texturelist

 Function Name  Parameter  Return  Explain
addTexture string filename number texid Load specified image file to the texture list of scene.
Return the texture id. If load file failed, create a NULL texture. If the image file already loaded, increment the reference count of the texture.
addBumpTexture  

string filename

 

number texid Load specified image file to the texture list as bump texture.
addCubeTexture  

string filename

 

number texid Load specified image file to the texture list as cube texture.
addVolumeTexture  

string filename

 

number texid Load specified image file to the texture list as volume texture.
addVideoTexture  

string filename

 

number texid Load specified image file to the texture list as video texture.
addRenderTexture  

string filename
[ ,dword style [,number sizescale=1]  ]

 

number texid Load specified image file to the texture list as render texture.
You can create back buffer aligned texture by TS_BB_ALIGNED  style, the texture size = back buffer size / sizescale .
addRenderTexture64  

string filename
[ ,dword style [,number sizescale=1]  ]

 

number texid Load specified image file to the texture list as 64-bit render texture.
You can create back buffer aligned texture by TS_BB_ALIGNED  style, the texture size = back buffer size / sizescale .
addCubeRenderTexture  

string filename

 

number texid Load specified image file to the texture list as cube render texture.
addCubeRenderTexture64  

string filename

 

number texid Load specified image file to the texture list as 64-bit cube render texture.
removeTexture number texid number Decrements the reference count on the texture; if the count reach zero, delete the texture.

Return Values

-1 : can not find the specified texture
0
: found the texture, but the reference count not reach zero
1 : delete the texture successfully

replaceTexture number texid
string filename
boolean Replace the texture use the specified image file. If success, return true, otherwise return false.
getTextureFileName number texid string filename Retrieve the image file name for specified texture id
getTextureID string filename number texid Retrieve the texture id for specified image file name
getTextureSurface number texid, [ number SurfIdx ] d3dsurface surf Retrieve the d3d surface of the specified texture; The SurfIdx indicates 0 based surface index; if the SurfIdx is absent, retrieve the first surface. Return nil if failed.
clearAll None None Clear all textures of the texture list

Styles List:

TS_BB_ALIGNED  --back buffer size aligned