This is my entry for the OpenGL Challenge, Gears Challenge.
I tried to come up with something original and eye catching, with
TnL friendly ("clean") OpenGL.
The oglchallenge website seems to be down (?), so "oh well maybe next time".
Some of the code is messy, with plenty of magic numbers.
Some of the code is (IMO) nice & clean.
Comments are for quiche-eaters (Mmmm... quiche).
Display lists (see Note).
Fast, fake env-mapping using texture matrix.
Fast, fake Phong shading with env-mapping.
Interesting blend mode glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA).
It doesn't saturate as quickly as GL_ONE/GL_ONE.
To be honest, its not much different to GL_ONE/GL_ONE at all :)
They really chew fillrate.
100% procedurally generated meshes & textures.
Exe is only 61Kb without C Runtime.
I'm using glGetFloatv(GL_MODELVIEW_MATRIX) several times per frame.
This won't be TnL friendly unless the driver keeps a matrix stack in
software. If the driver didn't maintain a software stack, it would
be very easy for the app to do this.