VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Classes | Public Member Functions | List of all members

List of RenderNodes, sorted by z-depth for rendering. More...

Public Member Functions

 RenderList ()
 Construct an empty RenderList. More...
 
void addNode (RenderNode *node)
 Add a RenderNode to this RenderList. More...
 
void reset ()
 Clear this RenderList. More...
 
void render ()
 Draw RenderNodes in sorted order, with larger z-depths appearing on top. More...
 

Detailed Description

List of RenderNodes, sorted by z-depth for rendering.

RenderNodes describe parts of the scene that need to perform rendering. This container class stores and sorts them. Currently this list does not support complex mutation operations so its list is intended to be rebuilt every frame.

Once RenderNodes are added to the list, a call to render() will render these nodes in sorted order through a call to RenderNode::render(). RenderNodes with larger RenderNode::zDepth values are drawn after those with lower z-depths, resulting in them appearing on top.

Constructor & Destructor Documentation

RenderList::RenderList ( )

Construct an empty RenderList.

Member Function Documentation

void RenderList::addNode ( RenderNode node)

Add a RenderNode to this RenderList.

Parameters
nodeRenderNode to add
void RenderList::render ( )

Draw RenderNodes in sorted order, with larger z-depths appearing on top.

Note
It is expected that a valid Renderer be set as current using Renderer::attachAsCurrent().
void RenderList::reset ( )

Clear this RenderList.