Julien,

Thank you for the response. I'm not sure that ticket#520 is my problem. I don't 
think that the glut framework on 10.6.2 has been processed by bridge support.

I'm trying to teach myself openGL using the superbible and other web resources. 
To keep things simple I wanted to build the superbible examples in MacRuby - 
this should give me an easy to use platform for just trying to get my mind 
around the openGL paradigms.

I agree with John Shea that GLUT is not the way to develop a real application. 
But for learning and trying things out its performance is just fine.

My current thinking is to build a simple template project in MacRuby that uses 
a NSOpenGlView rather than GLUT. I would add boilerplate to provide animation, 
keyboard and mouse support (I'm thinking of using the Sojaster port of the 
Apple Cocoa OpenGL example as a basis).

I'd be happy to share or work jointly on these efforts with anyone who has a 
similar need. It would be useful if there is a web site we could use to 
document such work and share code. Any ideas?

  Jonathan


On 22 Jan 2010, at 16:04, Julien Jassaud wrote:

> Jonathan,
> 
> The MacRuby-Cocoa-OpenGL sample code you mention in your first post is not 
> complete. The reason might be a Bridgesupport problem, reported in ticket 
> #520.
> 
> I recently bought the SuperBible to better  understand the OpenGL sample code 
> I was porting to MacRuby. What example are you trying to port ? We could 
> maybe work on it together ?
> 
> 
> Julien
> 
> Le 22 janv. 2010 à 17:32, Jonathan Waddilove a écrit :
> 
>> John,
>> 
>> Thank you for the response. GLUT won't be my first choice but I'm trying to 
>> follow the examples in the SuperBible.
>> 
>> I'm wondering what the plan is to support all the 'standard' frameworks in 
>> MacRuby is? Should I be able to process the GLUT.framework with 
>> gen_bridge_metadata?
>> 
>> Meanwhile I will look at providing my own wrapper class as you suggest. As 
>> you say this provides a flexible way of handling any framework that lacks 
>> bridge support.
>> 
>> Many thank, Jonathan
>> 
>> On 21 Jan 2010, at 20:56, John Shea wrote:
>> 
>>> 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@lists.macosforge.org
>>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>> 
>>> _______________________________________________
>>> MacRuby-devel mailing list
>>> MacRuby-devel@lists.macosforge.org
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> 
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel@lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to