Example code for CS638-2, Fall 1999

 

Last modified:

FlTk

Note: Richard has placed several example programs connected with his fltk tutorial. You can look in the Examples directory inside of the course web folder on afs. His powerpoint presentation is there as well.

There are many examples given with the fltk distribution. Including some using GL.

 LibTiff and FlTK

Richard has some sample code with his tutorial

Simple TIFF and FLTK program
TiffTest is about the simplest program I could write that displays a TIFF image using FLTK. The entire project is there as well, if you want to see how to set up a project.
Slightly less simple TIFF and FLTK program
ShowChan is another simple program, making a small extension to TiffTest. It does everything necessary to be a satisfactory answer to assignment #3. The entire project is there as well, if you want to see how to set up a project.
 

OpenGL

My Tutorial on OpenGL basics for this class has a few examples.

I have also added an example of how to do animation with GL and FlTk that provides some support code that might be useful in your projects.

I have made a simple demonstration of drawing stuff in 3D with GL. Right now, the demo shows hack shadows (as we did in class) and provides a basic interface for moving the camera around. It does not do lighting. Be warned: while it gives basic methods for doing things, it doesn't necessarily do them well. For example, the camera interface uses fixed axes and therefore suffers from severe gimbal lock. Also, it doesn't do any fancy GL tricks to make things look nice. If some GL wizard were to send me a nicer set of hacks to make things look better, I would encorporate them (especially for nicer looking shadows)