njReLoadTextureNum | Japanese
    <-|INDEX|->
Reloads Textures

### FORMAT

      #include <Ninja.h>
      Sint32 njReLoadTextureNum( n, *texaddr, attr, lod);
      Uint32 n
      void *texaddr
      Uint32 attr
      Uint32 lod

### PARAMETERS

n
  texture number of the current texture list
*texaddr
  address for either a filename or a texture memory
attr
  texture attribute
lod
  mipmap level

### RETURN VALUE

Success
  1
Failure
  -1

### ERROR VALUE

  None

### FUNCTION

- Reloads texture to the texture number n of the current texture list.
- Textures that can be reloaded must be the same format and size as previously loaded. The reloading texture overwrites the previous texture.
- When loading textures from a file, specify NJD_TEXATTR_TYPE_FILE for attr. When loading textures from a memory, specify NJD_TEXATTR_TYPE_MEMORY for attr.

- Also, for mipmap textures, specifying lod allows reloading corresponding mipmap level.
  For example, setting 128 to lod will reload only 128x128 level mipmap textures.
- Specifying 0 to lod will reload all levels of mipmap textures.
- When loading from memory, it reloads from the address specified by texaddr to the level specified by lod.

### EXAMPLE

  Suppose
  - 256x256 mipmap is loaded as texture #0 in the current texture list,
  - 128x128 mipmap is loaded as texture #1 in the current texture list,
  - 256x128 rectangle texture is loaded as texture #2 in the current texture list.

      /*
        Change texture #0 texture, mipmap level 128x128 to file1.pvr.
        (Here, file1.pvr is 256x256 mipmap texture.)
      */
      njReLoadTextureNum(0,"file1.pvr",NJD_TEXATTR_TYPE_FILE,128);

      /*
        Reloads all the textures of texture #1.
        (Here, file2.pvr is 128x128 mipmap texture.)
      */
      njReLoadTextureNum(1,"file2.pvr",NJD_TEXATTR_TYPE_FILE,0);

      /*
        Reloads all the textures of texture #2.
        (Here file3.pvr is 256x128 rectangle texture.)
      */
      njReLoadTextureNum(2,"file3.pvr",NJD_TEXATTR_TYPE_FILE,0);

### NOTES

  - For memory textures, it specifies the beginning of texture specified by lod.
  - Please refer to texture documentation for more details.

### RELATED TOPICS

  njLoadTextureNum
  njLoadTextureNumG
  njReLoadTextureNumG

njReLoadTextureNum |
    <-|INDEX|->