summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp3
-rw-r--r--src/opengl/qglpaintdevice.cpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 6365a7421b..cc97bed3f7 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -2099,9 +2099,8 @@ bool QGL2PaintEngineEx::end()
d->device->endPaint();
ctx->d_ptr->active_engine = 0;
-
+ ctx->makeCurrent();
d->resetOpenGLContextActiveEngine();
-
d->resetGLState();
delete d->shaderManager;
diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp
index b29f71ad2e..c5151f66bb 100644
--- a/src/opengl/qglpaintdevice.cpp
+++ b/src/opengl/qglpaintdevice.cpp
@@ -126,6 +126,7 @@ void QGLPaintDevice::endPaint()
{
// Make sure the FBO bound at beginPaint is re-bound again here:
QGLContext *ctx = context();
+ ctx->makeCurrent();
ctx->d_func()->refreshCurrentFbo();