xoreos  0.0.5
Classes | Public Member Functions | Private Attributes | List of all members
Graphics::Render::RenderQueue Class Reference

#include <renderqueue.h>

Collaboration diagram for Graphics::Render::RenderQueue:
Collaboration graph
[legend]

Classes

struct  RenderQueueNode
 

Public Member Functions

 RenderQueue (uint32 precache=1000)
 
 ~RenderQueue ()
 
void setCameraReference (const glm::vec3 &reference)
 
void queueItem (Shader::ShaderProgram *program, Shader::ShaderSurface *surface, Shader::ShaderMaterial *material, Mesh::Mesh *mesh, const glm::mat4 *transform, float alpha)
 
void queueItem (Shader::ShaderRenderable *renderable, const glm::mat4 *transform, float alpha)
 
void sortShader ()
 Sort queue elements by shader program. More...
 
void sortDepth ()
 Sort queue elements by depth. More...
 
void render ()
 Render all queued items. More...
 
void clear ()
 Clear the queue of all items. More...
 

Private Attributes

std::vector< RenderQueueNode_nodeArray
 
glm::vec3 _cameraReference
 

Detailed Description

Definition at line 40 of file renderqueue.h.

Constructor & Destructor Documentation

◆ RenderQueue()

Graphics::Render::RenderQueue::RenderQueue ( uint32  precache = 1000)

Definition at line 58 of file renderqueue.cpp.

◆ ~RenderQueue()

Graphics::Render::RenderQueue::~RenderQueue ( )

Definition at line 62 of file renderqueue.cpp.

References _nodeArray.

Member Function Documentation

◆ clear()

void Graphics::Render::RenderQueue::clear ( )

Clear the queue of all items.

Definition at line 190 of file renderqueue.cpp.

References _nodeArray.

Referenced by Graphics::Render::RenderManager::clear().

Here is the caller graph for this function:

◆ queueItem() [1/2]

void Graphics::Render::RenderQueue::queueItem ( Shader::ShaderProgram program,
Shader::ShaderSurface surface,
Shader::ShaderMaterial material,
Mesh::Mesh mesh,
const glm::mat4 *  transform,
float  alpha 
)

Definition at line 71 of file renderqueue.cpp.

References _cameraReference, _nodeArray, Graphics::Mesh::Mesh::getCentre(), and Graphics::Shader::ShaderProgram::glid.

Referenced by Graphics::Render::RenderManager::queueRenderable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ queueItem() [2/2]

void Graphics::Render::RenderQueue::queueItem ( Shader::ShaderRenderable renderable,
const glm::mat4 *  transform,
float  alpha 
)

◆ render()

void Graphics::Render::RenderQueue::render ( )

◆ setCameraReference()

void Graphics::Render::RenderQueue::setCameraReference ( const glm::vec3 &  reference)

Definition at line 67 of file renderqueue.cpp.

References _cameraReference.

Referenced by Graphics::Render::RenderManager::setCameraReference().

Here is the caller graph for this function:

◆ sortDepth()

void Graphics::Render::RenderQueue::sortDepth ( )

Sort queue elements by depth.

Definition at line 98 of file renderqueue.cpp.

References _nodeArray, and Graphics::Render::compareDepth().

Referenced by Graphics::Render::RenderManager::sort().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sortShader()

void Graphics::Render::RenderQueue::sortShader ( )

Sort queue elements by shader program.

Definition at line 92 of file renderqueue.cpp.

References _nodeArray, and Graphics::Render::compareShader().

Referenced by Graphics::Render::RenderManager::sort().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _cameraReference

glm::vec3 Graphics::Render::RenderQueue::_cameraReference
private

Definition at line 76 of file renderqueue.h.

Referenced by queueItem(), and setCameraReference().

◆ _nodeArray

std::vector<RenderQueueNode> Graphics::Render::RenderQueue::_nodeArray
private

Definition at line 75 of file renderqueue.h.

Referenced by clear(), queueItem(), render(), sortDepth(), sortShader(), and ~RenderQueue().


The documentation for this class was generated from the following files: