Re: Java 3D crash or flickering
Posted by philjord on Nov 01, 2016; 12:19am
URL: https://forum.jogamp.org/Java-3D-crash-or-flickering-tp4035074p4037370.html
A solution! (hopefully without side effects
In
Win32GraphicsDevice
I see this
static {
// 4455041 - Even when ddraw is disabled, ddraw.dll is loaded when
// pixel format calls are made. This causes problems when a Java app
// is run as an NT service. To prevent the loading of ddraw.dll
// completely, sun.awt.nopixfmt should be set as well. Apps which use
// OpenGL w/ Java probably don't want to set this.
String nopixfmt = (String)java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("sun.awt.nopixfmt"));
pfDisabled = (nopixfmt != null);
initIDs();
}
so when I add this:
System.setProperty("sun.awt.nopixfmt", "true");
after this
System.setProperty("sun.java2d.noddraw", "true");
in my test case, I no longer get any issues. Including running fiji with this property set
However I don't know what effect pfDisabled=true will cause elsewhere.
As noted before this only discernible different with the noddraw property true is
Outputs this (false):
getDevice D3DGraphicsDevice[screen=0]
getDevice class name sun.java2d.d3d.D3DGraphicsDevice
instead of this (true):
getDevice Win32GraphicsDevice[screen=0]
getDevice class name sun.awt.Win32GraphicsDevice
and with
System.setProperty("sun.awt.nopixfmt", "true");
The device is still Win32GraphicsDevice