SBTexture#
This class describes a texture that can be attached to a surface for rendering.
Textures in the Python API are represented by RGBA byte data together with their width and height, which makes them convenient for building or inspecting custom textured meshes.
- class samson.SBTexture(self: samson.SBTexture, width: int, height: int, textureData: list[int])#
Bases:
pybind11_objectThis class describes a texture.
Constructs a texture from RGBA byte data.
textureData must contain exactly 4 * width * height values.
- getTextureData(self: samson.SBTexture) list[int]#
Returns the texture data; size: 4 * width * height
- setTextureData(self: samson.SBTexture, data: list[int]) None#
Sets the texture data; size: 4 * width * height
- property height#
Texture height in pixels.
- property width#
Texture width in pixels.