Vizard 8 » Command Index » Vizard modules » viz » <viz>.addBlankTexture
8.0

<viz>.addBlankTexture

Add a blank texture

<viz>.addBlankTexture(  
size  
type = viz.TEX_2D  
format = viz.TEX_RGB  
)  
size
A list specifying the dimensions of the texture.

viz.TEX_1D only requires a single dimension, [width].

viz.TEX_2D, viz.TEX_RECT, and viz.TEX_CUBE require 2 dimensions, [width,height].

viz.TEX_3D requires 3 dimensions, [width,height,depth].
type = viz.TEX_2D
The texture type. Can be one of the following:

viz.TEX_1D
viz.TEX_2D
viz.TEX_3D
viz.TEX_CUBE
viz.TEX_RECT
format = viz.TEX_RGB
Texture format. Can be one of the following:

viz.TEX_RGB
viz.TEX_RGBA
viz.TEX_BGR
viz.TEX_BGRA
viz.TEX_RGB_16
viz.TEX_RGBA_16
viz.TEX_RGB_32
viz.TEX_RGBA_32
viz.TEX_LUMINANCE
viz.TEX_ALPHA
viz.TEX_LUMINANCE_ALPHA

Remarks

This command will create a blank texture that can be used for manual modifications. Unlike <viz>.addRenderTexture, this command will allocate image memory so the <texture>.getImageData command will return valid data. The pixel values are all initialized to 0 (black).

Return Value

<texture> object

See also

<viz>.addRenderTexture
<viz>.addTexture
<viz>.addTextureFromBuffer
<viz>.addVideo