GlobeEngine
ge::FrameBufferObject Class Reference

#include <FrameBufferObject.h>

Inheritance diagram for ge::FrameBufferObject:
geHikingViewer::HikingFrameBufferObject

Public Types

enum  FBOTYPE {
  NORMAL =0, COLOR, STENCIL_ONLY, DEPTH_ONLY,
  DEPTH_STENCIL, HDR_ONLY
}
 

Public Member Functions

 FrameBufferObject ()
 
virtual ~FrameBufferObject ()
 
void clear ()
 
void setupFrameBuffer (vmml::Vector2i _size)
 
void resizeFrameBuffer (vmml::Vector2i _size)
 
void createBasicBuffersAndColorBuffers (vmml::Vector2i _size, int _channels)
 
void createBasicBufferSetup (vmml::Vector2i _size)
 
void createDepthBuffer (vmml::Vector2i _size)
 
void createStencilBuffer (vmml::Vector2i _size, int _channels=3)
 
void createGBuffer (vmml::Vector2i _size)
 
void createGBufferWithIDLayer (vmml::Vector2i _size)
 
void addLayerType (ge::TextureProperties2D _prop)
 
void bind ()
 
void release ()
 
const std::shared_ptr< TextureHandlegetColorTexture (GLint _index) const
 
void getOpenGLError (std::string _input)
 
GLubyte * getPickingResult (int _x, int _y, int _w, int _h, GLint _layer=2)
 
GLfloat * getPickingResultf (int _x, int _y, int _w, int _h, GLint _layer=2)
 
void saveFramebufferToFile (std::string _filePath)
 
int getStandardFramebufferID ()
 
int lookupStandardFramebufferID ()
 
void setStandardFramebufferID (int _id)
 
int getWidth () const
 
int getHeight () const
 
void printMaximumSizes ()
 

Public Attributes

enum ge::FrameBufferObject::FBOTYPE FBOTYPE
 
GLvoid * notype
 
GLfloat * alpha
 
GLubyte * rgba
 

Protected Member Functions

void setSize (int _width, int _height)
 
void createFrameBufferHandle ()
 
void setupTextureChannels ()
 
void attachColorChannels ()
 
void addTextureChannel (ge::TextureProperties2D _prop, std::string _name="")
 
void createBasicLayerSetup ()
 
void attachTextureToFramebuffer (GLenum _attachement, GLenum _textarget, GLuint _texHandle, GLint _level)
 
void callDrawBuffers ()
 
void checkFramebufferStatus ()
 
void setupRenderBuffer (GLenum _internalFormat, GLenum _assignedAttachement)
 
void deleteMemory ()
 
void deletePickbuffer ()
 
void deleteFrameBufferHandle ()
 
void retrievePickResult (int _x, int _y, int _w, int _h, GLint _layer, GLenum _format, GLenum _type)
 

Protected Attributes

RenderBufferObject rbo
 
GLuint fboId
 
GLuint sboId
 
GLenum * colorBuffers
 
std::vector< ge::TextureProperties2Dlayertypes
 
std::vector< std::shared_ptr< ge::TextureHandle > > colorMaps
 
ge::DepthMap2Drgba stencilMap
 
GLsizei width
 
GLsizei height
 
union {
   GLvoid *   notype
 
   GLfloat *   alpha
 
   GLubyte *   rgba
 
pickdata
 
int standardFBOid
 

Member Enumeration Documentation

Enumerator
NORMAL 
COLOR 
STENCIL_ONLY 
DEPTH_ONLY 
DEPTH_STENCIL 
HDR_ONLY 

Constructor & Destructor Documentation

ge::FrameBufferObject::FrameBufferObject ( )
ge::FrameBufferObject::~FrameBufferObject ( )
virtual

Member Function Documentation

void ge::FrameBufferObject::addLayerType ( ge::TextureProperties2D  _prop)
void ge::FrameBufferObject::addTextureChannel ( ge::TextureProperties2D  _prop,
std::string  _name = "" 
)
protected
void ge::FrameBufferObject::attachColorChannels ( )
protected
void ge::FrameBufferObject::attachTextureToFramebuffer ( GLenum  _attachement,
GLenum  _textarget,
GLuint  _texHandle,
GLint  _level 
)
protected
void ge::FrameBufferObject::bind ( )
void ge::FrameBufferObject::callDrawBuffers ( )
protected
void ge::FrameBufferObject::checkFramebufferStatus ( )
protected
void ge::FrameBufferObject::clear ( )
void ge::FrameBufferObject::createBasicBuffersAndColorBuffers ( vmml::Vector2i  _size,
int  _channels 
)
void ge::FrameBufferObject::createBasicBufferSetup ( vmml::Vector2i  _size)
void ge::FrameBufferObject::createBasicLayerSetup ( )
protected
void ge::FrameBufferObject::createDepthBuffer ( vmml::Vector2i  _size)
void ge::FrameBufferObject::createFrameBufferHandle ( )
protected
void ge::FrameBufferObject::createGBuffer ( vmml::Vector2i  _size)
void ge::FrameBufferObject::createGBufferWithIDLayer ( vmml::Vector2i  _size)
void ge::FrameBufferObject::createStencilBuffer ( vmml::Vector2i  _size,
int  _channels = 3 
)
void ge::FrameBufferObject::deleteFrameBufferHandle ( )
protected
void ge::FrameBufferObject::deleteMemory ( )
protected
void ge::FrameBufferObject::deletePickbuffer ( )
protected
const std::shared_ptr< TextureHandle > ge::FrameBufferObject::getColorTexture ( GLint  _index) const
int ge::FrameBufferObject::getHeight ( ) const
void ge::FrameBufferObject::getOpenGLError ( std::string  _input)
GLubyte * ge::FrameBufferObject::getPickingResult ( int  _x,
int  _y,
int  _w,
int  _h,
GLint  _layer = 2 
)
GLfloat * ge::FrameBufferObject::getPickingResultf ( int  _x,
int  _y,
int  _w,
int  _h,
GLint  _layer = 2 
)
int ge::FrameBufferObject::getStandardFramebufferID ( )
int ge::FrameBufferObject::getWidth ( ) const
int ge::FrameBufferObject::lookupStandardFramebufferID ( )
void ge::FrameBufferObject::printMaximumSizes ( )
void ge::FrameBufferObject::release ( )
void ge::FrameBufferObject::resizeFrameBuffer ( vmml::Vector2i  _size)
void ge::FrameBufferObject::retrievePickResult ( int  _x,
int  _y,
int  _w,
int  _h,
GLint  _layer,
GLenum  _format,
GLenum  _type 
)
protected
void ge::FrameBufferObject::saveFramebufferToFile ( std::string  _filePath)
void ge::FrameBufferObject::setSize ( int  _width,
int  _height 
)
protected
void ge::FrameBufferObject::setStandardFramebufferID ( int  _id)
void ge::FrameBufferObject::setupFrameBuffer ( vmml::Vector2i  _size)
void ge::FrameBufferObject::setupRenderBuffer ( GLenum  _internalFormat,
GLenum  _assignedAttachement 
)
protected
void ge::FrameBufferObject::setupTextureChannels ( )
protected

Member Data Documentation

GLfloat* ge::FrameBufferObject::alpha
GLenum* ge::FrameBufferObject::colorBuffers
protected
std::vector< std::shared_ptr<ge::TextureHandle> > ge::FrameBufferObject::colorMaps
protected
GLuint ge::FrameBufferObject::fboId
protected
GLsizei ge::FrameBufferObject::height
protected
std::vector< ge::TextureProperties2D > ge::FrameBufferObject::layertypes
protected
GLvoid* ge::FrameBufferObject::notype
union { ... } ge::FrameBufferObject::pickdata
RenderBufferObject ge::FrameBufferObject::rbo
protected
GLubyte* ge::FrameBufferObject::rgba
GLuint ge::FrameBufferObject::sboId
protected
int ge::FrameBufferObject::standardFBOid
protected
ge::DepthMap2Drgba ge::FrameBufferObject::stencilMap
protected
GLsizei ge::FrameBufferObject::width
protected

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