Classes | Public Member Functions | Static Public Member Functions | Static Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
Ogre::GL3PlusFBOManager Class Reference

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

#include <OgreGL3PlusFBORenderTexture.h>

Inheritance diagram for Ogre::GL3PlusFBOManager:
Inheritance graph
[legend]

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

 GL3PlusFBOManager ()
 
 ~GL3PlusFBOManager ()
 
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 GL3PlusFBORenderTexturecreateRenderTexture (const String &name, const GL3PlusSurfaceDesc &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 GL3PlusSurfaceDesc &surface)
 Release a render buffer. More...
 
GL3PlusSurfaceDesc requestRenderBuffer (GLenum format, uint32 width, uint32 height, uint fsaa)
 Request a render buffer. More...
 
void requestRenderBuffer (const GL3PlusSurfaceDesc &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 GL3PlusRTTManagergetSingleton (void)
 
static GL3PlusRTTManagergetSingletonPtr (void)
 

Static Protected Attributes

static GL3PlusRTTManagermsSingleton
 

Private Types

typedef map< RBFormat, RBRef >::type RenderBufferMap
 

Private Member Functions

void _createTempFramebuffer (int ogreFormat, GLuint internalFormat, GLuint fmt, GLenum dataType, GLuint &fb, GLuint &tid)
 
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 OgreGL3PlusFBORenderTexture.h.

Member Typedef Documentation

◆ RenderBufferMap

Definition at line 178 of file OgreGL3PlusFBORenderTexture.h.

Constructor & Destructor Documentation

◆ GL3PlusFBOManager()

Ogre::GL3PlusFBOManager::GL3PlusFBOManager ( )

◆ ~GL3PlusFBOManager()

Ogre::GL3PlusFBOManager::~GL3PlusFBOManager ( )

Member Function Documentation

◆ _createTempFramebuffer()

void Ogre::GL3PlusFBOManager::_createTempFramebuffer ( int  ogreFormat,
GLuint  internalFormat,
GLuint  fmt,
GLenum  dataType,
GLuint &  fb,
GLuint &  tid 
)
private

◆ _tryFormat()

GLuint Ogre::GL3PlusFBOManager::_tryFormat ( GLenum  depthFormat,
GLenum  stencilFormat 
)
private

◆ _tryPackedFormat()

bool Ogre::GL3PlusFBOManager::_tryPackedFormat ( GLenum  packedFormat)
private

◆ bind()

void Ogre::GL3PlusFBOManager::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::GL3PlusRTTManager.

◆ checkFormat()

bool Ogre::GL3PlusFBOManager::checkFormat ( PixelFormat  format)
virtual

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

Implements Ogre::GL3PlusRTTManager.

Definition at line 102 of file OgreGL3PlusFBORenderTexture.h.

◆ createMultiRenderTarget()

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

Create a multi render target.

Reimplemented from Ogre::GL3PlusRTTManager.

◆ createRenderTexture()

virtual GL3PlusFBORenderTexture* Ogre::GL3PlusFBOManager::createRenderTexture ( const String name,
const GL3PlusSurfaceDesc target,
bool  writeGamma,
uint  fsaa 
)
virtual

Create a texture rendertarget object.

Implements Ogre::GL3PlusRTTManager.

◆ detectFBOFormats()

void Ogre::GL3PlusFBOManager::detectFBOFormats ( )
private

Detect allowed FBO formats.

◆ getBestDepthStencil()

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

Get best depth and stencil supported for given internalFormat.

Reimplemented from Ogre::GL3PlusRTTManager.

◆ getSingleton()

static GL3PlusRTTManager & Ogre::Singleton< GL3PlusRTTManager >::getSingleton ( void  )
staticinherited

Definition at line 90 of file OgreSingleton.h.

◆ getSingletonPtr()

static GL3PlusRTTManager * Ogre::Singleton< GL3PlusRTTManager >::getSingletonPtr ( void  )
staticinherited

Definition at line 92 of file OgreSingleton.h.

◆ getSupportedAlternative()

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

Get the closest supported alternative format.

If format is supported, returns format.

◆ getTemporaryFBO()

GLuint Ogre::GL3PlusFBOManager::getTemporaryFBO ( )

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

Definition at line 106 of file OgreGL3PlusFBORenderTexture.h.

◆ releaseRenderBuffer()

void Ogre::GL3PlusFBOManager::releaseRenderBuffer ( const GL3PlusSurfaceDesc surface)

Release a render buffer.

Ignore silently if surface.buffer is 0.

◆ requestRenderBuffer() [1/2]

GL3PlusSurfaceDesc Ogre::GL3PlusFBOManager::requestRenderBuffer ( GLenum  format,
uint32  width,
uint32  height,
uint  fsaa 
)

Request a render buffer.

If format is GL_NONE, return a zero buffer.

◆ requestRenderBuffer() [2/2]

void Ogre::GL3PlusFBOManager::requestRenderBuffer ( const GL3PlusSurfaceDesc surface)

Request the specify render buffer in case shared somewhere.

Ignore silently if surface.buffer is 0.

◆ unbind()

void Ogre::GL3PlusFBOManager::unbind ( RenderTarget target)
virtual

Unbind a certain render target.

No-op for FBOs.

Implements Ogre::GL3PlusRTTManager.

Definition at line 74 of file OgreGL3PlusFBORenderTexture.h.

Member Data Documentation

◆ mProps

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

Properties for all internal formats defined by OGRE.

Definition at line 126 of file OgreGL3PlusFBORenderTexture.h.

◆ mRenderBufferMap

RenderBufferMap Ogre::GL3PlusFBOManager::mRenderBufferMap
private

Definition at line 179 of file OgreGL3PlusFBORenderTexture.h.

◆ msSingleton

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

Definition at line 75 of file OgreSingleton.h.

◆ mTempFBO

GLuint Ogre::GL3PlusFBOManager::mTempFBO
private

Temporary FBO identifier.

Definition at line 183 of file OgreGL3PlusFBORenderTexture.h.


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

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Oct 22 2017 04:04:15