Commit c1763208 authored by Laurent Aimar's avatar Laurent Aimar

Added vlc_gl_t::getProcAddress() declaration.

parent 5ebee8d0
......@@ -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 */
......@@ -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:
......
......@@ -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))
......
......@@ -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))
......
......@@ -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;
......
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment