Public Member Functions | Static Public Member Functions

eq::util::Accum Class Reference

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

#include <accum.h>

Collaboration diagram for eq::util::Accum:

List of all members.

Public Member Functions

 Accum (const GLEWContext *const glewContext)
 Construct a new accumulation buffer.
 ~Accum ()
 Destruct the accumulation buffer.
bool init (const PixelViewport &pvp, GLuint textureFormat)
 Initialize the accumulation buffer.
void exit ()
 Exit the accum buffer.
bool resize (const int width, const int height)
 Resize the accumulation buffer.
void clear ()
 Clear the accumulation buffer.
void accum ()
 Accumulate a frame from the read buffer into the accumulation buffer.
void display ()
 Copy the result of the accumulation to the current draw buffer.
uint32_t getMaxSteps () const
 Get the maximum number of accumulation steps possible.
uint32_t getNumSteps () const
 Get the current number of accumulation steps done.
void setTotalSteps (uint32_t totalSteps)
 Set the total number of accumulation steps that will be done.
uint32_t getTotalSteps ()
bool usesFBO () const
 Test if the accumulation uses the FBO implementation.
const GLEWContext * glewGetContext () const

Static Public Member Functions

static bool usesFBO (const GLEWContext *glewContext)

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() to set up the total number of accumulations done.

Definition at line 40 of file accum.h.


Constructor & Destructor Documentation

eq::util::Accum::Accum ( const GLEWContext *const   glewContext  ) 

Construct a new accumulation buffer.

Version:
1.0

Definition at line 23 of file accum.cpp.

eq::util::Accum::~Accum (  ) 

Destruct the accumulation buffer.

Version:
1.0

Definition at line 34 of file accum.cpp.


Member Function Documentation

void eq::util::Accum::accum (  ) 

Accumulate a frame from the read buffer into the accumulation buffer.

Version:
1.0

Definition at line 97 of file accum.cpp.

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

Here is the caller graph for this function:

void eq::util::Accum::clear (  ) 

Clear the accumulation buffer.

Version:
1.0

Definition at line 72 of file accum.cpp.

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

Here is the caller graph for this function:

void eq::util::Accum::display (  ) 

Copy the result of the accumulation to the current draw buffer.

Version:
1.0

Definition at line 129 of file accum.cpp.

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

Here is the caller graph for this function:

void eq::util::Accum::exit (  ) 

Exit the accum buffer.

Version:
1.0

Definition at line 61 of file accum.cpp.

Referenced by init().

Here is the caller graph for this function:

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

Get the maximum number of accumulation steps possible.

Returns:
the maximum number of steps.
Version:
1.0

Definition at line 149 of file accum.cpp.

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

Get the current number of accumulation steps done.

Returns:
the number of steps done.
Version:
1.0

Definition at line 101 of file accum.h.

uint32_t eq::util::Accum::getTotalSteps (  )  [inline]
Returns:
the total number of accumulations.
Version:
1.0

Definition at line 116 of file accum.h.

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

Initialize the accumulation buffer.

Parameters:
pvp the pixel viewport.
textureFormat the texture format.
Returns:
true if initialized successfully.
Version:
1.0

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 
)

Resize the accumulation buffer.

Parameters:
width the new width.
height the new height.
Returns:
true if the accumulation buffer is correctly resized.
Version:
1.0

Definition at line 77 of file accum.cpp.

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

Set the total number of accumulation steps that will be done.

This is used only for Darwin systems due to a specific glAccum() workaround.

Parameters:
totalSteps the total number of steps to do.
Version:
1.0

Definition at line 112 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

Test if the accumulation uses the FBO implementation.

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

Definition at line 160 of file accum.cpp.


The documentation for this class was generated from the following files:
Generated on Sun Aug 29 2010 13:54:00 for Equalizer 0.9.1 by  doxygen 1.7.1