Login  Register

Re: follow-up course on JOGL

Posted by gouessej on Jan 02, 2012; 9:24am
URL: https://forum.jogamp.org/follow-up-course-on-JOGL-tp3608394p3626204.html

Hi

The documentation of the API is here:
http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/

Of course, using glFlush() is not mandatory, I never use it. It is useful in only some very particular cases and it can even have a bad impact on performances if you use it when it is not appropriate (it may break the internal synchronization of the pipeline in the driver). I know several engines including mine which don't use it. glFlush was mainly used when the rendering was done on remote servers more than ten years ago and even in this case nowadays it is very rarely used, I only sometimes see some programmers using glFinish() to be alerted when OpenGL has done its job.

I will try to provide you a template project as soon as possible.

I know that quaternions are difficult to explain to students. However, you could have explained a bit the singularities on poles with a workaround not relying on quaternions like Ardor3D does. Maybe I will translate my report about gimbal lock when I'm less tired. UVW matrices and Euler angles are mathematically 2 "different" ways to express angles but if you use them with eulerian transforms, you obtain gimbal lock. Your approach does not allow to reduce the risk of gimbal lock, you only try to do something to prevent cases close to singularities on poles. If some students want to see a good example of building blocks to make games, they should have a look at existing 3D engines written in Java, especially Ardor3D. If a student tried to use your approach in a more general case to rotate a given object close to any singularity, he would have some gimbal lock. Your example doesn't prove anything as you won't have any gimbal lock if your input modifies only 2 rotations at a time and if you don't try to test problematic cases. Using unclear methods to work around gimbal lock just makes it harder to test the cases of singularities, it does not mean that there is no gimbal lock.

JCuda is nice but I really prefer using OpenCL and JOCL in order to avoid using only Nvidia graphics cards.
Julien Gouesse | Personal blog | Website