1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

remove the timeout stuff

This commit is contained in:
scrawl 2012-03-29 00:05:48 +02:00
parent 47c3e92db1
commit e5a19209a4
2 changed files with 2 additions and 15 deletions

View File

@ -12,7 +12,7 @@ using namespace Ogre;
OcclusionQuery::OcclusionQuery(OEngine::Render::OgreRenderer* renderer, SceneNode* sunNode) : OcclusionQuery::OcclusionQuery(OEngine::Render::OgreRenderer* renderer, SceneNode* sunNode) :
mSunTotalAreaQuery(0), mSunVisibleAreaQuery(0), mSingleObjectQuery(0), mActiveQuery(0), mSunTotalAreaQuery(0), mSunVisibleAreaQuery(0), mSingleObjectQuery(0), mActiveQuery(0),
mDoQuery(0), mSunVisibility(0), mQuerySingleObjectStarted(false), mTestResult(false), mDoQuery(0), mSunVisibility(0), mQuerySingleObjectStarted(false), mTestResult(false),
mQuerySingleObjectRequested(false), mResponding(true), mDelay(0), mWasVisible(false), mObjectWasVisible(false) mQuerySingleObjectRequested(false), mWasVisible(false), mObjectWasVisible(false)
{ {
mRendering = renderer; mRendering = renderer;
mSunNode = sunNode; mSunNode = sunNode;
@ -94,7 +94,7 @@ OcclusionQuery::~OcclusionQuery()
bool OcclusionQuery::supported() bool OcclusionQuery::supported()
{ {
//if (!mResponding) std::cout << "Occlusion query timed out" << std::endl; //if (!mResponding) std::cout << "Occlusion query timed out" << std::endl;
return mSupported && mResponding; return mSupported;
} }
void OcclusionQuery::notifyRenderSingleObject(Renderable* rend, const Pass* pass, const AutoParamDataSource* source, void OcclusionQuery::notifyRenderSingleObject(Renderable* rend, const Pass* pass, const AutoParamDataSource* source,
@ -167,9 +167,6 @@ void OcclusionQuery::update(float duration)
{ {
if (!mSupported) return; if (!mSupported) return;
mDelay += duration;
if (mDelay >= 2) mResponding = false;
mWasVisible = false; mWasVisible = false;
mObjectWasVisible = false; mObjectWasVisible = false;
@ -189,9 +186,6 @@ void OcclusionQuery::update(float duration)
if (!mSunTotalAreaQuery->isStillOutstanding() if (!mSunTotalAreaQuery->isStillOutstanding()
&& !mSunVisibleAreaQuery->isStillOutstanding()) && !mSunVisibleAreaQuery->isStillOutstanding())
{ {
mDelay = 0;
mResponding = true;
unsigned int totalPixels; unsigned int totalPixels;
unsigned int visiblePixels; unsigned int visiblePixels;
@ -213,9 +207,6 @@ void OcclusionQuery::update(float duration)
} }
if (mQuerySingleObjectStarted && !mSingleObjectQuery->isStillOutstanding()) if (mQuerySingleObjectStarted && !mSingleObjectQuery->isStillOutstanding())
{ {
mDelay = 0;
mResponding = true;
unsigned int result; unsigned int result;
mSingleObjectQuery->pullOcclusionQuery(&result); mSingleObjectQuery->pullOcclusionQuery(&result);

View File

@ -72,10 +72,6 @@ namespace MWRender
bool mWasVisible; bool mWasVisible;
bool mObjectWasVisible; bool mObjectWasVisible;
bool mResponding;
float mDelay;
bool mTestResult; bool mTestResult;
bool mSupported; bool mSupported;