ffi-opengl icon indicating copy to clipboard operation
ffi-opengl copied to clipboard

Various fixes

Open cjameshuff opened this issue 13 years ago • 1 comments

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.

cjameshuff avatar Nov 13 '11 04:11 cjameshuff

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.

cjameshuff avatar Nov 26 '11 04:11 cjameshuff