nWidth | YUV420 data width size |
nHeight | YUV420 data height size |
njLoadTextureYUV420Num()
njLoadTextureYUV420NumG()
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);