Fbo Class Reference

Framebuffer object to be used with OpenGL. More...

#include <Fbo.h>

List of all members.

Public Member Functions

 Fbo ()
 Standard Constructor.
 Fbo (const string &identifier, const GLuint &width, const GLuint &height, const GLuint &channels, const GLuint &colorAttachmentTextures)
 Constructor.
 Fbo (const Fbo &source)
 Copy-constructor.
 ~Fbo ()
 Destructor.
void bind ()
 Bind FBO in OpenGL.
void disable ()
 Turn off rendering to this buffer.
void bindColorTexture (const GLuint &textureNumber)
 Binds color texture in OpenGL.
const string & getIdentifier () const
 Gets FBO identifier.
GLuint getWidth () const
 Gets FBO resolution width.
GLuint getHeight () const
 Gets FBO resolution height.
GLuint getGlName ()
 Gets OpenGL FBO name.
void renderGl (const GLuint &x, const GLuint &y, const GLuint &width, const GLuint &height, const GLuint &textureNumber)
 Renders framebuffer contents to screen.
virtual string toString () const
 Returns a textual representation.
virtual string className () const
 Returns the class name of the object.
virtual enum classId classId () const
 Returns the class id of the object.
Fbo operator= (const Fbo &fbo)
 Operator =.

Private Attributes

struct fboEntrydata
 data of the texture


Detailed Description

Framebuffer object to be used with OpenGL.

Constructor & Destructor Documentation

Fbo::Fbo (  ) 

Standard Constructor.

Fbo::Fbo ( const string &  identifier,
const GLuint &  width,
const GLuint &  height,
const GLuint &  channels,
const GLuint &  colorAttachmentCount 
)

Constructor.

Creates an FBO

Parameters:
identifier The name by that this framebuffer will be referred to
width Width of the buffer in pixels
height Height of the buffer in pixels
channels Bytes per Pixel
colorAttachmentCount Number of Textures attached to buffer

Fbo::Fbo ( const Fbo source  ) 

Copy-constructor.

Duplicates an FBO

Fbo::~Fbo (  ) 

Destructor.

Destroys the FBO


Member Function Documentation

void Fbo::bind (  ) 

Bind FBO in OpenGL.

Signals OpenGL to use this one as active framebuffer

void Fbo::disable (  ) 

Turn off rendering to this buffer.

Turns back to default framebuffer rendering

void Fbo::bindColorTexture ( const GLuint &  textureNumber  ) 

Binds color texture in OpenGL.

Signals OpenGL to use the first color texture as active textur

const string & Fbo::getIdentifier (  )  const

Gets FBO identifier.

Returns:
The FBO's identifier

GLuint Fbo::getWidth (  )  const

Gets FBO resolution width.

Returns:
The FBO's resolution width

GLuint Fbo::getHeight (  )  const

Gets FBO resolution height.

Returns:
The FBO's resolution height

GLuint Fbo::getGlName (  ) 

Gets OpenGL FBO name.

Returns:
The internal name (id) OpenGL has assigned this FBO

void Fbo::renderGl ( const GLuint &  x,
const GLuint &  y,
const GLuint &  width,
const GLuint &  height,
const GLuint &  textureNumber 
)

Renders framebuffer contents to screen.

Parameters:
x the screen

string Fbo::toString (  )  const [virtual]

Returns a textual representation.

Returns:
a string descriping the run-time object

string Fbo::className (  )  const [virtual]

Returns the class name of the object.

Returns:
a string with the name of the object's class

enum classId Fbo::classId (  )  const [virtual]

Returns the class id of the object.

Returns:
an id of the object's class

Fbo Fbo::operator= ( const Fbo fbo  )  [inline]

Operator =.


Member Data Documentation

struct fboEntry* Fbo::data [read, private]

data of the texture


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

Generated on Mon Jul 7 13:30:33 2008 for Firefly by  doxygen 1.5.6