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

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