-
26
pages
-
English
-
Documents
Description
A Follow-up Cg Runtime Tutorial
*
for Readers of The Cg Tutorial
Mark J. Kilgard
NVIDIA Corporation
Austin, Texas
April 20, 2005
The source code discussed in this tutorial is
installed by the Cg Toolkit installer for Windows at
c:\Program Files\NVIDIA Corporation\Cg\examples\OpenGL\basic\24_bump_map_torus
†
When Randy and I wrote The Cg Tutorial, we wanted a book that would convey our
‡
intense enthusiasm for programmable graphics using Cg, short for C for Graphics. We
focused our tutorial on the language itself: What is the Cg language and how do you
write Cg programs for programmable graphics hardware?
We chose our language focus for a couple of different reasons.
First off, the language is where all the power and new concepts are. Once you interface
Cg into your graphics application, it’s the Cg language that really matters. For a
conventional CPU programming language, explaining the Cg runtime is somewhat akin
to explaining how to edit programs and how to run the compiler. Obviously, you’ve got
to learn these tasks, but there’s nothing profound about using an editor or compiler.
Likewise, there’s nothing deep about the Cg runtime either; it’s a fairly straightforward
programming interface.
Second, how you interface Cg to your application is a matter of personal design and
depends on the nature of your application and your choice of application programming
language, operating system, and 3D programming interface. While Randy and I are ...
*
for Readers of The Cg Tutorial
Mark J. Kilgard
NVIDIA Corporation
Austin, Texas
April 20, 2005
The source code discussed in this tutorial is
installed by the Cg Toolkit installer for Windows at
c:\Program Files\NVIDIA Corporation\Cg\examples\OpenGL\basic\24_bump_map_torus
†
When Randy and I wrote The Cg Tutorial, we wanted a book that would convey our
‡
intense enthusiasm for programmable graphics using Cg, short for C for Graphics. We
focused our tutorial on the language itself: What is the Cg language and how do you
write Cg programs for programmable graphics hardware?
We chose our language focus for a couple of different reasons.
First off, the language is where all the power and new concepts are. Once you interface
Cg into your graphics application, it’s the Cg language that really matters. For a
conventional CPU programming language, explaining the Cg runtime is somewhat akin
to explaining how to edit programs and how to run the compiler. Obviously, you’ve got
to learn these tasks, but there’s nothing profound about using an editor or compiler.
Likewise, there’s nothing deep about the Cg runtime either; it’s a fairly straightforward
programming interface.
Second, how you interface Cg to your application is a matter of personal design and
depends on the nature of your application and your choice of application programming
language, operating system, and 3D programming interface. While Randy and I are ...
-
Publié par
-
Langue
English