summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-26 20:48:11 +0100
committerwm4 <wm4@nowhere>2014-11-26 20:48:18 +0100
commit3fe57e3cb691d75dc8813c29cada5e3ddfd2a295 (patch)
tree93962472662b8d3c402d97cd3f78b91f2d0f4c89 /video/out/gl_common.h
parent7e62f2b0527e2a4d96418b9d8009dd840a45df0c (diff)
downloadmpv-3fe57e3cb691d75dc8813c29cada5e3ddfd2a295.tar.bz2
mpv-3fe57e3cb691d75dc8813c29cada5e3ddfd2a295.tar.xz
gl_common: factor context creation
Always create the context in mpgl_init(), instead of doing it when mpgl_config_window() is called the first time. This is a small step towards cleaning up the GL backend interface, and adding other things like perhaps GLES support, or a callback-driven backend for libmpv.
Diffstat (limited to 'video/out/gl_common.h')
-rw-r--r--video/out/gl_common.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/video/out/gl_common.h b/video/out/gl_common.h
index a8775ba09d..eb54ca41d2 100644
--- a/video/out/gl_common.h
+++ b/video/out/gl_common.h
@@ -136,9 +136,6 @@ typedef struct MPGLContext {
void *priv;
} MPGLContext;
-MPGLContext *mpgl_init(struct vo *vo, const char *backend_name);
-void mpgl_uninit(MPGLContext *ctx);
-
void mpgl_lock(MPGLContext *ctx);
void mpgl_unlock(MPGLContext *ctx);
void mpgl_set_context(MPGLContext *ctx);
@@ -150,7 +147,12 @@ bool mpgl_is_thread_safe(MPGLContext *ctx);
// gl_caps: bitfield of MPGL_CAP_* (required GL version and feature set)
// flags: passed to the backend's create window function
// Returns success.
-bool mpgl_config_window(struct MPGLContext *ctx, int gl_caps, int flags);
+MPGLContext *mpgl_init(struct vo *vo, const char *backend_name,
+ int gl_caps, int vo_flags);
+void mpgl_uninit(MPGLContext *ctx);
+
+// flags: passed to the backend function
+bool mpgl_reconfig_window(struct MPGLContext *ctx, int flags);
int mpgl_find_backend(const char *name);