C4 Engine
C4 Engine API Documentation

class Renderable

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

class Renderable : public Drawable, 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::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::InvalidatePipelineData Invalidates the pipeline data for all drawables belonging to a renderable object.
Constructor

Renderable(RenderType type, uint32 state = 0);

Parameters
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.
Description
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.
kRenderPointList A set of n points to be amplified in a geometry shader.
kRenderLineList A set of n / 2 unconnected line segments.
kRenderLineStrip A set of n − 1 connected line segments.
kRenderLineListIndex16 A set of line segments with 16-bit indexed vertices.
kRenderTriangleList A set of n / 3 unconnected triangles.
kRenderTriangleStrip A set of n − 2 triangles connected as a strip.
kRenderTriangleListIndex16 A set of triangles with 16-bit indexed vertices.
kRenderTriangleListIndex32 A set of triangles with 32-bit indexed vertices.
kRenderQuadList 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.
kRenderLinePolygon Render edges instead of filled polygons.
kRenderRectPolygon Render filled rectangles instead of polygons.
Base Classes
Drawable A Renderable object contains a Drawable base object.
ListElement<Renderable> Renderable objects are stored in a list that is passed to the GraphicsMgr::Draw function.