OGRE  1.8
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::GLFrameBufferObject Class Reference

Frame Buffer Object abstraction. More...

#include <OgreGLFrameBufferObject.h>

+ Collaboration diagram for Ogre::GLFrameBufferObject:

Public Member Functions

 GLFrameBufferObject (GLFBOManager *manager, uint fsaa)
 
 ~GLFrameBufferObject ()
 
void attachDepthBuffer (DepthBuffer *depthBuffer)
 This function acts very similar to. More...
 
void bind ()
 Bind FrameBufferObject. More...
 
void bindSurface (size_t attachment, const GLSurfaceDesc &target)
 Bind a surface to a certain attachment point. More...
 
void detachDepthBuffer ()
 
PixelFormat getFormat ()
 
GLsizei getFSAA ()
 
GLuint getGLFBOID () const
 Get the GL id for the FBO. More...
 
GLuint getGLMultisampleFBOID () const
 Get the GL id for the multisample FBO. More...
 
size_t getHeight ()
 
GLFBOManagergetManager ()
 
const GLSurfaceDescgetSurface (size_t attachment)
 
size_t getWidth ()
 Accessors. More...
 
void swapBuffers ()
 Swap buffers - only useful when using multisample buffers. More...
 
void unbindSurface (size_t attachment)
 Unbind attachment. More...
 

Private Member Functions

void initialise ()
 Initialise object (find suitable depth and stencil format). More...
 

Private Attributes

GLSurfaceDesc mColour [OGRE_MAX_MULTIPLE_RENDER_TARGETS]
 
GLSurfaceDesc mDepth
 
GLuint mFB
 
GLFBOManagermManager
 
GLSurfaceDesc mMultisampleColourBuffer
 
GLuint mMultisampleFB
 
GLsizei mNumSamples
 
GLSurfaceDesc mStencil
 

Detailed Description

Frame Buffer Object abstraction.

Definition at line 38 of file OgreGLFrameBufferObject.h.

Constructor & Destructor Documentation

Ogre::GLFrameBufferObject::GLFrameBufferObject ( GLFBOManager manager,
uint  fsaa 
)
Ogre::GLFrameBufferObject::~GLFrameBufferObject ( )

Member Function Documentation

void Ogre::GLFrameBufferObject::attachDepthBuffer ( DepthBuffer depthBuffer)

This function acts very similar to.

See also
GLFBORenderTexture::attachDepthBuffer The difference between D3D & OGL is that D3D setups the DepthBuffer before rendering, while OGL setups the DepthBuffer per FBO. So the DepthBuffer (RenderBuffer) needs to be attached for OGL.
void Ogre::GLFrameBufferObject::bind ( )

Bind FrameBufferObject.

void Ogre::GLFrameBufferObject::bindSurface ( size_t  attachment,
const GLSurfaceDesc target 
)

Bind a surface to a certain attachment point.

attachment: 0..OGRE_MAX_MULTIPLE_RENDER_TARGETS-1

void Ogre::GLFrameBufferObject::detachDepthBuffer ( )
PixelFormat Ogre::GLFrameBufferObject::getFormat ( )
GLsizei Ogre::GLFrameBufferObject::getFSAA ( )
GLuint Ogre::GLFrameBufferObject::getGLFBOID ( ) const
inline

Get the GL id for the FBO.

Definition at line 69 of file OgreGLFrameBufferObject.h.

GLuint Ogre::GLFrameBufferObject::getGLMultisampleFBOID ( ) const
inline

Get the GL id for the multisample FBO.

Definition at line 71 of file OgreGLFrameBufferObject.h.

size_t Ogre::GLFrameBufferObject::getHeight ( )
GLFBOManager* Ogre::GLFrameBufferObject::getManager ( )
inline

Definition at line 79 of file OgreGLFrameBufferObject.h.

const GLSurfaceDesc& Ogre::GLFrameBufferObject::getSurface ( size_t  attachment)
inline

Definition at line 80 of file OgreGLFrameBufferObject.h.

size_t Ogre::GLFrameBufferObject::getWidth ( )

Accessors.

void Ogre::GLFrameBufferObject::initialise ( )
private

Initialise object (find suitable depth and stencil format).

Must be called every time the bindings change. It fails with an exception (ERR_INVALIDPARAMS) if:

  • Attachment point 0 has no binding
  • Not all bound surfaces have the same size
  • Not all bound surfaces have the same internal format
void Ogre::GLFrameBufferObject::swapBuffers ( )

Swap buffers - only useful when using multisample buffers.

void Ogre::GLFrameBufferObject::unbindSurface ( size_t  attachment)

Unbind attachment.

Member Data Documentation

GLSurfaceDesc Ogre::GLFrameBufferObject::mColour[OGRE_MAX_MULTIPLE_RENDER_TARGETS]
private

Definition at line 90 of file OgreGLFrameBufferObject.h.

GLSurfaceDesc Ogre::GLFrameBufferObject::mDepth
private

Definition at line 87 of file OgreGLFrameBufferObject.h.

GLuint Ogre::GLFrameBufferObject::mFB
private

Definition at line 84 of file OgreGLFrameBufferObject.h.

GLFBOManager* Ogre::GLFrameBufferObject::mManager
private

Definition at line 82 of file OgreGLFrameBufferObject.h.

GLSurfaceDesc Ogre::GLFrameBufferObject::mMultisampleColourBuffer
private

Definition at line 86 of file OgreGLFrameBufferObject.h.

GLuint Ogre::GLFrameBufferObject::mMultisampleFB
private

Definition at line 85 of file OgreGLFrameBufferObject.h.

GLsizei Ogre::GLFrameBufferObject::mNumSamples
private

Definition at line 83 of file OgreGLFrameBufferObject.h.

GLSurfaceDesc Ogre::GLFrameBufferObject::mStencil
private

Definition at line 88 of file OgreGLFrameBufferObject.h.


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