#include "OgrePlatformOcclusionQuery.h" #include namespace Ogre { //----------------------------------------------------------------------- PlatformOcclusionQuery::PlatformOcclusionQuery(RenderSystem *rsys) { mHardwareOcclusionQuery = rsys->createHardwareOcclusionQuery(); } //----------------------------------------------------------------------- PlatformOcclusionQuery::~PlatformOcclusionQuery() { delete mHardwareOcclusionQuery; } //----------------------------------------------------------------------- void PlatformOcclusionQuery::BeginQuery() { mHardwareOcclusionQuery->beginOcclusionQuery(); } //----------------------------------------------------------------------- void PlatformOcclusionQuery::EndQuery() { mHardwareOcclusionQuery->endOcclusionQuery(); } //----------------------------------------------------------------------- bool PlatformOcclusionQuery::GetQueryResult(unsigned int &visiblePixels, const bool waitForResult) const { return mHardwareOcclusionQuery->pullOcclusionQuery(&visiblePixels, waitForResult); } } // namespace Ogre