Merge pull request #15887 from sethalves/set-default-gl-format

BUGZ-926: use the correct gl format when creating the initial platform window
This commit is contained in:
Shannon Romano 2019-07-08 14:03:43 -07:00 committed by GitHub
commit 31582cf857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1465,6 +1465,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
_saveAvatarOverrideUrl = true;
}
// setDefaultFormat has no effect after the platform window has been created, so call it here.
QSurfaceFormat::setDefaultFormat(getDefaultOpenGLSurfaceFormat());
_glWidget = new GLCanvas();
getApplicationCompositor().setRenderingWidget(_glWidget);
_window->setCentralWidget(_glWidget);