diff options
author | Scott Lawrence <oz@lindenlab.com> | 2013-10-16 17:26:02 -0400 |
---|---|---|
committer | Scott Lawrence <oz@lindenlab.com> | 2013-10-16 17:26:02 -0400 |
commit | 3986a358db70d6282772c31884fd0fc814e59066 (patch) | |
tree | 47147145b9574310080a96807bc6e91d6f45d6be /indra/newview/llspatialpartition.cpp | |
parent | ba7a564700ba20c6ece7ab16197c2415ebec42cb (diff) | |
parent | c7057c141c38492bfdc2bfe9d82de97a7364f01b (diff) |
Merged 3.6.8-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); } }; |