diff options
author | Graham Linden <graham@lindenlab.com> | 2013-10-16 15:02:29 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2013-10-16 15:02:29 -0700 |
commit | a19f4ae2b31b6bdea1e2f0b6e7f9c420a93596df (patch) | |
tree | 6463336db2d1e41eb3b34c38ac693278cde0b462 /indra/newview/llspatialpartition.cpp | |
parent | db18ad3b2a368986b2757aab673c3b988cd60575 (diff) | |
parent | c7057c141c38492bfdc2bfe9d82de97a7364f01b (diff) |
Merge 3.6.8
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); } }; |