Revision 115,
1.1 KB
checked in by mattausch, 20 years ago
(diff) |
added depth pass algorithm + delayed transparent object rendering (so depth ordering is right)
|
Line | |
---|
1 | #include "OgrePlatformOcclusionQuery.h"
|
---|
2 | #include <OgreLogManager.h>
|
---|
3 |
|
---|
4 | namespace Ogre {
|
---|
5 |
|
---|
6 | //-----------------------------------------------------------------------
|
---|
7 | PlatformOcclusionQuery::PlatformOcclusionQuery(RenderSystem *rsys)
|
---|
8 | {
|
---|
9 | mHardwareOcclusionQuery = rsys->createHardwareOcclusionQuery();
|
---|
10 | }
|
---|
11 | //-----------------------------------------------------------------------
|
---|
12 | PlatformOcclusionQuery::~PlatformOcclusionQuery()
|
---|
13 | {
|
---|
14 | delete mHardwareOcclusionQuery;
|
---|
15 | }
|
---|
16 | //-----------------------------------------------------------------------
|
---|
17 | void PlatformOcclusionQuery::BeginQuery()
|
---|
18 | {
|
---|
19 | mHardwareOcclusionQuery->beginOcclusionQuery();
|
---|
20 | }
|
---|
21 | //-----------------------------------------------------------------------
|
---|
22 | void PlatformOcclusionQuery::EndQuery()
|
---|
23 | {
|
---|
24 | mHardwareOcclusionQuery->endOcclusionQuery();
|
---|
25 | }
|
---|
26 | //-----------------------------------------------------------------------
|
---|
27 | bool PlatformOcclusionQuery::GetQueryResult(unsigned int &visiblePixels,
|
---|
28 | const bool waitForResult) const
|
---|
29 | {
|
---|
30 | return mHardwareOcclusionQuery->pullOcclusionQuery(&visiblePixels, waitForResult);
|
---|
31 | }
|
---|
32 |
|
---|
33 | } // namespace Ogre |
---|
Note: See
TracBrowser
for help on using the repository browser.