VoltAir
|
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... | |
RenderableInterface * | callback = nullptr |
RenderableInterface queued for rendering. More... | |
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().
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().
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().
float RenderNode::zDepth = 0.0f |
Z-depth value used for sorting nodes in a RenderList.