njLoadCacheTextureNum | Japanese
    <-|INDEX|->
Loads a texture by texture number.

### FORMAT

      #include <Ninja.h>
      Sint32 njLoadCacheTextureNum(n);
      Uint32 n

### PARAMETERS

n
  texture number in current texture list

### RETURN VALUE

Successful
  1
Failed
  -1

### FUNCTION

- Loads a texture by texture number.

### EXAMPLE

      NJS_TEXNAME texname[2];

      NJS_TEXLIST texlist ={texname,2};

      /* Prepare to read in two textures  */
      NJS_TEXMEMLIST texmemlist[2];

      njInitTexture(texmemlist,2);

      njSetTextureName(&texname[0],"file1.pvr",0,NJD_TEXATTR_TYPE_FILE|
          				NJD_TEXATTR_TYPE_CACHE|NJD_TEXATTR_GLOBALINDEX);
      njSetTextureName(&texname[1],"file2.pvr",1,NJD_TEXATTR_TYPE_FILE|
          				NJD_TEXATTR_TYPE_CACHE|NJD_TEXATTR_GLOBALINDEX);

      /* Load texture and read into cache */
      njLoadTexture(&texlist);

      /* Set texlist as the current texture list */
      njSetTexture(&texlist);

      /* Read textures from cache into texture memory*/
      njLoadCacheTextureNum(0);
      njLoadCacheTextureNum(1);

      /* Set current texture as texture #0 in texlist file1.pvr*/
      njSetTextureNum(0);

                  :
      Drawing texture with texture in file1.pvr
                  :

      /* Release texture #0 in cache */
      njReleaseCacheTextureNum(0);

### NOTES

- Current texture list must be specified by njSetTexture.
- 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. Refer to Texture Guide for more details.

### RELATED TOPICS

  njLoadCacheTexture njLoadCacheTextureNumG

njLoadCacheTextureNum |
    <-|INDEX|->