mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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
This commit is contained in:
parent
4f7ef56c53
commit
3d708a5bfa
1 changed files with 15 additions and 0 deletions
|
@ -30,6 +30,21 @@
|
|||
#include <QtGui/qtgui-config.h>
|
||||
#endif
|
||||
|
||||
/* 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.*/
|
||||
#if GST_GL_HAVE_OPENGL
|
||||
#ifdef __gl_glext_h_
|
||||
#ifndef __glext_h_
|
||||
#define __glext_h_ 1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
#define GLsync gst_qt_GLsync
|
||||
#include <QOpenGLContext>
|
||||
|
|
Loading…
Reference in a new issue