OGRE  1.10.12
Object-Oriented Graphics Rendering Engine
Ogre::GLES2DepthBuffer Class Reference

More...

#include <OgreGLES2DepthBuffer.h>

+ Inheritance diagram for Ogre::GLES2DepthBuffer:

Public Types

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

Public Member Functions

 GLES2DepthBuffer (uint16 poolId, GLES2RenderSystem *renderSystem, GLContext *creatorContext, GLES2RenderBuffer *depth, GLES2RenderBuffer *stencil, uint32 width, uint32 height, uint32 fsaa, uint32 multiSampleQuality, bool isManual)
 
 ~GLES2DepthBuffer ()
 
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
 
GLES2RenderBuffergetDepthBuffer () 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...
 
GLES2RenderBuffergetStencilBuffer () 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...
 

Detailed Description

OpenGL supports 2 different methods: FBO & 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

◆ GLES2DepthBuffer()

Ogre::GLES2DepthBuffer::GLES2DepthBuffer ( uint16  poolId,
GLES2RenderSystem renderSystem,
GLContext creatorContext,
GLES2RenderBuffer depth,
GLES2RenderBuffer stencil,
uint32  width,
uint32  height,
uint32  fsaa,
uint32  multiSampleQuality,
bool  isManual 
)

◆ ~GLES2DepthBuffer()

Ogre::GLES2DepthBuffer::~GLES2DepthBuffer ( )

Member Function Documentation

◆ isCompatible()

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

◆ getGLContext()

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

◆ getDepthBuffer()

GLES2RenderBuffer* Ogre::GLES2DepthBuffer::getDepthBuffer ( ) const
inline

◆ getStencilBuffer()

GLES2RenderBuffer* Ogre::GLES2DepthBuffer::getStencilBuffer ( ) const
inline

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