Ninja Library - Texture Function

njReleaseTextureNumG

Releases texture memory

FORMAT

Sint32 njReleaseTextureNumG( globalIndex )
Uint32 globalIndex

PARAMETER

 globalIndex  Global index number 

RETURN

 1  Successful 
 -1  Failure 

DESCRIPTION

Releases texture specified by globalIndex in the current texture list from texture memory.

EXAMPLE

NJS_TEXNAME texname[2];
NJS_TEXLIST texlist ={texname,2};
/* Prepare to read in two textures */
NJS_TEXMEMLIST texmemlist[2];
Sint8 *texbuf;
njInitTexture(texmemlist,2);
texbuf = syMalloc(0x20800);
njInitTextureBuffer(texbuf,0x20000);
njSetTextureName(&texname[0],"file1.pvr",100,NJD_TEXATTR_TYPE_FILE|
      NJD_TEXATTR_GLOBALINDEX);
njSetTextureName(&texname[1],"file2.pvr",200,NJD_TEXATTR_TYPE_FILE|
      NJD_TEXATTR_GLOBALINDEX);
/* Load texture */
njLoadTexture(&texlist);
syFree(texbuf);
/* Set current texture list*/
njSetTexture(&texlist);
/* Release the global index #100 texture in the texlist file1.pvr */
njReleaseTextureNumG(100);

NOTE

If the texture is registered in another texture list, the texture will not be released from texture memory unless all other occupying lists release the texture.

** Same textures in global index are defined identical.

Refer to texture document for more details.


REFERENCE

njReleaseTextureAll()
njReleaseTexture()
njReleaseTextureNum()

njReleaseTextureNumG
COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999