forked from AuroraMiddleware/gtk
52d1c0c271
Add support to share the WGL context in GDK with the WGL context in GStreamer, so that we can also use OpenGL in the gstreamer media backend to playback videos. For now OpenGL/ES is not supported for this under Windows. The process of setting this up in Windows is a little bit more involved, as: * The OpenGL support in GstGL requires a GL 4.1 Core context, but we may just get the GL version from wglCreateContextAttribsARB() that we pass into the attributes, which is 3.2 by default. So, try to ask for a 4.1 Core context first if we are asking for anything less. * There is only one GstDisplay available for Windows, so we just use gst_gl_display_new(). * We must explicitly tell libepoxy that we are using wglMakeCurrent() outside of libepoxy that is being used in GdkGL, otherwise we would end up crashing as the GL/WGL function pointers would become invalid. * We must also deactivate temporarily the underlying WGL context that was made current by gdk_gl_context_make_current() so that when gst_gl_display_create_context() calls wglShareLists(), we won't get bitten by error 0xaa (resource busy), as some drivers don't handle this well when the GL context is current in another thread. For the last two points we make use of macros defined by the platforms that the build is done for to help us carry out the necessary tasks as needed. Thanks to Matthew Waters for the info on integrating GstGL and windowing toolkits on Windows. |
||
---|---|---|
.. | ||
gtkffmediafile.c | ||
gtkffmediafileprivate.h | ||
gtkgstmediafile.c | ||
gtkgstmediafileprivate.h | ||
gtkgstpaintable.c | ||
gtkgstpaintableprivate.h | ||
gtkgstsink.c | ||
gtkgstsinkprivate.h | ||
meson.build |