Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The Renderer class executes the actual rendering on the given RenderQueue. More...
#include <Renderer.hpp>
Public Member Functions | |
Renderer () | |
virtual | ~Renderer () |
virtual const RenderQueue * | render (const RenderQueue *in_render_queue, Camera *camera, real frame_clock) |
Takes as input the render queue to render and returns a possibly filtered render queue for further processing. | |
void | setProjViewTransfCallback (ProjViewTransfCallback *callback) |
const ProjViewTransfCallback * | projViewTransfCallback () const |
ProjViewTransfCallback * | projViewTransfCallback () |
const std::map< unsigned int, ref< Shader > > & | shaderOverrideMask () const |
A bitmask/Shader map used to everride the Shader of those Actors whose enable mask satisfy the following condition: (Actors::enableMask() & bitmask) != 0. | |
std::map< unsigned int, ref < Shader > > & | shaderOverrideMask () |
A bitmask/Shader map used to everride the Shader of those Actors whose enable mask satisfy the following condition: (Actors::enableMask() & bitmask) != 0. | |
std::vector< RenderStateSlot > & | overriddenDefaultRenderStates () |
Render states that will be used as default by the opengl context by this renderer. | |
const std::vector < RenderStateSlot > & | overriddenDefaultRenderStates () const |
Render states that will be used as default by the opengl context by this renderer. | |
bool | isEnabled (unsigned int mask) |
void | setFramebuffer (Framebuffer *framebuffer) |
The Framebuffer on which the rendering is performed. | |
const Framebuffer * | framebuffer () const |
The Framebuffer on which the rendering is performed. | |
Framebuffer * | framebuffer () |
The Framebuffer on which the rendering is performed. | |
Protected Attributes | |
ref< Framebuffer > | mFramebuffer |
vl::ref< EnableSet > | mDummyEnables |
vl::ref< RenderStateSet > | mDummyStateSet |
std::map< unsigned int, ref < Shader > > | mShaderOverrideMask |
std::vector< RenderStateSlot > | mOverriddenDefaultRenderStates |
ref< ProjViewTransfCallback > | mProjViewTransfCallback |
The Renderer class executes the actual rendering on the given RenderQueue.
Definition at line 47 of file Renderer.hpp.
Renderer::Renderer | ( | ) |
Definition at line 44 of file Renderer.cpp.
References mDummyEnables, mDummyStateSet, mProjViewTransfCallback, and VL_DEBUG_SET_OBJECT_NAME.
virtual vl::Renderer::~Renderer | ( | ) | [inline, virtual] |
Definition at line 54 of file Renderer.hpp.
const RenderQueue * Renderer::render | ( | const RenderQueue * | in_render_queue, |
Camera * | camera, | ||
real | frame_clock | ||
) | [virtual] |
Takes as input the render queue to render and returns a possibly filtered render queue for further processing.
Renderer's implementation of this function always returns in_render_queue
.
Implements vl::RendererAbstract.
Reimplemented in vl::EdgeRenderer, and vl::OcclusionCullRenderer.
Definition at line 86 of file Renderer.cpp.
References vl::Viewport::activate(), vl::OpenGLContext::applyEnables(), vl::OpenGLContext::applyRenderStates(), vl::GLSLProgram::applyUniformSet(), vl::OpenGLContext::areUniformsColliding(), vl::RenderQueue::at(), vl::OpenGLContext::bindVAS(), vl::OpenGLContext::defaultRenderState(), vl::Actor::dispatchOnActorRenderStarted(), vl::Scissor::enable(), vl::Actor::enableMask(), vl::RendererAbstract::enableMask(), vl::Log::error(), vl::OpenGLContext::framebuffer(), framebuffer(), vl::ref< T >::get(), vl::Shader::getEnableSet(), vl::Shader::getRenderStateSet(), vl::Actor::getUniformSet(), vl::Shader::getUniformSet(), vl::GLSLProgram::getUniformSet(), vl::globalSettings(), vl::RenderStateSet::glslProgram(), vl::Shader::glslProgram(), vl::GLSLProgram::handle(), vl::Has_Fixed_Function_Pipeline, vl::Viewport::height(), isEnabled(), vl::GLSLProgram::linked(), vl::RenderToken::mActor, mDummyEnables, mDummyStateSet, vl::RenderToken::mNextPass, vl::RenderToken::mRenderable, vl::RenderToken::mShader, mShaderOverrideMask, NULL, vl::Framebuffer::openglContext(), overriddenDefaultRenderStates(), projViewTransfCallback(), vl::Renderable::render(), vl::Shader::scissor(), vl::Actor::scissor(), vl::Viewport::setClearFlags(), vl::OpenGLContext::setDefaultRenderState(), vl::RenderQueue::size(), vl::Actor::transform(), vl::UniformSet::uniforms(), vl::ProjViewTransfCallback::updateMatrices(), vl::Camera::viewport(), VL_CHECK, VL_CHECK_OGL, VL_TRAP, vl::Viewport::width(), vl::Viewport::x(), and vl::Viewport::y().
void vl::Renderer::setProjViewTransfCallback | ( | ProjViewTransfCallback * | callback ) | [inline] |
Definition at line 60 of file Renderer.hpp.
const ProjViewTransfCallback* vl::Renderer::projViewTransfCallback | ( | ) | const [inline] |
Definition at line 62 of file Renderer.hpp.
Referenced by render(), and vl::OcclusionCullRenderer::render_pass2().
ProjViewTransfCallback* vl::Renderer::projViewTransfCallback | ( | ) | [inline] |
Definition at line 64 of file Renderer.hpp.
A bitmask/Shader map used to everride the Shader of those Actors whose enable mask satisfy the following condition: (Actors::enableMask() & bitmask) != 0.
Useful when you want to override the Shader of a whole set of Actors. If multiple mask/shader pairs match an Actor's enable mask then the shader with the corresponding lowest mask will be used. See also vl::Actor::enableMask() and vl::Rendering::effectOverrideMask().
Definition at line 70 of file Renderer.hpp.
A bitmask/Shader map used to everride the Shader of those Actors whose enable mask satisfy the following condition: (Actors::enableMask() & bitmask) != 0.
Useful when you want to override the Shader of a whole set of Actors. If multiple mask/shader pairs match an Actor's enable mask then the shader with the corresponding lowest mask will be used. See also vl::Actor::enableMask() and vl::Rendering::effectOverrideMask().
Definition at line 76 of file Renderer.hpp.
std::vector<RenderStateSlot>& vl::Renderer::overriddenDefaultRenderStates | ( | ) | [inline] |
Render states that will be used as default by the opengl context by this renderer.
Useful for example to setup the default left/right color mask for anaglyph stereo rendering.
Definition at line 80 of file Renderer.hpp.
Referenced by render().
const std::vector<RenderStateSlot>& vl::Renderer::overriddenDefaultRenderStates | ( | ) | const [inline] |
Render states that will be used as default by the opengl context by this renderer.
Useful for example to setup the default left/right color mask for anaglyph stereo rendering.
Definition at line 84 of file Renderer.hpp.
bool vl::Renderer::isEnabled | ( | unsigned int | mask ) | [inline] |
Definition at line 86 of file Renderer.hpp.
Referenced by render(), and vl::EdgeRenderer::render().
void vl::Renderer::setFramebuffer | ( | Framebuffer * | framebuffer ) | [inline] |
The Framebuffer on which the rendering is performed.
Definition at line 89 of file Renderer.hpp.
const Framebuffer* vl::Renderer::framebuffer | ( | ) | const [inline, virtual] |
The Framebuffer on which the rendering is performed.
Implements vl::RendererAbstract.
Reimplemented in vl::OcclusionCullRenderer.
Definition at line 92 of file Renderer.hpp.
Referenced by render(), vl::EdgeRenderer::render(), vl::EdgeRenderer::renderLines(), vl::EdgeRenderer::renderSolids(), and vl::Applet::resizeEvent().
Framebuffer* vl::Renderer::framebuffer | ( | ) | [inline, virtual] |
The Framebuffer on which the rendering is performed.
Implements vl::RendererAbstract.
Reimplemented in vl::OcclusionCullRenderer.
Definition at line 95 of file Renderer.hpp.
ref<Framebuffer> vl::Renderer::mFramebuffer [protected] |
Definition at line 98 of file Renderer.hpp.
vl::ref<EnableSet> vl::Renderer::mDummyEnables [protected] |
Definition at line 101 of file Renderer.hpp.
Referenced by render(), vl::OcclusionCullRenderer::render_pass2(), and Renderer().
vl::ref<RenderStateSet> vl::Renderer::mDummyStateSet [protected] |
Definition at line 102 of file Renderer.hpp.
Referenced by render(), vl::OcclusionCullRenderer::render_pass2(), and Renderer().
std::map<unsigned int, ref<Shader> > vl::Renderer::mShaderOverrideMask [protected] |
Definition at line 104 of file Renderer.hpp.
Referenced by render().
std::vector<RenderStateSlot> vl::Renderer::mOverriddenDefaultRenderStates [protected] |
Definition at line 106 of file Renderer.hpp.
Definition at line 108 of file Renderer.hpp.
Referenced by Renderer().