sim.writeTexture

Overwrites a specific texture (or a portion of it) with RGB data

Synopsis

sim.writeTexture(int textureId, int options, bytes textureData, int posX = 0, int posY = 0, int sizeX = 0, int sizeY = 0, float interpolation = 0) sim.writeTexture(int textureId, int options, buffer textureData, int posX = 0, int posY = 0, int sizeX = 0, int sizeY = 0, float interpolation = 0)

Arguments

  • textureId: ID of the texture. See also sim.getTextureId
  • 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: x/y position where to copy the RGB data. Set to 0/0 to overwrite the full texture
  • sizeX / sizeY: x/y size of the RGB data. Set to 0/0 to overwrite the full texture
  • interpolation: fade or interpolation factor. 0 for no fade


See also: