Getting Started with OpenGL - Mac

ThrottleMonkey
Unregistered
 
Post: #1
I've been looking around the internet for quite some time. OpenGL.org has great tutorials and whatnot on how to get started... learning to code in OpenGL... but the Apple website (IMO) is crap when it comes to explaining how/where to get/download GLUT and OpenGL for OSX.

Would someone be kind enough to point a total newbie in the right direction?
Quote this message in a reply
macboy
Unregistered
 
Post: #2
Click the "idg faq" button at the top then on the iDevGames site, look at some of the examples and such. Cool
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #3
standard nehe.gamedev.net plug applies

[edit] fixed site Rolleyes jabber Rasp
Quote this message in a reply
Member
Posts: 177
Joined: 2002.08
Post: #4
GLUT is provided as a framework included with the dev tools. Throw it into the project, write a new main.c, and it should be good to go.

The next harder thing to learn is AGL, which is closely tied to the window manager, but you'll need it for Carbon work without GLUT.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #5
Just to explicitly say it, GLUT and OpenGL come with Mac OS X. There's nothing you need to install but the developer tools.
Quote this message in a reply
Member
Posts: 469
Joined: 2002.10
Post: #6
For glut, my suggestion would be just too pick apart Apple's sample code:
http://developer.apple.com/samplecode/Sa...r_OS_X.htm

if you're not interested in glut, and are looking for a more non-portable option, I'd suggest looking into working with OpenGL in Cocoa. If you have any questions about Cocoa and OpenGL I'll be happy to answer.

---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #7
Quote:Originally posted by skyhawk
standard nehe.gamedev.org plug applies
I perfer nehe.gamedev.net Rasp
Quote this message in a reply
Feanor
Unregistered
 
Post: #8
Was not there a bunch of stuff on the OpenGL list lately about GLUT being incomplete in the distribution and you had to compile it yourself to get it to work correctly? I know the framework that is installed is functional...

ThrottleMonkey, don't forget to tell us what OS version you are using and what developer tools you have chosen. In any case you have to link to the correct libraries/frameworks, and how you do that depends on the IDE. But I'll ditto OSC that you don't have to download or install anything. Also, if you have the Apple developer tools installed on OS X, there are a pile of AGL, NSGL and GLUT sample applications.

I recommend OS X, and either Project Builder (free) or CodeWarrior ($$) to develop with. You will probably get more help from those of us around here who like Apple's tools because they are free and work pretty darn well. If you are using GLUT, you also need to link to the Cocoa frameworks on OS X because they are used to implement GLUT. From there, either NeHe examples or, do yourself a favour, read the OpenGL Programming Guide. It's for sale in stores at v1.2, and free online for v1.1.

I have added some of this to the FAQ. If this is somehow redundant... then the FAQ needs reorganization. Rasp
Quote this message in a reply
ThrottleMonkey
Unregistered
 
Post: #9
I have OSX 10.2.4 and CodeWarrior.

I really want to begin programming, but... well... I kinda need a mentor.

Preferably someone that is patient with someone (me) who asks lots of questions.

NEHE looks great, only the Tutorial on OpenGL is very vague as with which program you're supposed to be putting all that code in... is it CodeWarrior, GLUT? what?

I thank you all for your input. I'm just getting very frustrated at running around in circles in the past, trying to find good help, examples, tolerant people (who are tolerant of coders just starting out... total newbies like me).

Oh, and what's the Project Builder download link? I keep going to apples' dev site and only get the "run around" links... not some place i can actually download it.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #10
If you got a new Mac with 10.2 installed, there's a dev tools installer in /Applications/Installers/. It's not the most up-to-date, but it should do you to begin.

If you bought 10.2 retail, the dev tools came on an extra CD. Again, not the most recent version...

If you go to http://connect.apple.com/, you can sign up to be an online member of the Apple Developer Connection (free), this lets you download the latest developer tools (250-300MB).
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #11
Quote:Originally posted by ThrottleMonkey
I really want to begin programming, but... well... I kinda need a mentor.
Are you new to programming in general or just OpenGL?
Quote this message in a reply
Feanor
Unregistered
 
Post: #12
Quote:Originally posted by ThrottleMonkey
NEHE looks great, only the Tutorial on OpenGL is very vague as with which program you're supposed to be putting all that code in... is it CodeWarrior, GLUT? what?

The NeHe Tutorials were originally written to work with Windows -- you'll see "#include <windows.h>" at the beginning of the example files. However, there are GLUT versions available for download. Also, note there are almost forty tutorials, from the absolute simplest all the way to quite complicated games.

Question: Are you already familiar with the C programming language? (Note to self: finish "ChooseYourEnvironment" in FAQ.)
Quote this message in a reply
Moderator
Posts: 698
Joined: 2002.04
Post: #13
Insert neheX plug here.
Insert guilt for not having finished the site yet here.

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
ThrottleMonkey
Unregistered
 
Post: #14
Thank you Cookie. I'm downloading the Dev Tools right now. A whopping 300 Mb.

To answer the other questions, I'm only a couple weeks into C++, but I'm not a complete stranger to programming. Well, if you really call QBasic, HTML and FileMakerPro programming. Blush

I've already written MUD-like text-based games in C++ to get used to the idea of programming for games and I'm wanting to make the graphical "leap".

I'm dedicated and highly motivated (sounds like a resume) but I'm the kind of guy that needs the initial spoon feeding and push in the right direction.

Thanks for everyone's comments so far, it's more help than I've gotten from the CodeWarriorU.com site.
Quote this message in a reply
BobbyWatson
Unregistered
 
Post: #15
Instead of dealing with AGL for creating OpenGL contexts in windows or fullscreen, you may want to check out SDL (http://www.libsdl.org), a very nice little library which can create a context for you very easily (the way to do it is written in the documentation, it only takes a few function calls instead of the two pages of code Apple provides as a sample) and works pretty well from what I've seen.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Getting started with OpenGL XxtraLarGe 8 3,529 Mar 20, 2006 05:40 PM
Last Post: wadesworld