Kaydet (Commit) 29e9247b authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Andras Timar

OpenGL: use CHECK_GL_ERROR() only when a context is bound.

Removes a large number of spurious GL errors left & right.

Change-Id: I0b5639478812982b39d3b88be2600dad5d3f1fd0
Reviewed-on: https://gerrit.libreoffice.org/18422Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 19043bcb
...@@ -1230,11 +1230,12 @@ void SAL_CALL OGLTransitionerImpl::update( double nTime ) throw (uno::RuntimeExc ...@@ -1230,11 +1230,12 @@ void SAL_CALL OGLTransitionerImpl::update( double nTime ) throw (uno::RuntimeExc
if (isDisposed() || !mbValidOpenGLContext || mpTransition->getSettings().mnRequiredGLVersion > mnGLVersion) if (isDisposed() || !mbValidOpenGLContext || mpTransition->getSettings().mnRequiredGLVersion > mnGLVersion)
return; return;
CHECK_GL_ERROR();
mpContext->makeCurrent(); mpContext->makeCurrent();
CHECK_GL_ERROR();
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
CHECK_GL_ERROR();
if(mpTransition) if(mpTransition)
{ {
...@@ -1277,8 +1278,8 @@ void SAL_CALL OGLTransitionerImpl::viewChanged( const Reference< presentation::X ...@@ -1277,8 +1278,8 @@ void SAL_CALL OGLTransitionerImpl::viewChanged( const Reference< presentation::X
void OGLTransitionerImpl::disposeTextures() void OGLTransitionerImpl::disposeTextures()
{ {
CHECK_GL_ERROR();
mpContext->makeCurrent(); mpContext->makeCurrent();
CHECK_GL_ERROR();
#if defined( GLX_EXT_texture_from_pixmap ) #if defined( GLX_EXT_texture_from_pixmap )
const GLWindow& rGLWindow(mpContext->getOpenGLWindow()); const GLWindow& rGLWindow(mpContext->getOpenGLWindow());
......
...@@ -1874,9 +1874,9 @@ void OpenGLSalGraphicsImpl::endPaint() ...@@ -1874,9 +1874,9 @@ void OpenGLSalGraphicsImpl::endPaint()
mpContext->AcquireDefaultFramebuffer(); mpContext->AcquireDefaultFramebuffer();
glFlush(); glFlush();
mpContext->swapBuffers(); mpContext->swapBuffers();
}
CHECK_GL_ERROR(); CHECK_GL_ERROR();
}
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment