views:

123

answers:

3

Hello, I'm wondering if someone could offer me some tips on how to go about this. I have a MacOS X OpenGL game that is written in very portable C with the exception of the non-game-play GUI. So in Cocoa I set up the window and OpenGL context, manage preferences, registration, listen for keystrokes etc. But all of the drawing and processing of input is handled in nice portable C. So I want to port to Windows. I figured the obvious way to go about was to use the Win32 api. Then I started to read a primer on Win32 and began to wonder if maybe life isn't too short. Can I do this in C# (without converting the backend to C#)? I'd rather devote the time to learning C# than Win32.

Any suggestions would be most welcome. I really don't know a lick about Windows. The last version I regularly used was 3.1...

A: 

There is Tao Framework to access OpenGL, GLUT, SDL etc from C#... but I'm not sure if it will help you. I'm not a games programmer, but If I was to write a portable game I would definitely keep it independent from platform UI... Id rather use GLUT to make windows on any systems and have all the UI inside the game window. Good luck.

m0s
Hi, thanks for the comment. However, I don't really think GLUT is a very viable tool for commercial software; it's just too limited in functionality.
Philip
+1  A: 

Well, while it's not great for writing Mac apps, QT is quite acceptable on Windows... and would let you build for Linux as well. Bonus, you can build and debug on your Mac as well, which means you can get the UI working, then you're mostly left with testing and making sound work on the other platforms.

Andrew McGregor
Hi, I've actually looked in QT a bit. I was turned off by the licensing system; it not being free for use in commercial (read shareware) software. So then I started to look at wxWidgets. I'll likely end up going one of these two routes. It would be nice to be able to do all of the development on my Mac.Thanks!
Philip
A: 

Look at GNUStep. It is an open source implementation of OpenStep/Cocoa which can be run on a variety of platforms, including Windows. That should get you many if not most of the APIs you currently use and make porting much easier. OpenGL should port pretty easily because there are Windows implementations of that as well.

Steve Rowe