Emmanuel,
Thanks so much for the quick response to my question.
Unfortunately, I'm an *infant* newbie. I found out
that a shell is something in Unix using the Terminal
application (?I could be wrong?) and have a vague idea
what an ARB Fragment program is.
Not too long ago, I downloaded some sample GLUT
programs in an XCode project file. There were about 7
or so targets: one had whales swimming around, another
an animated chessboard, etc. I was able to examine and
compile the source code for each one and hardly had to
figure anything out.
It seems (and again, I could be wrong) that I should
be able to incorporate my Cg tools into XCode (see the
Cg Toolkit from NVidia's Web site) so that I can enter
and compile the example source code listings in the Cg
Tutorial book. It's a beginner's book that explains Cg
as if you were learning C or C++.
I hope I have given you enough information and
apologize in advance if I've gotten anything wrong. If
you or anyone else on the list knows what I'm talking
about and can post some suggestions, I'd be eternally
grateful and I can stop pulling my hair out.
In the meatime, I'm going to look at as much as I can
find out about Unix, C, C++, GLUT, etc. . . .
Thanks again for your help.
Peter
email@hidden
--- mgix <email@hidden> wrote:
>
>
> Cut and paste the following in a shell window:
>
>
>
> cat <<EOF >fragmentProgram.cg
>
> void main(
> out float4 color : COLOR,
> in float2 tc0 : TEXCOORD0,
> uniform samplerRECT tex0 : TEXUNIT0,
> uniform float4 gamma : C0
> )
> {
> float4 t0 = texRECT(tex0, tc0);
> color = pow(t0, gamma);
> }
>
> EOF
>
> /usr/bin/cgc -profile arbfp1 fragmentProgram.cg
>
>
> This will produce an ARB fragment program that you
> can
> feed directly to glProgramStringARB
>
> - Emmanuel
>
>
>
> On May 13, 2005, at 8:37 AM, Peter Zukowski wrote:
>
> > To everyone and anyone on the list,
> >
> > I'm a newbie to OpenGl and want to learn how to
> > program.
> >
> > I downloaded the Cg toolkit for Mac from NVidia's
> Web
> > site. I also have the book "The Cg Tutorial" by
> > Fernando and Kilgard published by NVidia.
> >
> > I may seem completely ignorant, but I can't figure
> out
> > how to use the toolkit. NVidia's Web site tells
> which
> > folder from the download contains the compiler,
> but
> > there's only a UNIX window in that folder.
> >
> > I would guess that I can use the toolkit in XCode
> but
> > I don't know how to set it up. Perhaps I need to
> learn
> > a little more about C or C++.
> >
> > Is there anyone that can help? Any ideas would be
> > greatly appreciated.
> >
> > Thanks for your help.
> >
> > Peter
> > email@hidden
> > _______________________________________________
> > Do not post admin requests to the list. They will
> be ignored.
> > Mac-opengl mailing list
> (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
>
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
> >
> > This email sent to email@hidden
> >
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden