Quellcode durchsuchen

Force colour depth to 32 bpp

Change-Id: I6896dfa74e0bec01f2800419d4bdad0f0c6788de
Donald Carr vor 9 Jahren
Ursprung
Commit
3b626ea201
1 geänderte Dateien mit 9 neuen und 0 gelöschten Zeilen
  1. 9 0
      main.cpp

+ 9 - 0
main.cpp

@@ -3,6 +3,7 @@
 #include <QQmlContext>
 #include <QThread>
 #include <QSettings>
+#include <QSurfaceFormat>
 
 #include <picturemodel.h>
 
@@ -20,6 +21,14 @@ public:
 int main(int argc, char *argv[])
 {
     qsrand(time(NULL));
+
+    QSurfaceFormat format = QSurfaceFormat::defaultFormat();
+    format.setAlphaBufferSize(8);
+    format.setRedBufferSize(8);
+    format.setGreenBufferSize(8);
+    format.setBlueBufferSize(8);
+    QSurfaceFormat::setDefaultFormat(format);
+
     QGuiApplication app(argc, argv);
 
     app.setOrganizationName("Chaos Reins");