Don Burns (don_burns++at++peru.engr.sgi.com)
Mon, 26 Apr 1999 11:47:54 -0700 (PDT)
Sorry for the delay in responding to this. Hope the response is still
relevant.
> Does pfuTextureManager work for:
> 1) Cliptextures
No it does not. pfuTextureManager manages lists of pfTextures and does not
have any notion of a ClipTexture.
> 2) Textures not applied by the texture manager, but made known by
> pfuTextureManager->AddTexList? (spelling / capitalization may be wrong)
By definition, texture not applied will not be resident in texture memory
(unless by accident - see note in pfuTextureManager man page referring to the
use of default textures).
> > I am trying to get an inventory of what is in texture memory. This seems to
> > be a lot harder than it should be. All calls to pfuTextureManager show 0 or
> > 64MB.
This is a bit confusing to me as I just tested this and it seemed to work fine.
Perhaps there is something that is not understood in the usage.
Apply the following exercise. Copy the
/usr/share/Performer/src/pguide/libpfutil directory somewhere and make texman.
Run with :
% setenv PFPATH /usr/share/Performer/data
% texman /usr/share/Performer/data/*.sv
The 'm' key will print a report of resident and non-resident textures that the
texture manager is managing. It also includes a total byte count and
percentage of texture memory used. The 'k' key will cycle through the various
models.
If you want to query these values directly, change lines reading:
if( shared->reportLevel )
{
printf( "\033[0;0H PrintLevel %d\n\n", shared->reportLevel );
shared->texMan->Print( shared->reportLevel );
}
to:
if( shared->reportLevel )
{
printf( "\033[0;0H PrintLevel %d\n\n", shared->reportLevel );
//shared->texMan->Print( shared->reportLevel );
printf( "Texture Memory available : %d bytes\n",
shared->texMan->getTextureMemoryAvailable() );
printf( "Texture Memory used : %d bytes\n",
shared->texMan->getTextureMemoryUsed() );
printf( "Texture Memory used : %8.4f %%\n",
shared->texMan->getTextureMemoryUsedPercent() );
}
The expected values should print.
Barring all of that, if you just want to know if a texture is resident, just
call
pfTexture->isLoaded().
-don
This archive was generated by hypermail 2.0b2 on Mon Apr 26 1999 - 11:48:29 PDT