ffi-opengl
ffi-opengl copied to clipboard
Various fixes
I've found a variety of minor issues (largely outdated/deprecated stuff) and a small bug or two with the examples. Still trying to figure out why gears.rb blows up.
The way the GLUT callbacks were being passed was the root of the problem. No reference to the procs was being kept on the Ruby side, and the C side did nothing to mark those procs when the garbage collector ran, so they got blown away by the garbage collector. Both demos had the problem, but the gears demo had callbacks for mouse movement and the spinning cube demo did the drawing in the idle callback, giving the spinning cube demo far fewer opportunities for the problem to crop up.