diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2013-10-21 16:57:38 -0600 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2013-10-21 16:57:38 -0600 |
| commit | 0c60e3280866d0d9692b71166c93a2f6cda06f58 (patch) | |
| tree | 5800e31bb4f1012f4e251fb6b70f608eaf46dfbb /indra/newview/llvieweroctree.cpp | |
| parent | fc45b59a977881a4e37619cb0220790d5ad4c814 (diff) | |
| parent | c7057c141c38492bfdc2bfe9d82de97a7364f01b (diff) | |
Merge
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
| -rw-r--r-- | indra/newview/llvieweroctree.cpp | 46 |
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);
} }; |
