*texlist | pointer to NJS_TEXLIST structure |
1 | Successful | |
-1 | Failed |
Specify member "textures" which indicates the pointer to NJS_TEXLIST structure setting each texture information and member " nbTexture" which indicates number of textures.
Texture information needs to be set in NJS_TEXNAME structure for numbers of required texture.
For details, refer to texture document.
NJS_TEXNAME texname[2]; NJS_TEXLIST texlist ={texname,2}; /* Prepare to read in two textures */ NJS_TEXMEMLIST texmemlist[2]; Sint8 *texbuf; njInitTexture(texmemlist,2); texbuf = syMalloc(0x20800); njInitTextureBuffer(texbuf,0x20000); /* Set the two textures */ njSetTextureName(&texname[0],"file1.pvr",0,NJD_TEXATTR_TYPE_FILE| NJD_TEXATTR_GLOBALINDEX); njSetTextureName(&texname[1],"file2.pvr",1,NJD_TEXATTR_TYPE_FILE| NJD_TEXATTR_GLOBALINDEX); /* Load texture */ njLoadTexture(&texlist); syFree(texbuf); /* Set texlist as the current texture list */ njSetTexture(&texlist); /* Set current texture to texlist #0 */ njSetTextureNum(0);