RenderWare::CompiledState struct

This structure contains properties that tells the renderer how to draw a certain object.

This is often called "materials" in other games, as this decides the shader and some of its parameters, the textures that will be used, etc.

Public types

enum class Flags: uint32_t { UseTransform = 0x01, UseTransformObject = 0x02, UseShaderConstants = 0x08, UseMaterialColor = 0x10, UseAmbientColor = 0x20, UseVertexDescription = 0x100000, UseBooleans = 0x8000 }
enum class Flags3: uint32_t { UseTextureSlots = 0xDFFFF, UseRenderStates = 0x20000 }

Public static variables

static const uint32_t RW_TYPE

Public functions

auto Load() -> void
Sends the data of this compiled state into the renderer's active material state.
auto GetRaster(size_t nSlotIndex) -> Raster*
auto SetRaster(size_t nSlotIndex, Raster* pRaster) -> void
auto SetTransform(const Math::Matrix4& matrix, Graphics::GlobalState::MatrixType type = Graphics::GlobalState::MATRIXTYPE_ORTHOGONAL) -> bool
Sets the matrix transform, only if it is enabled for this compiled state.
auto GetData() -> char*

Public variables

int instancedSize
int primitiveType
int softStateDirty
int softStateDelta
int hardStateDirty
int hardStateDelta
Graphics::MaterialShader* shader

Function documentation

bool RenderWare::CompiledState::SetTransform(const Math::Matrix4& matrix, Graphics::GlobalState::MatrixType type = Graphics::GlobalState::MATRIXTYPE_ORTHOGONAL)

Sets the matrix transform, only if it is enabled for this compiled state.

Returns false if it wasn't enabled.