diff options
author | wm4 <wm4@nowhere> | 2015-12-19 11:56:19 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-19 14:14:12 +0100 |
commit | 3394d37b4ea6876c0a4484c51ba23e6b8ed08e5a (patch) | |
tree | 95e646d22bb8ca0ffb28e9c5850a1241739da8ec /video/out/opengl/dxinterop.c | |
parent | d2baaaa7df87eba9566fb935eeab5bd0af80fe1b (diff) | |
download | mpv-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/dxinterop.c')
-rw-r--r-- | video/out/opengl/dxinterop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/opengl/dxinterop.c b/video/out/opengl/dxinterop.c index bc302629aa..093729351d 100644 --- a/video/out/opengl/dxinterop.c +++ b/video/out/opengl/dxinterop.c @@ -275,17 +275,17 @@ static int d3d_size_dependent_create(MPGLContext *ctx) // work is needed. switch (bb_desc.Format) { case D3DFMT_X1R5G5B5: case D3DFMT_A1R5G5B5: - ctx->depth_r = ctx->depth_g = ctx->depth_b = 5; + ctx->gl->fb_r = ctx->gl->fb_g = ctx->gl->fb_b = 5; break; case D3DFMT_R5G6B5: - ctx->depth_r = 5; ctx->depth_g = 6; ctx->depth_b = 5; + ctx->gl->fb_r = 5; ctx->gl->fb_g = 6; ctx->gl->fb_b = 5; break; case D3DFMT_R8G8B8: case D3DFMT_A8R8G8B8: case D3DFMT_X8R8G8B8: case D3DFMT_A8B8G8R8: case D3DFMT_X8B8G8R8: default: - ctx->depth_r = ctx->depth_g = ctx->depth_b = 8; + ctx->gl->fb_r = ctx->gl->fb_g = ctx->gl->fb_b = 8; break; case D3DFMT_A2R10G10B10: case D3DFMT_A2B10G10R10: - ctx->depth_r = ctx->depth_g = ctx->depth_b = 10; + ctx->gl->fb_r = ctx->gl->fb_g = ctx->gl->fb_b = 10; break; } |