Carbon Event Loop

Im porting my Linux code to MAC OS, I’ve successfully create a Carbon window handling my OpenGL context (double buffer, antialias etc…) Now I need to implement the event loop to handle: mouse, keyboard, resize etc… can someone point me out a tutorial somewhere on how to handle the event loop using carbon.

Tks in advance,

Cheers,

If you have the developer tools installed, then you can probably find examples in:

/Developer/Examples

There is a carbon folder there.

I recommend you not use carbon. In fact, its easier to use cocoa. What tripped me up initially was the thinking that I could not integrate my c++/c code with objective c. This is false. If you make your file names .mm then you can mix objective c and c++, for instance. Its really incredible. Carbon cannot be built in 64 bits too – its not the path to the future.

I don’t recommend glut either…

Just my two cents. You don’t want to have to rebuild multiple things twice like me. :slight_smile:

As nib says, do not write new Carbon code. You’ll just make your life more difficult as it gets phased out. Cocoa is not only the future, it is easier and better-documented too. If you know C++ already it’ll take you all of a day to learn ObjC, and as nib says, ObjC can be freely mixed with C and C++.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.