From b096d8e1a0250994c8701c9e8ce896e5901d8ccd Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Mon, 13 Jul 2020 18:42:52 +0200 Subject: [PATCH] sweethome3d: improve performance by enabling OpenGL for java2d This is a well-known optimization (see also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854030 http://www.sweethome3d.com/support/forum/viewthread_thread,5662 https://sourceforge.net/p/sweethome3d/bugs/854/ ) and indeed also on my machine was a drastic improvement. --- pkgs/applications/misc/sweethome3d/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/sweethome3d/default.nix b/pkgs/applications/misc/sweethome3d/default.nix index bd0730a05aa1..94875de7ebc8 100644 --- a/pkgs/applications/misc/sweethome3d/default.nix +++ b/pkgs/applications/misc/sweethome3d/default.nix @@ -34,7 +34,7 @@ let patchelf --set-rpath ${libXxf86vm}/lib lib/java3d-1.6/linux/i586/libnativewindow_x11.so ''; - buildInputs = [ ant jdk jre makeWrapper p7zip gtk3 gsettings-desktop-schemas ]; + buildInputs = [ ant jdk makeWrapper p7zip gtk3 gsettings-desktop-schemas ]; buildPhase = '' ant furniture textures help @@ -53,7 +53,7 @@ let makeWrapper ${jre}/bin/java $out/bin/$exec \ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ - --add-flags "-jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}" + --add-flags "-Dsun.java2d.opengl=true -jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}" ''; dontStrip = true;