struct GUIRenderElement

Contains information about a single renderable element within a GUIElement.

Public

Methods

GetVertexAndIndexData

u32 GetVertexAndIndexData(u32 vertexOffset, u32 indexOffset, const Vector2 &offset, const Area2 &clipRectangle, bool performClipping, DataRange &outPositions, DataRange &outUVs, DataRange &outIndices) const

Retrieves vertex and index data from the sprite render element and outputs them to the provided buffers.

vertexOffset
At which vertex should the method start writing to the output position/uv buffer.
indexOffset
At which index should the method start writing to the output index buffer.
offset
Offset that should be applied to all output vertex positions.
clipRectangle
Rectangle to clip the vertices to, if clipping is enabled.
performClipping
Should the vertices be clipped to the provided .
outPositions
Previously allocated buffer where to store the vertex positions. Caller must ensure size matches the vertex count.
outUVs
Previously allocated buffer where to store the vertex UVs. Caller must ensure size matches the vertex count.
outIndices
Previously allocated buffer where to store the indices. Caller must ensure size matches the index count.

Returns: Number of quads that were written.

Fields

Depth

u32 Depth

Offset

Vector2 Offset

Offset to apply to every vertex in the render element, relative to parent GUI element.

ClipRectangle

Area2 ClipRectangle

Area of the clip rectangle, relative to the parent GUI element.

Any vertices outside of this area will be clipped. Clipping is done before is applied.

UseNewFillBuffer

bool UseNewFillBuffer

IndexCount

u32 IndexCount

VertexCount

u32 VertexCount

VertexPositions

Vector2 * VertexPositions

VertexUVs

Vector2 * VertexUVs

Indices

u32 * Indices

MaterialInformation

SpriteMaterialInfo * MaterialInformation