##### Ninja Library - Texture Function

# njReleaseCacheTextureNumG

Releases cache memory

### FORMAT

`

  Sint32 njReleaseCacheTextureNumG( globalIndex )
  Uint32 globalIndex

`

### PARAMETER

  `globalIndex` | Global index number

### RETURN

  1 | Successful |
  -1 | Failure |

### DESCRIPTION

  Releases cache memory for globalIndex.

### EXAMPLE

      NJS_TEXNAME texname[2];
      NJS_TEXLIST texlist ={texname,2};
      /* Prepare to read in two textures */
      NJS_TEXMEMLIST texmemlist[2];
      Sint8 *texbuf;
      Sint8 *cachebuf;
      njInitTexture(texmemlist,2);
      texbuf = syMalloc(0x20800);
      njInitTextureBuffer(texbuf,0x20000);
      /* Set cache buffer 256x256x2bytex2=0x40000*/
      cachebuf = syMalloc(0x40000);
      njInitCacheTextureBuffer(cachebuf,0x40000);
      njSetTextureName(&texname[0],"file1.pvr",100,NJD_TEXATTR_TYPE_FILE|
          NJD_TEXTURE_CACHE|NJD_TEXATTR_GLOBALINDEX);
      njSetTextureName(&texname[1],"file2.pvr",200,NJD_TEXATTR_TYPE_FILE|
          NJD_TEXTURE_CACHE|NJD_TEXATTR_GLOBALINDEX);
      /* Load texture and read into cache */
      njLoadTexture(&texlist);
      syFree(texbuf);
      /* Set texlist as the current texture list */
      njSetTexture(&texlist);
      /* Read textures from cache into texture memory */
      njLoadCacheTextureNumG(100);
      njLoadCacheTextureNumG(200);
      /* Set current texture as global index #100 in texlist file1.pvr*/
      njSetTextureNumG(100);
          :
      /* lit. Drawing texture with texture in file1.pvr */
          :
      /* Release the global index #100 texture stored in cache */
      njReleaseCacheTextureNumG(100);

### NOTE

  The specified texture must be loaded into cache memory. Even if texture in cache memory is released, the one in texture memory will not be released.

### REFERENCE

  `njReleaseCacheTextureAll()
  `

njReleaseCacheTextureNumG

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999