diff options
author | Merov Linden <merov@lindenlab.com> | 2013-10-14 17:25:24 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-10-14 17:25:24 -0700 |
commit | f6c7b906e1f1d1bcc56a1e71b1867a58c5b2381a (patch) | |
tree | ec9226508d7a3e1555b774fde915a8b299b35cd7 /indra/newview/llspatialpartition.cpp | |
parent | c2f5365f986aab49d5c7cfa2834a68f5b35c09c2 (diff) | |
parent | 04b84ce07dd5bc8364f948ef0004e3dc5328f1b4 (diff) |
Pull merge with lindenlab/viewer-bear
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rwxr-xr-x | indra/newview/llspatialpartition.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index d7ae897604..2c83f6d0b7 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -89,28 +89,17 @@ class LLOcclusionQueryPool : public LLGLNamePool public: LLOcclusionQueryPool() { - mCurQuery = 1; + } protected: - std::list<GLuint> mAvailableName; - GLuint mCurQuery; - virtual GLuint allocateName() { GLuint ret = 0; - if (!mAvailableName.empty()) - { - ret = mAvailableName.front(); - mAvailableName.pop_front(); - } - else - { - ret = mCurQuery++; - } - + glGenQueriesARB(1, &ret); + return ret; } @@ -119,8 +108,7 @@ protected: #if LL_TRACK_PENDING_OCCLUSION_QUERIES LLSpatialGroup::sPendingQueries.erase(name); #endif - llassert(std::find(mAvailableName.begin(), mAvailableName.end(), name) == mAvailableName.end()); - mAvailableName.push_back(name); + glDeleteQueriesARB(1, &name); } }; @@ -1580,7 +1568,7 @@ void LLSpatialGroup::checkOcclusion() { glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available); - static LLCachedControl<bool> wait_for_query(gSavedSettings, "RenderSynchronousOcclusion"); + static LLCachedControl<bool> wait_for_query(gSavedSettings, "RenderSynchronousOcclusion", true); if (wait_for_query && mOcclusionIssued[LLViewerCamera::sCurCameraID] < gFrameCount) { //query was issued last frame, wait until it's available |