mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
remove the timeout stuff
This commit is contained in:
parent
47c3e92db1
commit
e5a19209a4
@ -12,7 +12,7 @@ using namespace Ogre;
|
||||
OcclusionQuery::OcclusionQuery(OEngine::Render::OgreRenderer* renderer, SceneNode* sunNode) :
|
||||
mSunTotalAreaQuery(0), mSunVisibleAreaQuery(0), mSingleObjectQuery(0), mActiveQuery(0),
|
||||
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;
|
||||
mSunNode = sunNode;
|
||||
@ -94,7 +94,7 @@ OcclusionQuery::~OcclusionQuery()
|
||||
bool OcclusionQuery::supported()
|
||||
{
|
||||
//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,
|
||||
@ -167,9 +167,6 @@ void OcclusionQuery::update(float duration)
|
||||
{
|
||||
if (!mSupported) return;
|
||||
|
||||
mDelay += duration;
|
||||
if (mDelay >= 2) mResponding = false;
|
||||
|
||||
mWasVisible = false;
|
||||
mObjectWasVisible = false;
|
||||
|
||||
@ -189,9 +186,6 @@ void OcclusionQuery::update(float duration)
|
||||
if (!mSunTotalAreaQuery->isStillOutstanding()
|
||||
&& !mSunVisibleAreaQuery->isStillOutstanding())
|
||||
{
|
||||
mDelay = 0;
|
||||
mResponding = true;
|
||||
|
||||
unsigned int totalPixels;
|
||||
unsigned int visiblePixels;
|
||||
|
||||
@ -213,9 +207,6 @@ void OcclusionQuery::update(float duration)
|
||||
}
|
||||
if (mQuerySingleObjectStarted && !mSingleObjectQuery->isStillOutstanding())
|
||||
{
|
||||
mDelay = 0;
|
||||
mResponding = true;
|
||||
|
||||
unsigned int result;
|
||||
|
||||
mSingleObjectQuery->pullOcclusionQuery(&result);
|
||||
|
@ -72,10 +72,6 @@ namespace MWRender
|
||||
bool mWasVisible;
|
||||
bool mObjectWasVisible;
|
||||
|
||||
bool mResponding;
|
||||
|
||||
float mDelay;
|
||||
|
||||
bool mTestResult;
|
||||
|
||||
bool mSupported;
|
||||
|
Loading…
x
Reference in New Issue
Block a user