diff options
author | Ima Mechanique <ima.mechanique@secondlife.com> | 2013-10-21 04:21:00 +0100 |
---|---|---|
committer | Ima Mechanique <ima.mechanique@secondlife.com> | 2013-10-21 04:21:00 +0100 |
commit | 30f835809bc736351f0134dfefefbdcdcbdc9948 (patch) | |
tree | 39f20a7defa9de67d1e604bd527f55a37e48f52b /indra/newview/llspatialpartition.cpp | |
parent | 79645e6981a97224024c5226d8713dce9569d54a (diff) | |
parent | 37b705c96264ed28896d687e565d1112939e9123 (diff) |
Merge 3.5.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); } }; |