Equalizer  1.2.1
Public Member Functions
seq::Renderer Class Reference

A renderer instance. More...

#include <renderer.h>

+ Inheritance diagram for seq::Renderer:
+ Collaboration diagram for seq::Renderer:

List of all members.

Public Member Functions

 Renderer (Application &application)
 Construct a new renderer.
virtual ~Renderer ()
 Destruct this renderer.
Operations
virtual bool init (co::Object *initData)
 Initialize the renderer.
virtual bool exit ()
 De-initialize the renderer.
virtual bool initContext (co::Object *initData)
 Initialize an OpenGL context.
virtual bool exitContext ()
 De-initialize an OpenGL context.
virtual void clear (co::Object *frameData)
 Clear the frame buffer.
virtual void draw (co::Object *frameData)=0
 Render the scene.
virtual void applyRenderContext ()
 Apply the current rendering parameters to OpenGL.
virtual void applyModelMatrix ()
 Apply the current model matrix to OpenGL.
Data Access
detail::Renderer * getImpl ()
co::ObjectgetFrameData ()
ApplicationgetApplication ()
const ApplicationgetApplication () const
virtual ViewDatacreateViewData ()
 Create a new per-view data instance.
virtual void destroyViewData (ViewData *viewData)
 Delete the given view data.
const GLEWContext * glewGetContext () const
 Get the GLEW context for this renderer.
const Frustumf & getFrustum () const
const Matrix4f & getViewMatrix () const
const Matrix4f & getModelMatrix () const
ObjectFactory interface, forwards to Application instance.
virtual eq::ConfiggetConfig ()
virtual co::ObjectcreateObject (const uint32_t type)
virtual void destroyObject (co::Object *object, const uint32_t type)
 Delete the given object of the given type.

Detailed Description

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.


Constructor & Destructor Documentation

Construct a new renderer.

Version:
1.0

Reimplemented in eqHello::Renderer, and seqPly::Renderer.

virtual seq::Renderer::~Renderer ( ) [virtual]

Destruct this renderer.

Version:
1.0

Reimplemented in eqHello::Renderer, and seqPly::Renderer.


Member Function Documentation

virtual void seq::Renderer::applyModelMatrix ( ) [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.

Version:
1.0

Referenced by eqHello::Renderer::draw(), and seqPly::Renderer::draw().

+ Here is the caller graph for this function:

virtual void seq::Renderer::applyRenderContext ( ) [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.

Version:
1.0

Referenced by eqHello::Renderer::draw(), and seqPly::Renderer::draw().

+ Here is the caller graph for this function:

virtual void seq::Renderer::clear ( co::Object frameData) [virtual]

Clear the frame buffer.

Parameters:
frameDatathe renderer's instance of the object passed to Config::run.
Version:
1.0
virtual co::Object* seq::Renderer::createObject ( const uint32_t  type) [virtual]
Returns:
a new object instance of the given type.
Version:
1.0
See also:
ObjectType, Config::getObject(), Renderer::getObject()

Implements seq::ObjectFactory.

Reimplemented in seqPly::Renderer.

virtual ViewData* seq::Renderer::createViewData ( ) [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.

Returns:
the new view data
Version:
1.0
virtual void seq::Renderer::destroyObject ( co::Object object,
const uint32_t  type 
) [virtual]

Delete the given object of the given type.

Version:
1.0

Reimplemented from seq::ObjectFactory.

virtual void seq::Renderer::destroyViewData ( ViewData viewData) [virtual]

Delete the given view data.

Version:
1.0
virtual void seq::Renderer::draw ( co::Object frameData) [pure virtual]

Render the scene.

Parameters:
frameDatathe renderer's instance of the object passed to Config::run.
Version:
1.0

Implemented in seqPly::Renderer, and eqHello::Renderer.

virtual bool seq::Renderer::exit ( ) [inline, virtual]

De-initialize the renderer.

Called just before the last context will be destroyed after the last call to exitContext().

Returns:
true on success, false otherwise.
Version:
1.0

Reimplemented in seqPly::Renderer.

Definition at line 65 of file include/seq/renderer.h.

virtual bool seq::Renderer::exitContext ( ) [virtual]

De-initialize an OpenGL context.

Called just before the context will be destroyed.

Returns:
true on success, false otherwise.
Version:
1.0
Returns:
the application instance for this renderer.
Version:
1.0

Definition at line 136 of file include/seq/renderer.h.

Referenced by seqPly::Renderer::draw().

+ Here is the caller graph for this function:

const Application& seq::Renderer::getApplication ( ) const [inline]
Returns:
the application instance for this renderer.
Version:
1.0

Definition at line 139 of file include/seq/renderer.h.

const Frustumf& seq::Renderer::getFrustum ( ) const
Returns:
the current view frustum.
Version:
1.0

Referenced by seqPly::Renderer::draw().

+ Here is the caller graph for this function:

const Matrix4f& seq::Renderer::getModelMatrix ( ) const
Returns:
the current model (scene) transformation.
Version:
1.0

Referenced by seqPly::Renderer::draw().

+ Here is the caller graph for this function:

const Matrix4f& seq::Renderer::getViewMatrix ( ) const
Returns:
the current view (frustum) transformation.
Version:
1.0

Referenced by seqPly::Renderer::draw().

+ Here is the caller graph for this function:

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.

Returns:
the extended OpenGL function table for the window's OpenGL context.
Version:
1.0

Referenced by seqPly::Renderer::init().

+ Here is the caller graph for this function:

virtual bool seq::Renderer::init ( co::Object initData) [inline, virtual]

Initialize the renderer.

Called once per renderer with an OpenGL context current before the first call to initContext().

Parameters:
initDataa per-renderer instance of the object passed to Config::init().
Returns:
true on success, false otherwise.
Version:
1.0

Reimplemented in seqPly::Renderer.

Definition at line 54 of file include/seq/renderer.h.

virtual bool seq::Renderer::initContext ( co::Object initData) [virtual]

Initialize an OpenGL context.

Called for each window handled by this renderer, after the context has been created and made current.

Parameters:
initDataa per-renderer instance of the object passed to Config::init().
Returns:
true on success, false otherwise.
Version:
1.0

The documentation for this class was generated from the following file:
Generated on Fri Jun 8 2012 15:44:37 for Equalizer 1.2.1 by  doxygen 1.8.0