25 #ifndef GRAPHICS_RENDER_RENDERQUEUE_H 26 #define GRAPHICS_RENDER_RENDERQUEUE_H 28 #include "glm/vec3.hpp" 29 #include "glm/mat4x4.hpp" 53 RenderQueueNode(
Shader::ShaderProgram *prog,
Shader::ShaderSurface *sur,
Shader::ShaderMaterial *mat,
Mesh::Mesh *mes,
const glm::mat4 *t,
float a = 1.0f,
float ref = 0.0f) :
program(prog),
surface(sur),
material(mat),
mesh(mes),
transform(t),
reference(ref),
alpha(a) {}
83 #endif // GRAPHICS_RENDER_RENDERQUEUE glm::vec3 _cameraReference
The global graphics manager.
Shader renderable, a class for easier managing of a collection of items (surface, material...
Shader::ShaderMaterial * material
void clear()
Clear the queue of all items.
const glm::mat4 * transform
float reference
Reference point to the camera location, primarily used for depth sorting.
const RenderQueueNode & operator=(const RenderQueueNode &src)
void sortShader()
Sort queue elements by shader program.
RenderQueue(uint32 precache=1000)
void queueItem(Shader::ShaderProgram *program, Shader::ShaderSurface *surface, Shader::ShaderMaterial *material, Mesh::Mesh *mesh, const glm::mat4 *transform, float alpha)
RenderQueueNode(Shader::ShaderProgram *prog, Shader::ShaderSurface *sur, Shader::ShaderMaterial *mat, Mesh::Mesh *mes, const glm::mat4 *t, float a=1.0f, float ref=0.0f)
void sortDepth()
Sort queue elements by depth.
std::vector< RenderQueueNode > _nodeArray
Shader::ShaderProgram * program
float alpha
Custom alpha value applied per-object.
Shader::ShaderSurface * surface
RenderQueueNode(const RenderQueueNode &src)
void render()
Render all queued items.
void setCameraReference(const glm::vec3 &reference)