having a typical Java2D issue on Linux where window is not instantly repainted unless mouse is moved. In my own Scala code I usually try to get around it by calling component.toolkit.sync(). Has nobody experienced this problem yet? Using latest 4.0b7 on Debian 11. Is there a way to get the repainting to work smoothly even in the absence of mouse movement?
(the effect is better discerned when run live than in the screencast, but should still be visible)
I tried adding java.awt.Toolkit.getDefaultToolkit().sync(); in draw(), but it has no effect, probably because it would have to be called precisely outside the repaint methods.
I make a lot of animations using Processing on Linux Mint on a desktop PC using nVidia’s proprietary drivers and have never noticed a jerky framerate. Or, I should say, any jerkiness I noticed I attributed either to complex computations to generate the images or to other processes like Chrome thrashing CPU or memory.
I’m traveling at the moment, so I can’t test your example of a spiraling image, but I’ve definitely made simulations of particle swarms flying around at 60 fps that look perfectly fluid without any mouse motion whether I’m using the Java2D, P2D, or P3D renderers.
What video drivers on what graphics hardware are you using? Do you get a similar effect from both the default renderer and P2D or P3D? How about outside of Processing, such as with p5js in your browser or animations on shadertoy?
My guess is that the Intel graphics is in use and not the Nvidia (and no proprietary drivers loaded AFAICS). So might be an Intel driver related issue?
Using P2D or P3D solves the bad rate, but obviously the code is no longer the same (the shape operations do not produce the same results, for example). I’ll have to check if this all holds for the Raspberry Pi 4B as well, which is the target machine.