OGRE 14.3
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::HardwareOcclusionQuery Class Referenceabstract

Query how many pixels have passed the per-fragment tests. More...

#include <OgreHardwareOcclusionQuery.h>

+ Inheritance diagram for Ogre::HardwareOcclusionQuery:

Public Member Functions

 HardwareOcclusionQuery ()
 
virtual ~HardwareOcclusionQuery ()
 
void begin ()
 Starts the hardware occlusion query.
 
virtual void beginOcclusionQuery ()=0
 
void end ()
 Ends the hardware occlusion test.
 
virtual void endOcclusionQuery ()=0
 
uint32 getLastQuerysPixelcount () const
 
uint32 getLastResult () const
 Let's you get the last pixel count with out doing the hardware occlusion test.
 
virtual bool isStillOutstanding (void)=0
 
virtual bool pullOcclusionQuery (unsigned int *result)=0
 
bool resultReady ()
 Lets you know when query is done, or still be processed by the Hardware.
 
bool waitForResult (unsigned int *result)
 Waits until the query result is available.
 

Detailed Description

Query how many pixels have passed the per-fragment tests.

Create one OcclusionQuery per outstanding query or one per tested object

Then, in the rendering loop:

  1. Draw all occluders
  2. begin()
  3. Draw the polygons to be tested
  4. end()

Results must be pulled using waitForResult()

Constructor & Destructor Documentation

◆ HardwareOcclusionQuery()

Ogre::HardwareOcclusionQuery::HardwareOcclusionQuery ( )

◆ ~HardwareOcclusionQuery()

virtual Ogre::HardwareOcclusionQuery::~HardwareOcclusionQuery ( )
virtual

Member Function Documentation

◆ begin()

void Ogre::HardwareOcclusionQuery::begin ( )
inline

Starts the hardware occlusion query.

◆ beginOcclusionQuery()

virtual void Ogre::HardwareOcclusionQuery::beginOcclusionQuery ( )
pure virtual

◆ end()

void Ogre::HardwareOcclusionQuery::end ( )
inline

Ends the hardware occlusion test.

◆ endOcclusionQuery()

virtual void Ogre::HardwareOcclusionQuery::endOcclusionQuery ( )
pure virtual

◆ waitForResult()

bool Ogre::HardwareOcclusionQuery::waitForResult ( unsigned int result)
inline

Waits until the query result is available.

use resultReady() if just want to test if the result is available.

Return values
resultwill get the resulting number of fragments.
Returns
True if success or false if not.

◆ pullOcclusionQuery()

virtual bool Ogre::HardwareOcclusionQuery::pullOcclusionQuery ( unsigned int result)
pure virtual

◆ getLastResult()

uint32 Ogre::HardwareOcclusionQuery::getLastResult ( ) const
inline

Let's you get the last pixel count with out doing the hardware occlusion test.

This function won't give you new values, just the old value.

Returns
The last fragment count from the last test.

◆ getLastQuerysPixelcount()

uint32 Ogre::HardwareOcclusionQuery::getLastQuerysPixelcount ( ) const
inline

◆ resultReady()

bool Ogre::HardwareOcclusionQuery::resultReady ( )
inline

Lets you know when query is done, or still be processed by the Hardware.

Returns
true if query is finished.

◆ isStillOutstanding()

virtual bool Ogre::HardwareOcclusionQuery::isStillOutstanding ( void  )
pure virtual

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