eq::util::Accum Class Reference

A C++ class to abstract an accumulation buffer. More...

#include <accum.h>

Collaboration diagram for eq::util::Accum:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Accum (GLEWContext *const glewContext)
 Construct a new accumulation buffer.
 ~Accum ()
 Destruct the accumulation buffer.
bool init (const PixelViewport &pvp, GLuint textureFormat)
 Inits the accumulation object.
void exit ()
 Exits the accum object.
bool resize (const int width, const int height)
 Resizes the accumulation object.
void clear ()
 Clears the accumulation object.
void accum ()
 Accumulates a frame into the accumulation object.
void display ()
 Displays the result of the accumulation object.
uint32_t getMaxSteps () const
 Get the number of maximum steps possible to do during the accumulation operation.
uint32_t getNumSteps () const
 Get the current number of accumulations done.
void setTotalSteps (uint32_t totalSteps)
 Set the total steps that will be used.
uint32_t getTotalSteps ()
bool usesFBO () const
 Test if the accumulation uses the FBO implementation.
GLEWContext * glewGetContext ()
const GLEWContext * glewGetContext () const

Static Public Member Functions

static bool usesFBO (const GLEWContext *glewContext)
 Test if the accumulation would use the FBO implementation.

Detailed Description

A C++ class to abstract an accumulation buffer.

Depending on the OpenGL version, an FBO or glAccum() is used.

Remark: MacOS systems seem to have a buggy implementation of glAccum(), and use a workaround which needs setTotalSteps().

Definition at line 39 of file accum.h.


Member Function Documentation

uint32_t eq::util::Accum::getMaxSteps (  )  const

Get the number of maximum steps possible to do during the accumulation operation.

Returns:
the maximum number of steps.

Definition at line 151 of file accum.cpp.

uint32_t eq::util::Accum::getNumSteps (  )  const [inline]

Get the current number of accumulations done.

Returns:
the number of steps done.

Definition at line 98 of file accum.h.

bool eq::util::Accum::init ( const PixelViewport pvp,
GLuint  textureFormat 
)

Inits the accumulation object.

Parameters:
pvp the pixel viewport.
textureFormat the texture format.

Definition at line 39 of file accum.cpp.

References exit().

Here is the call graph for this function:

bool eq::util::Accum::resize ( const int  width,
const int  height 
)

Resizes the accumulation object.

Parameters:
width the new width.
height the new height.
Returns:
true if the accumulation object is correctly resized.

Definition at line 77 of file accum.cpp.

void eq::util::Accum::setTotalSteps ( uint32_t  totalSteps  )  [inline]

Set the total steps that will be used.

This is needed only for Darwin systems because of the specific glAccum() workaround.

Parameters:
totalSteps the total number of steps to do.

Definition at line 108 of file accum.h.

Referenced by eq::Compositor::assembleFramesSorted(), and eq::Compositor::assembleFramesUnsorted().

Here is the caller graph for this function:

bool eq::util::Accum::usesFBO ( const GLEWContext *  glewContext  )  [static]

Test if the accumulation would use the FBO implementation.

Returns:
true if the accumulation uses an FBO, false if it uses glAccum().

Definition at line 169 of file accum.cpp.

bool eq::util::Accum::usesFBO (  )  const

Test if the accumulation uses the FBO implementation.

Returns:
true if the accumulation uses an FBO, false if it uses glAccum().

Definition at line 162 of file accum.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Mar 10 16:39:55 2010 for Equalizer 0.9.1 by  doxygen 1.6.2