diff options
author | wm4 <wm4@nowhere> | 2016-06-14 10:35:43 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-06-14 10:35:43 +0200 |
commit | 788929e4e07e00325cc1b2f58569db9de1ba47fb (patch) | |
tree | 7f29822cd0e439a0626f4ecf8fcee651bb129a99 /video/out/opengl/egl_helpers.c | |
parent | 3682df2dd50313812aadaec92f554b3d60dadc30 (diff) | |
download | mpv-788929e4e07e00325cc1b2f58569db9de1ba47fb.tar.bz2 mpv-788929e4e07e00325cc1b2f58569db9de1ba47fb.tar.xz |
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/egl_helpers.c')
-rw-r--r-- | video/out/opengl/egl_helpers.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/video/out/opengl/egl_helpers.c b/video/out/opengl/egl_helpers.c index d86b5becde..7e236f1da9 100644 --- a/video/out/opengl/egl_helpers.c +++ b/video/out/opengl/egl_helpers.c @@ -18,13 +18,3 @@ #include "egl_helpers.h" #include "common.h" -void mp_egl_get_depth(struct GL *gl, EGLConfig fbc) -{ - EGLint tokens[] = {EGL_RED_SIZE, EGL_GREEN_SIZE, EGL_BLUE_SIZE}; - int *ptrs[] = {&gl->fb_r, &gl->fb_g, &gl->fb_b}; - for (int n = 0; n < MP_ARRAY_SIZE(tokens); n++) { - EGLint depth = 0; - if (eglGetConfigAttrib(eglGetCurrentDisplay(), fbc, tokens[n], &depth)) - *ptrs[n] = depth; - } -} |