Advertisement

Nvidia CG

Started by February 21, 2003 10:17 PM
2 comments, last by shins 21 years, 8 months ago
Hey, I''m new to game programming, had a quick question about this new CG language thats supposed to be easier to use. Does it really dramatically cut down on time spent coding? Is it less powerful than assembly code or something like C++? Lastly I suppose, I''d like to know if you guys reccomend starting off in it. (I''ve taken two high school courses in C++, so I know the basics, if that has any relevance).
quote: Original post by shins
Hey, I''m new to game programming, had a quick question about this new CG language thats supposed to be easier to use.


Cg is not a general purpose programming language. It is a method of directly programming the graphics pipeline.

quote: Does it really dramatically cut down on time spent coding?

Nope. It''s pretty complex.

quote: Is it less powerful than assembly code or something like C++?

Yep, much less powerful. It''s only ever used along with a more general-purpose programming language.

quote: Lastly I suppose, I''d like to know if you guys reccomend starting off in it. (I''ve taken two high school courses in C++, so I know the basics, if that has any relevance).

When you need Cg, you''ll know it. Until then, stick to C++.

But... but that''s what HITLER would say!!
Advertisement
Even the GeForce 3 has programmable shaders. If you have a Voodoo 2 that''s your fault for not upgrading. That doesn''t mean there isn''t a sizable market for programs using shaders. Even Quake 3 and Morrowind have shader technology.

Who besides Yann cares? John Carmack cares. Tim Sweeney cares. Many developers care. I care. My engine pushes around ten a frame.

Why so hostile?
Multiversal Gaming-redefining engine technology, graphics, and neworking technology in our upcoming MMORPG and FPS gameIf interested Contact MBRAM32@aol.com Huge royalties will benefit
quote: Original post by Californium
blah blah blah...

You can write Cg code that runs on a GeForce3. If you know exactly what you are doing, you can even write Cg code that runs on a GeForce2 or 1. And who besides me cares ? A lot of people, fortunately. High level shader languages are a very important milestone in the development of 3D graphics.

shins:
Cg is a graphics programming language. It is for a 3D card GPU, what the C/C++ compiler is for you x86 CPU. Cg makes the development of shaders easier, as you don''t have to code them in shader-ASM anymore. Both compile processes (CPU and GPU) are very similar, but absolutely not exchangeable, as the target hardware is totally different:

C/C++ code --[C/C++ compiler]--> x86 ASM --[x86 assembler]--> executable

Cg code --[Cg compiler]--> vp/fp shader ASM --[DX/OGL Driver]--> GPU microcode

This topic is closed to new replies.

Advertisement