summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-03-11 17:46:13 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-04-01 14:35:47 (GMT)
commitb469889f6f9b49f2e52948e3419958b0d8bfc994 (patch)
tree6b052e46adc25b5afa1d025fdff7a77a7dd8f9cd /src
parentee8949183917ae7494cbf0121922d0b68384f90f (diff)
downloadQt-b469889f6f9b49f2e52948e3419958b0d8bfc994.zip
Qt-b469889f6f9b49f2e52948e3419958b0d8bfc994.tar.gz
Qt-b469889f6f9b49f2e52948e3419958b0d8bfc994.tar.bz2
Fixes: Prevent QGLFramebufferObject from resetting the current context.
RevBy: Trond Details: If there is already an active context we don't need a dummy widget.
Diffstat (limited to 'src')
-rw-r--r--src/opengl/qglframebufferobject.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index 297ef84..45d4788 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -918,7 +918,8 @@ QPaintEngine *QGLFramebufferObject::paintEngine() const
*/
bool QGLFramebufferObject::hasOpenGLFramebufferObjects()
{
- QGLWidget dmy; // needed to detect and init the QGLExtensions object
+ if (!QGLContext::currentContext())
+ QGLWidget dmy; // needed to detect and init the QGLExtensions object
return (QGLExtensions::glExtensions & QGLExtensions::FramebufferObject);
}
@@ -1079,7 +1080,8 @@ bool QGLFramebufferObject::isBound() const
*/
bool QGLFramebufferObject::hasOpenGLFramebufferBlit()
{
- QGLWidget dmy; // needed to detect and init the QGLExtensions object
+ if (!QGLContext::currentContext())
+ QGLWidget dmy; // needed to detect and init the QGLExtensions object
return (QGLExtensions::glExtensions & QGLExtensions::FramebufferBlit);
}