Facebook Twitter YouTube

class Renderable

Defined in:  TSRenderable.h
The Renderable class stores general rendering information for a renderable object.

class Renderable : public ListElement<Renderable>

Member Functions
Renderable::GetRenderType Returns the primitive render type.
Renderable::SetRenderType Sets the primitive render type.
Renderable::GetRenderState Returns the render state flags that pertain to rendering.
Renderable::SetRenderState Sets the render state flags that pertain to rendering.
Renderable::GetRenderableFlags Returns the miscellaneous renderable flags.
Renderable::SetRenderableFlags Sets the miscellaneous renderable flags.
Renderable::GetAmbientBlendState Returns the ambient pass blend state.
Renderable::SetAmbientBlendState Sets the ambient pass blend state.
Renderable::GetDepthOffsetDelta Returns the depth offset delta value.
Renderable::GetDepthOffsetPoint Returns the depth offset center point.
Renderable::SetDepthOffset Sets the depth offset parameters.
Renderable::GetTransformable Returns a pointer to the Transformable object.
Renderable::SetTransformable Sets a pointer to the Transformable object.
Renderable::GetTransparentAttachment Returns the transparent attachment.
Renderable::SetTransparentAttachment Sets the transparent attachment.
Renderable::GetTransparentPosition Returns the transparent position pointer.
Renderable::SetTransparentPosition Sets the transparent position pointer.
Renderable::SetVertexBuffer Assigns a vertex buffer to a renderable.
Renderable::SetVertexBufferArrayFlags Sets the vertex buffer array flags.
Renderable::SetVertexAttributeArray Sets the offset and size of a vertex attribute array.
Renderable::GetVertexCount Returns the vertex count.
Renderable::SetVertexCount Sets the vertex count.
Renderable::GetVertexAttributeComponentCount Returns the number of components used by one of the vertex attribute arrays.
Renderable::GetPrimitiveCount Returns the primitive count.
Renderable::SetPrimitiveCount Sets the primitive count.
Renderable::SetPrimitiveIndexOffset Sets the offset of the primitive index array.
Renderable::GetOcclusionQuery Returns the pointer to an occlusion query object.
Renderable::SetOcclusionQuery Sets the pointer to an occlusion query object.
Renderable::GetFirstRenderSegment Returns the first render segment belonging to a renderable object.
Renderable::InvalidateShaderData Invalidates the shader data for all render segments belonging to a renderable object.

Renderable(RenderType type, unsigned_int32 state = 0);

type The primitive type of the renderable object. See below for possible values.
state Flags that determine various render states to be applied. See below for possible values.
The Renderable class stores general rendering information about a single renderable object. The use of the Renderable class is the sole means by which an object can be rendered by the Graphics Manager. Objects are rendered by storing their associated Renderable objects (which may be base classes of more specialized structures) in a list and passing the list to the GraphicsMgr::Draw function.

The type parameter passed to the constructor specifies the rendering primitive used by the object and may be any one of the following constants, where n represents the number of vertices.
kRenderPointSprites A set of n point sprites.
kRenderPoints A set of n points to be amplified in a geometry shader.
kRenderLines A set of n / 2 unconnected line segments.
kRenderLineStrip A set of n − 1 connected line segments.
kRenderIndexedLines A set of line segments with indexed vertices.
kRenderTriangles A set of n / 3 unconnected triangles.
kRenderTriangleStrip A set of n − 2 triangles connected as a strip.
kRenderIndexedTriangles A set of triangles with indexed vertices.
kRenderQuads A set of n / 4 unconnected quads.
When an object is rendered, the current light determines how the object is shaded. The state parameter specifies light-independent rendering state and may be any combination of the following bit flags.
kRenderDepthTest The depth test is enabled. If the depth test is disabled, then depth is also not written.
kRenderColorInhibit Writes to the color buffer are disabled.
kRenderDepthInhibit Writes to the depth buffer are disabled.
kRenderDepthOffset Apply depth offset in the projection matrix. See the Renderable::SetDepthOffset function.
kRenderPolygonOffset Apply minimal viewport-space polygon offset using the graphics hardware.
kRenderClippingPlanes A set of four user clipping planes is applied.
kRenderWireframe Render wireframe instead of filled polygons.
Base Classes
ListElement<Renderable> Renderable objects are stored in a list that is passed to the GraphicsMgr::Draw function.