OGRE  master
Object-Oriented Graphics Rendering Engine
Ogre::GLDepthBufferCommon Class Reference

OpenGL supports 3 different methods: FBO, pbuffer & Copy. More...

#include <OgreGLDepthBufferCommon.h>

+ Inheritance diagram for Ogre::GLDepthBufferCommon:

Public Member Functions

 GLDepthBufferCommon (uint16 poolId, GLRenderSystemCommon *renderSystem, GLContext *creatorContext, GLHardwarePixelBufferCommon *depth, GLHardwarePixelBufferCommon *stencil, const RenderTarget *target, bool isManual)
 
virtual ~GLDepthBufferCommon ()
 
GLHardwarePixelBufferCommongetDepthBuffer () const
 
GLContextgetGLContext () const
 
GLHardwarePixelBufferCommongetStencilBuffer () const
 
bool isCompatible (RenderTarget *renderTarget) const override
 Returns whether the specified RenderTarget is compatible with this DepthBuffer That is, this DepthBuffer can be attached to that RenderTarget. More...
 
- Public Member Functions inherited from Ogre::DepthBuffer
 DepthBuffer (uint16 poolId, uint32 width, uint32 height, uint32 fsaa, bool manual)
 
virtual ~DepthBuffer ()
 
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...
 
uint32 getFSAA () const
 
virtual uint32 getHeight () const
 
virtual uint16 getPoolId () const
 Gets the pool id in which this DepthBuffer lives. More...
 
virtual uint32 getWidth () const
 
bool isManual () const
 Manual DepthBuffers are cleared in RenderSystem's destructor. More...
 

Additional Inherited Members

- Public Types inherited from Ogre::DepthBuffer
enum  PoolId { POOL_NO_DEPTH = 0, POOL_MANUAL_USAGE = 0, POOL_DEFAULT = 1 }
 

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.

Constructor & Destructor Documentation

◆ GLDepthBufferCommon()

Ogre::GLDepthBufferCommon::GLDepthBufferCommon ( uint16  poolId,
GLRenderSystemCommon renderSystem,
GLContext creatorContext,
GLHardwarePixelBufferCommon depth,
GLHardwarePixelBufferCommon stencil,
const RenderTarget target,
bool  isManual 
)

◆ ~GLDepthBufferCommon()

virtual Ogre::GLDepthBufferCommon::~GLDepthBufferCommon ( )
virtual

Member Function Documentation

◆ isCompatible()

bool Ogre::GLDepthBufferCommon::isCompatible ( RenderTarget renderTarget) const
overridevirtual

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

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.

◆ getGLContext()

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

◆ getDepthBuffer()

GLHardwarePixelBufferCommon* Ogre::GLDepthBufferCommon::getDepthBuffer ( ) const
inline

◆ getStencilBuffer()

GLHardwarePixelBufferCommon* Ogre::GLDepthBufferCommon::getStencilBuffer ( ) const
inline

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