summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-06-03 09:25:13 +0300
committerTor Lillqvist <tml@collabora.com>2016-06-03 10:29:57 +0300
commit210c39dd9a6ebaa964c03c20e4b442ea36941ae9 (patch)
tree365ef9454867d4572925abaee3e5a4e7f6759b01 /vcl/source/opengl
parentc6d553b5fac93d97cb0d316586db34f4d5a8def1 (diff)
tdf#100193: Check earlier and harder whether OpenGL is good enough on Windows
If we notice early enough that OpenGL is broken or not good enough, we can disable it and terminate with EXITHELPER_NORMAL_RESTART. Not beautiful, but works. The earlier added check whether shader compilation and loading of shader program binaries from a cached file works is now just one of the aspects that are checked. Change-Id: I9382576cc607f1916f6002f1fa78a62e23180fe3
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 72cb1d61e6f8..4d3549509a57 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -282,8 +282,23 @@ bool OpenGLContext::InitGLEW()
bGlewInit = true;
}
- VCL_GL_INFO("OpenGLContext::ImplInit----end");
+ VCL_GL_INFO("OpenGLContext::ImplInit----end, GL version: " << OpenGLHelper::getGLVersion());
mbInitialized = true;
+
+ // I think we need at least GL 3.0
+ if (!GLEW_VERSION_3_0)
+ {
+ SAL_WARN("vcl.opengl", "We don't have at least OpenGL 3.0");
+ return false;
+ }
+
+ // Check that some "optional" APIs that we use unconditionally are present
+ if (!glBindFramebuffer)
+ {
+ SAL_WARN("vcl.opengl", "We don't have glBindFramebuffer");
+ return false;
+ }
+
return true;
}