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

More...

#include <OgreGLDepthBuffer.h>

+ Inheritance diagram for Ogre::GLDepthBuffer:
+ Collaboration diagram for Ogre::GLDepthBuffer:

Public Types

enum  PoolId { POOL_NO_DEPTH = 0, POOL_MANUAL_USAGE = 0, POOL_DEFAULT = 1 }
 

Public Member Functions

 GLDepthBuffer (uint16 poolId, GLRenderSystem *renderSystem, GLContext *creatorContext, GLRenderBuffer *depth, GLRenderBuffer *stencil, uint32 width, uint32 height, uint32 fsaa, uint32 multiSampleQuality, bool isManual)
 
 ~GLDepthBuffer ()
 
virtual void _notifyRenderTargetAttached (RenderTarget *renderTarget)
 Called when a RenderTarget is attaches this DepthBuffer. More...
 
virtual void _notifyRenderTargetDetached (RenderTarget *renderTarget)
 Called when a RenderTarget is detaches from this DepthBuffer. More...
 
void _setPoolId (uint16 poolId)
 Sets the pool id in which this DepthBuffer lives. More...
 
virtual uint16 getBitDepth () const
 
GLRenderBuffergetDepthBuffer () const
 
virtual uint32 getFsaa () const
 
virtual const StringgetFsaaHint () const
 
GLContextgetGLContext () const
 
virtual uint32 getHeight () const
 
virtual uint16 getPoolId () const
 Gets the pool id in which this DepthBuffer lives. More...
 
GLRenderBuffergetStencilBuffer () const
 
virtual uint32 getWidth () const
 
virtual bool isCompatible (RenderTarget *renderTarget) const
 Returns whether the specified RenderTarget is compatible with this DepthBuffer That is, this DepthBuffer can be attached to that RenderTarget. More...
 
bool isManual () const
 Manual DepthBuffers are cleared in RenderSystem's destructor. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 

Protected Types

typedef set< RenderTarget * >::type RenderTargetSet
 

Protected Member Functions

void detachFromAllRenderTargets ()
 

Protected Attributes

RenderTargetSet mAttachedRenderTargets
 
uint16 mBitDepth
 
GLContextmCreatorContext
 
GLRenderBuffermDepthBuffer
 
uint32 mFsaa
 
String mFsaaHint
 
uint32 mHeight
 
bool mManual
 
uint32 mMultiSampleQuality
 
uint16 mPoolId
 
GLRenderSystemmRenderSystem
 
GLRenderBuffermStencilBuffer
 
uint32 mWidth
 

Detailed Description

OpenGL supports 3 different methods: FBO, pbuffer & Copy. Each one has it's own limitations. Non-FBO methods are solved using "dummy" DepthBuffers. That is, a DepthBuffer pointer is attached to the RenderTarget (for the sake of consistency) but it doesn't actually contain a Depth surface/renderbuffer (mDepthBuffer & mStencilBuffer are null pointers all the time) Those dummy DepthBuffers are identified thanks to their GL context. Note that FBOs don't allow sharing with the main window's depth buffer. Therefore even when FBO is enabled, a dummy DepthBuffer is still used to manage the windows.

Definition at line 47 of file OgreGLDepthBuffer.h.

Constructor & Destructor Documentation

Ogre::GLDepthBuffer::GLDepthBuffer ( uint16  poolId,
GLRenderSystem renderSystem,
GLContext creatorContext,
GLRenderBuffer depth,
GLRenderBuffer stencil,
uint32  width,
uint32  height,
uint32  fsaa,
uint32  multiSampleQuality,
bool  isManual 
)
Ogre::GLDepthBuffer::~GLDepthBuffer ( )

Member Function Documentation

GLRenderBuffer* Ogre::GLDepthBuffer::getDepthBuffer ( ) const
inline

Definition at line 60 of file OgreGLDepthBuffer.h.

References mDepthBuffer.

GLContext* Ogre::GLDepthBuffer::getGLContext ( ) const
inline

Definition at line 59 of file OgreGLDepthBuffer.h.

References mCreatorContext.

GLRenderBuffer* Ogre::GLDepthBuffer::getStencilBuffer ( ) const
inline

Definition at line 61 of file OgreGLDepthBuffer.h.

References mStencilBuffer.

virtual bool Ogre::GLDepthBuffer::isCompatible ( RenderTarget renderTarget) const
virtual

Returns whether the specified RenderTarget is compatible with this DepthBuffer That is, this DepthBuffer can be attached to that RenderTarget.

Remarks
Most APIs impose the following restrictions: Width & height must be equal or higher than the render target's They must be of the same bit depth. They need to have the same FSAA setting
Parameters
renderTargetThe render target to test against

Reimplemented from Ogre::DepthBuffer.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

Member Data Documentation

GLContext* Ogre::GLDepthBuffer::mCreatorContext
protected

Definition at line 65 of file OgreGLDepthBuffer.h.

Referenced by getGLContext().

GLRenderBuffer* Ogre::GLDepthBuffer::mDepthBuffer
protected

Definition at line 66 of file OgreGLDepthBuffer.h.

Referenced by getDepthBuffer().

uint32 Ogre::GLDepthBuffer::mMultiSampleQuality
protected

Definition at line 64 of file OgreGLDepthBuffer.h.

GLRenderSystem* Ogre::GLDepthBuffer::mRenderSystem
protected

Definition at line 68 of file OgreGLDepthBuffer.h.

GLRenderBuffer* Ogre::GLDepthBuffer::mStencilBuffer
protected

Definition at line 67 of file OgreGLDepthBuffer.h.

Referenced by getStencilBuffer().


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