OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::D3D11DepthBuffer Class Reference

#include <OgreD3D11DepthBuffer.h>

+ Inheritance diagram for Ogre::D3D11DepthBuffer:

Public Types

enum  PoolId {
  POOL_NO_DEPTH = 0 , POOL_MANUAL_USAGE = 0 , POOL_DEFAULT = 1 , POOL_NON_SHAREABLE = 65534 ,
  POOL_INVALID = 65535
}
 

Public Member Functions

 D3D11DepthBuffer (uint16 poolId, D3D11RenderSystem *renderSystem, ID3D11Texture2D *depthStencilResource, ID3D11DepthStencilView *depthBufferView, ID3D11ShaderResourceView *depthTextureView, uint32 width, uint32 height, uint32 fsaa, uint32 multiSampleQuality, PixelFormat pixelFormat, bool isDepthTexture, bool isManual)
 
 ~D3D11DepthBuffer ()
 
virtual void _notifyRenderTargetAttached (RenderTarget *renderTarget)
 Called when a RenderTarget is attaches this DepthBuffer.
 
virtual void _notifyRenderTargetDetached (RenderTarget *renderTarget)
 Called when a RenderTarget is detaches from this DepthBuffer.
 
void _resized (ID3D11DepthStencilView *depthBufferView, uint32 width, uint32 height)
 internal method, gets called when the renderwindow was resized
 
void _setPoolId (uint16 poolId)
 Sets the pool id in which this DepthBuffer lives.
 
bool copyTo (DepthBuffer *destination)
 Copies the contents of the DepthBuffer to the destination.
 
virtual uint16 getBitDepth () const
 
ID3D11DepthStencilViewgetDepthStencilView (uint8 viewportRenderTargetFlags)
 
ID3D11ShaderResourceViewgetDepthTextureView () const
 
PixelFormat getFormat (void) const
 
virtual uint32 getFsaa () const
 
virtual const StringgetFsaaHint () const
 
virtual uint32 getHeight () const
 
virtual uint16 getPoolId () const
 Gets the pool id in which this DepthBuffer lives.
 
virtual uint32 getWidth () const
 
virtual bool isCompatible (RenderTarget *renderTarget, bool exactFormatMatch) const
 Returns whether the specified RenderTarget is compatible with this DepthBuffer That is, this DepthBuffer can be attached to that RenderTarget.
 
bool isDepthTexture (void) const
 
bool isManual () const
 Manual DepthBuffers are cleared in RenderSystem's destructor.
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
voidoperator new (size_t sz, void *ptr)
 placement operator new
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 

Static Public Attributes

static PixelFormat DefaultDepthBufferFormat
 

Member Enumeration Documentation

◆ PoolId

Enumerator
POOL_NO_DEPTH 
POOL_MANUAL_USAGE 
POOL_DEFAULT 
POOL_NON_SHAREABLE 
POOL_INVALID 

Constructor & Destructor Documentation

◆ D3D11DepthBuffer()

Ogre::D3D11DepthBuffer::D3D11DepthBuffer ( uint16  poolId,
D3D11RenderSystem renderSystem,
ID3D11Texture2D depthStencilResource,
ID3D11DepthStencilView depthBufferView,
ID3D11ShaderResourceView depthTextureView,
uint32  width,
uint32  height,
uint32  fsaa,
uint32  multiSampleQuality,
PixelFormat  pixelFormat,
bool  isDepthTexture,
bool  isManual 
)

◆ ~D3D11DepthBuffer()

Ogre::D3D11DepthBuffer::~D3D11DepthBuffer ( )

Member Function Documentation

◆ _notifyRenderTargetAttached()

virtual void Ogre::DepthBuffer::_notifyRenderTargetAttached ( RenderTarget renderTarget)
virtualinherited

Called when a RenderTarget is attaches this DepthBuffer.

Remarks
This function doesn't actually attach. It merely informs the DepthBuffer which RenderTarget did attach. The real attachment happens in RenderTarget::attachDepthBuffer()
Parameters
renderTargetThe RenderTarget that has just been attached

◆ _notifyRenderTargetDetached()

virtual void Ogre::DepthBuffer::_notifyRenderTargetDetached ( RenderTarget renderTarget)
virtualinherited

Called when a RenderTarget is detaches from this DepthBuffer.

Remarks
Same as DepthBuffer::_notifyRenderTargetAttached()
Parameters
renderTargetThe RenderTarget that has just been detached

◆ _resized()

void Ogre::D3D11DepthBuffer::_resized ( ID3D11DepthStencilView depthBufferView,
uint32  width,
uint32  height 
)

internal method, gets called when the renderwindow was resized

◆ _setPoolId()

void Ogre::DepthBuffer::_setPoolId ( uint16  poolId)
inherited

Sets the pool id in which this DepthBuffer lives.

Note this will detach any render target from this depth buffer

◆ copyTo()

bool Ogre::DepthBuffer::copyTo ( DepthBuffer destination)
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)

Remarks
The function will throw if the depth buffers are incompatible (e.g. different resolution, different format, different MSAA settings)
Parameters
destinationDepthBuffer to copy to.
Returns
False if failed to copy for hardware reasons (DX10 does not allow copying MSAA depth buffer; DX10.1 does)

◆ getBitDepth()

virtual uint16 Ogre::DepthBuffer::getBitDepth ( ) const
virtualinherited

◆ getDepthStencilView()

ID3D11DepthStencilView * Ogre::D3D11DepthBuffer::getDepthStencilView ( uint8  viewportRenderTargetFlags)

◆ getDepthTextureView()

ID3D11ShaderResourceView * Ogre::D3D11DepthBuffer::getDepthTextureView ( ) const

◆ getFormat()

PixelFormat Ogre::DepthBuffer::getFormat ( void  ) const
inherited

◆ getFsaa()

virtual uint32 Ogre::DepthBuffer::getFsaa ( ) const
virtualinherited

◆ getFsaaHint()

virtual const String & Ogre::DepthBuffer::getFsaaHint ( ) const
virtualinherited

◆ getHeight()

virtual uint32 Ogre::DepthBuffer::getHeight ( ) const
virtualinherited

◆ getPoolId()

virtual uint16 Ogre::DepthBuffer::getPoolId ( ) const
virtualinherited

Gets the pool id in which this DepthBuffer lives.

◆ getWidth()

virtual uint32 Ogre::DepthBuffer::getWidth ( ) const
virtualinherited

◆ isCompatible()

virtual bool Ogre::D3D11DepthBuffer::isCompatible ( RenderTarget renderTarget,
bool  exactFormatMatch 
) 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
exactFormatMatchTrue 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.

◆ isDepthTexture()

bool Ogre::DepthBuffer::isDepthTexture ( void  ) const
inherited

◆ isManual()

bool Ogre::DepthBuffer::isManual ( ) const
inherited

Manual DepthBuffers are cleared in RenderSystem's destructor.

Non-manual ones are released with it's render target (aka, a backbuffer or similar)

◆ operator delete() [1/3]

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

◆ operator delete() [2/3]

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

◆ operator delete() [3/3]

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

◆ operator delete[]() [1/2]

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

◆ operator delete[]() [2/2]

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

◆ operator new() [1/3]

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

◆ operator new() [2/3]

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

◆ operator new() [3/3]

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

placement operator new

◆ operator new[]() [1/2]

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

◆ operator new[]() [2/2]

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

Member Data Documentation

◆ DefaultDepthBufferFormat

PixelFormat Ogre::DepthBuffer::DefaultDepthBufferFormat
staticinherited

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