diff options
author | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-12-09 14:40:29 +0200 |
---|---|---|
committer | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-12-09 17:13:59 +0200 |
commit | 54613aec3bdac668d198923814873a9e622ad675 (patch) | |
tree | 0ea1e26e8199900e6f314242653ceb0bb4ec63a6 /src/opengl/qgl_symbian.cpp | |
parent | 5fbd3e1aacf789cc46fef57d8726333ee8a00e03 (diff) | |
download | qt4-tools-54613aec3bdac668d198923814873a9e622ad675.tar.gz |
Fix window surface config on OpenGL graphics system.
QtOpenGL uses 16-bit configs by default but on Symbian
it should use 32-bit config.
Task-number: QTBUG-23082
Task-number: ou1cimx1#951223
Reviewed-by: Murray Read
Diffstat (limited to 'src/opengl/qgl_symbian.cpp')
-rw-r--r-- | src/opengl/qgl_symbian.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp index 0148304547..7d343f66a2 100644 --- a/src/opengl/qgl_symbian.cpp +++ b/src/opengl/qgl_symbian.cpp @@ -181,14 +181,19 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as d->ownsEglContext = true; d->eglContext->setApi(QEgl::OpenGL); - // Allow apps to override ability to use multisampling by setting an environment variable. Eg: - // qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1"); - // Added to allow camera app to start with limited memory. - if (!QSymbianGraphicsSystemEx::hasBCM2727() && !qgetenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE").toInt()) { - // Most likely we have hw support for multisampling - // so let's enable it. - d->glFormat.setSampleBuffers(1); - d->glFormat.setSamples(4); + if (d->glFormat.samples() == EGL_DONT_CARE) { + // Allow apps to override ability to use multisampling by setting an environment variable. Eg: + // qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1"); + // Added to allow camera app to start with limited memory. + if (!QSymbianGraphicsSystemEx::hasBCM2727() && !qgetenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE").toInt()) { + // Most likely we have hw support for multisampling + // so let's enable it. + d->glFormat.setSampleBuffers(1); + d->glFormat.setSamples(4); + } else { + d->glFormat.setSampleBuffers(0); + d->glFormat.setSamples(1); + } } // If the device is a widget with WA_TranslucentBackground set, make sure the glFormat |