Vizard 7 » Command Index » Vizard objects » texture » <texture>.getType
7.7

<texture>.getType

Returns the texture type

<texture>.getType()  

Remarks

This command will return the texture type (i.e. 1D, 2D, 3D, Rectangle, Cubemap).

Return Value

One of the following values:

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

Example

if tex.getType() == viz.TEX_CUBE:
    print('Texture is a cubemap')