Equalizer  1.11.0
Parallel Rendering Framework
eq::util::AccumBufferObject Class Reference

A class to emulate an OpenGL accumulation buffer using an FBO. More...

#include <accumBufferObject.h>

+ Inheritance diagram for eq::util::AccumBufferObject:
+ Collaboration diagram for eq::util::AccumBufferObject:

Public Member Functions

EQ_API AccumBufferObject (const GLEWContext *const glewContext)
 Construct a new Accumulation Buffer Object. More...
 
EQ_API ~AccumBufferObject ()
 Destruct the Accumulation Buffer Object. More...
 
EQ_API bool init (const PixelViewport &pvp, const unsigned format)
 Initialize the Accumulation Buffer Object. More...
 
EQ_API void exit ()
 De-initialize the Accumulation Buffer Object. More...
 
EQ_API void load (const float value)
 Load the current read buffer into the accumulation buffer. More...
 
EQ_API void accum (const float value)
 Accumulate the current read buffer into the accumulation buffer. More...
 
EQ_API void display (const float value)
 Transfer accumulation buffer values to the draw buffer. More...
 
EQ_API 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
EQ_API FrameBufferObject (const GLEWContext *const glewContext, const unsigned textureTarget=0x84F5)
 Construct a new Frame Buffer Object. More...
 
EQ_API ~FrameBufferObject ()
 Destruct the Frame Buffer Object. More...
 
EQ_API bool addColorTexture ()
 Add one color texture to the FBO. More...
 
EQ_API Error init (const int32_t width, const int32_t height, const unsigned colorFormat, const int32_t depthSize, const int32_t stencilSize, const int32_t samplesSize=1)
 Initialize the Frame Buffer Object. More...
 
EQ_API void exit ()
 De-initialize the Frame Buffer Object. More...
 
EQ_API void bind (const uint32_t target=0x8D40)
 Bind to the Frame Buffer Object. More...
 
EQ_API void unbind (const uint32_t target=0x8D40)
 Unbind any Frame Buffer Object and use the default drawable for the current context. More...
 
EQ_API Error resize (const int32_t width, const int32_t height)
 Resize the FBO. More...
 
int32_t getWidth () const
 
int32_t getHeight () const
 
const TexturesgetColorTextures () const
 
const TexturegetDepthTexture () const
 
const GLEWContext * glewGetContext () const
 
bool isValid () const
 

Detailed Description

A class to emulate an OpenGL accumulation buffer using an FBO.

See also
glAccum(), eq::util::Accum

Definition at line 35 of file accumBufferObject.h.

Constructor & Destructor Documentation

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

Construct a new Accumulation Buffer Object.

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

Destruct the Accumulation Buffer Object.

Version
1.0

Member Function Documentation

EQ_API 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.

Parameters
valuea floating-point value multiplying the source values during the accum operation.
Version
1.0
EQ_API 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.

Parameters
valuea floating-point value multiplying the accumulation values during the operation.
Version
1.0
EQ_API void eq::util::AccumBufferObject::exit ( )

De-initialize the Accumulation Buffer Object.

Version
1.0
EQ_API 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.

Parameters
pvpthe initial pixel viewport of the rendering buffer.
formatthe texture format corresponding to the source color read buffer.
Returns
true on success, false otherwise
See also
Window::getColorFormat(), glReadBuffer()
Version
1.0
EQ_API 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.

Parameters
valuea floating-point value multiplying the source values during the load operation.
Version
1.0
EQ_API bool eq::util::AccumBufferObject::resize ( const PixelViewport &  pvp)

Resets the pixel viewport used in display and resizes the accumulation buffer if needed.

Parameters
pvppixel viewport of the destination buffer.
Returns
true if the accumulation buffer has been resized.
Version
1.5.2

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