GLUT and Red Book samples

Much of the sample code written for OpenGL uses Mark Kilgard's GL Utility Toolkit (GLUT). GLUT provides essential services like window and input support, but using the windowing callbacks may cause VB to crash.

The samples on this page all use 'glxCtl', an ocx which emulates enough of the GLUT functionality to make porting samples fairly painless. The ocx handles the gl setup and fires 'Display', 'Reshape', and key and mouse events. This ocx is used in conjuction with a template project which has all the boilerplate code for responding to the control's events. Together, the ocx and project comprise a working OpenGL app to which you add code for drawing. A tutorial on this site further explains the process of translating GLUT samples to VB.

These samples do not include the ocx, you must download it separately.


New or updated as of 3/99:

TriSelect.zip (5K) - an adapation of a GLUT feedback example.

Surface.zip (5K) - a port of a Red Book nurbs example.

Feedback.zip (5K) - a port of the Red Book feedback example.

TexSurface.zip (5K) - a port of a Red Book nurbs example.


New or updated as of 2/99:

Lorentz.zip (9K) - animation of particles stuck in a Lorenz attractor.

Offset.zip (9K) - shows how to use glPolygonOffset.


New or updated as of 11/98:

Billboard.zip (7K) - demonstrates billboarding.

glPuzzle.zip (16K) - demonstrates picking.

Rainbow.zip (5K) - demonstrates palette animation.

Wave.zip (7K) - demonstrates contouring an animated mesh.

Index.zip (7K) - a simple test of color index mode.

Teapot.zip (6K) - draws a teapot

Quad.zip (27K) - demonstrates the effect of various gluQuadric parameters

Nurbs.zip (5K) - a simple NURBS demo.




Logo.zip (8K) - demonstrates textures and a clipping plane

Caustics.zip (1691K) - demonstrates the use of '.rgb' and '.bw' image files.

Caustics2.zip (12K) - code only, if you already have the image files. You must get the image files from the main GLUT site.



Please send suggestions, bug reports, and such to: edx@pacific.net.hk

Home Page   |  Related Sites