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

Frame Buffer Object abstraction. More...

#include <OgreGL3PlusFrameBufferObject.h>

+ Collaboration diagram for Ogre::GL3PlusFrameBufferObject:

Public Member Functions

 GL3PlusFrameBufferObject (GL3PlusFBOManager *manager, uint fsaa)
 
 ~GL3PlusFrameBufferObject ()
 
void attachDepthBuffer (DepthBuffer *depthBuffer)
 This function acts very similar to. More...
 
void bind ()
 Bind FrameBufferObject. More...
 
void bindSurface (size_t attachment, const GL3PlusSurfaceDesc &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...
 
uint32 getHeight ()
 
GL3PlusFBOManagergetManager ()
 
const GL3PlusSurfaceDescgetSurface (size_t attachment)
 
uint32 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

GL3PlusSurfaceDesc mColour [OGRE_MAX_MULTIPLE_RENDER_TARGETS]
 
GL3PlusSurfaceDesc mDepth
 
GLuint mFB
 
GL3PlusFBOManagermManager
 
GL3PlusSurfaceDesc mMultisampleColourBuffer
 
GLuint mMultisampleFB
 
GLsizei mNumSamples
 
GL3PlusSurfaceDesc mStencil
 

Detailed Description

Frame Buffer Object abstraction.

Definition at line 41 of file OgreGL3PlusFrameBufferObject.h.

Constructor & Destructor Documentation

Ogre::GL3PlusFrameBufferObject::GL3PlusFrameBufferObject ( GL3PlusFBOManager manager,
uint  fsaa 
)
Ogre::GL3PlusFrameBufferObject::~GL3PlusFrameBufferObject ( )

Member Function Documentation

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

This function acts very similar to.

See also
GL3PlusFBORenderTexture::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::GL3PlusFrameBufferObject::bind ( )

Bind FrameBufferObject.

void Ogre::GL3PlusFrameBufferObject::bindSurface ( size_t  attachment,
const GL3PlusSurfaceDesc target 
)

Bind a surface to a certain attachment point.

attachment: 0..OGRE_MAX_MULTIPLE_RENDER_TARGETS-1

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

Get the GL id for the FBO.

Definition at line 72 of file OgreGL3PlusFrameBufferObject.h.

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

Get the GL id for the multisample FBO.

Definition at line 74 of file OgreGL3PlusFrameBufferObject.h.

uint32 Ogre::GL3PlusFrameBufferObject::getHeight ( )
GL3PlusFBOManager* Ogre::GL3PlusFrameBufferObject::getManager ( )
inline

Definition at line 82 of file OgreGL3PlusFrameBufferObject.h.

const GL3PlusSurfaceDesc& Ogre::GL3PlusFrameBufferObject::getSurface ( size_t  attachment)
inline

Definition at line 83 of file OgreGL3PlusFrameBufferObject.h.

uint32 Ogre::GL3PlusFrameBufferObject::getWidth ( )

Accessors.

void Ogre::GL3PlusFrameBufferObject::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::GL3PlusFrameBufferObject::swapBuffers ( )

Swap buffers - only useful when using multisample buffers.

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

Unbind attachment.

Member Data Documentation

GL3PlusSurfaceDesc Ogre::GL3PlusFrameBufferObject::mColour[OGRE_MAX_MULTIPLE_RENDER_TARGETS]
private

Definition at line 93 of file OgreGL3PlusFrameBufferObject.h.

GL3PlusSurfaceDesc Ogre::GL3PlusFrameBufferObject::mDepth
private

Definition at line 90 of file OgreGL3PlusFrameBufferObject.h.

GLuint Ogre::GL3PlusFrameBufferObject::mFB
private

Definition at line 87 of file OgreGL3PlusFrameBufferObject.h.

GL3PlusFBOManager* Ogre::GL3PlusFrameBufferObject::mManager
private

Definition at line 85 of file OgreGL3PlusFrameBufferObject.h.

GL3PlusSurfaceDesc Ogre::GL3PlusFrameBufferObject::mMultisampleColourBuffer
private

Definition at line 89 of file OgreGL3PlusFrameBufferObject.h.

GLuint Ogre::GL3PlusFrameBufferObject::mMultisampleFB
private

Definition at line 88 of file OgreGL3PlusFrameBufferObject.h.

GLsizei Ogre::GL3PlusFrameBufferObject::mNumSamples
private

Definition at line 86 of file OgreGL3PlusFrameBufferObject.h.

GL3PlusSurfaceDesc Ogre::GL3PlusFrameBufferObject::mStencil
private

Definition at line 91 of file OgreGL3PlusFrameBufferObject.h.


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