diff --git a/fixqopengl.h b/fixqopengl.h new file mode 100644 --- /dev/null +++ b/fixqopengl.h @@ -0,0 +1,37 @@ +/******************************************************************** + KWin - the KDE window manager + This file is part of the KDE project. + +Copyright (C) 2018 Bhushan Shah + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*********************************************************************/ + +#ifndef FIXQOPENGL_H +#define FIXQOPENGL_H + +// qopengl.h declares GLdouble as a typedef of float when Qt is built +// with GLES support. This conflicts with the epoxy/gl_generated.h +// declaration, so we have to prevent the Qt header from being #included. +#define QOPENGL_H + +#ifndef QOPENGLF_APIENTRY +#define QOPENGLF_APIENTRY GLAPIENTRY +#endif + +#ifndef QOPENGLF_APIENTRYP +#define QOPENGLF_APIENTRYP GLAPIENTRYP +#endif + +#endif //FIXQOPENGL_H diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp --- a/libkwineffects/kwinglplatform.cpp +++ b/libkwineffects/kwinglplatform.cpp @@ -19,6 +19,9 @@ *********************************************************************/ #include "kwinglplatform.h" +// include kwinglutils_funcs.h to avoid the redeclaration issues +// between qopengl.h and epoxy/gl.h +#include "kwinglutils_funcs.h" #include #include diff --git a/platform.h b/platform.h --- a/platform.h +++ b/platform.h @@ -22,6 +22,8 @@ #include #include #include +#include "fixqopengl.h" + #include #include #include diff --git a/plugins/qpa/abstractplatformcontext.h b/plugins/qpa/abstractplatformcontext.h --- a/plugins/qpa/abstractplatformcontext.h +++ b/plugins/qpa/abstractplatformcontext.h @@ -21,6 +21,7 @@ #define KWIN_QPA_ABSTRACTPLATFORMCONTEXT_H #include +#include "fixqopengl.h" #include #include diff --git a/plugins/qpa/integration.h b/plugins/qpa/integration.h --- a/plugins/qpa/integration.h +++ b/plugins/qpa/integration.h @@ -21,6 +21,8 @@ #define KWIN_QPA_INTEGRATION_H #include +#include "fixqopengl.h" + #include #include #include diff --git a/plugins/qpa/window.h b/plugins/qpa/window.h --- a/plugins/qpa/window.h +++ b/plugins/qpa/window.h @@ -21,6 +21,8 @@ #define KWIN_QPA_WINDOW_H #include +#include "fixqopengl.h" + #include #include // wayland