OpenGL and DirectX libraries with Xcode

Hello. Quick question:

I've found a good book on game programming using OpenGL for graphics and DirectX for audio and input. However, it is written for Windows. I know Mac uses OpenGL too, though, so I'm trying to figure out if I can use this book as a resource for game programming on the Mac.

The book says something like, "you will need the -OpenGL- and -DirectX- libraries and headers installed on your computer, and a compiler set up to find them." I need to know if all of that applies to me (I'm running Mac OS X 10.5.8 on a MacBook (black) using Xcode 3.1.2 in case any of that is relevant).

So, basically, there's three things I need to know here:

1.) Does Xcode (or its compiler, whichever is the relevant one I should be asking about) include the OpenGL libraries and headers? Am I all set in that area? I think the answer here is yes, but I want to make sure.

2.) Does Xcode (again, or its compiler) include the DirectX libraries and headers? Am I good to go here? This one I'm not so sure about -- I think of DirectX as more of a Windows thing, but I don't know.

3.) Is the Xcode compiler (GNU or GCC or whatever -- still don't know the difference) "set up to find" these libraries and headers?

Any help here is greatly appreciated. Thank you.

MacBook, Mac OS X (10.5.8)

Posted on Oct 18, 2009 2:25 AM

Reply
4 replies

Oct 18, 2009 7:05 AM in response to Tron55555

Tron55555 wrote:
Hello. Quick question:


1.) Does Xcode (or its compiler, whichever is the relevant one I should be asking about) include the OpenGL libraries and headers? Am I all set in that area? I think the answer here is yes, but I want to make sure.


Yes. http://developer.apple.com/graphicsimaging/opengl/

2.) Does Xcode (again, or its compiler) include the DirectX libraries and headers? Am I good to go here? This one I'm not so sure about -- I think of DirectX as more of a Windows thing, but I don't know.


No.

3.) Is the Xcode compiler (GNU or GCC or whatever -- still don't know the difference) "set up to find" these libraries and headers?


Just drag the appropriate framework into Xcode just like any other framework (AGL, OpenGL, GLUT, etc).

Some friendly advice. You seem to be a bit all over the map. C, assembly, OpenGL, etc. Maybe this is because you're still exploring and that's great. But you might want to slow down a bit and pick a single project for yourself and work on that one project to it's completion.

Eric

Oct 19, 2009 7:15 AM in response to ericmeyers

Some friendly advice. You seem to be a bit all over the map. C, assembly, OpenGL, etc. Maybe this is because you're still exploring and that's great. But you might want to slow down a bit and pick a single project for yourself and work on that one project to it's completion.


Yes, I know a lot of people don't like to do that many things at once, but I do, and I don't think there's anything wrong with that. I'm not suggesting that your wrong -- I think you're right that it would probably be beneficial in a lot of ways to pick a single project and work through it, but I'm just interested in too many things to do only one at a time. I like learning a bunch of different things at once, and I think that has its benefits as well. It is true, though, that I am especially "all over the map" right now because I've just gotten into Mac programming in the last few months and, like you said, I'm still exploring what's out there. I'll slow down to a certain degree sooner or later, but I'm not there yet.

Anyways, I appreciate your advice, though, as well as your answers to my questions. So, the DirectX parts of the book won't be applicable, but the OpenGL parts should be. Okay. Also, the link you posted looks great, and I wanted to ask you how you got to it. There was no dev center title at the top of the page (in other words, it wasn't part of the Mac Dev Center or anything like that from what I could tell), and the navigation links at the top said "ADC Home -> Graphics & Imaging", and I couldn't find any links to it from ADC Home. The reason I ask is because I've been through the Mac Dev Center looking for stuff like this and I didn't find this, so it looks like there might be a part of the site that I haven't discovered that could have some good resources. How did you get to it? Thanks!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

OpenGL and DirectX libraries with Xcode

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.