From c8fa3244c27b3df4904ad2631039973380035efc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 19 Jun 2013 12:19:28 +0000 Subject: [PATCH] From Jan Ciger, "I have found a problem when building OSG with Qt 5 support. Qt has the following in the qopengl.h header: # include # ifndef GL_DOUBLE # define GL_DOUBLE GL_FLOAT # endif # ifndef GLdouble typedef GLfloat GLdouble; # endif Unfortunately, when building for normal OpenGL (not GL/ES!) on Windows with MSVC2012, GLdouble is not defined (it is not a macro but typedef) and the code above produces a conflicting definition, making the compile fail. I am attaching a bit hackish workaround for this problem in osg/GL " --- include/osg/GL | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/osg/GL b/include/osg/GL index 7a3c7aae1..1f387c624 100644 --- a/include/osg/GL +++ b/include/osg/GL @@ -122,6 +122,12 @@ #include #else #include + + // hack required to avoid conflicts with Qt + // Qt expects GLdouble to be a macro ?! + #ifndef GLdouble + #define GLdouble double + #endif #endif #endif #endif