njSetTextureName | Japanese
    <-|INDEX|->
Set data into texture name structure

### FORMAT

      #include <Ninja.h>
      void  njSetTextureName(*texname, *addr, globalIndex, attr)
      NJS_TEXNAME *texname
      void   *addr
      Uint32 globalIndex
      Uint32 attr

### PARAMETERS

*texname
  NJS_TEXNAME structure pointer
*addr
  file name or NJS_TEXINFO structure pointer
globalIndex
  global index
attr
  texture attribute

### RETURN VALUE

  None

### FUNCTION

- Set filename to addr when loading textures from a file.
- NJD_TEXATTR_TYPE_FILE should be specified to attr.
- With PVR format textures, if global index is not used for the textures, set NJD_TEXATTR_GLOBALINDEX to attr and global index to globalIndex.
- For memory texture, set NJS_TEXINFO structure pointer that is set by njSetTextureInfo to addr.
- Also, set NJD_TEXATTR_TYPE_MEMORY to attr, and global index to globalIndex.

### EXAMPLE

      NJS_TEXNAME texname[2];

      NJS_TEXLIST texlist ={texname,2};

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

      njInitTexture(texmemlist,2);

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

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

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

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

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

              :
      /* Omitted texture drawing. Drawing with texture file1.pvr */
              :

### NOTES

- The global index set here is once stored to texaddr in NJS_TEXNAME structure and passed to NJS_MEMLIST structure globalIndex when loading textures.
- At that time texaddr is overwritten.
- So you'll need to set it again if you load textures, release them and reload them.
- Refer to Texture Guide for more information.

### RELATED TOPICS

  njSetTextureInfo

njSetTextureName |
    <-|INDEX|->