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

Node which queues a callback (RenderableInterface) or MeshInstance for rendering. More...

Public Member Functions

void render ()
 Renders the queued callback or MeshInstance. More...
 

Public Attributes

float zDepth = 0.0f
 Z-depth value used for sorting nodes in a RenderList. More...
 
ShaderPtr shader
 Shader to draw mesh with, if set. More...
 
MeshInstancePtr mesh
 MeshInstance to queue for rendering. More...
 
RenderableInterfacecallback = nullptr
 RenderableInterface queued for rendering. More...
 

Detailed Description

Node which queues a callback (RenderableInterface) or MeshInstance for rendering.

RenderNodes are added to a RenderList, which stores and sorts nodes by zDepth. To queue a callback, set callback to non-null. To queue a MeshInstance, set shader and mesh to non-null. A queued MeshInstance and Shader will be rendered through a call to Renderer::drawMesh().

Member Function Documentation

void RenderNode::render ( )

Renders the queued callback or MeshInstance.

This method is called by RenderList. To render MeshInstances with this method correctly, a valid Renderer should be set as current using Renderer::attachAsCurrent().

Member Data Documentation

RenderableInterface* RenderNode::callback = nullptr

RenderableInterface queued for rendering.

The queued callback will be fired by a call to render().

MeshInstancePtr RenderNode::mesh

MeshInstance to queue for rendering.

If both shader and mesh are set, they will be rendered through a call to Renderer::drawMesh() by render().

ShaderPtr RenderNode::shader

Shader to draw mesh with, if set.

float RenderNode::zDepth = 0.0f

Z-depth value used for sorting nodes in a RenderList.