xoreos
0.0.5
|
#include <renderqueue.h>
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 |
Definition at line 40 of file renderqueue.h.
Graphics::Render::RenderQueue::RenderQueue | ( | uint32 | precache = 1000 | ) |
Definition at line 58 of file renderqueue.cpp.
Graphics::Render::RenderQueue::~RenderQueue | ( | ) |
Definition at line 62 of file renderqueue.cpp.
References _nodeArray.
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().
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().
void Graphics::Render::RenderQueue::queueItem | ( | Shader::ShaderRenderable * | renderable, |
const glm::mat4 * | transform, | ||
float | alpha | ||
) |
Definition at line 82 of file renderqueue.cpp.
References _cameraReference, _nodeArray, Graphics::Shader::ShaderRenderable::getMaterial(), Graphics::Shader::ShaderRenderable::getMesh(), Graphics::Shader::ShaderRenderable::getProgram(), Graphics::Shader::ShaderRenderable::getSurface(), and Graphics::Shader::ShaderProgram::glid.
void Graphics::Render::RenderQueue::render | ( | ) |
Render all queued items.
Definition at line 104 of file renderqueue.cpp.
References _nodeArray, Graphics::Shader::ShaderMaterial::bindFade(), Graphics::Shader::ShaderMaterial::bindGLState(), Graphics::Shader::ShaderSurface::bindGLState(), Graphics::Shader::ShaderSurface::bindObjectModelview(), Graphics::Shader::ShaderSurface::bindProgram(), Graphics::Shader::ShaderMaterial::bindProgramNoFade(), Graphics::Shader::ShaderProgram::glid, Graphics::Mesh::Mesh::render(), Graphics::Mesh::Mesh::renderBind(), Graphics::Mesh::Mesh::renderUnbind(), Graphics::Shader::ShaderSurface::unbindGLState(), and Graphics::Shader::ShaderMaterial::unbindGLState().
Referenced by Graphics::Render::RenderManager::render().
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().
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().
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().
|
private |
Definition at line 76 of file renderqueue.h.
Referenced by queueItem(), and setCameraReference().
|
private |
Definition at line 75 of file renderqueue.h.
Referenced by clear(), queueItem(), render(), sortDepth(), sortShader(), and ~RenderQueue().