Re: Negating some JNI call overhead by doing transformations in Java
Posted by GiGurra on Jul 21, 2011; 12:28pm
URL: https://forum.jogamp.org/Negating-some-JNI-call-overhead-by-doing-transformations-in-Java-tp3188212p3188390.html
I'm not sure I understand you here. JNI is a factor for my application.
Calling glRoatef for example in jogl would probably take a factor 10 longer than from a C program (probably more).
Let's say I have 10 of those. Why not just make a single transformation matrix of that in java and THEN make one JNI glLoadMatrixf to opengl though jogl? surely that must be an advantage if the application has a significant amount of transformations. (That is if it turns out that one java rotation matrix multiplication is faster than one call to glRotatef)
Let's for the moment skip shaders cause i dont even know what they are (well I've done some OpenCL and just guess that openGL shaders might be some kind of small mini apps running on the gpu) :), opengl beginner here but I very much need to optimize performance in my simple but somewhat big application.