Ninja Library - Texture Function

njLoadTextureYUV420NumG

Loads YUV420 data

FORMAT

Sint32 njLoadTextureYUV420NumG( globalIndex, *data )
Uint32 globalIndex
Uint32 *data

PARAMETER

 globalIndex  Global index number 
 *data  YUV420 data address 

RETURN

 1  Successful 
 -1  Failed 

DESCRIPTION

Loads YUV420 data.

For the global index number globalIndex 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,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

njSetSizeYUV420()
njLoadTextureYUV420Num()

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