diff options
author | wm4 <wm4@nowhere> | 2015-05-14 13:07:00 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-05-14 13:07:00 +0200 |
commit | bad932e8ed4b5af75ad2a4619d2331ad1a530900 (patch) | |
tree | 822b38faaefb114a6c3b9190608ea8487ee68d6f /video/out/gl_common.h | |
parent | fa39dadb059bb81839b6e97e74e5b83b7c0a2a0f (diff) | |
download | mpv-bad932e8ed4b5af75ad2a4619d2331ad1a530900.tar.bz2 mpv-bad932e8ed4b5af75ad2a4619d2331ad1a530900.tar.xz |
vo_opengl: hardcode rquested GL version in backends
The requested version field didn't make much sense anymore, and was even
partially ignored by some backends.
Diffstat (limited to 'video/out/gl_common.h')
-rw-r--r-- | video/out/gl_common.h | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/video/out/gl_common.h b/video/out/gl_common.h index 3b5def0346..f163e4fd28 100644 --- a/video/out/gl_common.h +++ b/video/out/gl_common.h @@ -86,16 +86,12 @@ struct mpgl_driver { int priv_size; // Init the GL context and possibly the underlying VO backend. + // The created context should be compatible to GL 3.2 core profile, but + // some other GL versions are supported as well (e.g. GL 2.1 or GLES 2). // Return 0 on success, negative value (-1) on error. int (*init)(struct MPGLContext *ctx, int vo_flags); // Resize the window, or create a new window if there isn't one yet. - // On the first call, it creates a GL context according to what's specified - // in MPGLContext.requested_gl_version. This is just a hint, and if the - // requested version is not available, it may return a completely different - // GL context. (The caller must check if the created GL version is ok. The - // callee must try to fall back to an older version if the requested - // version is not available, and newer versions are incompatible.) // Currently, there is an unfortunate interaction with ctx->vo, and // display size etc. are determined by it. // Return 0 on success, negative value (-1) on error. @@ -119,10 +115,6 @@ typedef struct MPGLContext { // Bit size of each component in the created framebuffer. 0 if unknown. int depth_r, depth_g, depth_b; - // GL version requested from config_window_gl3 backend (MPGL_VER mangled). - // (Might be different from the actual version in gl->version.) - int requested_gl_version; - // For free use by the mpgl_driver. void *priv; @@ -142,12 +134,7 @@ typedef struct MPGLContext { // Resize the window, or create a new window if there isn't one yet. - // On the first call, it creates a GL context according to what's specified - // in MPGLContext.requested_gl_version. This is just a hint, and if the - // requested version is not available, it may return a completely different - // GL context. (The caller must check if the created GL version is ok. The - // callee must try to fall back to an older version if the requested - // version is not available, and newer versions are incompatible.) + // On the first call, it creates a GL context. bool (*config_window)(struct MPGLContext *ctx, int flags); // Optional callback on the beginning of a frame. The frame will be finished |