PDA

View Full Version : Newbie question



Yvo G.
05-03-2009, 07:50 PM
Sorry if this is a really stupid question.
I am using Mac OSX and xcode to program.

How do I actually program OpenGL? do I need a separate program or do I use xCode?

If this is not the right forum to ask this question can you revert me to another site or source?

Many thanks

todayman
05-04-2009, 01:35 PM
This is the kind of thing that should go under Developers->OpenGL on Macintosh.

You can use XCode, but there are a couple tweaks to most available tutorials:
Add the framework OpenGL.framework to the target
Instead of including <GL/gl.h>, include <OpenGL/gl.h> ( include it from the framework).

If you're going to use GLUT, use the GLUT framework (add it to the project, include from there). You can also use Cocoa and the NSOpenGLView. Check out the docs on that, and hopefully you should be all set.