Is there any opengl example so that I can run on MacOS 10.5.5? And if there is a XCode project with the opengl examples?
Thank you.
Is there any opengl example so that I can run on MacOS 10.5.5? And if there is a XCode project with the opengl examples?
Thank you.
In addition to the examples that come with XCode that Brad mentioned, there is an OpenGL example in Aaron Hillegass's book Cocoa Programming for Mac OS X. All of the source code from that book is available for download.
The Nehe tutorials will run on OS X. Scroll to the bottom of each tutorial and you'll see a download link for about a dozen platforms / languages / IDEs, one of which is OS X / Objective-C / Cocoa.
I recommend /Developer/Examples/OpenGL/GLUT
by learning openGL with GLUT you can very easily copy/paste arbitrary openGL code from the internet and have it compile and run properly. (assuming it's also GLUT based-- but there's a ton of it out there...)
Dietrich is right, the nehe tutorials are very valuable, but for me many of them were far too game-oriented if not game-on-windoze-platform specific.
and of course, don't overlook: openGL.org code examples and tutorials page
Impromptu is a live coding environment that handles openGL, check out this gentle tutorial.
Additionally, Impromptu has hooks into the Mac audio units and camera and is a great prototyping environment.
It does use Scheme, a language that may not be as wide spread; but it allows you to build up your program one line at a time.
There is lots of sample code, demonstrating OpenGL and others, in the Mac OS X Reference Library and these include all XCode project files needed.