This is a class that is the DirectX9 implementation of hardware occlusion testing. More...
#include <OgreD3D9HardwareOcclusionQuery.h>
Public Member Functions | |
D3D9HardwareOcclusionQuery () | |
Default object constructor. More... | |
~D3D9HardwareOcclusionQuery () | |
Object destructor. More... | |
void | beginOcclusionQuery () |
Starts the hardware occlusion query Simple usage: Create one or more OcclusionQuery object one per outstanding query or one per tested object OcclusionQuery* m_pOcclusionQuery; createOcclusionQuery( &m_pOcclusionQuery ); In the rendering loop: Draw all occluders m_pOcclusionQuery->startOcclusionQuery(); Draw the polygons to be tested m_pOcclusionQuery->endOcclusionQuery();. More... | |
void | endOcclusionQuery () |
Ends the hardware occlusion test. More... | |
unsigned int | getLastQuerysPixelcount () |
unsigned int | getLastQuerysPixelcount () const |
Let's you get the last pixel count with out doing the hardware occlusion test. More... | |
bool | isStillOutstanding (void) |
Lets you know when query is done, or still be processed by the Hardware. More... | |
virtual void | notifyOnDeviceCreate (IDirect3DDevice9 *d3d9Device) |
virtual void | notifyOnDeviceDestroy (IDirect3DDevice9 *d3d9Device) |
virtual void | notifyOnDeviceLost (IDirect3DDevice9 *d3d9Device) |
virtual void | notifyOnDeviceReset (IDirect3DDevice9 *d3d9Device) |
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) |
bool | pullOcclusionQuery (unsigned int *NumOfFragments) |
Pulls the hardware occlusion query. More... | |
Static Public Member Functions | |
static void | lockDeviceAccess () |
static void | unlockDeviceAccess () |
Protected Attributes | |
bool | mIsQueryResultStillOutstanding |
unsigned int | mPixelCount |
Private Types | |
typedef DeviceToQueryMap::iterator | DeviceToQueryIterator |
typedef map< IDirect3DDevice9 *, IDirect3DQuery9 * >::type | DeviceToQueryMap |
Private Member Functions | |
void | createQuery (IDirect3DDevice9 *d3d9Device) |
void | releaseQuery (IDirect3DDevice9 *d3d9Device) |
Private Attributes | |
DeviceToQueryMap | mMapDeviceToQuery |
This is a class that is the DirectX9 implementation of hardware occlusion testing.
Updated on 12/7/2004 by Chris McGuirk Updated on 4/8/2005 by Tuan Kuranes email: tuan. kura nes@f ree. fr
Definition at line 54 of file OgreD3D9HardwareOcclusionQuery.h.
|
private |
Definition at line 106 of file OgreD3D9HardwareOcclusionQuery.h.
|
private |
Definition at line 105 of file OgreD3D9HardwareOcclusionQuery.h.
Ogre::D3D9HardwareOcclusionQuery::D3D9HardwareOcclusionQuery | ( | ) |
Default object constructor.
Ogre::D3D9HardwareOcclusionQuery::~D3D9HardwareOcclusionQuery | ( | ) |
Object destructor.
|
virtual |
Starts the hardware occlusion query Simple usage: Create one or more OcclusionQuery object one per outstanding query or one per tested object OcclusionQuery* m_pOcclusionQuery; createOcclusionQuery( &m_pOcclusionQuery ); In the rendering loop: Draw all occluders m_pOcclusionQuery->startOcclusionQuery(); Draw the polygons to be tested m_pOcclusionQuery->endOcclusionQuery();.
Results must be pulled using: UINT m_uintNumberOfPixelsVisable; pullOcclusionQuery( &m_dwNumberOfPixelsVisable );
Implements Ogre::HardwareOcclusionQuery.
|
private |
|
virtual |
Ends the hardware occlusion test.
Implements Ogre::HardwareOcclusionQuery.
unsigned int Ogre::D3D9HardwareOcclusionQuery::getLastQuerysPixelcount | ( | ) |
|
inlineinherited |
Let's you get the last pixel count with out doing the hardware occlusion test.
Definition at line 109 of file OgreHardwareOcclusionQuery.h.
|
virtual |
Lets you know when query is done, or still be processed by the Hardware.
Implements Ogre::HardwareOcclusionQuery.
|
staticinherited |
|
virtual |
Reimplemented from Ogre::D3D9Resource.
|
virtual |
Reimplemented from Ogre::D3D9Resource.
|
virtual |
Reimplemented from Ogre::D3D9Resource.
|
virtual |
Reimplemented from Ogre::D3D9Resource.
|
inlineinherited |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 107 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 118 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
operator new, with debug line info
Definition at line 67 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 72 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
placement operator new
Definition at line 78 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
array operator new, with debug line info
Definition at line 85 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 90 of file OgreMemoryAllocatedObject.h.
|
virtual |
Pulls the hardware occlusion query.
NumOfFragments | will get the resulting number of fragments. |
Implements Ogre::HardwareOcclusionQuery.
|
private |
|
staticinherited |
|
protectedinherited |
Definition at line 125 of file OgreHardwareOcclusionQuery.h.
|
private |
Definition at line 108 of file OgreD3D9HardwareOcclusionQuery.h.
|
protectedinherited |
Definition at line 123 of file OgreHardwareOcclusionQuery.h.
Referenced by Ogre::D3D10HardwareOcclusionQuery::getLastQuerysPixelcount(), and Ogre::D3D11HardwareOcclusionQuery::getLastQuerysPixelcount().