Commit dd9403c8 authored by Pasi Keranen's avatar Pasi Keranen Committed by Pasi Keränen
Browse files

Fixed OpenGL ES 3 incompatibility.


Fixed surface format initialization to use OpenGL ES 2.0 on OpenGL ES 3.0 capable devices.

Change-Id: I2bb77294af47211f4b72c4d06a5d4c794be134cd
Reviewed-by: default avatarPasi Keränen <pasi.keranen@digia.com>
Showing with 4 additions and 0 deletions
...@@ -314,6 +314,10 @@ CanvasContext *Canvas::getContext(const QString &type, const QVariantMap &option ...@@ -314,6 +314,10 @@ CanvasContext *Canvas::getContext(const QString &type, const QVariantMap &option
} }
QSurfaceFormat surfaceFormat = m_glContextQt->format(); QSurfaceFormat surfaceFormat = m_glContextQt->format();
#if defined(QT_OPENGL_ES_2)
surfaceFormat.setMajorVersion(2);
surfaceFormat.setMinorVersion(0);
#endif
surfaceFormat.setSwapBehavior(QSurfaceFormat::SingleBuffer); surfaceFormat.setSwapBehavior(QSurfaceFormat::SingleBuffer);
surfaceFormat.setSwapInterval(0); surfaceFormat.setSwapInterval(0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment