Login  Register

Re: useful Java2D bridge

Posted by Martin on Feb 17, 2012; 4:47pm
URL: https://forum.jogamp.org/useful-Java2D-bridge-tp3391708p3754249.html

Hi,
No problem to test glg2d on this app, however I unfortunately can't share the source code it will work on.
When I tried your library few month ago, I used to log Graphics2D.getClass().getName() into the renderer main draw(Graphics2D) method, and it did not seam to be any object of your library so we might work on that :).
Do you suggest any tracking/testing method?
Cheers,
Martin



2012/2/17 Brandon Borkholder [via jogamp] <[hidden email]>

Martin, it would be useful to have you app as a testcase.  Java2D painting is amazingly convoluted and I've found it really hard to make sure swing components are being painted in glg2d and not in Java2D.

There's an effort to modularize the painting so it can be delegated properly. Marrio Torre (I believe with Roman Kennke) developed Caciocavallo http://ladybug-studio.com/caciocavallo/ and the idea is to make it easy to have one place to change the painting subsystem. I've been wanting to look at their code, maybe even leverage it.

But the short answer is that you might be right. So far, I've found no speedup when using swing repainting (my UIDemo class) and multiple levels of JComponents. I think the problem is a combination of too much logic in deciding what to paint and being expensive to fire an OpenGL display call when a little button just wants to repaint the border.

But if you ignore that and look at my GraphTest class (a single JPanel painting a lot of objects) glg2d wins easily. It's much more responsive when making a lot of Graphics2D calls on the same paint call.




If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/useful-Java2D-bridge-tp3391708p3753434.html
To unsubscribe from useful Java2D bridge, click here.
NAML