diff options
author | Merov Linden <merov@lindenlab.com> | 2013-10-16 16:00:08 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-10-16 16:00:08 -0700 |
commit | ee74eb1a9ee8e2aba49613cf434f1272a4526417 (patch) | |
tree | e01eac820836118756bd4146ddccf3a5f03881a9 /indra/newview/llspatialpartition.cpp | |
parent | 528f424952ea77945139279c7de4bb67880ce169 (diff) | |
parent | c7057c141c38492bfdc2bfe9d82de97a7364f01b (diff) |
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rwxr-xr-x | indra/newview/llspatialpartition.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index d7ae897604..00eb0c1ab1 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); } }; |