Re: Getting started in OpenGL programming?
Re: Getting started in OpenGL programming?
- Subject: Re: Getting started in OpenGL programming?
- From: Jeff LaMarche <email@hidden>
- Date: Mon, 3 Jun 2002 21:43:51 -0700
On Monday, June 3, 2002, at 01:33 PM, John Kundert-Gibbs wrote:
>
Hi, all,
>
>
This summer I am working with someone to learn some basic OpenGL programming.
>
My trouble right now is that this other person uses Linux to do his programming
>
and I'm (obviously) using a Mac. I am currently trying to get a dirt-simple
>
OpenGL program (included below, if you care) to work on my Mac, but I'm not
>
having much luck. The basic problem I'm having is one of setting the correct
>
switches, I believe. For Linux the command to compile this code is:
>
cc -L/usr/X11R6/lib -O2 program.c -lX11 -lGL -lGLU -lglut -lm
>
>
Trouble is, the Mac has no X11 libraries by default, and when I use the other
>
switches, the compiler still tells me the gl and glut commands are undefined.
>
I stuck the whole program into a project builder shell and added the GLUT.
>
framework headers to the project, so now it compiles properly, but I only
>
get a blank window, not the black-on-red squares I should see inside them.
>
>
So... if anyone knows either how to set up the switches properly so that
>
the regular cc compiler can see the GL and glut header information, or how
>
to build a basic project builder shell to stick this program into, I'd much
>
appreciate it (especially the latter, as that allows me to create prettier
>
applications right out of the box). I figure once I can get this basic program
>
to work, I can stick the later, more complex ones, into the same skeleton
>
and be off and running.
>
John:
Not to ask an obvious question, but have you looked at the ProjectBuilder
versions of the OpenGL sample code? In the Developer folder (if you've installed
the developer tools. You have installed the developer tools, right?), in
/Developer/Examples/GLUTExamples/ there is a project builder project with
targets for ALL the OpenGL GLUT examples. It seems like you could probably
use this as a starting point, since you're also looking to use GLUT. You won'
t need the X11 libraries when you compile because the Apple implementation
of OpenGL doesn't depend on the X11 libraries. You can probably just look
at the include statements in target settings there, or if worse comes to worse,
clone it and delete all but one target, and substitute your code for theirs.
..
- Jeff
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.