summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions.h
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-02-05 21:25:31 +0100
committerJoão Abecasis <joao.abecasis@nokia.com>2012-02-05 21:26:33 +0100
commitd065dfd454890c332482a6109ed34a989e50809b (patch)
tree0d3e9c5367c1fad7d089d368182374e8d1d46ca1 /src/gui/opengl/qopenglfunctions.h
parent632840cb0f5ad355d87fc040b015d04af86371ec (diff)
parent9f54846d951838361f4188b423e7aa7c7b9a9540 (diff)
Merge remote-tracking branch 'gerrit/master' into containers
Conflicts: src/corelib/tools/qstring.cpp Change-Id: I23d214bf33c2badfae1876da3cc7d6d8f6e635fb
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.h')
-rw-r--r--src/gui/opengl/qopenglfunctions.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 2f4b5b18cb..881c27f2c9 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.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 QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,6 +42,8 @@
#ifndef QOPENGLFUNCTIONS_H
#define QOPENGLFUNCTIONS_H
+#ifndef QT_NO_OPENGL
+
#ifdef __GLEW_H__
#warning qopenglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
#warning To use GLEW with Qt, do not include <qopengl.h> or <QOpenGLFunctions> after glew.h
@@ -71,7 +73,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
// Types that aren't defined in all system's gl.h files.
typedef ptrdiff_t qopengl_GLintptr;
@@ -477,6 +478,8 @@ inline void QOpenGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
inline void QOpenGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffer)
{
+ if (framebuffer == 0)
+ framebuffer = QOpenGLContext::currentContext()->defaultFramebufferObject();
#if defined(QT_OPENGL_ES_2)
::glBindFramebuffer(target, framebuffer);
#else
@@ -2420,4 +2423,6 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_OPENGL
+
#endif