#include <iso_gl_frame_buffer_object.h>
Collaboration diagram for iso::gl::FrameBufferObject:
Public Member Functions | |
FrameBufferObject (const math::Vector2< GLsizei > pSize, ColorType pColorType, DataType pDataType) throw (GLException) | |
create frame buffer object for offscreen rendering | |
~FrameBufferObject () | |
destructor | |
bool | created () const |
void | create () throw (GLException) |
bool | checkStatus () |
check frame buffer object status | |
const math::Vector2< GLsizei > & | size () const |
return size | |
ColorType | colorType () const |
return internal color format | |
DataType | dataType () const |
return data type | |
void | bind () throw (GLException) |
switches rendering to frame buffer object
| |
void | release () |
switches rendering to default mode | |
Texture * | texture (unsigned int pAttachmentPoint) throw (GLException) |
retrieve texture | |
void | addTexture (unsigned int pAttachmentPoint) throw (GLException) |
add texture | |
void | addTexture (Texture *pTexture, unsigned int pAttachmentPoint) throw (GLException) |
add texture | |
void | removeTexture (unsigned int pAttachmentPoint) throw (GLException) |
remove texture | |
void | addDepthBuffer () throw (GLException) |
add depth render buffer | |
void | addStencilBuffer () throw (GLException) |
add depth render buffer | |
template<class Type> | |
data::Buffer< Type > * | toBuffer () throw (GLException) |
return content of framebuffer as image buffer | |
template<typename DataType> | |
void | colorBuffer (DataType *pBuffer, unsigned int pAttachmentPoint) throw (GLException) |
template<typename DataType> | |
void | depthBuffer (DataType *pBuffer) throw (GLException) |
template<typename DataType> | |
void | stencilBuffer (DataType *pBuffer) throw (GLException) |
Static Public Member Functions | |
static int | maxTextureCount () |
return maximum number of textures | |
static int | maxSize () |
return maximum size of render buffers | |
Protected Member Functions | |
FrameBufferObject () | |
default constructor | |
void | updateDrawBuffers () |
update draw buffers based on available textures | |
Static Protected Member Functions | |
static void | staticInitialize () |
initialize global frame buffer object settings | |
Protected Attributes | |
GLuint | mId |
maximum size of fbo | |
math::Vector2< GLsizei > | mSize |
id | |
ColorType | mColorType |
size of offscreen rendering buffer | |
DataType | mDataType |
internal color format | |
Texture ** | mTextures |
data type | |
GLuint | mDepthBuffer |
all attached textures | |
GLuint | mStencilBuffer |
depth buffer | |
GLuint * | mDrawBuffers |
stencil buffer | |
unsigned int | mDrawBufferCount |
draw buffers | |
bool * | mTextureCreationFlags |
number of currently available draw buffers | |
bool | mColorFlag |
flags indicating whether textures have been created by the fbo | |
Static Protected Attributes | |
static bool | sInitialized |
static GLint | sMaxTextureCount |
flag whether global frame buffer object settings have been initialized | |
static GLint | sMaxSize |
maximum number of textures per fbo |
Created by Daniel Bisig on 11/26/07.
FrameBufferObject::FrameBufferObject | ( | const math::Vector2< GLsizei > | pSize, | |
ColorType | pColorType, | |||
DataType | pDataType | |||
) | throw (GLException) |
create frame buffer object for offscreen rendering
pSize | size of offscreen rendering buffer | |
pColorType | color type | |
pDataType | data type |
FrameBufferObject::~FrameBufferObject | ( | ) |
destructor
FrameBufferObject::FrameBufferObject | ( | ) | [protected] |
default constructor
bool iso::gl::FrameBufferObject::created | ( | ) | const [inline] |
void iso::gl::FrameBufferObject::create | ( | ) | throw (GLException) |
bool FrameBufferObject::checkStatus | ( | ) |
check frame buffer object status
const math::Vector2< GLsizei > & FrameBufferObject::size | ( | ) | const |
return size
ColorType FrameBufferObject::colorType | ( | ) | const |
return internal color format
DataType FrameBufferObject::dataType | ( | ) | const |
return data type
void FrameBufferObject::bind | ( | ) | throw (GLException) |
switches rendering to frame buffer object
rendering will be performed to all attached textures
void FrameBufferObject::release | ( | ) |
switches rendering to default mode
Texture * FrameBufferObject::texture | ( | unsigned int | pAttachmentPoint | ) | throw (GLException) |
retrieve texture
pAttachmentPoint | texture attachment point |
void FrameBufferObject::addTexture | ( | unsigned int | pAttachmentPoint | ) | throw (GLException) |
add texture
pAttachmentPoint | attachement point |
void FrameBufferObject::addTexture | ( | Texture * | pTexture, | |
unsigned int | pAttachmentPoint | |||
) | throw (GLException) |
add texture
pTexture | to attach | |
pAttachmentPoint | attachement point |
void FrameBufferObject::removeTexture | ( | unsigned int | pAttachmentPoint | ) | throw (GLException) |
remove texture
pAttachmentPoint | attachement point |
void FrameBufferObject::addDepthBuffer | ( | ) | throw (GLException) |
add depth render buffer
creates depth render buffer and attaches it to fbo
void FrameBufferObject::addStencilBuffer | ( | ) | throw (GLException) |
add depth render buffer
creates stencil render buffer and attaches it to fbo
int FrameBufferObject::maxTextureCount | ( | ) | [static] |
return maximum number of textures
int FrameBufferObject::maxSize | ( | ) | [static] |
return maximum size of render buffers
data::Buffer< Type > * iso::gl::FrameBufferObject::toBuffer | ( | ) | throw (GLException) |
return content of framebuffer as image buffer
void iso::gl::FrameBufferObject::colorBuffer | ( | DataType * | pBuffer, | |
unsigned int | pAttachmentPoint | |||
) | throw (GLException) |
void iso::gl::FrameBufferObject::depthBuffer | ( | DataType * | pBuffer | ) | throw (GLException) |
void iso::gl::FrameBufferObject::stencilBuffer | ( | DataType * | pBuffer | ) | throw (GLException) |
void FrameBufferObject::staticInitialize | ( | ) | [static, protected] |
initialize global frame buffer object settings
void FrameBufferObject::updateDrawBuffers | ( | ) | [protected] |
update draw buffers based on available textures
bool FrameBufferObject::sInitialized [static, protected] |
GLint FrameBufferObject::sMaxTextureCount [static, protected] |
flag whether global frame buffer object settings have been initialized
GLint FrameBufferObject::sMaxSize [static, protected] |
maximum number of textures per fbo
GLuint iso::gl::FrameBufferObject::mId [protected] |
maximum size of fbo
math::Vector2<GLsizei> iso::gl::FrameBufferObject::mSize [protected] |
id
ColorType iso::gl::FrameBufferObject::mColorType [protected] |
size of offscreen rendering buffer
DataType iso::gl::FrameBufferObject::mDataType [protected] |
internal color format
Texture** iso::gl::FrameBufferObject::mTextures [protected] |
data type
GLuint iso::gl::FrameBufferObject::mDepthBuffer [protected] |
all attached textures
GLuint iso::gl::FrameBufferObject::mStencilBuffer [protected] |
depth buffer
GLuint* iso::gl::FrameBufferObject::mDrawBuffers [protected] |
stencil buffer
unsigned int iso::gl::FrameBufferObject::mDrawBufferCount [protected] |
draw buffers
bool* iso::gl::FrameBufferObject::mTextureCreationFlags [protected] |
number of currently available draw buffers
bool iso::gl::FrameBufferObject::mColorFlag [protected] |
flags indicating whether textures have been created by the fbo