aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobo1on1 <bob-nospam-@xbmc.org>2011-07-16 20:11:01 +0200
committerbobo1on1 <bob-nospam-@xbmc.org>2011-07-16 20:11:01 +0200
commit9d5979aa8943fb2621396983206220d950638b28 (patch)
treede4f83c5a4ed94bd21911d51c4567a6d54c42381
parente7e9818ed5bcd3f346478a53cd35e6654f05319d (diff)
fixed: clean up any old query in CRenderCaptureGL if the flags changed to do immediate capturing
-rw-r--r--xbmc/cores/VideoRenderers/RenderCapture.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/xbmc/cores/VideoRenderers/RenderCapture.cpp b/xbmc/cores/VideoRenderers/RenderCapture.cpp
index 442adc60e1..3536945d55 100644
--- a/xbmc/cores/VideoRenderers/RenderCapture.cpp
+++ b/xbmc/cores/VideoRenderers/RenderCapture.cpp
@@ -100,8 +100,16 @@ void CRenderCaptureGL::BeginRender()
if (!m_pbo)
glGenBuffersARB(1, &m_pbo);
+ //only use a query when not capturing immediately
if (!m_query && !(m_flags & CAPTUREFLAG_IMMEDIATELY))
+ {
glGenQueriesARB(1, &m_query);
+ }
+ else if (m_query && (m_flags & CAPTUREFLAG_IMMEDIATELY))
+ { //clean up any old query if the previous capture was not immediately
+ glDeleteQueriesARB(1, &m_query);
+ m_query = 0;
+ }
//start the occlusion query
if (m_query)