diff options
author | Matthew Waters <matthew@centricular.com> | 2015-07-18 17:19:18 +1000 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2015-07-18 18:18:22 +1000 |
commit | d5996de5d7b2153f70edda60e993406137ee19b8 (patch) | |
tree | 4b23b7c06bb754fc53fc3391c07f53ef06929085 /gst-libs/gst/gl/gstglcontext.c | |
parent | 74711c214df4ab607ff69a428b8e690969a3949e (diff) | |
download | gstreamer-plugins-bad-d5996de5d7b2153f70edda60e993406137ee19b8.tar.gz |
glcontext: fix get_current_gl_api on x11/nvidia drivers
They require to get_proc_address some functions through the
platform specific {glX,egl}GetProcAddress rather than the default
GL library symbol lookup.
Diffstat (limited to 'gst-libs/gst/gl/gstglcontext.c')
-rw-r--r-- | gst-libs/gst/gl/gstglcontext.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index a8e4af060..d4a286fa0 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -411,7 +411,7 @@ gst_gl_context_new_wrapped (GstGLDisplay * display, guintptr handle, if (context_type == GST_GL_PLATFORM_CGL) { context_class->get_current_context = gst_gl_context_cocoa_get_current_context; - context_class->get_proc_address = _default_get_proc_address; + context_class->get_proc_address = gst_gl_context_default_get_proc_address; } #endif #if GST_GL_HAVE_PLATFORM_WGL @@ -424,7 +424,7 @@ gst_gl_context_new_wrapped (GstGLDisplay * display, guintptr handle, if (context_type == GST_GL_PLATFORM_EAGL) { context_class->get_current_context = gst_gl_context_eagl_get_current_context; - context_class->get_proc_address = _default_get_proc_address; + context_class->get_proc_address = gst_gl_context_default_get_proc_address; } #endif @@ -507,6 +507,7 @@ gst_gl_context_get_proc_address_with_platform (GstGLPlatform context_type, /** * gst_gl_context_get_current_gl_api: + * @platform: the #GstGLPlatform to retreive the API for * @major: (out): (allow-none): the major version * @minor: (out): (allow-none): the minor version * @@ -519,7 +520,8 @@ gst_gl_context_get_proc_address_with_platform (GstGLPlatform context_type, * Since: 1.6 */ GstGLAPI -gst_gl_context_get_current_gl_api (guint * major, guint * minor) +gst_gl_context_get_current_gl_api (GstGLPlatform platform, guint * major, + guint * minor) { const GLubyte *(*GetString) (GLenum name); #if GST_GL_HAVE_OPENGL @@ -533,10 +535,13 @@ gst_gl_context_get_current_gl_api (guint * major, guint * minor) while (ret != GST_GL_API_NONE) { /* FIXME: attempt to delve into the platform specific GetProcAddress */ - GetString = gst_gl_context_default_get_proc_address (ret, "glGetString"); + GetString = + gst_gl_context_get_proc_address_with_platform (platform, ret, + "glGetString"); #if GST_GL_HAVE_OPENGL GetIntegerv = - gst_gl_context_default_get_proc_address (ret, "glGetIntegerv"); + gst_gl_context_get_proc_address_with_platform (platform, ret, + "glGetIntegerv"); #endif if (!GetString) { goto next; |