summaryrefslogtreecommitdiff
path: root/indra/newview/llspatialpartition.cpp
diff options
context:
space:
mode:
authorScott Lawrence <oz@lindenlab.com>2013-10-16 17:24:32 -0400
committerScott Lawrence <oz@lindenlab.com>2013-10-16 17:24:32 -0400
commit7ba4fc06f351dc09bf3cac6cc768a11302ce5598 (patch)
tree256001700bd19cead3e198727ecf6ce80c7ac998 /indra/newview/llspatialpartition.cpp
parent9c313aea13c70db145d3f2ba840fdc34ed8c8adf (diff)
parentc7057c141c38492bfdc2bfe9d82de97a7364f01b (diff)
Merged 3.6.8-release
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rwxr-xr-xindra/newview/llspatialpartition.cpp20
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);
}
};