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 33 of file frameBufferObject.h.
EQ_API eq::util::FrameBufferObject::FrameBufferObject |
( |
const GLEWContext *const |
glewContext, |
|
|
const unsigned |
textureTarget = 0x84F5 |
|
) |
| |
Construct a new Frame Buffer Object.
The first color texture is automatically created.
- Version
- 1.0
EQ_API eq::util::FrameBufferObject::~FrameBufferObject |
( |
| ) |
|
Destruct the Frame Buffer Object.
- Version
- 1.0
EQ_API bool eq::util::FrameBufferObject::addColorTexture |
( |
| ) |
|
Add one color texture to the FBO.
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
EQ_API void eq::util::FrameBufferObject::bind |
( |
const uint32_t |
target = 0x8D40 | ) |
|
Bind to the Frame Buffer Object.
The FBO becomes the read and/or draw buffer of the current context, depending on the given target.
- Parameters
-
target | the framebuffer target to bind, default read and draw |
- Version
- 1.0
EQ_API 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 |
int32_t eq::util::FrameBufferObject::getHeight |
( |
| ) |
const |
|
inline |
int32_t eq::util::FrameBufferObject::getWidth |
( |
| ) |
const |
|
inline |
const GLEWContext* eq::util::FrameBufferObject::glewGetContext |
( |
| ) |
const |
|
inline |
EQ_API Error eq::util::FrameBufferObject::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.
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. |
samplesSize | The number of multisamples. |
- Returns
- ERROR_NONE on success, Error code on failure.
- See also
- resize()
- Version
- 1.0
bool eq::util::FrameBufferObject::isValid |
( |
| ) |
const |
|
inline |
EQ_API Error 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.
-
ERROR_NONE on success, Error code on failure.
- Version
- 1.0
EQ_API void eq::util::FrameBufferObject::unbind |
( |
const uint32_t |
target = 0x8D40 | ) |
|
Unbind any Frame Buffer Object and use the default drawable for the current context.
- Parameters
-
target | the framebuffer target to unbind, default read and draw |
- Version
- 1.0
The documentation for this class was generated from the following file: