RubyCube on Mac OS X
April 17th, 2007 by proj
I’ve been making small incremental progress.
First problem I ran into was:
objc: failed objc_getClass(NSObject) for GLUTApplication->isa->isa objc: please link appropriate classes in your program Trace/BPT trap
This was pretty easily fixed by making sure to pass ‘-framework Foundation’ to the linker.
The next issue I’ve run into and I don’t have a good solution for so far is the GLUT startup performance on OS X. According to Sampler most of the time spent is in glutInit. When I drill down into glutInit I see that it is spending all it’s time in HIDUpdateDeviceList which it calls once during __glutGetNumberOfMouseButtons and again in __glutLoadPrefs. This descends down into a long chain of methods that appear to build an internal dictionary of devices (connected HID devices?). It appears this process is painfully slow, at least on my sample configuration.
I want the graphics window to pop up immediately (if at all possible) and so I’m going to have to spend more time figuring out the internals of what is really going on here. I’m sure it’s possible to speed it up but at what cost of my personal time? I’m not yet ready to write a specific windowing layer for the Mac.
Related posts:






