/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtOpenGL module of the Qt Toolkit.
**
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
#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;
typedef ptrdiff_t qgl_GLsizeiptr;
-#ifdef Q_WS_WIN
-# define QGLF_APIENTRY APIENTRY
-#endif
-#ifndef Q_WS_MAC
# ifndef QGLF_APIENTRYP
# ifdef QGLF_APIENTRY
# define QGLF_APIENTRYP QGLF_APIENTRY *
# define QGLF_APIENTRYP *
# endif
# endif
-#else
-# define QGLF_APIENTRY
-# define QGLF_APIENTRYP *
-#endif
struct QGLFunctionsPrivate;
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