njRenderTextureNum | Japanese
    <-|INDEX|->
Renders Texture Area

### FORMAT

      #include <Ninja.h>
      void njRenderTextureNum(n);
      Uint32 n

### PARAMETERS

n
  texture number in the current texture list

### RETURN VALUE

  None

### ERROR VALUE

  None

### FUNCTION

- Renders to the number n texture of the current texture list.
- Textures that can render are either NJD_TEXFMT_RECTANGLE or NJD_TEXFMT_STRIDE.
- If texture area is smaller than the screen, it adjusts to the upper left and performs rendering.
- Stride value must be set by njSetRenderWidth if NJD_TEXFMT_STRIDE
- Normally, the stride value is the same as rendering area width.

### EXAMPLE

      void njUserInit(void)
      {

        /* When render texture is used, set njInitSystem frame buffer color mode
           with the texture color mode used for render texture.
        */
        njInitSystem( NJD_RESOLUTION_VGA, NJD_FRAMEBUFFER_MODE_RGB565, 1 );

            :

        /* Reserve texture memory area with dummy  */
        buff = njMalloc(512*512*2);
        /* Set color the same as the frame buffer color, and size to 512x512 */
        njSetTextureInfo(&info,buff,NJD_TEXFMT_RECTANGLE|NJD_TEXFMT_RGB_565,512,512);
        njSetTextureName(&texname[0],&info,0,NJD_TEXATTR_TYPE_MEMORY|
                                  NJD_TEXATTR_GLOBALINDEX);

        njInitTexture( tex, 100 );
        njLoadTexture(&texlist);

        /* Reserved dummy area can be released after the njLoadTexture function  */
        njFree(buff);
      }

      Sint32 njUserMain(void)
      {
            :

        /* Draw models etc. */
        njDrawObject( OBJECT );

            :

        njSetTexture(&texlist);
        /* Renders to the texture number 0. */
        njRenderTextureNum(0);

        /* Draw using rendered textures. */
        njDrawTexture( poly, 4, 0,TRUE);

          :
      }

### NOTES

- Rendering to texture area means that it is totally two times to perform rendering in addtion to normal rendering to the frame buffer.
- Refer to texture document for more details.

### RELATED TOPICS

  njRenderTextureNumG

njRenderTextureNum |
    <-|INDEX|->