Mitch Richling: Example GLUT Programs
Author: | Mitch Richling |
Updated: | 2023-11-15 |
Table of Contents
1. Introduction
Everybody loves OpenGL, and OpenGL beginners love GLUT! In fact, many seasoned programmers, especially scientific programmers, use GLUT all the time as a primary toolkit for OpenGL. Some windowing toolkits, like FLTK, support GLUT compatibility modes so GLUT skills can often be transitioned to such environments. The example programs on this page are intended to get GLUT beginners, and OpenGL beginners, a few examples to chew on.
Get it all on github: https://github.com/richmit/ex-GLUT/
2. GLUT Basics
helloWorld.c
- This little example is a minimal (almost) GLUT program. Uses the glut character drawing function.
mandelbrotGL.c
- Demonstrates how to do 2D vector drawing in a pseudo-raster way.
mandelbrotImageGL.c
- Demonstrates how to load an RGB image into a GL window
mandelbrotIncImageGL.c
- Demonstrates how to draw partial images, and how to use the idle function for background computation.
tformColor.c
- Shows how colors blend and transform across objects.
3. GLUT Interaction
interact.c
- Demonstrates interaction and timer callbacks, and constant frame rate animation across various hardware platforms.
rotAndScaleInteractive.c
&boxNaxis.h
- Demonstrates intuitive, interactive rotation/scaling, and anti-aliasing.
rotAndScaleInteractive.c
&surf.h
- Demonstrates intuitive, interactive rotation/scaling, and surface shading and lighting.
rotAndScaleInteractive.c
&lorenzC.h
- Demonstrates intuitive, interactive rotation/scaling, and display lists with anti-aliasing.
4. OpenGL Topics
lightedSphere.c
- Very simple lighted scene and rotation.