Equalizer
2.1.0
Parallel Rendering Framework
|
A C++ class to abstract an accumulation buffer. More...
#include <accum.h>
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) |
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.
|
explicit |
Construct a new accumulation buffer.
EQ_API eq::util::Accum::~Accum | ( | ) |
Destruct the accumulation buffer.
EQ_API void eq::util::Accum::accum | ( | ) |
Accumulate a frame from the read buffer into the accumulation buffer.
EQ_API void eq::util::Accum::clear | ( | ) |
Clear the accumulation buffer.
EQ_API void eq::util::Accum::display | ( | ) |
Copy the result of the accumulation to the current draw buffer.
EQ_API void eq::util::Accum::exit | ( | ) |
Exit the accum buffer.
EQ_API uint32_t eq::util::Accum::getMaxSteps | ( | ) | const |
Get the maximum number of accumulation steps possible.
EQ_API uint32_t eq::util::Accum::getNumSteps | ( | ) | const |
Get the current number of accumulation steps done.
EQ_API uint32_t eq::util::Accum::getTotalSteps | ( | ) |
EQ_API bool eq::util::Accum::init | ( | const PixelViewport & | pvp, |
unsigned | textureFormat | ||
) |
Initialize the accumulation buffer.
pvp | the pixel viewport. |
textureFormat | the texture format. |
EQ_API bool eq::util::Accum::resize | ( | const PixelViewport & | pvp | ) |
Resize the accumulation buffer.
pvp | The pixel viewport where the accumulation buffer will be displayed |
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.
totalSteps | the total number of steps to do. |
EQ_API bool eq::util::Accum::usesFBO | ( | ) | const |
Test if the accumulation uses the FBO implementation.