summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/opengl/platform/egl/qeglplatformcontext.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/opengl/platform/egl/qeglplatformcontext.cpp b/src/gui/opengl/platform/egl/qeglplatformcontext.cpp
index 0a6e83e875e..e1bf056d655 100644
--- a/src/gui/opengl/platform/egl/qeglplatformcontext.cpp
+++ b/src/gui/opengl/platform/egl/qeglplatformcontext.cpp
@@ -378,6 +378,21 @@ bool QEGLPlatformContext::makeCurrent(QPlatformSurface *surface)
if (eglSurface != EGL_NO_SURFACE) // skip if using surfaceless context
eglSwapInterval(eglDisplay(), m_swapInterval);
}
+#if defined(Q_OS_VXWORKS) && defined(Q_PROCESSOR_X86_64)
+ // Clear set of framebuffers as workaround for display artifacts found
+ // in Wind River's Mesa OpenGL implementation
+ static bool firstWindow = true;
+ if (firstWindow && (QSurface::Window == surface->surface()->surfaceClass())) {
+ glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+ swapBuffers(surface);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+ swapBuffers(surface);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+ swapBuffers(surface);
+ firstWindow = false;
+ }
+#endif
} else {
qWarning("QEGLPlatformContext: eglMakeCurrent failed: %x", eglGetError());
}