[vlc-commits] Added vlc_gl_t::getProcAddress() declaration.

Laurent Aimar git at videolan.org
Wed May 25 21:48:54 CEST 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed May 25 21:17:08 2011 +0200| [c1763208e345a00be5289b7f8dc0370937a99c7f] | committer: Laurent Aimar

Added vlc_gl_t::getProcAddress() declaration.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c1763208e345a00be5289b7f8dc0370937a99c7f
---

 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(+), 0 deletions(-)

diff --git a/include/vlc_opengl.h b/include/vlc_opengl.h
index 64e4b7d..c32ab68 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 f7f0960..d4416fc 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 b4e0447..4d6121a 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 07c50e8..5ea64b2 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 7a76f31..dcbb6ab 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 4a79df1..4ba551d 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))



More information about the vlc-commits mailing list