summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-19 11:56:19 +0100
committerwm4 <wm4@nowhere>2015-12-19 14:14:12 +0100
commit3394d37b4ea6876c0a4484c51ba23e6b8ed08e5a (patch)
tree95e646d22bb8ca0ffb28e9c5850a1241739da8ec /video/out/opengl/common.h
parentd2baaaa7df87eba9566fb935eeab5bd0af80fe1b (diff)
downloadmpv-3394d37b4ea6876c0a4484c51ba23e6b8ed08e5a.tar.bz2
mpv-3394d37b4ea6876c0a4484c51ba23e6b8ed08e5a.tar.xz
vo_opengl: refactor how framebuffer depth is passed from backends
Store the determined framebuffer depth in struct GL instead of MPGLContext. This means gl_video_set_output_depth() can be removed, and also justifies adding new fields describing framebuffer/backend properties to struct GL instead of having to add more functions just to shovel the information around. Keep in mind that mpgl_load_functions() will wipe struct GL, so the new fields must be set before calling it.
Diffstat (limited to 'video/out/opengl/common.h')
-rw-r--r--video/out/opengl/common.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/video/out/opengl/common.h b/video/out/opengl/common.h
index 537e785e3b..f376a41f6a 100644
--- a/video/out/opengl/common.h
+++ b/video/out/opengl/common.h
@@ -119,9 +119,6 @@ typedef struct MPGLContext {
struct vo *vo;
const struct mpgl_driver *driver;
- // Bit size of each component in the created framebuffer. 0 if unknown.
- int depth_r, depth_g, depth_b;
-
// For hwdec_vaegl.c.
const char *native_display_type;
void *native_display;
@@ -164,6 +161,7 @@ struct GL {
char *extensions; // Equivalent to GL_EXTENSIONS
int mpgl_caps; // Bitfield of MPGL_CAP_* constants
bool debug_context; // use of e.g. GLX_CONTEXT_DEBUG_BIT_ARB
+ int fb_r, fb_g, fb_b; // frame buffer bit depth (0 if unknown)
void (GLAPIENTRY *Viewport)(GLint, GLint, GLsizei, GLsizei);
void (GLAPIENTRY *Clear)(GLbitfield);