aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out/opengl
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2016-06-15 00:55:27 +0200
committerGravatar wm4 <wm4@nowhere>2016-06-15 00:55:27 +0200
commit43e964e2d6af06dacf14e64243d6ee0b298906a1 (patch)
tree8a479172b05708549a5f8a5459ac283bd09032fe /video/out/opengl
parenta30e7272669478ca1a04469c0ab3614b0e99dd98 (diff)
vo_opengl: fix framebuffer object name
The OpenGL 3.0+ and ES specs are quite clear on what values are accepted for the attachment object name parameter. And there's no overlap for the default framebuffer. Sigh. Probably fixes Mesa raising an error in this case and might fix #3251. Regression by the previous vo_opengl change.
Diffstat (limited to 'video/out/opengl')
-rw-r--r--video/out/opengl/video.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 961eab3383..0bbc979476 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -3342,13 +3342,14 @@ static void init_gl(struct gl_video *p)
}
if ((gl->es >= 300 || gl->version) && (gl->mpgl_caps & MPGL_CAP_FB)) {
+ GLenum obj = gl->version ? GL_BACK_LEFT : GL_BACK;
GLint depth_r = -1, depth_g = -1, depth_b = -1;
- gl->GetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK,
+ gl->GetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, obj,
GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &depth_r);
- gl->GetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK,
+ gl->GetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, obj,
GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE, &depth_g);
- gl->GetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK,
+ gl->GetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, obj,
GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE, &depth_b);
MP_VERBOSE(p, "Reported display depth: R=%d, G=%d, B=%d\n",