summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-08-27 20:39:19 +0100
committerJan Holesovsky <kendy@collabora.com>2015-09-01 07:24:28 +0000
commitbcef0483cfbff181ca940fe219226d11cbb0e6a4 (patch)
tree8a12c529e8bbd37f867349339ee94a3ac1d8e315
parent20c92dc6b772a6016501499bb1ecc53686dba1fb (diff)
tdf#93530 - glClear our depth, stencil and buffer contents on init.
Change-Id: I117fd5f5fd12fd6534b9d10532a39807ad82ce71 Reviewed-on: https://gerrit.libreoffice.org/18069 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-on: https://gerrit.libreoffice.org/18220 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 388a1a0ed6c6..20b510f18f8a 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -871,6 +871,9 @@ bool OpenGLContext::ImplInit()
bool bRet = InitGLEW();
InitGLEWDebugging();
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+
return bRet;
}
@@ -1013,6 +1016,8 @@ bool OpenGLContext::ImplInit()
m_aGLWin.Width = clientRect.right - clientRect.left;
m_aGLWin.Height = clientRect.bottom - clientRect.top;
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+
return true;
}