summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglfunctions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qglfunctions.h')
-rw-r--r--src/opengl/qglfunctions.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/opengl/qglfunctions.h b/src/opengl/qglfunctions.h
index 725fc22bc5..da3ce7db4d 100644
--- a/src/opengl/qglfunctions.h
+++ b/src/opengl/qglfunctions.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtOpenGL module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,12 +48,12 @@
#endif
#include <QtOpenGL/qgl.h>
+#include <QtGui/qopenglcontext.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(OpenGL)
// Types that aren't defined in all system's gl.h files.
typedef ptrdiff_t qgl_GLintptr;
@@ -451,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