I’ve read Kevin Glass’s tutorial about refactoring space invaders to use OpenGL from Java2D to render to screen. (http://www.cokeandcode.com/info/tut2d-3.html)
It provides a link to see the difference between the Java2D version and the JOGL version. The thing is that the Java2D version actually runs faster on my machine! (tested it with the latest versions of Sun jvm 1.5 and 1.4)
Maybe this is caused because jogl uses native (jni?) calls that degrade the performance compared to Java2D? Because I believe Java2D uses OpenGL too under the hood (when available), which may not suffer from this overhead?
And if Java2D can use opengl, why don’t they make an pure java opengl binding which doesn’t require any external native libs?