|
@@ -24,6 +24,7 @@
|
|
#include <QSettings>
|
|
#include <QSettings>
|
|
#include <QSurfaceFormat>
|
|
#include <QSurfaceFormat>
|
|
#include <QTimer>
|
|
#include <QTimer>
|
|
|
|
+#include <QQuickWindow>
|
|
|
|
|
|
#include <QDir>
|
|
#include <QDir>
|
|
#include <QFile>
|
|
#include <QFile>
|
|
@@ -59,25 +60,29 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
QSettings settings;
|
|
QSettings settings;
|
|
|
|
|
|
- if (settings.value("force32bpp", true).toBool()) {
|
|
|
|
- QSurfaceFormat format = QSurfaceFormat::defaultFormat();
|
|
|
|
- format.setAlphaBufferSize(8);
|
|
|
|
- format.setRedBufferSize(8);
|
|
|
|
- format.setGreenBufferSize(8);
|
|
|
|
- format.setBlueBufferSize(8);
|
|
|
|
- QSurfaceFormat::setDefaultFormat(format);
|
|
|
|
- }
|
|
|
|
|
|
+ if (settings.value("raster", false).toBool()) {
|
|
|
|
+ QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
|
|
|
|
+ } else {
|
|
|
|
+ if (settings.value("force32bpp", true).toBool()) {
|
|
|
|
+ QSurfaceFormat format = QSurfaceFormat::defaultFormat();
|
|
|
|
+ format.setAlphaBufferSize(8);
|
|
|
|
+ format.setRedBufferSize(8);
|
|
|
|
+ format.setGreenBufferSize(8);
|
|
|
|
+ format.setBlueBufferSize(8);
|
|
|
|
+ QSurfaceFormat::setDefaultFormat(format);
|
|
|
|
+ }
|
|
|
|
|
|
- if (settings.value("forceSingleBuffer", false).toBool()) {
|
|
|
|
- QSurfaceFormat format = QSurfaceFormat::defaultFormat();
|
|
|
|
- format.setSwapBehavior(QSurfaceFormat::SingleBuffer);
|
|
|
|
- QSurfaceFormat::setDefaultFormat(format);
|
|
|
|
- }
|
|
|
|
|
|
+ if (settings.value("forceSingleBuffer", false).toBool()) {
|
|
|
|
+ QSurfaceFormat format = QSurfaceFormat::defaultFormat();
|
|
|
|
+ format.setSwapBehavior(QSurfaceFormat::SingleBuffer);
|
|
|
|
+ QSurfaceFormat::setDefaultFormat(format);
|
|
|
|
+ }
|
|
|
|
|
|
- if (settings.value("forceTripleBuffer", false).toBool()) {
|
|
|
|
- QSurfaceFormat format = QSurfaceFormat::defaultFormat();
|
|
|
|
- format.setSwapBehavior(QSurfaceFormat::TripleBuffer);
|
|
|
|
- QSurfaceFormat::setDefaultFormat(format);
|
|
|
|
|
|
+ if (settings.value("forceTripleBuffer", false).toBool()) {
|
|
|
|
+ QSurfaceFormat format = QSurfaceFormat::defaultFormat();
|
|
|
|
+ format.setSwapBehavior(QSurfaceFormat::TripleBuffer);
|
|
|
|
+ QSurfaceFormat::setDefaultFormat(format);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
QQmlApplicationEngine engine;
|
|
QQmlApplicationEngine engine;
|