context reinit support

This commit is contained in:
2022-10-13 08:57:27 +03:00
parent 3b0d1ea0e2
commit ce3df7d051
24 changed files with 136 additions and 24 deletions

View File

@@ -14,8 +14,8 @@ OpenGLWindow::OpenGLWindow(QWindow *parent) : QWindow(parent) {
format.setRenderableType(QSurfaceFormat::OpenGLES);
#else
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) {
format.setVersion(2, 0);
format.setProfile(QSurfaceFormat::NoProfile);
format.setVersion(4, 0);
format.setProfile(QSurfaceFormat::CoreProfile);
}
#endif
format.setDepthBufferSize(24);