Commit graph

10 commits

Author SHA1 Message Date
Milian Wolff
3e0d557744 qmlgl: ensure Qt defines GLsync to fix compile on some platforms
By explictly including QtGui/qopengl.h we force the code path that
defines GLsync in the Qt-specific way. Without that, some platforms
failed to compile the qmlgl plugin, since neither Qt nor gstreamer
defined GLsync then, leading to e.g.:

```
make[4]: Entering directory '/.../gst-plugins-good-1.16.1/ext/qt'
  CXX      libgstqmlgl_la-qtitem.lo
In file included from gstqtgl.h:32,
                 from qtitem.h:27,
                 from qtitem.cc:28:
/.../usr/include/gstreamer-1.0/
gst/gl/gstglfuncs.h:93:17: error: expected identifier before ‘*’ token
   ret (GSTGLAPI *name) args;
                 ^
/.../usr/include/gstreamer-1.0/
gst/gl/glprototypes/sync.h:27:1: note: in expansion of macro
‘GST_GL_EXT_FUNCTION’
 GST_GL_EXT_FUNCTION (GLsync, FenceSync,
 ^~~~~~~~~~~~~~~~~~~
```
2020-03-05 03:21:48 +00:00
Matthew Waters
c92dcf513d qmlgl: Fix opengl header guard changes again
Reapply 3d708a5bfa in the correct place
after the iOS additions.
2019-02-05 15:27:49 +11:00
Nirbheek Chauhan
0de89c0dbe qt: Don't define GLsync inside gstglfuncs.h
This was originally added for fixing conflicting definitions between
Android and Qt, but times have changed and now this breaks the build
on iOS:

 [...]/OpenGLES.framework/Headers/ES3/gl.h:1006:48: error: unknown type name 'gst_qt_GLsync'
 GL_API void           GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)   OPENGLES_DEPRECATED(ios(7.0, 12.0), tvos(9.0, 12.0));
                                               ^
 ../ext/qt/gstqtgl.h:49:16: note: expanded from macro 'GLsync'
 #define GLsync gst_qt_GLsync
                ^
 6 errors generated.

Instead, we simply avoid defining GLsync ourselves if we're using Qt.
2019-02-01 14:28:18 +05:30
George Kiagiadakis
e279903857 qmlgl: qualify Qt includes with their module and remove module include dir from the .pro file
it is perfectly legal to use the <module/class> style of includes with Qt
and it avoids the need for having the module's include dir in the include path
2019-01-21 11:55:50 +02:00
Edward Hervey
3d708a5bfa 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
2018-12-17 10:51:50 +01:00
Matthew Waters
319171b162 qt: Ensure GL headers are included
Otherwise there may be no valid typedef of GLsync.

...
/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
   ret (GSTGLAPI *name) args;
                        ^~~~
/usr/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:33:23: error: 'GLsync' has not been declared
                      (GLsync sync))
                       ^~~~~~
...

https://bugzilla.gnome.org/show_bug.cgi?id=796879
2018-08-01 12:11:04 +10:00
Iñigo Huguet
b03df1abf8 qmlgl: Fix conflicting declaration of type GLsync for non-android
https://bugzilla.gnome.org/show_bug.cgi?id=796821
2018-07-18 13:57:23 +10:00
Edward Hervey
115fb15a40 qt: Only include qtgui-config.h on qt >= 5.9.0
The file does not exist in previous versions
2017-09-01 15:57:25 +02:00
Matthew Waters
20d51d876f qt: the defines for QT_OPENGL_ES_2 have moved
Update the includes to account for that
2017-08-31 14:40:44 +10:00
Matthew Waters
d47398de3b qt: add support for building/running on android
Including:
- Necessary configure checks
- Necessary compile time platform checks
- Necessary runtime qt android platform detection
- Escaping GLsync definition with Qt's GLES2 implementation

https://bugzilla.gnome.org/show_bug.cgi?id=754466
2015-09-28 16:47:00 +10:00