Line | |
---|
1 | #include "OgrePlatformOcclusionQuery.h"
|
---|
2 |
|
---|
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 | //-----------------------------------------------------------------------
|
---|
16 | void PlatformOcclusionQuery::BeginQuery()
|
---|
17 | {
|
---|
18 | mHardwareOcclusionQuery->beginOcclusionQuery();
|
---|
19 | }
|
---|
20 | //-----------------------------------------------------------------------
|
---|
21 | void PlatformOcclusionQuery::EndQuery()
|
---|
22 | {
|
---|
23 | mHardwareOcclusionQuery->endOcclusionQuery();
|
---|
24 | }
|
---|
25 | //-----------------------------------------------------------------------
|
---|
26 | bool PlatformOcclusionQuery::GetQueryResult(unsigned int &visiblePixels,
|
---|
27 | const bool waitForResult) const
|
---|
28 | {
|
---|
29 | return mHardwareOcclusionQuery->pullOcclusionQuery(&visiblePixels, waitForResult);
|
---|
30 | }
|
---|
31 |
|
---|
32 | } // namespace Ogre |
---|
Note: See
TracBrowser
for help on using the repository browser.