Skip to content

Commit 6a2c59c

Browse files
authored
Explicitly set OpenGL as the graphics API for QtQuick (#712)
The default rendering backend has been changed to Direct3D 11 in Qt6 (see https://doc.qt.io/qt-6/qtquick-visualcanvas-scenegraph-renderer.html#rendering-via-the-qt-rendering-hardware-interface). Without this change, Gazebo crashes on windows as it tries to initialize an OpenGL context. Signed-off-by: Addisu Z. Taddese <[email protected]>
1 parent 8c306f6 commit 6a2c59c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Application.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ Application::Application(int &_argc, char **_argv, const WindowType _type,
168168
}
169169
else
170170
{
171+
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
171172
gzdbg << "Qt using OpenGL graphics interface" << std::endl;
172173
}
173174
#endif

0 commit comments

Comments
 (0)