Drawing in GL

Nicholas Zambetti

June 2003

Exposition  »  Projects  »  Drawing in GL

A few years ago, I ran into a program called Dynadraw by Paul Haeberli. I was immediately intrigued. That was the first time I encountered an interactive graphical C program that was fun and relatively simple. Thinking it would be nice to get into using C for interactive work, I sat down with the red book and the GLUT spec one day and cranked out a few fun drawing programs. The programs are set up a bit like Macromedia Flash and Director. The coordinate space has been set up so that the origin is in the upper left with the positive y axis pointing downward. Pixel offsets are used for positioning. The screen is updated on a regular interval. These programs serve as a nice stepping stone for Flash and Director programmers to get into OpenGL and GLUT. This same framework was used to port dynadraw from original GL to OpenGL/GLUT.

Usage Instructions


The C source code files for the aforementioned drawing programs are provided below. The comments at the top of each file includes Mac OS X build instructions, but these sources should be ridiculously easy to compile on any recent operating system. Please note that gnu gcc is required in order to compile these sources into binary executables. If installing and configuring gcc proves to be more annoying than it's worth, a tarball containing the sources and compiled Mac OS X binaries of the programs is also available.

C Sources

gcc required to build
Dynadraw 2003 (source) 
mac os x port of dynadraw as it was released in 1989
Spring (source) 
drawing pen that is controlled by spring dynamics
Eased (source) 
smooth drawing by way of an interpolated cursor delay
 

Downloads

Archive of sources and binaries
Original Dynadraw 1989 source

Legal Notice

Dynadraw '89 is the IP of Paul Haeberli. Feel free to use the other sources as you wish.

Contact

Via Montenavale 1
Ivrea (TO), Italia 10015
email me :)
© 2006 Nicholas Zambetti