Beginner OpenGL: Looking for source code

Posts: 102
Joined: 2003.07
Post: #1
I am just starting to get into OpenGL programming and I want to see how the inner workings of a real OpenGL game. Does anybody know of a good OS X / Carbon game that is free to download the source code for?

Quote this message in a reply
Posts: 469
Joined: 2002.10
Post: #2
In my opinion, you should take a two step approach to learning OpenGL on the mac. 1) Learn OpenGL. 2) Pick a framework and learn it.

For OpenGL, start with The Redbook and go through the first few chapters of examples. You'll need to download a Sample Code that has a minimum of Context setup to drop your code into. I recommend glut, Cocoa OpenGL, or Carbon OpenGL. Cocoa OpenGL will probably be the most approachable if you haven't used any of the 3 already.

Once you've got a good grasp of OpenGL, then learn how to do the application basics. Look to the CoreGraphics headers in the Application Services framework for Fullscreen capturing and switching.

As always, bring us your questions on the boards and we'll do our best to answer. Smile

15.4" MacBook Pro revA
Quote this message in a reply
Posts: 434
Joined: 2002.09
Post: #3
Quite a few OpenGL games in uDevGame 2003, and the source code for all of them will be posted eventually. The source for the 2002 entries is already available in the iDevGames file library.

Measure twice, cut once, curse three or four times.
Quote this message in a reply
Posts: 102
Joined: 2003.07
Post: #4
Thanks for the input. I have already downloaded The Red Book and am reading the chapters. I also have downloaded the NeHe Cocoa tutorials. I'm not a big fan of Objective-C because you have to forget parts of C++ to use it and it just gets too confusing. I will probably learn it eventually.

P.S. Matt, When do you think the source code for all of the games in uDevGame2003 wil be posted for download.

Quote this message in a reply
Posts: 72
Joined: 2006.10
Post: #5
When it comes to objective-C. You don't need a lot. You just need a couple of very simple objective-C++ classes to interface with cocoa, and the rest of your game can still be written in good old C++.

You can find a (very simple) example of this on nehe's homepage. It's called the NeHe cocoa basecode.

- Sohta
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Beginner Carbon & OpenGL help jo_shadow 4 3,426 Jan 10, 2008 09:31 AM
Last Post: TomorrowPlusX
  NEED HELP! OpenGL code for my exam doesn't work mr02077 2 2,663 Feb 9, 2007 05:44 PM
Last Post: stevejohnson
  Beginner-Intermediate level OpenGL tutorials Jones 7 4,277 Jan 9, 2006 12:40 AM
Last Post: AnotherJake
  SDL/OpenGL Initialization Code Nick 15 6,853 Sep 7, 2005 07:28 AM
Last Post: Nick
  OpenGL code optimization unknown 38 12,785 Jul 28, 2005 10:22 PM
Last Post: unknown