A C++ class to abstract OpenGL frame buffer objects.
More...
#include <frameBufferObject.h>
A C++ class to abstract OpenGL frame buffer objects.
Definition at line 32 of file frameBufferObject.h.
eq::util::FrameBufferObject::FrameBufferObject |
( |
const GLEWContext *const |
glewContext, |
|
|
const unsigned |
textureTarget = 0x84F5 |
|
) |
| |
Construct a new Frame Buffer Object.
- Version
- 1.0
eq::util::FrameBufferObject::~FrameBufferObject |
( |
| ) |
|
Destruct the Frame Buffer Object.
- Version
- 1.0
bool eq::util::FrameBufferObject::addColorTexture |
( |
| ) |
|
Add one color texture to the FBO.
The first color texture is automatically created in the constructor. The maximum number of textures per FBO is 16. Added color textures will have the same format as the existing texture(s). This method has to be called on an uninitialized FBO.
- Returns
- false if color texture can't be added, otherwise true.
- Version
- 1.0
void eq::util::FrameBufferObject::bind |
( |
| ) |
|
Bind to the Frame Buffer Object.
The FBO becomes the read and draw buffer of the current context.
- See Also
- getError()
- Version
- 1.0
void eq::util::FrameBufferObject::exit |
( |
| ) |
|
De-initialize the Frame Buffer Object.
- Version
- 1.0
const Textures& eq::util::FrameBufferObject::getColorTextures |
( |
| ) |
const |
|
inline |
const Texture& eq::util::FrameBufferObject::getDepthTexture |
( |
| ) |
const |
|
inline |
- Returns
- the reason for the last failed operation.
- Version
- 1.0
Definition at line 121 of file frameBufferObject.h.
int32_t eq::util::FrameBufferObject::getHeight |
( |
| ) |
const |
|
inline |
int32_t eq::util::FrameBufferObject::getWidth |
( |
| ) |
const |
|
inline |
const GLEWContext* eq::util::FrameBufferObject::glewGetContext |
( |
| ) |
const |
|
inline |
bool eq::util::FrameBufferObject::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.
On successful initialization, the FBO is bound.
- Parameters
-
width | the initial width of the rendering buffer. |
height | the initial height of the rendering buffer. |
colorFormat | The internal color texture format, e.g., GL_RGBA. |
depthSize | The bit depth of the depth attachment. |
stencilSize | The bit depth of the stencil attachment. |
- Returns
- true on success, false otherwise
- See Also
- resize(), getError()
- Version
- 1.0
bool eq::util::FrameBufferObject::isValid |
( |
| ) |
const |
|
inline |
bool eq::util::FrameBufferObject::resize |
( |
const int32_t |
width, |
|
|
const int32_t |
height |
|
) |
| |
Resize the FBO.
The FBO has to be initialized and bound. It is not changed if the size does not change.
- Returns
- true on success, false on error.
- See Also
- getError()
- Version
- 1.0
void eq::util::FrameBufferObject::unbind |
( |
| ) |
|
Unbind any Frame Buffer Object and use the default drawable for the current context.
- Version
- 1.0
The documentation for this class was generated from the following file: