Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes

vl::Renderer Class Reference

The Renderer class executes the actual rendering on the given RenderQueue. More...

#include <Renderer.hpp>

Inheritance diagram for vl::Renderer:
vl::RendererAbstract vl::Object vl::EdgeRenderer vl::OcclusionCullRenderer

List of all members.

Public Member Functions

 Renderer ()
virtual ~Renderer ()
virtual const RenderQueuerender (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 ProjViewTransfCallbackprojViewTransfCallback () const
ProjViewTransfCallbackprojViewTransfCallback ()
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 Framebufferframebuffer () const
 The Framebuffer on which the rendering is performed.
Framebufferframebuffer ()
 The Framebuffer on which the rendering is performed.

Protected Attributes

ref< FramebuffermFramebuffer
vl::ref< EnableSetmDummyEnables
vl::ref< RenderStateSetmDummyStateSet
std::map< unsigned int, ref
< Shader > > 
mShaderOverrideMask
std::vector< RenderStateSlotmOverriddenDefaultRenderStates
ref< ProjViewTransfCallbackmProjViewTransfCallback

Detailed Description

The Renderer class executes the actual rendering on the given RenderQueue.

See also:
Rendering

Definition at line 47 of file Renderer.hpp.


Constructor & Destructor Documentation

Renderer::Renderer (  )
virtual vl::Renderer::~Renderer (  ) [inline, virtual]

Definition at line 54 of file Renderer.hpp.


Member Function Documentation

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.

const std::map<unsigned int, ref<Shader> >& vl::Renderer::shaderOverrideMask (  ) const [inline]

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.

std::map<unsigned int, ref<Shader> >& vl::Renderer::shaderOverrideMask (  ) [inline]

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.


Member Data Documentation

Definition at line 98 of file Renderer.hpp.

Definition at line 101 of file Renderer.hpp.

Referenced by render(), vl::OcclusionCullRenderer::render_pass2(), and Renderer().

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().

Definition at line 106 of file Renderer.hpp.

Definition at line 108 of file Renderer.hpp.

Referenced by Renderer().


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

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:11.
Permission is granted to use this page to write and publish articles regarding Visualization Library.