<viz>.addTexture

Adds a texture

 

<viz>.addTexture(
    fileName    
    type = viz.TEX_2D    
    useCache = False    

)

 

fileName

Name of texture file


type = viz.TEX_2D

viz.TEX_1D
viz.TEX_2D
viz.TEX_3D
viz.TEX_CUBE
viz.TEX_RECT


useCache = False

If True and a texture object has already been created from the same file, Vizard will return it.


Remarks

This command will attempt to create a texture object from the specified file. The texture can be applied to any node3d object.

Return Value

<multimedia:image> object.

Example

texture = viz.addTexture('somefile.jpg')

See also

<viz>.addBlankTexture
<viz>.addRenderTexture
<viz>.addTextureFromBuffer
<viz>.addVideo