PDA

View Full Version : Trying to port an OpenGL Windows game


anthony
2007.01.26, 03:58 PM
Hey,

I'm a newbie when it comes to Mac development so I was hoping that a few members here can help me out.

The code I am looking to convert is from Brian Schwab's "AI Game Engine Programming" and it's a straight forward Asteroids (or to use the correct name AIsteroids) game using the GLUT wrapper.

I want to improve my C/C++ (I've had my fill of Java for now) so I presume that Carbon is the correct API to study up on right?

Is porting simply a case of changing the code that performs function X in Windows to it's equivalent in OS X or is there a lot more to it?

I'm not looking to create a fancy game, I just want to make a Mac compatible version of the code so that I can implement various AI systems - it's my goal to become an AI programmer so I'm not that concerned with creating visually fantastic games.

And this could be the dumbest question ever but I have to ask, is there anyway to create and run and OpenGL / GLUT application without have to get either Cocoa/Carbon involved?

Any help/advice is greatly appreciated

anthony

akb825
2007.01.26, 04:09 PM
It's quite simple: leave it as an OpenGL/GLUT application. :p Mac has an implementation of GLUT available, and it's even bundled with the system, which means that you don't even have to distribute the library. You will only need to replace Win32 functions you use.

anthony
2007.01.26, 04:16 PM
You will only need to replace Win32 functions you use.

Excellent! Thanks for that wonderful bit of information! :)