From b9a10f8e15a54573dabb8157572623456123ff1b Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Sat, 9 Mar 2013 23:36:36 +1100 Subject: [PATCH] [678/906] window_win32_wgl: implement wglGetProcAddress for extension functions --- gst-libs/gst/gl/win32/gstglwindow_win32_wgl.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gst-libs/gst/gl/win32/gstglwindow_win32_wgl.c b/gst-libs/gst/gl/win32/gstglwindow_win32_wgl.c index 8fa166b..e85a011 100644 --- a/gst-libs/gst/gl/win32/gstglwindow_win32_wgl.c +++ b/gst-libs/gst/gl/win32/gstglwindow_win32_wgl.c @@ -49,6 +49,8 @@ static gboolean gst_gl_window_win32_wgl_create_context (GstGLWindowWin32 * static void gst_gl_window_win32_wgl_destroy_context (GstGLWindowWin32 * window_win32); GstGLAPI gst_gl_window_win32_wgl_get_gl_api (GstGLWindow * window); +static gpointer gst_gl_window_win32_wgl_get_proc_address (GstGLWindow * window, + const gchar * name); static void gst_gl_window_win32_wgl_class_init (GstGLWindowWin32WGLClass * klass) @@ -69,6 +71,8 @@ gst_gl_window_win32_wgl_class_init (GstGLWindowWin32WGLClass * klass) window_win32_class->swap_buffers = GST_DEBUG_FUNCPTR (gst_gl_window_win32_wgl_swap_buffers); + window_class->get_proc_address = + GST_DEBUG_FUNCPTR (gst_gl_window_win32_wgl_get_proc_address); window_class->get_gl_api = GST_DEBUG_FUNCPTR (gst_gl_window_win32_wgl_get_gl_api); } @@ -206,3 +210,16 @@ gst_gl_window_win32_wgl_get_gl_api (GstGLWindow * window) { return GST_GL_API_OPENGL; } + +static gpointer +gst_gl_window_win32_wgl_get_proc_address (GstGLWindow * window, + const gchar * name) +{ + gpointer result; + + if (!(result = wglGetProcAddress ((LPCSTR) name))) { + result = gst_gl_window_default_get_proc_address (window, name); + } + + return result; +} -- 2.7.4