/**
* A VLC GL context (and its underlying surface)
*/
-typedef struct vlc_gl vlc_gl_t;
+typedef struct vlc_gl_t vlc_gl_t;
-struct vlc_gl
+struct vlc_gl_t
{
VLC_COMMON_MEMBERS
void (*swap)(vlc_gl_t *);
int (*lock)(vlc_gl_t *);
void (*unlock)(vlc_gl_t *);
+ void*(*getProcAddress)(vlc_gl_t *, const char *);
};
enum {
VLC_OPENGL_ES2,
};
-VLC_EXPORT( vlc_gl_t *, vlc_gl_Create, (struct vout_window_t *, unsigned, const char *) ) LIBVLC_USED;
-VLC_EXPORT( void, vlc_gl_Destroy, (vlc_gl_t *) );
+VLC_API vlc_gl_t *vlc_gl_Create(struct vout_window_t *, unsigned, const char *) VLC_USED;
+VLC_API void vlc_gl_Destroy(vlc_gl_t *);
static inline int vlc_gl_MakeCurrent(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 */