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

More...

#include <OgreGL3PlusDepthBuffer.h>

+ Inheritance diagram for Ogre::GL3PlusDepthBuffer:
+ Collaboration diagram for Ogre::GL3PlusDepthBuffer:

Public Types

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

Public Member Functions

 GL3PlusDepthBuffer (uint16 poolId, GL3PlusRenderSystem *renderSystem, GL3PlusContext *creatorContext, GL3PlusRenderBuffer *depth, GL3PlusRenderBuffer *stencil, uint32 width, uint32 height, uint32 fsaa, uint32 multiSampleQuality, bool manual)
 
 ~GL3PlusDepthBuffer ()
 
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
 
GL3PlusRenderBuffergetDepthBuffer () const
 
virtual uint32 getFsaa () const
 
virtual const StringgetFsaaHint () const
 
GL3PlusContextgetGLContext () const
 
virtual uint32 getHeight () const
 
virtual uint16 getPoolId () const
 Gets the pool id in which this DepthBuffer lives. More...
 
GL3PlusRenderBuffergetStencilBuffer () 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
 
GL3PlusContextmCreatorContext
 
GL3PlusRenderBuffermDepthBuffer
 
uint32 mFsaa
 
String mFsaaHint
 
uint32 mHeight
 
bool mManual
 
uint32 mMultiSampleQuality
 
uint16 mPoolId
 
GL3PlusRenderSystemmRenderSystem
 
GL3PlusRenderBuffermStencilBuffer
 
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 51 of file OgreGL3PlusDepthBuffer.h.

Constructor & Destructor Documentation

Ogre::GL3PlusDepthBuffer::GL3PlusDepthBuffer ( uint16  poolId,
GL3PlusRenderSystem renderSystem,
GL3PlusContext creatorContext,
GL3PlusRenderBuffer depth,
GL3PlusRenderBuffer stencil,
uint32  width,
uint32  height,
uint32  fsaa,
uint32  multiSampleQuality,
bool  manual 
)
Ogre::GL3PlusDepthBuffer::~GL3PlusDepthBuffer ( )

Member Function Documentation

GL3PlusRenderBuffer* Ogre::GL3PlusDepthBuffer::getDepthBuffer ( ) const
inline

Definition at line 64 of file OgreGL3PlusDepthBuffer.h.

GL3PlusContext* Ogre::GL3PlusDepthBuffer::getGLContext ( ) const
inline

Definition at line 63 of file OgreGL3PlusDepthBuffer.h.

GL3PlusRenderBuffer* Ogre::GL3PlusDepthBuffer::getStencilBuffer ( ) const
inline

Definition at line 65 of file OgreGL3PlusDepthBuffer.h.

virtual bool Ogre::GL3PlusDepthBuffer::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

GL3PlusContext* Ogre::GL3PlusDepthBuffer::mCreatorContext
protected

Definition at line 69 of file OgreGL3PlusDepthBuffer.h.

GL3PlusRenderBuffer* Ogre::GL3PlusDepthBuffer::mDepthBuffer
protected

Definition at line 70 of file OgreGL3PlusDepthBuffer.h.

uint32 Ogre::GL3PlusDepthBuffer::mMultiSampleQuality
protected

Definition at line 68 of file OgreGL3PlusDepthBuffer.h.

GL3PlusRenderSystem* Ogre::GL3PlusDepthBuffer::mRenderSystem
protected

Definition at line 72 of file OgreGL3PlusDepthBuffer.h.

GL3PlusRenderBuffer* Ogre::GL3PlusDepthBuffer::mStencilBuffer
protected

Definition at line 71 of file OgreGL3PlusDepthBuffer.h.


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