NJS_TEXNAME texname[2];
NJS_TEXLIST texlist ={texname,2};
/* Prepare to read two textures in */
NJS_TEXMEMLIST texmemlist[2];
njInitTexture(texmemlist,2);
/* Specify to read file into cache */
njSetTextureName(&texname[0],"file1.pvr",0,NJD_TEXATTR_TYPE_FILE|
NJD_TEXATTR_TYPE_CACHE|NJD_TEXATTR_GLOBALINDEX);
/* Specify to read file into cache */
njSetTextureName(&texname[1],"file2.pvr",1,NJD_TEXATTR_TYPE_FILE|
NJD_TEXATTR_TYPE_CACHE|NJD_TEXATTR_GLOBALINDEX);
/* Load texture into cache */
njLoadTexture(&texlist);
/* Set texlist as the current texture */
njSetTexture(&texlist);
/* Read texture from cache into texture memory*/
njLoadCacheTexture(&texlist);
/* Set current texture as texlist #0 file1.pvr*/
njSetTextureNum(0);
:
Drawing textures
: