Suggestions welcome!
There is online documentation (within ANU only) for JOGL and GLUT.
Sample questions and the ANU has copies of exam papers from previous years.
Simple 3D programs like the cube exercise may show multiple images in the window at once. This happens because the nVidia graphics cards are really fast and screen updates are not being limited to one per LCD/CRT frame. You can synchronise drawing by setting an environment variable from your terminal.
$ setenv __GL_SYNC_TO_VBLANK 1
You need to add JOGL to your classpath with
$ setenv CLASSPATH ".:/usr/local/java/jre/lib/jogl.jar"
The R105 server is ephebe.anu.edu.au. You can ssh or scp to ephebe from inside or outside the ANU.
and the C code:import java.util.*; // Initialise static long Start; Date now = new Date(); Start = now.getTime(); ... // Current time Date now = new Date(); float seconds; seconds = (float)(now.getTime() - Start) / 1000.0f;
#include <sys/time.h> ... /* Initialise */ static long Start; struct timeval now; gettimeofday(&now, NULL); Start = now.tv_sec; ... /* Current time */ struct timeval now; float seconds; gettimeofday(&now, NULL); seconds = (float)(now.tv_sec - Start) + (float)now.tv_usec / 1000000.0;
Virtual Reality System Development