[Libreoffice-commits] core.git: config_host/config_opengl.h.in configure.ac vcl/source

David Tardon dtardon at redhat.com
Thu Jun 18 01:16:25 PDT 2015


 config_host/config_opengl.h.in      |   10 ++++++++++
 configure.ac                        |    4 ++++
 vcl/source/opengl/OpenGLContext.cxx |   10 +++++++++-
 3 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit 2703f4d84323c718f6fbefc8699457ab2a7aacbf
Author: David Tardon <dtardon at redhat.com>
Date:   Thu Jun 18 10:15:28 2015 +0200

    continue to support glew 1.10
    
    Change-Id: I951c04e7d0039f1e38e3bcb2ea7e0f7c33293b9b

diff --git a/config_host/config_opengl.h.in b/config_host/config_opengl.h.in
new file mode 100644
index 0000000..b2c6358
--- /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 4ec301c..6a30d8a 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 31dc1c0..326250c 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


More information about the Libreoffice-commits mailing list