njSetTextureNumG | Japanese
    <-|INDEX|->
Sets the current texture to a global index number.

### FORMAT

      #include <Ninja.h>
      Sint32 njSetTextureNumG(globalIndex);
      Uint32 globalIndex

### PARAMETERS

globalIndex
  global index number

### RETURN VALUE

Successful
  1
Failed
  -1

### FUNCTION

- Sets the texture identified by global index number globalIndex as the current texture. ‚Subsequently, this remains the current texture until execution of njSetTextureNum or njSetTextureNumG.

### EXAMPLE

      NJS_TEXNAME texname[2];
      NJS_TEXNAME texname2[2];

      NJS_TEXLIST texlist ={texname,2};
      NJS_TEXLIST texlist ={texname2,2};

      /* Prepare to read in textures for four */
      NJS_TEXMEMLIST texmemlist[4];

      njInitTexture(texmemlist,4);

      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 );

      njSetTextureName(&texname2[0],
                      "file3.pvr",300,
                       NJD_TEXATTR_TYPE_FILE |
                       NJD_TEXATTR_GLOBALINDEX );

      njSetTextureName(&texname2[1],
                      "file4.pvr",400,
                      NJD_TEXATTR_TYPE_FILE |
                      NJD_TEXATTR_GLOBALINDEX );

      /* Load texture */
      njLoadTexture(&texlist);

      /* Load texture */
      njLoadTexture(&texlist2);

      /* Set global index #100 texture
       * as the current texture file1.pvr
       */
      njSetTextureNumG(100);

              :
      Drawing textures (using file1.pvr textures.)
              :

      /* Set the 3rd texture in global index
       * as the current texture file4.pvr
       */
      njSetTextureNumG(400);

              :
      Drawing textures (using file4.pvr textures.)
              :

### NOTES

- Specified texture must be located in textue memory.
- Refer to Texture Guide for more details.

### RELATED TOPICS

  njSetTexture
  njSetTextureNum

njSetTextureNumG |
    <-|INDEX|->