Recently there was a small benchmark on http://graphcomp.com/opengl/bench.html
I thought that it might be fun do a quick conversion to java, but if I had known the results before I maybe wouldn’t have.
The c version prints something like:
FBO Texture Rendering FPS: 239.646497
Teapot Shader FPS: 570.048602
Frame overhead secs/frame: 0.000044
OS/GLUT overhead secs/frame: 0.000011
Overall FPS: 167.167671
The JOGL (JOGL 1.1 rc 3, JDK 6) version returns:
FBO Texture Rendering FPS: 208.672087
Teapot Shader FPS: 153.128346
Frame overhead secs/frame: 0.000035
OS/GLUT overhead secs/frame: 0.000584
Overall FPS: 83.737661
Obviously using GLUT functions and using immediate mode isn’t the best performing way of woking with OpenGL today, but I think the benchmark might have a purpose for showing the overhead on JNI. Is that expected that JNI adds that much overhead (I had expected something like 10-20% overhead)?
Would you have expected such a large difference?
If you want to run the benchmark or check my conversion (after all - maybe there’s a bug somewhere) see the attached file.