Login  Register

Re: follow-up course on JOGL

Posted by Manuel on Dec 29, 2011; 2:53pm
URL: https://forum.jogamp.org/follow-up-course-on-JOGL-tp3608394p3618987.html

Hi!
thank you so much for the precious comments. I am going to put the improvements suggested in my to-do list (unfortunately, I won't be able to work on it immediately since I have a number of courses to open next semester).

I have a few questions:

>>  Please remove obsolete references for the Java documentation of the API, this one is... old:
>>  http://download.java.net/media/jogl/jogl-2.x-docs/
Could you please provide me with a link to the most recent reference for JOGL classes? I had great difficulties finding relevant documentation on the web.

>> Don't call glFlush().
I thought it was a good thing to flush all the buffers at the end of display()... Can it really be avoided in OpenGL?
Or is there something specific about it with JOGL? Or is it really just needed for a distributed execution on a network? If yes, maybe it is still good practice to call it when running on a single PC?

>> If you want, I can provide you a template project to ease that task in Eclipse.
Yes, I am interested. I don't use Eclipse but I will distribute it to my students who do.
(my email:  manuel.carcenac@gmail.com)

About Quaternions, I got myself stuck in a dilemma since you suggested it last June. Indeed, I was to open this course as an undergraduate course, an elective one in addition. So I figured out a general approach  to spatial orientation with that kind of intimidating math would not be appropriate.

I finally chose a pretty basic and practical approach: through a real-time animation, i.e. a sequence of small rotations controled by the keyboard and applied relatively to the axes of the camera coordinate system, the user can gradually orient himself as if he were inside a  spacecraft and firing attitude rockets. I do not see how there could be any gimbal lock like that. Of course, from a mathematical standpoint, that's heavy: the orientation is defined by the 9 coordinates of u,v,w and these coordinates are modified progressively by the user. So, there is no clear, static, description of the spatial orientation. But in practice, I believe it is a good building block for a video game. Well, I admit I am far from being a real specialist of the field, so I hope I don't talk too much nonsense...  ;-)

I had fun for some time navigating around the earth and the moon with the program under the link "textures earth, moon, sun, heaven and spacecraft" and I never got stuck in any gimbal lock. It kept behaving exactly as I wanted  (orient yourself by the milky way when no planet is in sight). Notice that I am planning in the future to add the physical animation part that is missing to this code (time integration of earth and moon gravity, no big deal...)

Sorry, I wish I could have made a general presentation of the issue of spatial orientation.

PS: JCUDA is intriguing indeed.