Windows : Fix Video.

Qt set the rendering engine to DirectX by default. createRender was never call in this case.
Force to OpenGL.
This commit is contained in:
Julien Wadel 2024-04-23 14:29:24 +02:00
parent 7f3d774817
commit c69ac2ee4c

View file

@ -75,6 +75,8 @@ DEFINE_ABSTRACT_OBJECT(App)
App::App(int &argc, char *argv[])
: SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) {
// If not OpenGL, createRender is never call.
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
// Ignore vertical sync. This way, we avoid blinking on resizes(and other refresh like layouts etc.).
auto ignoreVSync = QSurfaceFormat::defaultFormat();
ignoreVSync.setSwapInterval(0);