OGRE: Ogre::HardwareOcclusionQuery Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::HardwareOcclusionQuery Class Referenceabstract
Core » RenderSystem

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

`#include <OgreHardwareOcclusionQuery.h>`

Inheritance diagram for Ogre::HardwareOcclusionQuery:
[legend]

## 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.

References beginOcclusionQuery().

## ◆ beginOcclusionQuery()

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

Referenced by begin().

## ◆ end()

void Ogre::HardwareOcclusionQuery::end | ( |  | ) |
| inline

Ends the hardware occlusion test.

References endOcclusionQuery().

## ◆ endOcclusionQuery()

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

Referenced by end().

## ◆ 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

  result | will get the resulting number of fragments.

Returns
  True if success or false if not.

References pullOcclusionQuery().

## ◆ pullOcclusionQuery()

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

Referenced by waitForResult().

## ◆ 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.

Referenced by getLastQuerysPixelcount().

## ◆ getLastQuerysPixelcount()

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

References getLastResult().

## ◆ 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.

References isStillOutstanding().

## ◆ isStillOutstanding()

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

Referenced by resultReady().

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

- OgreHardwareOcclusionQuery.h