[Bug 752743] gl: add support for egl+x11+swrast on osx

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jul 24 01:44:22 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=752743

--- Comment #17 from Julien Isorce <julien.isorce at gmail.com> ---
(In reply to Matthew Waters from comment #13)
> Review of attachment 308044 [details] [review]:
> 
> ::: configure.ac
> @@ +831,3 @@
> +  case "$host" in
> +    *-*darwin*)
> +      GL_CFLAGS="-Wno-typedef-redefinition"
> 
> Again, not a fan of disabling the typedef redefinition on osx. 

I have no other solution (clang is not happy on osx) except reducing the scope: 

dnl check if we can include both GL and GLES2 at the same time
if test "x$HAVE_GL" = "xyes" -a "x$HAVE_GLES2" = "xyes"; then
  GL_INCLUDES="
+ # ifdef __APPLE_
+ # pragma GCC diagnostic push
+ # pragma GCC diagnostic ignored "-Wtypedef-redefinition"
+ # endif

# ifndef GL_GLEXT_PROTOTYPES
...
# endif

+ # ifdef __APPLE_
+ # pragma GCC reset_options
+ # pragma GCC diagnostic pop
+ # endif
"

And do the same in gstglapi.h (also checking we do that only if gl and gles are
both going to be included)

> Should also
> hide behind the $HAVE_EGL/$NEED_EGL check like the hunk below.

Right. Also depending if we go for the pragma push/pop it won't be needed.

> 
> ::: gst-libs/gst/gl/gstglcontext.c
> @@ +124,3 @@
> +#ifdef __APPLE__
> +  if (!module_opengl && (_get_default_gl_platform () ==
> GST_GL_PLATFORM_EGL))
> +    module_opengl = g_module_open ("libGL.dylib", G_MODULE_BIND_LAZY);
> 
> You should probably remove the && _get_default_gl_platform() == to always
> get the dylib on OS X.  The g_module_open call below is targetted to
> loadable modules which OS X differentiates between that and shared
> libraries.  See
> http://www.finkproject.org/doc/porting/porting.en.html#shared.lib-and-mod

Ah ok I'll try it

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list