diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-05-27 09:12:02 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-05-30 15:23:28 (GMT) |
commit | af3efefeefe686e5c35ed502de077c0bcb6f6fc0 (patch) | |
tree | 91929fe548846a7d0e1f0ce68808b966f4d0f050 /src | |
parent | 7c2d885d98761fca7624933a92cde7bad113c862 (diff) | |
download | Qt-af3efefeefe686e5c35ed502de077c0bcb6f6fc0.zip Qt-af3efefeefe686e5c35ed502de077c0bcb6f6fc0.tar.gz Qt-af3efefeefe686e5c35ed502de077c0bcb6f6fc0.tar.bz2 |
We need to let the currentContext be in the same state after
setting the new eglsurface
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandglcontext.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandglcontext.cpp b/src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandglcontext.cpp index d293019..aaba5ac 100644 --- a/src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandglcontext.cpp +++ b/src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandglcontext.cpp @@ -115,8 +115,15 @@ void *QWaylandGLContext::getProcAddress(const QString &string) void QWaylandGLContext::setEglSurface(EGLSurface surface) { - doneCurrent(); + bool wasCurrent = false; + if (QPlatformGLContext::currentContext() == this) { + wasCurrent = true; + doneCurrent(); + } mSurface = surface; + if (wasCurrent) { + makeCurrent(); + } } EGLConfig QWaylandGLContext::eglConfig() const |