Cutout Vis2012
TUWienVisualisierung2(SS2012)-AdaptiveCutaways
 All Classes Namespaces Functions Pages
Public Member Functions | List of all members
Framebuffer Class Reference

#include <Framebuffer.h>

Public Member Functions

 ~Framebuffer ()
 
bool init (const FramebufferDescriptor &descriptor)
 
bool init (int width, int height, int depthFormat, int depthInternalFormat, int numColorAttachments, int *colorFormat, int *colorInternalFormat)
 
bool init (int width, int height, int depthFormat, int depthInternalFormat, int colorFormat, int colorInternalFormat)
 
void bind () const
 
void unbind () const
 
GLuint getDepthTextureHandle () const
 
GLuint getColorTextureHandle (int i=0) const
 
GLuint getHandle () const
 
void setViewport () const
 
int getWidth () const
 
int getHeight () const
 

Detailed Description

Encapsulated state of a GL framebuffer.

Constructor & Destructor Documentation

Framebuffer::~Framebuffer ( )

If initialized, deallocate all CPU and GPU memory used by this object.

Member Function Documentation

void Framebuffer::bind ( ) const

Binds this framebuffer to the GL context.

GLuint Framebuffer::getColorTextureHandle ( int  i = 0) const

returns a handle to the i's color attachment

GLuint Framebuffer::getDepthTextureHandle ( ) const

returns a handle to the depth attachment

GLuint Framebuffer::getHandle ( ) const

returns a handle to this framebuffer

bool Framebuffer::init ( const FramebufferDescriptor descriptor)

Allocates a new GL framebuffer. Number and type of attachments are read from descriptor. Call this before calling any other method.

bool Framebuffer::init ( int  width,
int  height,
int  depthFormat,
int  depthInternalFormat,
int  numColorAttachments,
int *  colorFormat,
int *  colorInternalFormat 
)

Legacy method, use FramebufferDescriptor instead

void Framebuffer::setViewport ( ) const

sets the GL viewport to fit this framebuffer

void Framebuffer::unbind ( ) const

Binds the default framebuffer to the GL context.


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