summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2015-06-18 10:15:28 +0200
committerDavid Tardon <dtardon@redhat.com>2015-06-18 10:16:02 +0200
commit2703f4d84323c718f6fbefc8699457ab2a7aacbf (patch)
tree76cb43cac734af198df1548392b8b7ae6af50566
parentf3b51162b68acc7b22c2c5b41a8b29038153afab (diff)
continue to support glew 1.10
Change-Id: I951c04e7d0039f1e38e3bcb2ea7e0f7c33293b9b
-rw-r--r--config_host/config_opengl.h.in10
-rw-r--r--configure.ac4
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx10
3 files changed, 23 insertions, 1 deletions
diff --git a/config_host/config_opengl.h.in b/config_host/config_opengl.h.in
new file mode 100644
index 000000000000..b2c63582b0d8
--- /dev/null
+++ b/config_host/config_opengl.h.in
@@ -0,0 +1,10 @@
+/*
+Settings for OpenGL
+*/
+
+#ifndef CONFIG_OPENGL_H
+#define CONFIG_OPENGL_H
+
+#undef HAVE_GLEW_1_12
+
+#endif
diff --git a/configure.ac b/configure.ac
index 4ec301ca9a6a..6a30d8ac4735 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8699,6 +8699,9 @@ dnl ===================================================================
dnl Check for system glew
dnl ===================================================================
libo_CHECK_SYSTEM_MODULE([glew], [GLEW], [glew >= 1.10.0])
+AS_IF([test "$with_system_glew" = "yes"],
+ [PKG_CHECK_EXISTS([glew >= 1.12.0], [AC_DEFINE([HAVE_GLEW_1_12])])],
+ [AC_DEFINE([HAVE_GLEW_1_12])])
dnl ===================================================================
dnl Check for system vigra
@@ -13075,6 +13078,7 @@ AC_CONFIG_HEADERS([config_host/config_orcus.h])
AC_CONFIG_HEADERS([config_host/config_kde4.h])
AC_CONFIG_HEADERS([config_host/config_mingw.h])
AC_CONFIG_HEADERS([config_host/config_oox.h])
+AC_CONFIG_HEADERS([config_host/config_opengl.h])
AC_CONFIG_HEADERS([config_host/config_options.h])
AC_CONFIG_HEADERS([config_host/config_test.h])
AC_CONFIG_HEADERS([config_host/config_telepathy.h])
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 31dc1c097772..326250c0f644 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -7,6 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <config_opengl.h>
+
#include <vcl/opengl/OpenGLContext.hxx>
#include <vcl/opengl/OpenGLHelper.hxx>
#include <vcl/syschild.hxx>
@@ -437,7 +439,13 @@ extern "C" void
APIENTRY
#endif
debug_callback(GLenum source, GLenum type, GLuint id,
- GLenum severity, GLsizei , const GLchar* message, const GLvoid* )
+ GLenum severity, GLsizei , const GLchar* message,
+#if defined HAVE_GLEW_1_12
+ const GLvoid*
+#else
+ GLvoid*
+#endif
+ )
{
// ignore Nvidia's : "Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches."
// the GLSL compiler is a bit too aggressive in optimizing the state based on the current OpenGL state