It seems to be a Linux (and Solaris) issue.
In some situations, Java was storing images on pixmaps instead of system memory.
The switch "-Dsun.java2d.pmoffscreen=true" force Java to don't use pixmaps.
Here are some useful links if anyone is experimenting this type of problem: http://java.sun.com/javase/6/docs/technotes/guides/2d/flags.html and http://java.sun.com/products/java-media/2D/perf_graphics.html
Now, lets go to the next round
Hi,
I was doing some experiments. First I removed a lot of code of the fps demo except the fps (frames per second) measurement.
Everyhing works fine. I've got about 160...170 frames per second on a totally black screen at 640x480 using the software renderer.
Then I modified the code to render in a JPanel. Now I have a JPanel with exactly same size of the JFrame (640x480). Again, everything works as expected.
When I resized the screen vertically (i.e. dragging down the bottom border) showing a piece of the JFrame behind the panel, I have no problem and the fps are the same.
But...
If I resize the screen horizontally (i.e. dragging the right border), the fps drops to 80...85
In my tests, all the time I have a frame bigger than my rendering panel (but only if horizontally), the fps drops a half.
Anyone have an ideia about what could cause this problem?
Thank you,
Leandro