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

Factory for GL Frame Buffer Objects, and related things. More...

#include <OgreGLESFBORenderTexture.h>

+ Inheritance diagram for Ogre::GLESFBOManager:
+ Collaboration diagram for Ogre::GLESFBOManager:

Classes

struct  FormatProperties
 Frame Buffer Object properties for a certain texture format. More...
 
struct  RBFormat
 Stencil and depth renderbuffers of the same format are re-used between surfaces of the same size and format. More...
 
struct  RBRef
 

Public Member Functions

 GLESFBOManager ()
 
 ~GLESFBOManager ()
 
void bind (RenderTarget *target)
 Bind a certain render target if it is a FBO. More...
 
bool checkFormat (PixelFormat format)
 Check if a certain format is usable as FBO rendertarget format. More...
 
virtual MultiRenderTargetcreateMultiRenderTarget (const String &name)
 Create a multi render target. More...
 
virtual GLESFBORenderTexturecreateRenderTexture (const String &name, const GLESSurfaceDesc &target, bool writeGamma, uint fsaa)
 Create a texture rendertarget object. More...
 
void getBestDepthStencil (GLenum internalFormat, GLenum *depthFormat, GLenum *stencilFormat)
 Get best depth and stencil supported for given internalFormat. More...
 
virtual PixelFormat getSupportedAlternative (PixelFormat format)
 Get the closest supported alternative format. More...
 
GLuint getTemporaryFBO ()
 Get a FBO without depth/stencil for temporary use, like blitting between textures. More...
 
void releaseRenderBuffer (const GLESSurfaceDesc &surface)
 Release a render buffer. More...
 
GLESSurfaceDesc requestRenderBuffer (GLenum format, size_t width, size_t height, uint fsaa)
 Request a render buffer. More...
 
void requestRenderBuffer (const GLESSurfaceDesc &surface)
 Request the specify render buffer in case shared somewhere. More...
 
void unbind (RenderTarget *target)
 Unbind a certain render target. More...
 

Static Public Member Functions

static GLESRTTManagergetSingleton (void)
 
static GLESRTTManagergetSingletonPtr (void)
 

Static Protected Attributes

static GLESRTTManagermsSingleton
 

Private Types

typedef map< RBFormat, RBRef >
::type 
RenderBufferMap
 

Private Member Functions

GLuint _tryFormat (GLenum depthFormat, GLenum stencilFormat)
 
bool _tryPackedFormat (GLenum packedFormat)
 
void detectFBOFormats ()
 Detect allowed FBO formats. More...
 

Private Attributes

FormatProperties mProps [PF_COUNT]
 Properties for all internal formats defined by OGRE. More...
 
RenderBufferMap mRenderBufferMap
 
GLuint mTempFBO
 Temporary FBO identifier. More...
 

Detailed Description

Factory for GL Frame Buffer Objects, and related things.

Definition at line 61 of file OgreGLESFBORenderTexture.h.

Member Typedef Documentation

Definition at line 177 of file OgreGLESFBORenderTexture.h.

Constructor & Destructor Documentation

Ogre::GLESFBOManager::GLESFBOManager ( )
Ogre::GLESFBOManager::~GLESFBOManager ( )

Member Function Documentation

GLuint Ogre::GLESFBOManager::_tryFormat ( GLenum  depthFormat,
GLenum  stencilFormat 
)
private
bool Ogre::GLESFBOManager::_tryPackedFormat ( GLenum  packedFormat)
private
void Ogre::GLESFBOManager::bind ( RenderTarget target)
virtual

Bind a certain render target if it is a FBO.

If it is not a FBO, bind the main frame buffer.

Implements Ogre::GLESRTTManager.

bool Ogre::GLESFBOManager::checkFormat ( PixelFormat  format)
inlinevirtual

Check if a certain format is usable as FBO rendertarget format.

Implements Ogre::GLESRTTManager.

Definition at line 102 of file OgreGLESFBORenderTexture.h.

virtual MultiRenderTarget* Ogre::GLESFBOManager::createMultiRenderTarget ( const String name)
virtual

Create a multi render target.

Reimplemented from Ogre::GLESRTTManager.

virtual GLESFBORenderTexture* Ogre::GLESFBOManager::createRenderTexture ( const String name,
const GLESSurfaceDesc target,
bool  writeGamma,
uint  fsaa 
)
virtual

Create a texture rendertarget object.

Implements Ogre::GLESRTTManager.

void Ogre::GLESFBOManager::detectFBOFormats ( )
private

Detect allowed FBO formats.

void Ogre::GLESFBOManager::getBestDepthStencil ( GLenum  internalFormat,
GLenum *  depthFormat,
GLenum *  stencilFormat 
)
virtual

Get best depth and stencil supported for given internalFormat.

Reimplemented from Ogre::GLESRTTManager.

static GLESRTTManager & Ogre::Singleton< GLESRTTManager >::getSingleton ( void  )
inlinestaticinherited

Definition at line 90 of file OgreSingleton.h.

static GLESRTTManager * Ogre::Singleton< GLESRTTManager >::getSingletonPtr ( void  )
inlinestaticinherited

Definition at line 92 of file OgreSingleton.h.

virtual PixelFormat Ogre::GLESRTTManager::getSupportedAlternative ( PixelFormat  format)
virtualinherited

Get the closest supported alternative format.

If format is supported, returns format.

GLuint Ogre::GLESFBOManager::getTemporaryFBO ( )
inline

Get a FBO without depth/stencil for temporary use, like blitting between textures.

Definition at line 106 of file OgreGLESFBORenderTexture.h.

void Ogre::GLESFBOManager::releaseRenderBuffer ( const GLESSurfaceDesc surface)

Release a render buffer.

Ignore silently if surface.buffer is 0.

GLESSurfaceDesc Ogre::GLESFBOManager::requestRenderBuffer ( GLenum  format,
size_t  width,
size_t  height,
uint  fsaa 
)

Request a render buffer.

If format is GL_NONE, return a zero buffer.

void Ogre::GLESFBOManager::requestRenderBuffer ( const GLESSurfaceDesc surface)

Request the specify render buffer in case shared somewhere.

Ignore silently if surface.buffer is 0.

void Ogre::GLESFBOManager::unbind ( RenderTarget target)
inlinevirtual

Unbind a certain render target.

No-op for FBOs.

Implements Ogre::GLESRTTManager.

Definition at line 74 of file OgreGLESFBORenderTexture.h.

Member Data Documentation

FormatProperties Ogre::GLESFBOManager::mProps[PF_COUNT]
private

Properties for all internal formats defined by OGRE.

Definition at line 126 of file OgreGLESFBORenderTexture.h.

RenderBufferMap Ogre::GLESFBOManager::mRenderBufferMap
private

Definition at line 178 of file OgreGLESFBORenderTexture.h.

GLESRTTManager * Ogre::Singleton< GLESRTTManager >::msSingleton
staticprotectedinherited

Definition at line 75 of file OgreSingleton.h.

GLuint Ogre::GLESFBOManager::mTempFBO
private

Temporary FBO identifier.

Definition at line 183 of file OgreGLESFBORenderTexture.h.


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