version 3.3

VRS::OffscreenCanvasGL Class Reference

Offscreen Canvas for OpenGL Rendering Engines. More...

#include <vrs/opengl/offscreencanvasgl.h>

Inheritance diagram for VRS::OffscreenCanvasGL:

VRS::GLCanvas VRS::Canvas VRS::Manager VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 OffscreenCanvasGL (unsigned int width, unsigned int height, bool luminanceOnly=false)
 OffscreenCanvasGL (Image *targetImage)
virtual ~OffscreenCanvasGL ()
virtual ImagegetTarget () const
virtual void setTarget (Image *targetImage)
virtual bool prepareRedisplay ()
 called before OpenGL redisplay
virtual void finishRedisplay ()
 called after OpenGL redisplay
virtual void makeContextCurrent ()
 Hook for subclasses, should make the correct rendering context current.
virtual void releaseContext ()
 Called implicitly by 'Canvaseval'.
virtual void setSize (unsigned int width, unsigned int height)
 Sets width and height of the canvas. Setting the size results in a resize operation.
virtual unsigned int getWidth () const
 Returns the width in pixels of the canvas.
virtual unsigned int getHeight () const
virtual int getProperties () const
virtual bool largeScaleSnapshot (Image *destination, GLCanvas::CanvasProperties buffer=GLCanvas::RGB_BUFFER)
 VRS_TYPEINFO (OffscreenCanvasGL, GLCanvas)

Static Public Member Functions

static void setOffscreenCanvasFactory (const SO< OffscreenCanvasFactoryBase > &factory)
 Sets the factory used for creating offscreen canves. Set to NULL to use default impl.
static SO
< OffscreenCanvasFactoryBase
getOffscreenCanvasFactory ()
 Returns the factory used for creating offscreen canves.


Detailed Description

Offscreen Canvas for OpenGL Rendering Engines.

Non-visible rendering canvas for OpenGL rendering engines. This canvas creates an offscreen pixmap and an OpenGL rendering engine. The rendered image is provided as 2D image and can be inquired with 'currentImage'. Normally, an offscreen canvas will be added as non-real-time canvas; each frame can be explicitly generated by calling 'redisplay'.


Constructor & Destructor Documentation

VRS::OffscreenCanvasGL::OffscreenCanvasGL ( unsigned int  width,
unsigned int  height,
bool  luminanceOnly = false 
)

VRS::OffscreenCanvasGL::OffscreenCanvasGL ( Image targetImage  ) 

virtual VRS::OffscreenCanvasGL::~OffscreenCanvasGL (  )  [virtual]


Member Function Documentation

virtual Image* VRS::OffscreenCanvasGL::getTarget (  )  const [virtual]

virtual void VRS::OffscreenCanvasGL::setTarget ( Image targetImage  )  [virtual]

Specifies the target image in which it is rendered from now on.

virtual bool VRS::OffscreenCanvasGL::prepareRedisplay (  )  [virtual]

called before OpenGL redisplay

invokes Canvas::prepareRedisplay and activates standard attributes for OpenGL rendering.

Reimplemented from VRS::GLCanvas.

virtual void VRS::OffscreenCanvasGL::finishRedisplay (  )  [virtual]

called after OpenGL redisplay

invokes Canvas::finishRedisplay and deactivates standard attributes for OpenGL rendering.

Reimplemented from VRS::GLCanvas.

virtual void VRS::OffscreenCanvasGL::makeContextCurrent (  )  [virtual]

Hook for subclasses, should make the correct rendering context current.

Since makeContextCurrent should be the first action in order to prepare a redisplay, it should use as least ressources as possible (e.g. the engine). The creation of the engine (and other ressources) can not be forced by this abstract base class, so there may be no engine when makeContextCurrent is called.

Reimplemented from VRS::Canvas.

virtual void VRS::OffscreenCanvasGL::releaseContext (  )  [virtual]

Called implicitly by 'Canvaseval'.

Reimplemented from VRS::Canvas.

virtual void VRS::OffscreenCanvasGL::setSize ( unsigned int  width,
unsigned int  height 
) [virtual]

Sets width and height of the canvas. Setting the size results in a resize operation.

Implements VRS::Canvas.

virtual unsigned int VRS::OffscreenCanvasGL::getWidth (  )  const [virtual]

Returns the width in pixels of the canvas.

Implements VRS::Canvas.

virtual unsigned int VRS::OffscreenCanvasGL::getHeight (  )  const [virtual]

Return the extension of the canvas.

Implements VRS::Canvas.

virtual int VRS::OffscreenCanvasGL::getProperties (  )  const [virtual]

Return the (currently hardcoded) properties of an OffscreenCanvasGL

Implements VRS::GLCanvas.

virtual bool VRS::OffscreenCanvasGL::largeScaleSnapshot ( Image destination,
GLCanvas::CanvasProperties  buffer = GLCanvas::RGB_BUFFER 
) [virtual]

static void VRS::OffscreenCanvasGL::setOffscreenCanvasFactory ( const SO< OffscreenCanvasFactoryBase > &  factory  )  [static]

Sets the factory used for creating offscreen canves. Set to NULL to use default impl.

static SO<OffscreenCanvasFactoryBase> VRS::OffscreenCanvasGL::getOffscreenCanvasFactory (  )  [static]

Returns the factory used for creating offscreen canves.

VRS::OffscreenCanvasGL::VRS_TYPEINFO ( OffscreenCanvasGL  ,
GLCanvas   
)


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

Generated on Tue May 22 06:00:24 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact