Public Types | Public Member Functions | Protected Attributes | Private Types | Private Member Functions
FramebufferObject Class Reference

#include <FrameBufferObject.h>

List of all members.

Public Types

enum  ColorAttachmentType {
  RGB_8 = 0, RGB_16, RGB_32, RGBA_8,
  RGBA_16, RGBA_32
}

Public Member Functions

void beginCapture (bool bEnablePassThroughShader=true)
void bind (int index=0)
 bind the color attachment with the index
void bindDepth (void)
 bind the depth attachment
bool checkFramebufferStatus (void)
 check errors using FBO extension function
void disableTextureTarget (void)
 disable Texture Target
void enableTextureTarget (void)
 enable Texture Target
void endCapture (bool bDisablePassThroughShader=true)
 FramebufferObject (const char *strMode="rgba=3x8t depth=24t")
GLuint getColorAttachmentID (int index=0)
 get the Texture ID of the color attachment with the index
GLuint getDepthAttachmentID (void)
 get the Texture ID of the depth attachment
unsigned int getHeight (void)
 get height of the FBO
GLuint getStencilAttachmentID (void)
 get the Texture ID of the stencil attachment
GLenum getTextureTarget (void)
 get the Texture target
unsigned int getWidth (void)
 get width of the FBO
bool initialize (unsigned int width, unsigned int height)
 initialize the FBOs and Textures
void printFramebufferStatus (void)
bool reInitialize (unsigned int width, unsigned int height, const char *strMode="rgb=16t depth=24t")
void setMagFilter (GLint magFilter)
 set the mag texture interpolation filter
void setMinFilter (GLint minFilter)
 set the min texture interpolation filter
void setWrapS (GLint wrapS)
 set the wrap s
void setWrapT (GLint wrapT)
 set the warp t
 ~FramebufferObject ()

Protected Attributes

bool _bColorAttachment
 use color attachment?
bool _bColorAttachmentRenderTexture
 use color as RenderTexture?
bool _bDepthAttachment
 use depth attachment?
bool _bDepthAttachmentRenderTexture
 use depth as RenderTexture?
bool _bFBOSupported
 FBO extension supported?
bool _bFloatColorBuffer
 indicates if color buffer is a float texture
bool _bInitialized
 FBO initialized?
bool _bPassThroughProgramInitialized
 pass through shader program initialized?
bool _bStencilAttachment
 use stencil attachment?
bool _bStencilAttachmentRenderTexture
 use stencil as RenderTexture?
ColorAttachmentType _colorAttachmentDepth
 color attachment depth
GLuint _colorAttachmentID [MAX_COLOR_COMPONENTS]
 Texture IDs of the color attachment textures.
GLint _colorFormat
 format of the color texture, default: GL_RGBA
GLenum _colorType
 type of the color attachment, default: GL_UNSIGNED_BYTE
GLuint _depthAttachmentID
 Texture ID of the depth attachment.
GLenum _depthFormat
 format of the depth texture, default: GL_DEPTH_COMPONENT
GLenum _depthType
 type of the depth attachment, default: GL_UNSIGNED_BYTE
GLuint _frameBufferID
 ID of the FBO.
int _height
 height of the FBO
GLint _internalColorFormat
 internal format of the depth texture, default: GL_RGBA
GLenum _internalDepthFormat
GLint _internalStencilFormat
 internal stencil buffer format
GLint _magFilter
 mag filterfor texture interpolation, default: GL_LINEAR
int _maxNumDrawBuffers
 number of maximum supported draw buffers|color attachments
GLint _minFilter
 min filterfor texture interpolation, default: GL_LINEAR
int _numColorAttachments
 number of color attachments
GLenum _passthrough_fragment_shader
GLenum _passthrough_program
 shader for float support
GLuint _passThroughProgram
GLuint _stencilAttachmentID
 Texture ID of the stencil attachment.
int _stencilDepth
 depth of the stencil buffer
GLenum _textureTarget
 texture target, default: GL_TEXTURE_RECTANGLE_ARB
GLint _viewport [4]
int _width
 width of the FBO
GLint _wrapS
 wrap s parameter for color attachments, default: GL_CLAMP_TO_EDGE
GLint _wrapT
 wrap t parameter for color attachments, default: GL_CLAMP_TO_EDGE

Private Types

typedef std::pair< std::string,
std::string
KeyVal

Private Member Functions

KeyVal getKeyValuePair (std::string token)
 get the key=value pair of a single token from the mode string
void parseModeString (const char *modeString)
 parse the mode string and set configuration

Detailed Description

Definition at line 95 of file FrameBufferObject.h.


Member Typedef Documentation

typedef std::pair<std::string, std::string> FramebufferObject::KeyVal [private]

Definition at line 285 of file FrameBufferObject.h.


Member Enumeration Documentation

Enumerator:
RGB_8 
RGB_16 
RGB_32 
RGBA_8 
RGBA_16 
RGBA_32 

Definition at line 101 of file FrameBufferObject.h.


Constructor & Destructor Documentation

FramebufferObject::FramebufferObject ( const char *  strMode = "rgba=3x8t depth=24t")

Definition at line 76 of file FrameBufferObject.cpp.

Definition at line 126 of file FrameBufferObject.cpp.


Member Function Documentation

void FramebufferObject::beginCapture ( bool  bEnablePassThroughShader = true)

enable and bind FBO if the color attachment is of type float a simple pass through fragment shader is automatically enabled to support 16/32 Bit depth at all, unfortunately this only works for the texture coordinates!!! these are convertex to the color in the shader, disable the pass through shader to support your own

Definition at line 773 of file FrameBufferObject.cpp.

void FramebufferObject::bind ( int  index = 0)

bind the color attachment with the index

Definition at line 172 of file FrameBufferObject.cpp.

bind the depth attachment

Definition at line 185 of file FrameBufferObject.cpp.

check errors using FBO extension function

Definition at line 1076 of file FrameBufferObject.cpp.

disable Texture Target

Definition at line 169 of file FrameBufferObject.h.

enable Texture Target

Definition at line 167 of file FrameBufferObject.h.

void FramebufferObject::endCapture ( bool  bDisablePassThroughShader = true)

disable and "unbind" FBO if the color attachment is of type float a simple pass through fragment shader is automatically enabled to support 16/32 Bit depth at all, unfortunately this only works for the texture coordinates!!! these are convertex to the color in the shader, disable the pass through shader to support your own

Definition at line 790 of file FrameBufferObject.cpp.

get the Texture ID of the color attachment with the index

Definition at line 198 of file FrameBufferObject.cpp.

get the Texture ID of the depth attachment

Definition at line 205 of file FrameBufferObject.cpp.

unsigned int FramebufferObject::getHeight ( void  )

get height of the FBO

Definition at line 165 of file FrameBufferObject.cpp.

get the key=value pair of a single token from the mode string

Definition at line 1060 of file FrameBufferObject.cpp.

get the Texture ID of the stencil attachment

Definition at line 212 of file FrameBufferObject.cpp.

get the Texture target

Definition at line 155 of file FrameBufferObject.h.

unsigned int FramebufferObject::getWidth ( void  )

get width of the FBO

Definition at line 158 of file FrameBufferObject.cpp.

bool FramebufferObject::initialize ( unsigned int  width,
unsigned int  height 
)

initialize the FBOs and Textures

Definition at line 247 of file FrameBufferObject.cpp.

void FramebufferObject::parseModeString ( const char *  modeString) [private]

parse the mode string and set configuration

Definition at line 805 of file FrameBufferObject.cpp.

Definition at line 1089 of file FrameBufferObject.cpp.

bool FramebufferObject::reInitialize ( unsigned int  width,
unsigned int  height,
const char *  strMode = "rgb=16t depth=24t" 
)

Definition at line 734 of file FrameBufferObject.cpp.

set the mag texture interpolation filter

Definition at line 226 of file FrameBufferObject.cpp.

set the min texture interpolation filter

Definition at line 219 of file FrameBufferObject.cpp.

set the wrap s

Definition at line 233 of file FrameBufferObject.cpp.

set the warp t

Definition at line 240 of file FrameBufferObject.cpp.


Member Data Documentation

use color attachment?

Definition at line 228 of file FrameBufferObject.h.

use color as RenderTexture?

Definition at line 230 of file FrameBufferObject.h.

use depth attachment?

Definition at line 233 of file FrameBufferObject.h.

use depth as RenderTexture?

Definition at line 235 of file FrameBufferObject.h.

FBO extension supported?

Definition at line 222 of file FrameBufferObject.h.

indicates if color buffer is a float texture

Definition at line 278 of file FrameBufferObject.h.

FBO initialized?

Definition at line 225 of file FrameBufferObject.h.

pass through shader program initialized?

Definition at line 247 of file FrameBufferObject.h.

use stencil attachment?

Definition at line 238 of file FrameBufferObject.h.

use stencil as RenderTexture?

Definition at line 240 of file FrameBufferObject.h.

color attachment depth

Definition at line 196 of file FrameBufferObject.h.

Texture IDs of the color attachment textures.

Definition at line 253 of file FrameBufferObject.h.

format of the color texture, default: GL_RGBA

Definition at line 189 of file FrameBufferObject.h.

type of the color attachment, default: GL_UNSIGNED_BYTE

Definition at line 193 of file FrameBufferObject.h.

Texture ID of the depth attachment.

Definition at line 262 of file FrameBufferObject.h.

format of the depth texture, default: GL_DEPTH_COMPONENT

Definition at line 199 of file FrameBufferObject.h.

type of the depth attachment, default: GL_UNSIGNED_BYTE

Definition at line 204 of file FrameBufferObject.h.

ID of the FBO.

Definition at line 250 of file FrameBufferObject.h.

int FramebufferObject::_height [protected]

height of the FBO

Definition at line 219 of file FrameBufferObject.h.

internal format of the depth texture, default: GL_RGBA

Definition at line 191 of file FrameBufferObject.h.

internal format of the depth texture, default: GL_DEPTH_COMPONENT24 other options: GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT32

Definition at line 202 of file FrameBufferObject.h.

internal stencil buffer format

Definition at line 244 of file FrameBufferObject.h.

mag filterfor texture interpolation, default: GL_LINEAR

Definition at line 214 of file FrameBufferObject.h.

number of maximum supported draw buffers|color attachments

Definition at line 259 of file FrameBufferObject.h.

min filterfor texture interpolation, default: GL_LINEAR

Definition at line 212 of file FrameBufferObject.h.

number of color attachments

Definition at line 256 of file FrameBufferObject.h.

Definition at line 274 of file FrameBufferObject.h.

shader for float support

Definition at line 273 of file FrameBufferObject.h.

Definition at line 275 of file FrameBufferObject.h.

Texture ID of the stencil attachment.

Definition at line 265 of file FrameBufferObject.h.

depth of the stencil buffer

Definition at line 242 of file FrameBufferObject.h.

texture target, default: GL_TEXTURE_RECTANGLE_ARB

Definition at line 186 of file FrameBufferObject.h.

save viewport before setting new one to restore it later avoid glPushAttrib() and glPopAttrib()!

Definition at line 269 of file FrameBufferObject.h.

int FramebufferObject::_width [protected]

width of the FBO

Definition at line 217 of file FrameBufferObject.h.

wrap s parameter for color attachments, default: GL_CLAMP_TO_EDGE

Definition at line 207 of file FrameBufferObject.h.

wrap t parameter for color attachments, default: GL_CLAMP_TO_EDGE

Definition at line 209 of file FrameBufferObject.h.


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


realtime_urdf_filter
Author(s): Nico Blodow
autogenerated on Mon Oct 6 2014 04:04:44