From 33a6b8df46f514a450d34dd74e20f4124426fe13 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 2 Dec 2014 19:59:41 +0100 Subject: vo_opengl: print error number if framebuffer creation fails Seems like a waste not to print this. Anyone with enough technical knowledge to have use for the exact error can map the number back to the GL symbol, so don't bother to convert it to a symbol. --- video/out/gl_video.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'video/out') diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 64356473be..fd4e3c5173 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -517,8 +517,10 @@ static bool fbotex_init(struct gl_video *p, struct fbotex *fbo, int w, int h, gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, p->gl_target, fbo->texture, 0); - if (gl->CheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { - MP_ERR(p, "Error: framebuffer completeness check failed!\n"); + GLenum err = gl->CheckFramebufferStatus(GL_FRAMEBUFFER); + if (err != GL_FRAMEBUFFER_COMPLETE) { + MP_ERR(p, "Error: framebuffer completeness check failed (error=%d).\n", + (int)err); res = false; } -- cgit v1.2.3