diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-05-10 13:42:02 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-05-11 12:01:53 +0000 |
commit | 45aa3c73f78c6c06874d0f826e1f112976cd522d (patch) | |
tree | a916d6c0b6bf1ada4408354ca9715feeeae4d6af /examples | |
parent | a9246c7132a2c8864d3ae6cebd260bb9ee711fcb (diff) | |
download | qtbase-45aa3c73f78c6c06874d0f826e1f112976cd522d.tar.gz |
hellogles3: Request core profile context
...instead of compatibility, in order to play nice with systems
that have no compatibility profile support (macOS). Instancing
needs OpenGL 3.x so sticking with 2.x contexts is not an option.
The example looks fully compatible with core profile so its
functionality should not change.
Change-Id: If0d554a6208973aa8a4fb86757e246d170cd0e71
Fixes: QTBUG-75680
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/opengl/hellogles3/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/opengl/hellogles3/main.cpp b/examples/opengl/hellogles3/main.cpp index 29b3b9617a..9451b2882f 100644 --- a/examples/opengl/hellogles3/main.cpp +++ b/examples/opengl/hellogles3/main.cpp @@ -69,11 +69,11 @@ int main(int argc, char *argv[]) QSurfaceFormat fmt; fmt.setDepthBufferSize(24); - // Request OpenGL 3.3 compatibility or OpenGL ES 3.0. + // Request OpenGL 3.3 core or OpenGL ES 3.0. if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) { - qDebug("Requesting 3.3 compatibility context"); + qDebug("Requesting 3.3 core context"); fmt.setVersion(3, 3); - fmt.setProfile(QSurfaceFormat::CompatibilityProfile); + fmt.setProfile(QSurfaceFormat::CoreProfile); } else { qDebug("Requesting 3.0 context"); fmt.setVersion(3, 0); |