Equalizer  1.13.0
Parallel Rendering Framework
eq::util::Accum Class Reference

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

#include <accum.h>

+ Collaboration diagram for eq::util::Accum:

Public Member Functions

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

Static Public Member Functions

static EQ_API 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 39 of file accum.h.

Constructor & Destructor Documentation

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

Construct a new accumulation buffer.

Version
1.0
EQ_API eq::util::Accum::~Accum ( )

Destruct the accumulation buffer.

Version
1.0

Member Function Documentation

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

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

Version
1.0
EQ_API void eq::util::Accum::clear ( )

Clear the accumulation buffer.

Version
1.0
EQ_API void eq::util::Accum::display ( )

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

Version
1.0
EQ_API void eq::util::Accum::exit ( )

Exit the accum buffer.

Version
1.0
EQ_API uint32_t eq::util::Accum::getMaxSteps ( ) const

Get the maximum number of accumulation steps possible.

Returns
the maximum number of steps.
Version
1.0
EQ_API uint32_t eq::util::Accum::getNumSteps ( ) const

Get the current number of accumulation steps done.

Returns
the number of steps done.
Version
1.0
EQ_API uint32_t eq::util::Accum::getTotalSteps ( )
Returns
the total number of accumulations.
Version
1.0
EQ_API bool eq::util::Accum::init ( const PixelViewport &  pvp,
unsigned  textureFormat 
)

Initialize the accumulation buffer.

Parameters
pvpthe pixel viewport.
textureFormatthe texture format.
Returns
true if initialized successfully.
Version
1.0
EQ_API bool eq::util::Accum::resize ( const PixelViewport &  pvp)

Resize the accumulation buffer.

Parameters
pvpThe pixel viewport where the accumulation buffer will be displayed
Returns
true if the accumulation buffer has changed size.
Version
1.5.2
EQ_API bool eq::util::Accum::resize ( const int  width,
const int  height 
)
EQ_API void eq::util::Accum::setTotalSteps ( uint32_t  totalSteps)

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
totalStepsthe total number of steps to do.
Version
1.0
EQ_API 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().

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