Regular API function

simWriteTexture

Description Overwrites a specific texture (or a portion of it) with RGB data. See also simGetTextureId, simReadTexture and simCreateTexture.
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 number result=simWriteTexture(number textureId,number options,string textureData,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