For your entertainment, I’ve created a modified version of the
original “gears.rb” OpenGL Ruby program (by Arto Bendiken) which
uses GLSL shaders to color the gears with velvet and shiny
You’ll need Ruby 1.8.6, GLUT and an OpenGL 2.0 (or greater) driver
to run it. Even if you don’t run it, you might find it educational
because it’s, in my opinion, fairly easy to read and will help anyone
trying to understand how OpenGL programs can implements GLSL.
The zip file containing the Ruby and GLSL code (which may disappear
in the future if I change providers) is available here
Please look at the readme.txt file in the zip for more details.