Rev | Line | |
---|
[59] | 1 | #include "OgrePlatformOcclusionQuery.h"
|
---|
[96] | 2 |
|
---|
[59] | 3 | namespace Ogre {
|
---|
| 4 |
|
---|
| 5 | //-----------------------------------------------------------------------
|
---|
| 6 | PlatformOcclusionQuery::PlatformOcclusionQuery(RenderSystem *rsys)
|
---|
| 7 | {
|
---|
| 8 | mHardwareOcclusionQuery = rsys->createHardwareOcclusionQuery();
|
---|
| 9 | }
|
---|
| 10 | //-----------------------------------------------------------------------
|
---|
| 11 | PlatformOcclusionQuery::~PlatformOcclusionQuery()
|
---|
| 12 | {
|
---|
| 13 | delete mHardwareOcclusionQuery;
|
---|
| 14 | }
|
---|
| 15 | //-----------------------------------------------------------------------
|
---|
[87] | 16 | void PlatformOcclusionQuery::BeginQuery()
|
---|
[59] | 17 | {
|
---|
| 18 | mHardwareOcclusionQuery->beginOcclusionQuery();
|
---|
| 19 | }
|
---|
| 20 | //-----------------------------------------------------------------------
|
---|
[87] | 21 | void PlatformOcclusionQuery::EndQuery()
|
---|
[59] | 22 | {
|
---|
| 23 | mHardwareOcclusionQuery->endOcclusionQuery();
|
---|
| 24 | }
|
---|
| 25 | //-----------------------------------------------------------------------
|
---|
[86] | 26 | bool PlatformOcclusionQuery::GetQueryResult(unsigned int &visiblePixels,
|
---|
| 27 | const bool waitForResult) const
|
---|
[59] | 28 | {
|
---|
[86] | 29 | return mHardwareOcclusionQuery->pullOcclusionQuery(&visiblePixels, waitForResult);
|
---|
[59] | 30 | }
|
---|
| 31 |
|
---|
| 32 | } // namespace Ogre |
---|
Note: See
TracBrowser
for help on using the repository browser.