how to compile opengl code

I’m completely new to OpenGL and I have a Mac OS 10.4. I followed the directions on the following webpage:

http://niloc.org/article/6/compiling-openglglut-programs-on-mac-os-x-using-xcode

and got stuck on how to add the GLUT.framework and OpenGL.framework. Any ideas on how to do this?

Hmmm, perhaps your dev environment is missing GLUT and OpenGL ‘frameworks’, or you are missing some config like a path.

Typically on other platforms you download these libs and/or install them with a driver or SDK and then include the header files and link to them and it just works.

I’m not familiar enough with Mac to help you with this ‘framework’ malarkey though. I expect OpenGL is there by default but perhaps not GLUT. So if you can’t find GLUT don’t assume you have a problem. You could use AGL etc. for your platfform specific interface given that GLUT tends to be non core functionality (again I don’t know whether it ships & installs with the dev environment by default, but I’d look for OpenGL and AGL first).

Try Apple’s developer articles, here’s one on OpenGL:

http://developer.apple.com/documentation…_section_1.html

This seems relevant

http://developer.apple.com/documentation…01987-CH202-TP9

It seems kinda light on details but it looks like they have sample projects of all sorts here:

http://developer.apple.com/samplecode/GraphicsImaging/idxOpenGL-date.html