summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweroctree.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-10-21 16:57:38 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-10-21 16:57:38 -0600
commit0c60e3280866d0d9692b71166c93a2f6cda06f58 (patch)
tree5800e31bb4f1012f4e251fb6b70f608eaf46dfbb /indra/newview/llvieweroctree.cpp
parentfc45b59a977881a4e37619cb0220790d5ad4c814 (diff)
parentc7057c141c38492bfdc2bfe9d82de97a7364f01b (diff)
Merge
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r--indra/newview/llvieweroctree.cpp46
1 files changed, 16 insertions, 30 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 425e7fbd1f..af6f8bdede 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -758,39 +758,25 @@ 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++;
- }
-
- return ret;
- }
-
- virtual void releaseName(GLuint name)
- {
-#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);
+
+ virtual GLuint allocateName()
+ {
+ GLuint ret = 0;
+
+ glGenQueriesARB(1, &ret);
+
+ return ret;
+ }
+
+ virtual void releaseName(GLuint name)
+ {
+#if LL_TRACK_PENDING_OCCLUSION_QUERIES
+ LLOcclusionCullingGroup::sPendingQueries.erase(name);
+#endif
+ glDeleteQueriesARB(1, &name);
}
};