Commit 5479af13 authored by Edward Hervey's avatar Edward Hervey 🤘 Committed by Tim-Philipp Müller
Browse files

qtgl: Handle OPENGL header guard changes

In 2018 khronos changed the gl header guards. If we don't detect
this properly we would end up with plenty of symbol redifinition
(since we would be importing twice the "same" header).

Instead detect if the "newer" header was already included and if
so define the "old" define to avoid this situation

Fixes #523
parent 5ae9cbcc
......@@ -30,6 +30,21 @@
#include <QtGui/qtgui-config.h>
/* The glext.h guard was renamed in 2018, but some software which
* includes their own copy of the GL headers (such as qt) might have
* older version which use the old guard. This would result in the
* header being included again (and symbols redefined).
* To avoid this, we define the "old" guard if the "new" guard is
* defined.*/
#ifdef __gl_glext_h_
#ifndef __glext_h_
#define __glext_h_ 1
#if defined(QT_OPENGL_ES_2)
#define GLsync gst_qt_GLsync
#include <QOpenGLContext>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment