[MacRuby-devel] OpenGL/GLUT Bridgesupport

John Shea johnmacshea at gmail.com
Thu Jan 21 12:56:29 PST 2010


Yes as far as I know bridge support does not support GLUT.

So you (obviously) have two other options other than gen_bridge_metadata (which I gave up on after a few tries) :

- don't use GLUT - use the equivalent (set of) non GLUT openGL calls
- place the GLUT calls in an ObjC class - and call out to that class from MacRuby

you might find that the second option is quite quick - i found that for some openGL calls (but not all) that dispatching to my own bridge class which then called opengl functions was quicker than going through BridgeSupport.

There are other good reasons to have your own bridge class anyway - i imagine that BridgeSupport is always going to be lagging Cocoa a bit (eg Core Animation constants), and it might just be easier allocating OpenGL texture memory in ObjC (well I still use objC for that)

HTH,
J


On Jan 20, 2010, at 8:14 PM, Jonathan Waddilove wrote:

> Hi, I'm back to using MacRuby again and I'm confused about Bridge Support.
> 
> I have been using the excellent sojaster port of the Cocoa OpenGL example to help develop an OpenGL playpen. However, when I started using glut calls (glutBitmapCharacter, glutStrokeString, etc) I started to get problems.
> 
> It seems that the OpenGL glut.framework (10.6.2) doesn't include bridge support. I've tried using gen_bridge_metadata to add bridge support but without success.
> 
> Should glut work in MacRuby? How does one add BridgeSupport to the Apple shipped frameworks?
> 
> Sorry if I have missed some very obvious step.
> 
> regards and thanks,  Jonathan
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



More information about the MacRuby-devel mailing list