From 2d39471897f0a3a769406ec9c2b39558ebd45af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 26 Jan 2012 11:44:05 +0100 Subject: Introduced QOpenGLContext::defaultFramebufferObject(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also add some debugging helpers to make sure applications are correctly written even on less restrictive platforms. Change-Id: Ie92e497c32e07b2b83662f7ab5540d8f37777fd0 Reviewed-by: Jørgen Lind --- src/opengl/qglfunctions.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/opengl/qglfunctions.h') diff --git a/src/opengl/qglfunctions.h b/src/opengl/qglfunctions.h index af6c583a10..40c00f1af8 100644 --- a/src/opengl/qglfunctions.h +++ b/src/opengl/qglfunctions.h @@ -48,6 +48,7 @@ #endif #include +#include QT_BEGIN_HEADER @@ -450,6 +451,8 @@ inline void QGLFunctions::glBindBuffer(GLenum target, GLuint buffer) inline void QGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffer) { + if (framebuffer == 0) + framebuffer = QOpenGLContext::currentContext()->defaultFramebufferObject(); #if defined(QT_OPENGL_ES_2) ::glBindFramebuffer(target, framebuffer); #else -- cgit v1.2.3