
simReadTexture
Description
|
Retrieves the RGB data (or a portion of it) related to a specific texture. See also simGetTextureId, simWriteTexture and simCreateTexture.
|
C synopsis
|
simChar* simReadTexture(simInt textureId,simInt options,simInt posX,simInt posY,simInt sizeX,simInt sizeY)
|
C parameters |
options: reserved for future functionality. Set to zero.
posX / posY: the x/y position of the texture portion to retrieve. Set to 0/0 to retrieve the full texture
sizeX / sizeY: the x/y size of the texture portion to retrieve. Set to 0/0 to retrieve the full texture
|
C return value
|
The texture data, or NULL in case of an error. The texture data contains RGB values between 0-255 (3 bytes per pixel). The user is in charge of releasing the returned buffer with simReleaseBuffer.
|
Lua synopsis
|
string textureData=simReadTexture(number textureId,number options,number posX=0,number posY=0,number sizeX=0,number sizeY=0) |
Lua parameters |
Same as C-function
|
Lua return values
|
Same as C-function
|
All regular API functions on one page
|