Equalizer
1.6.1
|
A renderer instance. More...
#include <renderer.h>
Public Member Functions | |
Renderer (Application &application) | |
Construct a new renderer. More... | |
virtual | ~Renderer () |
Destruct this renderer. More... | |
Operations | |
virtual bool | init (co::Object *initData) |
Initialize the renderer. More... | |
virtual bool | exit () |
De-initialize the renderer. More... | |
virtual bool | initContext (co::Object *initData) |
Initialize an OpenGL context. More... | |
virtual bool | exitContext () |
De-initialize an OpenGL context. More... | |
virtual void | clear (co::Object *frameData) |
Clear the frame buffer. More... | |
virtual void | draw (co::Object *frameData)=0 |
Render the scene. More... | |
virtual void | applyRenderContext () |
Apply the current rendering parameters to OpenGL. More... | |
const RenderContext & | getRenderContext () const |
virtual void | applyModelMatrix () |
Apply the current model matrix to OpenGL. More... | |
Data Access | |
detail::Renderer * | getImpl () |
co::Object * | getFrameData () |
Application & | getApplication () |
const Application & | getApplication () const |
virtual ViewData * | createViewData () |
Create a new per-view data instance. More... | |
virtual void | destroyViewData (ViewData *viewData) |
Delete the given view data. More... | |
const GLEWContext * | glewGetContext () const |
Get the GLEW context for this renderer. More... | |
const Frustumf & | getFrustum () const |
const Matrix4f & | getViewMatrix () const |
const Matrix4f & | getModelMatrix () const |
ObjectFactory interface, forwards to Application instance. | |
virtual co::Object * | createObject (const uint32_t type) |
virtual void | destroyObject (co::Object *object, const uint32_t type) |
A renderer instance.
All calls to one renderer instance are guaranteed to be executed from a single thread.
Definition at line 32 of file include/seq/renderer.h.
seq::Renderer::Renderer | ( | Application & | application | ) |
Construct a new renderer.
|
virtual |
|
virtual |
Apply the current model matrix to OpenGL.
This method is not included in applyRenderContext() since ligthing parameters are often applied before positioning the model.
This method is only to be called from clear(), draw() and TBD.
Referenced by eqHello::Renderer::draw(), and seqPly::Renderer::draw().
|
virtual |
Apply the current rendering parameters to OpenGL.
This method sets the draw buffer, color mask, viewport as well as the projection and view matrix.
This method is only to be called from clear(), draw() and TBD.
Referenced by eqHello::Renderer::draw(), and seqPly::Renderer::draw().
|
virtual |
Clear the frame buffer.
frameData | the renderer's instance of the object passed to Config::run. |
|
virtual |
Create a new per-view data instance.
Called once for each view used by this renderer. Creates the view instance used by the renderer to retrieve parameters from the application for rendering.
|
virtual |
Delete the given view data.
|
pure virtual |
Render the scene.
frameData | the renderer's instance of the object passed to Config::run. |
Implemented in seqPly::Renderer, and eqHello::Renderer.
|
inlinevirtual |
De-initialize the renderer.
Called just before the last context will be destroyed after the last call to exitContext().
Reimplemented in seqPly::Renderer.
Definition at line 65 of file include/seq/renderer.h.
Referenced by seqPly::Renderer::exit().
|
virtual |
De-initialize an OpenGL context.
Called just before the context will be destroyed.
|
inline |
Definition at line 139 of file include/seq/renderer.h.
Referenced by seqPly::Renderer::draw().
|
inline |
Definition at line 142 of file include/seq/renderer.h.
const Frustumf& seq::Renderer::getFrustum | ( | ) | const |
Referenced by seqPly::Renderer::draw().
const Matrix4f& seq::Renderer::getModelMatrix | ( | ) | const |
Referenced by seqPly::Renderer::draw().
const RenderContext& seq::Renderer::getRenderContext | ( | ) | const |
Referenced by seqPly::Renderer::draw().
const Matrix4f& seq::Renderer::getViewMatrix | ( | ) | const |
Referenced by seqPly::Renderer::draw().
const GLEWContext* seq::Renderer::glewGetContext | ( | ) | const |
Get the GLEW context for this renderer.
The glew context provides access to OpenGL extensions. This function does not follow the Sequel naming conventions, since GLEW uses a function of this name to automatically resolve OpenGL function entry points. Therefore, any OpenGL function support by the driver can be directly called from any method of an initialized renderer.
Referenced by seqPly::Renderer::init().
|
inlinevirtual |
Initialize the renderer.
Called once per renderer with an OpenGL context current before the first call to initContext().
initData | a per-renderer instance of the object passed to Config::init(). |
Reimplemented in seqPly::Renderer.
Definition at line 54 of file include/seq/renderer.h.
Referenced by seqPly::Renderer::init().
|
virtual |
Initialize an OpenGL context.
Called for each window handled by this renderer, after the context has been created and made current.
initData | a per-renderer instance of the object passed to Config::init(). |