Texture
This class is not intended to be used directly. Use one of the concrete texture types such as Texture2D, or derive your own texture class that implements the required interface.
Types
Texture::RowAlignment enum
Specifies the byte alignment of each row in source texture data.
Determines how pixel rows are aligned in memory when uploading texture data to the GPU. The alignment value must match the source image’s row stride to ensure correct decoding and avoid visual artifacts.
Textures generated through the asset builder pipeline are encoded as RGBA8 with 4-byte row alignment by default.
| Value | Description |
|---|---|
| OneByte | 1-byte alignment (tightly packed). |
| TwoBytes | 2-byte alignment. |
| FourBytes | 4-byte alignment (default). |
| EightBytes | 8-byte alignment |
Texture::Type enum
Enumerates all supported texture types.
| Value | Description |
|---|---|
| Texture2D | Two-dimensional texture. |
Properties
renderer_id unsigned int
Renderer-specific texture handle. Typically corresponds to the underlying graphics API object identifier, for example, an OpenGL texture ID.
unsigned int renderer_id {0};row_alignment RowAlignment
Current row alignment used when uploading texture data.
RowAlignment row_alignment {RowAlignment::FourBytes};Functions
Identifies the concrete texture type.
virtual Type Texture::GetType() const=0;