##### Ninja Library - Texture Function

# njSetSizeYUV420

Specifying YUV420 data size

### FORMAT

`

  void njSetSizeYUV420( nWidth, nHeight )
  Uint32 nWidth
  Uint32 nHeight

`

### PARAMETER

  `nWidth` | YUV420 data width size
  `nHeight` | YUV420 data height size

### RETURN

  None

### DESCRIPTION

  Specifies the width and height of YUV420 data. Make sure to set this for the texture specified using NJD_SURFACEFLAGS_STRIDE when loading YUV420 data using

  njLoadTextureYUV420Num()
  njLoadTextureYUV420NumG()

### EXAMPLE

      The following loads 320x240 YUV420 data.
      /*
      	When reserving parts as 512x256 YUV422 Stride texture format,
      	specify an address that the parameter written to the yuvbuffer can refer to.
      	(Writing in the manner of (Uint8*)0x8c010000 is acceptable)
      	Only NJD_TEXFMT_STRIDE or NJD_TEXFMT_RECTANGLE can be specified in the case of YUV420.
      */
      njSetTextureInfo(&info,yuvbuffer,NJD_TEXFMT_YUV_422|NJD_TEXFMT_STRIDE,512,256);
      njSetTextureName(&texname[0],&info,555,NJD_TEXATTR_TYPE_MEMORY|NJD_TEXATTR_GLOBALINDEX);
      /* Reserve area in texture memory by loading texture */
      njLoadTexture(&texlist);
      /* Set the current texture list */
      njSetTexture(&texlist);
      /* Set the YUV420 size */
      njSetSizeYUV420(320,240);
      njLoadTextureYUV420NumG(555,yuvbuffer);

### REFERENCE

  `njLoadTextureYUV420Num()
  njLoadTextureYUV420NumG()
  `

njSetSizeYUV420

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999