[vlc-commits] vout_macosx: implement gl.getProcAddress
Felix Paul Kühne
git at videolan.org
Fri May 4 17:56:16 CEST 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri May 4 17:50:24 2012 +0200| [572ee2900e6d96cf5f362763df49314acbd42bef] | committer: Felix Paul Kühne
vout_macosx: implement gl.getProcAddress
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=572ee2900e6d96cf5f362763df49314acbd42bef
---
modules/video_output/macosx.m | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 9a40d81..761558b 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -36,6 +36,7 @@
#import <Cocoa/Cocoa.h>
#import <OpenGL/OpenGL.h>
+#import <dlfcn.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -63,6 +64,8 @@ static void PictureRender (vout_display_t *vd, picture_t *pic, subpicture_t *sub
static void PictureDisplay (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture);
static int Control (vout_display_t *vd, int query, va_list ap);
+static void *OurGetProcAddress(vlc_gl_t *, const char *);
+
static int OpenglLock (vlc_gl_t *gl);
static void OpenglUnlock (vlc_gl_t *gl);
static void OpenglSwap (vlc_gl_t *gl);
@@ -115,6 +118,14 @@ struct vout_display_sys_t
bool has_first_frame;
};
+
+static void *OurGetProcAddress(vlc_gl_t *gl, const char *name)
+{
+ VLC_UNUSED(gl);
+
+ return dlsym(RTLD_DEFAULT, name);
+}
+
static int Open (vlc_object_t *this)
{
vout_display_t *vd = (vout_display_t *)this;
@@ -203,7 +214,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.getProcAddress = OurGetProcAddress;
sys->gl.sys = sys;
const vlc_fourcc_t *subpicture_chromas;
video_format_t fmt = vd->fmt;
More information about the vlc-commits
mailing list