diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-26 09:46:24 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-26 09:47:45 +0000 |
commit | b0310ddd163847beabf7da66c2190d0b9b5e6afb (patch) | |
tree | b3ede01819a84c0bd4a8a5cf06d0ac617a3a6084 /examples/opengl | |
parent | 342bb5b03a76d1428fafb8e1532d66e172bd1c0b (diff) |
hellogles3 example: Fix start-up crash when using dynamic GL
Move the instantiation of QGuiApplication to the top since it is
required by QOpenGLContext::openGLModuleType().
Task-number: QTBUG-55671
Change-Id: I506cee193fe2ba48400851588a8ef079848bc2f4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'examples/opengl')
-rw-r--r-- | examples/opengl/hellogles3/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/opengl/hellogles3/main.cpp b/examples/opengl/hellogles3/main.cpp index a6c6398628..29b3b9617a 100644 --- a/examples/opengl/hellogles3/main.cpp +++ b/examples/opengl/hellogles3/main.cpp @@ -64,6 +64,8 @@ int main(int argc, char *argv[]) { + QGuiApplication app(argc, argv); + QSurfaceFormat fmt; fmt.setDepthBufferSize(24); @@ -79,8 +81,6 @@ int main(int argc, char *argv[]) QSurfaceFormat::setDefaultFormat(fmt); - QGuiApplication app(argc, argv); - GLWindow glWindow; glWindow.showMaximized(); |