Qt: Recreate Window to release old surface and create a OpenGL one
This commit is contained in:
parent
47e5cd2432
commit
377ddf5081
@ -192,6 +192,7 @@ DisplayGL::DisplayGL(const QSurfaceFormat& format, QWidget* parent)
|
|||||||
setAttribute(Qt::WA_NativeWindow);
|
setAttribute(Qt::WA_NativeWindow);
|
||||||
window()->windowHandle()->setFormat(format);
|
window()->windowHandle()->setFormat(format);
|
||||||
windowHandle()->setSurfaceType(QSurface::OpenGLSurface);
|
windowHandle()->setSurfaceType(QSurface::OpenGLSurface);
|
||||||
|
windowHandle()->destroy();
|
||||||
windowHandle()->create();
|
windowHandle()->create();
|
||||||
|
|
||||||
#ifdef USE_SHARE_WIDGET
|
#ifdef USE_SHARE_WIDGET
|
||||||
|
Loading…
x
Reference in New Issue
Block a user