From c1763208e345a00be5289b7f8dc0370937a99c7f Mon Sep 17 00:00:00 2001 From: Laurent Aimar <fenrir@videolan.org> Date: Wed, 25 May 2011 21:17:08 +0200 Subject: [PATCH] Added vlc_gl_t::getProcAddress() declaration. --- include/vlc_opengl.h | 6 ++++++ modules/video_output/egl.c | 1 + modules/video_output/ios.m | 1 + modules/video_output/macosx.m | 1 + modules/video_output/msw/glwin32.c | 1 + modules/video_output/xcb/glx.c | 1 + 6 files changed, 11 insertions(+) diff --git a/include/vlc_opengl.h b/include/vlc_opengl.h index 64e4b7dc58..c32ab682ca 100644 --- a/include/vlc_opengl.h +++ b/include/vlc_opengl.h @@ -48,6 +48,7 @@ struct vlc_gl_t void (*swap)(vlc_gl_t *); int (*lock)(vlc_gl_t *); void (*unlock)(vlc_gl_t *); + void*(*getProcAddress)(vlc_gl_t *, const char *); }; enum { @@ -80,4 +81,9 @@ static inline void vlc_gl_Swap(vlc_gl_t *gl) gl->swap(gl); } +static inline void *vlc_gl_GetProcAddress(vlc_gl_t *gl, const char *name) +{ + return (gl->getProcAddress != NULL) ? gl->getProcAddress(gl, name) : NULL; +} + #endif /* VLC_GL_H */ diff --git a/modules/video_output/egl.c b/modules/video_output/egl.c index f7f0960de0..d4416fc171 100644 --- a/modules/video_output/egl.c +++ b/modules/video_output/egl.c @@ -195,6 +195,7 @@ static int Open (vlc_object_t *obj, const struct gl_api *api) gl->swap = SwapBuffers; gl->lock = NULL; gl->unlock = NULL; + gl->getProcAddress = NULL; return VLC_SUCCESS; error: diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m index b4e04475e1..4d6121a7bd 100644 --- a/modules/video_output/ios.m +++ b/modules/video_output/ios.m @@ -148,6 +148,7 @@ static int Open(vlc_object_t *this) sys->gl.lock = OpenglClean; // We don't do locking, but sometimes we need to cleanup the framebuffer sys->gl.unlock = NULL; sys->gl.swap = OpenglSwap; + sys->gl.getProcAddress = NULL; sys->gl.sys = sys; if (vout_display_opengl_Init(&sys->vgl, &vd->fmt, &sys->gl)) diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m index 07c50e8529..5ea64b2666 100644 --- a/modules/video_output/macosx.m +++ b/modules/video_output/macosx.m @@ -187,6 +187,7 @@ static int Open(vlc_object_t *this) sys->gl.lock = OpenglLock; sys->gl.unlock = OpenglUnlock; sys->gl.swap = OpenglSwap; + sys->gl.getProcAddress = NULL; sys->gl.sys = sys; if (vout_display_opengl_Init(&sys->vgl, &vd->fmt, &sys->gl)) diff --git a/modules/video_output/msw/glwin32.c b/modules/video_output/msw/glwin32.c index 7a76f3187f..dcbb6abe71 100644 --- a/modules/video_output/msw/glwin32.c +++ b/modules/video_output/msw/glwin32.c @@ -111,6 +111,7 @@ static int Open(vlc_object_t *object) sys->gl.lock = NULL; sys->gl.unlock = NULL; sys->gl.swap = Swap; + sys->gl.getProcAddress = NULL; sys->gl.sys = vd; video_format_t fmt = vd->fmt; diff --git a/modules/video_output/xcb/glx.c b/modules/video_output/xcb/glx.c index 4a79df106d..4ba551dfeb 100644 --- a/modules/video_output/xcb/glx.c +++ b/modules/video_output/xcb/glx.c @@ -362,6 +362,7 @@ static int Open (vlc_object_t *obj) sys->gl.lock = NULL; sys->gl.unlock = NULL; sys->gl.swap = SwapBuffers; + sys->gl.getProcAddress = NULL; sys->gl.sys = sys; if (vout_display_opengl_Init (&sys->vgl, &vd->fmt, &sys->gl)) -- 2.25.4