Qt: Recreate Window to release old surface and create a OpenGL one

This commit is contained in:
Jan200101 2024-10-30 23:48:25 +01:00 committed by Vicki Pfau
parent 47e5cd2432
commit 377ddf5081
1 changed files with 1 additions and 0 deletions

View File

@ -192,6 +192,7 @@ DisplayGL::DisplayGL(const QSurfaceFormat& format, QWidget* parent)
setAttribute(Qt::WA_NativeWindow);
window()->windowHandle()->setFormat(format);
windowHandle()->setSurfaceType(QSurface::OpenGLSurface);
windowHandle()->destroy();
windowHandle()->create();
#ifdef USE_SHARE_WIDGET