Add a texture from a memory buffer
| <viz>.addTextureFromBuffer( | |
| filename | |
| buffer | |
| type = viz.TEX_2D |
)
filename
Filename associated with the buffer. The extension of the filename will tell Vizard what image format the buffer provides (jpg, gif, bmp, etc..)
buffer
Buffer containing the image file data or one of the following buffer flags:
Buffer flags |
|
viz.BUFFER_MMAP |
Load buffer through a memory mapped file. This can be used in cluster mode to have the master transfer the file contents to the clients at runtime. |
type = viz.TEX_2D
viz.TEX_1D
viz.TEX_2D
viz.TEX_3D
viz.TEX_CUBE
viz.TEX_RECT
This command will load a texture using data from memory, instead of a file. The filename must contain the same extension as the format the buffer represents.
<multimedia:image> object
<viz>.addTexture
<viz>.addBlankTexture
<viz>.addRenderTexture
<viz>.addVideo