Java2D versus jogl/lwjgl performance for 2D.

Atm I’m developing my graphics engine in Java2D, but I’m considering porting to either jogl or lwjgl at a later time (ATM more important work on the game has priority, like networking, map editor, AI/steering/pathfinding, collision detection, gameplay etc.

How much better performance should I expect if moving to an OpenGL wrapper, when I’m only gonna be doing (possibly translucent) texturing of quads in the XY-plane?

Edit: changed “possibly transparent” to “possibly translucent”, since I’m already using bitmap transparency, but considering 8-bit translucent images not just for translucent effects but also for antialiased sprite outlining.

performance with opengl when compared to java2d is a hell lot faster atm.

I was really interrested in that fact so I also did some benchmarsk, and when it really comes down to blitting images the OpenGL pipeline java2d offers is quite as fast as OpenGL.
I benchmarked it and espacially for larger images there was no difference at all, smaller images had noteable overhead but nothing dramatic.

But keep in mind that with OpenGL you could do things Java2d does not offer and you have a lot better control over whats really going on behind the scenes.
Java2D on the other side will also run accerlated on DirectX-only cards, and can even fall back to GDI/DDraw rendering…

lg Clemens

Thanks, I’ll probably be doing my own benchmarks at a later time but I’m definitely considering using it, since I’ll probably be implementing some lighting algorithms.

J2D might be nearly as fast as pure OGL, but only if you get everything exactly right… and not only no your own system… and if you’re not afraid to toggle various unofficial VM arguments.

OGL has a steep learning curve, but it’s well worth the effort.