Re: listing textures

New Message Reply Date view Thread view Subject view Author view

Marcus Barnes (marcus++at++multigen.com)
Wed, 9 Oct 1996 13:03:52 -0700


On Oct 9, 10:28am, Jude Anthony wrote:
> Subject: listing textures
> I've been trying to clean out my texture directories for a while now.
> I'd like to be able to list all the textures used in a particular
> .flt file to standard output (or maybe to a file).

Since you're using the OpenFlight loader, you can ask it for its shared
palette.
Among other things, the palette contains a list of all the textures from all
the .flt files that it has loaded.

#include <pfflt.h>

{
    pfdLoadFile( "file.flt" );

    fltSharedPalette* pal = fltGetCurSharedPalette();

    for ( int which = 0; which < pfGetNum( pal->texList ); which ++ )
    {
        fltSharedObj* obj = pfGet( pal->texList, which );
        pfTexture* tex = ( pfTexture* ) obj->object;
        // do something with tex
    }
}

Regards.

--
   ____ ___  ____  _    Marcus Barnes, Member Technical Staff
  / __ `__ \/ __ `( )   MultiGen Inc. 550 S. Winchester Blvd. STE 500
 / / / / / / /_/ / /    San Jose CA 95128 WEB: http://www.multigen.com
/_/ /_/ /_/\__, /_/     PH:1-408-556-2654 FX:1-408-261-4102
          /____/        EMAIL: marcus++at++multigen.com
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:45 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.