![]() |
OGRE 2.1
Object-Oriented Graphics Rendering Engine
|
#include <OgreGLES2DepthBuffer.h>
Public Types | |
enum | PoolId { POOL_NO_DEPTH = 0 , POOL_MANUAL_USAGE = 0 , POOL_DEFAULT = 1 , POOL_NON_SHAREABLE = 65534 , POOL_INVALID = 65535 } |
Static Public Attributes | |
static PixelFormat | DefaultDepthBufferFormat |
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.
|
inherited |
Ogre::GLES2DepthBuffer::GLES2DepthBuffer | ( | uint16 | poolId, |
GLES2RenderSystem * | renderSystem, | ||
GLES2Context * | creatorContext, | ||
GLenum | depthFormat, | ||
GLenum | stencilFormat, | ||
uint32 | width, | ||
uint32 | height, | ||
uint32 | fsaa, | ||
uint32 | multiSampleQuality, | ||
PixelFormat | pixelFormat, | ||
bool | isDepthTexture, | ||
bool | isManual | ||
) |
Ogre::GLES2DepthBuffer::~GLES2DepthBuffer | ( | ) |
|
virtualinherited |
Called when a RenderTarget is attaches this DepthBuffer.
renderTarget | The RenderTarget that has just been attached |
|
virtualinherited |
Called when a RenderTarget is detaches from this DepthBuffer.
renderTarget | The RenderTarget that has just been detached |
Sets the pool id in which this DepthBuffer lives.
Note this will detach any render target from this depth buffer
void Ogre::GLES2DepthBuffer::bindToFramebuffer | ( | GLenum | target = GL_FRAMEBUFFER | ) |
|
inherited |
Copies the contents of the DepthBuffer to the destination.
Useful when you want to bind a DepthBuffer for sampling as a texture, but later resume rendering with this depth buffer (binding a DepthBuffer as a texture forces it to be decompressed and disables other optimization algorithms on a lot of Hardware. GCN Tahiti aka AMD Radeon R9 280 is no longer affected by this issue)
destination | DepthBuffer to copy to. |
|
inline |
|
inherited |
|
inline |
Gets the pool id in which this DepthBuffer lives.
|
inline |
bool Ogre::GLES2DepthBuffer::hasSeparateStencilBuffer | ( | ) | const |
|
virtual |
Returns whether the specified RenderTarget is compatible with this DepthBuffer That is, this DepthBuffer can be attached to that RenderTarget.
renderTarget | The render target to test against |
exactFormatMatch | True if looking for the exact format according to the RT's preferred format. False if the RT's preferred format should be ignored. |
Reimplemented from Ogre::DepthBuffer.
|
inherited |
Manual DepthBuffers are cleared in RenderSystem's destructor.
Non-manual ones are released with it's render target (aka, a backbuffer or similar)
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
placement operator new
|
inlineinherited |
|
inlineinherited |
array operator new, with debug line info
|
staticinherited |