Equalizer
1.6.1
|
A class to emulate an OpenGL accumulation buffer using an FBO. More...
#include <accumBufferObject.h>
Public Member Functions | |
AccumBufferObject (const GLEWContext *const glewContext) | |
Construct a new Accumulation Buffer Object. More... | |
~AccumBufferObject () | |
Destruct the Accumulation Buffer Object. More... | |
bool | init (const PixelViewport &pvp, const unsigned format) |
Initialize the Accumulation Buffer Object. More... | |
void | exit () |
De-initialize the Accumulation Buffer Object. More... | |
void | load (const float value) |
Load the current read buffer into the accumulation buffer. More... | |
void | accum (const float value) |
Accumulate the current read buffer into the accumulation buffer. More... | |
void | display (const float value) |
Transfer accumulation buffer values to the draw buffer. More... | |
bool | resize (const PixelViewport &pvp) |
Resets the pixel viewport used in display and resizes the accumulation buffer if needed. More... | |
Public Member Functions inherited from eq::util::FrameBufferObject | |
FrameBufferObject (const GLEWContext *const glewContext, const unsigned textureTarget=0x84F5) | |
Construct a new Frame Buffer Object. More... | |
~FrameBufferObject () | |
Destruct the Frame Buffer Object. More... | |
bool | addColorTexture () |
Add one color texture to the FBO. More... | |
bool | init (const int32_t width, const int32_t height, const unsigned colorFormat, const int32_t depthSize, const int32_t stencilSize) |
Initialize the Frame Buffer Object. More... | |
void | exit () |
De-initialize the Frame Buffer Object. More... | |
void | bind () |
Bind to the Frame Buffer Object. More... | |
void | unbind () |
Unbind any Frame Buffer Object and use the default drawable for the current context. More... | |
bool | resize (const int32_t width, const int32_t height) |
Resize the FBO. More... | |
int32_t | getWidth () const |
int32_t | getHeight () const |
const Textures & | getColorTextures () const |
const Texture & | getDepthTexture () const |
const eq::fabric::Error & | getError () |
const GLEWContext * | glewGetContext () const |
bool | isValid () const |
A class to emulate an OpenGL accumulation buffer using an FBO.
Definition at line 35 of file accumBufferObject.h.
eq::util::AccumBufferObject::AccumBufferObject | ( | const GLEWContext *const | glewContext | ) |
Construct a new Accumulation Buffer Object.
eq::util::AccumBufferObject::~AccumBufferObject | ( | ) |
Destruct the Accumulation Buffer Object.
void eq::util::AccumBufferObject::accum | ( | const float | value | ) |
Accumulate the current read buffer into the accumulation buffer.
The color values of the current read buffer are multiplied by value and added to the accumulation buffer.
value | a floating-point value multiplying the source values during the accum operation. |
void eq::util::AccumBufferObject::display | ( | const float | value | ) |
Transfer accumulation buffer values to the draw buffer.
The accumulation buffer color values are multiplied by value, and copied into the current draw buffer.
value | a floating-point value multiplying the accumulation values during the operation. |
void eq::util::AccumBufferObject::exit | ( | ) |
De-initialize the Accumulation Buffer Object.
bool eq::util::AccumBufferObject::init | ( | const PixelViewport & | pvp, |
const unsigned | format | ||
) |
Initialize the Accumulation Buffer Object.
The ABO uses a 32-bit float texture for the accumulation.
pvp | the initial pixel viewport of the rendering buffer. |
format | the texture format corresponding to the source color read buffer. |
void eq::util::AccumBufferObject::load | ( | const float | value | ) |
Load the current read buffer into the accumulation buffer.
The color values of the current read buffer are multiplied with value and copied into the accumulation buffer.
value | a floating-point value multiplying the source values during the load operation. |
bool eq::util::AccumBufferObject::resize | ( | const PixelViewport & | pvp | ) |
Resets the pixel viewport used in display and resizes the accumulation buffer if needed.
pvp | pixel viewport of the destination buffer. |