aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out/opengl/context_dxinterop.c
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2016-06-14 10:35:43 +0200
committerGravatar wm4 <wm4@nowhere>2016-06-14 10:35:43 +0200
commit788929e4e07e00325cc1b2f58569db9de1ba47fb (patch)
tree7f29822cd0e439a0626f4ecf8fcee651bb129a99 /video/out/opengl/context_dxinterop.c
parent3682df2dd50313812aadaec92f554b3d60dadc30 (diff)
vo_opengl: use standard functions to retrieve display depth
Until now, we've used system-specific API (GLX, EGL, etc.) to retrieve the depth of the default framebuffer. (We equal this to display depth and use the determined depth for dithering.) We can actually retrieve this value through standard GL API, and it works everywhere (except GLES 2 of course). This simplifies everything a great deal. egl_helpers.c is empty now. But I expect that some EGL boilerplate will be moved to it, so don't remove it yet.
Diffstat (limited to 'video/out/opengl/context_dxinterop.c')
-rw-r--r--video/out/opengl/context_dxinterop.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/video/out/opengl/context_dxinterop.c b/video/out/opengl/context_dxinterop.c
index a4dc165132..4f75d22186 100644
--- a/video/out/opengl/context_dxinterop.c
+++ b/video/out/opengl/context_dxinterop.c
@@ -278,25 +278,6 @@ static int d3d_size_dependent_create(MPGLContext *ctx)
MP_VERBOSE(ctx->vo, "DX_interop backbuffer format: %u\n",
(unsigned)bb_desc.Format);
- // Note: This backend has only been tested on an 8-bit display. It's
- // unknown whether this code is enough to support other formats or if more
- // work is needed.
- switch (bb_desc.Format) {
- case D3DFMT_X1R5G5B5: case D3DFMT_A1R5G5B5:
- ctx->gl->fb_r = ctx->gl->fb_g = ctx->gl->fb_b = 5;
- break;
- case D3DFMT_R5G6B5:
- 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->gl->fb_r = ctx->gl->fb_g = ctx->gl->fb_b = 8;
- break;
- case D3DFMT_A2R10G10B10: case D3DFMT_A2B10G10R10:
- ctx->gl->fb_r = ctx->gl->fb_g = ctx->gl->fb_b = 10;
- break;
- }
-
// Create a rendertarget with the same format as the backbuffer for
// rendering from OpenGL
HANDLE share_handle = NULL;