source: trunk/VUT/Ogre/src/OgrePlatformOcclusionQuery.cpp @ 96

Revision 96, 1.1 KB checked in by mattausch, 19 years ago (diff)
Line 
1#include "OgrePlatformOcclusionQuery.h"
2
3namespace Ogre {
4
5//-----------------------------------------------------------------------
6PlatformOcclusionQuery::PlatformOcclusionQuery(RenderSystem *rsys)
7{
8        mHardwareOcclusionQuery = rsys->createHardwareOcclusionQuery();
9}
10//-----------------------------------------------------------------------
11PlatformOcclusionQuery::~PlatformOcclusionQuery()
12{
13        delete mHardwareOcclusionQuery;
14}
15//-----------------------------------------------------------------------
16void PlatformOcclusionQuery::BeginQuery()
17{
18        mHardwareOcclusionQuery->beginOcclusionQuery();
19}
20//-----------------------------------------------------------------------
21void PlatformOcclusionQuery::EndQuery()
22{
23        mHardwareOcclusionQuery->endOcclusionQuery();
24}
25//-----------------------------------------------------------------------
26bool 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.