Regular API function

simWriteTexture / sim.writeTexture

Description Overwrites a specific texture (or a portion of it) with RGB data. See also sim.getTextureId, sim.readTexture and sim.createTexture.
C synopsis simInt simWriteTexture(simInt textureId,simInt options,const simChar* textureData,simInt posX,simInt posY,simInt sizeX,simInt sizeY,simFloat interpolation)
C parameters
textureId: the ID of the texture. See also simGetTextureId.
options: bit-coded:
bit0 reserved. Do not set.
bit1 reserved. Do not set.
bit2 set (4)=only an elliptical/circular portion of the texture data will be written.
textureData: RGB data to write onto the texture. Each pixel is represented with 3 bytes (0-255).
posX / posY: the x/y position where to copy the RGB data. Set to 0/0 to overwrite the full texture
sizeX / sizeY: the x/y size of the RGB data. Set to 0/0 to overwrite the full texture
interpolation: the fade or interpolation factor. 0 for no fade.
C return value
-1 in case of an error.
Lua synopsis sim.writeTexture(int textureId,int options,string textureData,int posX=0,int posY=0,int sizeX=0,int sizeY=0)
Lua parameters
Similar to the C-function counterpart
Lua return values