Is there any opengl example so that I can run on MacOS?

18,886

Solution 1

Check out these ones. They weren't easy to find :)

Solution 2

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.

http://nehe.gamedev.net/

Solution 3

There are a bunch in /Developer/Examples/OpenGL.

Solution 4

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.

Solution 5

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

Share:
18,886
lucius
Author by

lucius

Updated on June 07, 2022

Comments

  • lucius
    lucius almost 2 years

    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.