Real-world GLUT example
  • Paul Bourke's stereo rendering in GLUT
  • http://www.swin.edu.au/astronomy/pbourke/opengl/stereogl/

 
 
 
 
 
 
 
 
 
 
 
 

 

Strategy for this session
  • Identify GLUT library calls in the source code
  • Understand what they do
  • Ignore the OpenGL code (for now)
  • We will refer to the following:
    • Source code
    • GLUT online spec
  • This material is online in the lab at

  • http://origin3/bhti
    http://origin4/bhti

 
 
 
 
 
 
 
 
 
 
 
 

 

Demo of Stereo Pulsar Visualization

 
 
 
 
 
 
 
 
 
 
 
 

 

Source Code

 
 
 
 
 
 
 
 
 
 
 
 

 

Lab
  • Take the example code and compile it yourself
  • Modify the code to interactively modify the background color.  (Hint:  glClearColor()).  Use either the popup menus or the keyboard (or both) to specify the background color.
  • Extra Credit:  Modify the "WindowDump" routine to  display the image in a separate window.

 
 
 
 
 
 
 
 
 
 
 
 

 

Session 3

 
 
 
 
 
 
 
 
 
 
 
 

 

Lab
  • Take the code and familiarize yourself with the techniques used.
  • Place a wireframe triangle on top of the colored one spinning in the opposite direction
  • Place a "number of rotations" indicator in the bottom window

 
 
 
 
 
 
 
 
 
 
 
 

 

Title
  • Bullet 1
  • Bullet 2

 
 
 
 
 
 
 
 
 
 
 
 

 

Title
  • Bullet 1
  • Bullet 2

 
 
 
 
 
 
 
 
 
 
 
 

 

Title
  • Bullet 1
  • Bullet 2