I've just packaged up the latest revision of Yoshi's OpenGL/GLUT\nbindings to work on the Mac. This has required a little bit of hackery\nat extconf.rb and the .c files, but the result should compile following\nthe standard steps on an OSX box (works fine on my Powerbook,\ncertainly).\n\n=== README.OSX ===\n\n2005-04-26 :: James Adam <>\n\nRuby-OpenGL Bindings for Mac OS X\n=================================\n\nSo basically here's a tweaked version of the original OpenGL module for\nthe Mac. To compile, just follow the same instructions as normal:\n\nBuild it - don't worry too much about any warnings:\n$ ruby extconf.rb\n$ make\n\nTest it out:\n$ ruby sample/robot.rb\n(press the 'e' and 's' keys to make the "robot" move...)\n\nInstall it:\n$ make install\n(or possibly "sudo make install", depending on where your ruby is)\n\n\n\nChanges I've made\n-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\n\nextconf.rb:\nAdded -framework flags and correct include directories\nHacked to generate GLUT module even without detection of -lGLUT, since\nmkmf can't deal with the Mac GLUT framework\n\n*.c:\nEdited #includes to use <OpenGL/gl.h> and <GLUT/glut.h>\n\nglut.c:\nI've added the function CheckLoop to the GLUT module in line with the\nsame function in Apple's GLUT. GLUT's MainLoop is blocking and forces\nyou to perform additoinal processing using GLUT's IdleFunc system,\nwhich can sometimes be very undesirable (particularly if you are using\nRuby as the glue between two libraries which both feature this type of\nloop). CheckLoop allows you to cycle through a *single* GLUT processing\nloop, and then returns control to the calling thread/process. Thus, by\nperiodically calling CheckLoop, you can get the scene to update without\nhaving GLUT seize control of the whole application.\n\n\nProblems\n-\-\-\-\-\-\-\-\n\nFor some reason, including the libraries from the command line fails.\nFor instance:\n\n$ irb\nirb(main):001:0> require 'opengl'; require 'glut'\n=> true\n\n.... works fine, but:\n\n$ irb -r opengl\n/usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.0.0/opengl.bundle:\n[BUG] Bus Error\nruby 1.8.2 (2004-12-25) [powerpc-darwin8.0.0]\n\nAbort trap\n\n.... clearly fails. Not sure about that.\n\n\n=== EOF ===\n\nAnyway, feel free to grab it at\n[URL]http://www.lazyatom.com/software/opengl-0.32f.tar.gz[/URL] and send me any\ncomments or fixes. One day I'll spend enough time learning about mkmf\nto produce a proper patch so that the versions can be unified.