eq::FrameBufferObject Class Reference

A C++ class to abstract GL frame buffer objects. More...

#include <frameBufferObject.h>

Collaboration diagram for eq::FrameBufferObject:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FrameBufferObject (GLEWContext *const glewContext)
 Constructs a new Frame Buffer Object.
 ~FrameBufferObject ()
 Destruct the Frame Buffer Object.
bool init (const int width, const int height, const int depthSize, const int stencilSize)
 Initialize the Frame Buffer Object.
void setColorFormat (const GLuint format)
 Set format for all color textures, if desired format differs from default.
void exit ()
 De-initialize the Frame Buffer Object.
void bind ()
 Bind to the Frame Buffer Object.
void unbind ()
 Unbind any Frame Buffer Object.
bool resize (const int width, const int height)
GLEWContext * glewGetContext ()
const GLEWContext * glewGetContext () const
const TextureVectorgetColorTextures () const
const TexturegetDepthTexture () const
const TexturegetStencilTexture () const
const std::string & getErrorMessage ()
PixelViewport getPixelViewport () const
bool addColorTexture ()
 Add one texture to FBO.


Detailed Description

A C++ class to abstract GL frame buffer objects.

Definition at line 30 of file frameBufferObject.h.


Member Function Documentation

void eq::FrameBufferObject::setColorFormat ( const GLuint  format  ) 

Set format for all color textures, if desired format differs from default.

This function should be called before init function.

Parameters:
format new format of color texture

Definition at line 72 of file frameBufferObject.cpp.

Referenced by eq::OSWindow::configInitFBO().

Here is the caller graph for this function:

void eq::FrameBufferObject::exit (  ) 

De-initialize the Frame Buffer Object.

Definition at line 56 of file frameBufferObject.cpp.

References eq::Texture::flush().

Referenced by eq::OSWindow::configExitFBO(), and ~FrameBufferObject().

Here is the call graph for this function:

Here is the caller graph for this function:

const TextureVector& eq::FrameBufferObject::getColorTextures (  )  const [inline]

Returns:
the color texture.

Definition at line 67 of file frameBufferObject.h.

const Texture& eq::FrameBufferObject::getDepthTexture (  )  const [inline]

Returns:
the depth texture.

Definition at line 70 of file frameBufferObject.h.

const Texture& eq::FrameBufferObject::getStencilTexture (  )  const [inline]

Returns:
the stencil texture.

Definition at line 73 of file frameBufferObject.h.

const std::string& eq::FrameBufferObject::getErrorMessage (  )  [inline]

Returns:
the reason for the last failed operation.

Definition at line 76 of file frameBufferObject.h.

Referenced by eq::OSWindow::configInitFBO().

Here is the caller graph for this function:

PixelViewport eq::FrameBufferObject::getPixelViewport (  )  const

Returns:
the size of this framebuffer object.

Definition at line 200 of file frameBufferObject.cpp.

Referenced by eq::Channel::setupAssemblyState().

Here is the caller graph for this function:

bool eq::FrameBufferObject::addColorTexture (  ) 

Add one texture to FBO.

When FBO class is created it has one color texture by default. Maximal number of textures per FBO is 16. Added color texture will have the same format as already added textures.

Returns:
false if color texture can't be added, otherwise true

Definition at line 78 of file frameBufferObject.cpp.

References EQERROR.


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:42 2009 for Equalizer 0.9 by  doxygen 1.5.8