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