Ninja Library - Texture Function

njLoadTextureYUV420Num

Loads YUV420 data

FORMAT

Sint32 njLoadTextureYUV420Num( n, *data )
Uint32 n
Uint32 *data

PARAMETER

 n  Texture number of current texture list 
 *data  YUV420 data address 

RETURN

 1  Successful 
 -1  Failed 

DESCRIPTION

Loads YUV420 data.

For the texture number n texture "YUV422Rectangle format" and the "YUV422Stride format" texture parts, use the YUV converter hardware to convert the YUV420 format data to YUV422 format to load. When opening the "YUV422Stride format" part, use the njSetSizeYUV420() function and specify the YUV420 data size.


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,0,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);
njLoadTextureYUV420Num(0,yuvbuffer);

REFERENCE

njSetSizeYUV420()
njLoadTextureYUV420NumG()

njLoadTextureYUV420Num
COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999