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>
This commit is contained in:
parent
342bb5b03a
commit
b0310ddd16
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user