summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2010-12-15 15:53:31 +0100
committerGunnar Sletta <gunnar.sletta@nokia.com>2010-12-15 15:53:31 +0100
commitc9bc62ea78f6d75768213c5859df85facc667748 (patch)
treeb7cd3ae10c189a496aaeca453a76890aebc7ac6e
parent1c8d5416537539a4477c5585bc64b384be478401 (diff)
Properly initialize the QGLContext to be used.
If we don't call makeCurrent on the QGLContext, then we are not resolving the workarounds, such as the broken FBO readback used for the texture glyph cache. Without this, text will work randomly and mostly crash.
-rw-r--r--src/canvas/qxgraphicsview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/canvas/qxgraphicsview.cpp b/src/canvas/qxgraphicsview.cpp
index ddc3f72..6c3e257 100644
--- a/src/canvas/qxgraphicsview.cpp
+++ b/src/canvas/qxgraphicsview.cpp
@@ -615,7 +615,8 @@ void QxGraphicsView::initializeSceneGraph()
if (!platformContext) {
qFatal("QxGraphicsView::initializeSceneGraph: No platform GL context");
}
- platformContext->makeCurrent();
+ QGLContext *hackContext = QGLContext::fromPlatformGLContext(platformContext);
+ hackContext->makeCurrent();
#endif