JOGL performance for 2d primitives (compared to java2D)

Hi,

I know this might have been discussed previously, but I would like to know if I could notice extra performances using jogl to draw 2d primitives instead of using java2d (and possibly the ogl pipeline).
I mean, is it worth it rewriting a 2D intensive application (map drawing including polylines, polygons, texts) using jogl 3d canvas to get a drawing speed boost ?

Any advice appreciated, thanks.

A very similar question was just raised on the Java 2D forum this morning:
http://www.java-gaming.org/forums/index.php?topic=13453.0

I think my answer would be the same here: with Mustang, you’re not likely to see much difference between Java 2D’s OGL pipeline and an OGL binding (LWJGL, JOGL), especially if you’re using immediate mode calls. You may be able to rewrite your application using an OGL binding and leveraging vertex buffers, in which case the OGL binding approach might beat out Java 2D’s OGL pipeline (we don’t currently cache geometry in vertex buffers). For things like text and images, Java 2D’s OGL pipeline will cache those in OGL textures for you so there’s a benefit of simplicity there; you could certainly achieve the same effect with an OGL binding, but it would be quite a bit more work.

So, it’s mostly a matter of trade-offs. There are potential gains to be had from moving from Java 2D to an OGL binding if you have the time and energy, but for many common cases you’re not likely to see a huge difference in performance. If you do experiment, please share your experiences on the forum; it would be especially helpful to post hard numbers showing the differences in performance between the two approaches.

Chris

Thanks Chris !