Regular API function
simReadTexture / sim.readTexture
Description
|
Retrieves the RGB data (or a portion of it) related to a specific texture. See also sim.getTextureId, sim.writeTexture and sim.createTexture.
|
C/C++ synopsis
|
simChar* simReadTexture(simInt textureId,simInt options,simInt posX,simInt posY,simInt sizeX,simInt sizeY)
|
C/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/C++ return value
|
The texture data, or nullptr 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
|
buffer textureData=sim.readTexture(int textureId,int options,int posX=0,int posY=0,int sizeX=0,int sizeY=0) |
Lua parameters |
Similar to the C-function counterpart
|
Lua return values
|
Similar to the C-function counterpart
|
Python synopsis |
bytes textureData=sim.readTexture(int textureId,int options,int posX=0,int posY=0,int sizeX=0,int sizeY=0) |
|