Sfoglia il codice sorgente

Move to triple buffering by default

Introduce motionblur bash script args
Donald Carr 8 anni fa
parent
commit
fab0da240a
2 ha cambiato i file con 7 aggiunte e 5 eliminazioni
  1. 5 1
      art
  2. 2 4
      src/main.cpp

+ 5 - 1
art

@@ -3,13 +3,17 @@
 executed_file=$(readlink -f ${BASH_SOURCE[0]})
 script_dir=$(dirname ${executed_file})
 
+force_wayland=true
+
 args=""
 env=""
 
-if [[ "$XDG_SESSION_TYPE" = "wayland" ]]; then
+if $force_wayland && [[ "$XDG_SESSION_TYPE" = "wayland" ]]; then
   args="-platform wayland"
   env="QT_WAYLAND_SHELL_INTEGRATION=wl-shell"
 fi
 
+env="$env __GL_SYNC_TO_VBLANK=1 QML_FORCE_THREADED_RENDERER=1"
+
 export $env
 ${script_dir}/artriculate $args

+ 2 - 4
src/main.cpp

@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
     } else {
         if (settings.value("force32bpp", true).toBool()) {
             QSurfaceFormat format = QSurfaceFormat::defaultFormat();
-            format.setAlphaBufferSize(8);
+            format.setAlphaBufferSize(0);
             format.setRedBufferSize(8);
             format.setGreenBufferSize(8);
             format.setBlueBufferSize(8);
@@ -66,9 +66,7 @@ int main(int argc, char *argv[])
             QSurfaceFormat format = QSurfaceFormat::defaultFormat();
             format.setSwapBehavior(QSurfaceFormat::SingleBuffer);
             QSurfaceFormat::setDefaultFormat(format);
-        }
-
-        if (settings.value("forceTripleBuffer", false).toBool()) {
+        } else if (settings.value("forceDoubleBuffer", false).toBool()) {
             QSurfaceFormat format = QSurfaceFormat::defaultFormat();
             format.setSwapBehavior(QSurfaceFormat::TripleBuffer);
             QSurfaceFormat::setDefaultFormat(format);