# HG changeset patch # User Teemu Piippo # Date 1406554714 -10800 # Node ID 6bdc0309144134c10237ecfd2bc481438bdecb13 # Parent e16f1587ef4406cd3a7536e942d12cad7ccc0efd - and fixed compilation on linux systems too diff -r e16f1587ef44 -r 6bdc03091441 src/glCompiler.h --- a/src/glCompiler.h Mon Jul 28 03:34:05 2014 +0300 +++ b/src/glCompiler.h Mon Jul 28 16:38:34 2014 +0300 @@ -24,11 +24,7 @@ // ============================================================================= // -#ifdef USE_QT5 class GLCompiler : protected QOpenGLFunctions -#else -class GLCompiler -#endif { public: struct ObjectVBOInfo diff -r e16f1587ef44 -r 6bdc03091441 src/glRenderer.cc --- a/src/glRenderer.cc Mon Jul 28 03:34:05 2014 +0300 +++ b/src/glRenderer.cc Mon Jul 28 16:38:34 2014 +0300 @@ -237,7 +237,9 @@ // void GLRenderer::initializeGL() { +#ifdef USE_QT5 initializeOpenGLFunctions(); +#endif setBackground(); glLineWidth (cfg::LineThickness); glLineStipple (1, 0x6666); @@ -1621,8 +1623,5 @@ void GLRenderer::doMakeCurrent() { makeCurrent(); - -#ifdef USE_QT5 initializeOpenGLFunctions(); -#endif } diff -r e16f1587ef44 -r 6bdc03091441 src/glRenderer.h --- a/src/glRenderer.h Mon Jul 28 03:34:05 2014 +0300 +++ b/src/glRenderer.h Mon Jul 28 16:38:34 2014 +0300 @@ -135,11 +135,7 @@ // and selection picking. The instance of GLRenderer is accessible as // g_win->R() // -#ifdef USE_QT5 class GLRenderer : public QGLWidget, protected QOpenGLFunctions -#else -class GLRenderer : public QGLWidget -#endif { public: Q_OBJECT diff -r e16f1587ef44 -r 6bdc03091441 src/glShared.h --- a/src/glShared.h Mon Jul 28 03:34:05 2014 +0300 +++ b/src/glShared.h Mon Jul 28 16:38:34 2014 +0300 @@ -17,7 +17,11 @@ */ #pragma once -#include + +#ifdef USE_QT5 +# include +#endif + #include "basics.h" class LDObject; @@ -62,6 +66,15 @@ NUMERIC_ENUM_OPERATORS (EVBOSurface) NUMERIC_ENUM_OPERATORS (EVBOComplement) +#ifndef USE_QT5 +// Placeholder QOpenGLFunctions for Qt 4.x support +struct QOpenGLFunctions +{ + void initializeOpenGLFunctions() {} +}; + +#endif + // KDevelop doesn't seem to understand some VBO stuff #ifdef IN_IDE_PARSER using GLint = int;