Login  Register

Re: Negating some JNI call overhead by doing transformations in Java

Posted by gouessej on Jul 22, 2011; 8:21am
URL: https://forum.jogamp.org/Negating-some-JNI-call-overhead-by-doing-transformations-in-Java-tp3188212p3190840.html

If you need some help for composing the transform matrices, look at the source code of Ardor3D and its JOGL renderer. For shaders, rather look at JMonkeyEngine 3 (my JOGL 2.0 renderer for this engine is still on its SVN repository as far as I know).

If your geometry does not change, I advise you to use static VBOs. It gives a supplementary speedup on drivers supporting them correctly (on others, dynamic and static VBOs are as far as plain vertex arrays). Display lists would be interesting if their implementations on some modern graphics cards were less poor :(

Lots of wrong things are said about Java and JNI. Java has a bad reputation when it comes to performances which is not fair. Mickael is right about JNA's performances. OpenTk (an set of binbings for .NET containing an OpenGL binding) uses a mechanism similar to the one used by JNA to call native code on Windows (Microsoft Platform Invoke) and the result is that OpenTk is twice slower than JOGL.
Julien Gouesse | Personal blog | Website