Skip to content

Commit

Permalink
Ensure OpenGL is used for the main window
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrettin committed Mar 9, 2024
1 parent 44e9c26 commit 35eb4c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stratagus/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
#include <QIcon>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QQuickWindow>
#pragma warning(pop)

static QCoro::Task<void> start_stratagus(const int argc, char **argv)
Expand All @@ -101,6 +102,8 @@ int main(int argc, char **argv)
qputenv("QT_ENABLE_HIGHDPI_SCALING", "0");
#endif

QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);

QApplication app(argc, argv);
app.setApplicationName(NAME);
app.setApplicationVersion(VERSION);
Expand Down

0 comments on commit 35eb4c3

Please sign in to comment.