www.digitalmars.com         C & C++   DMDScript  

D - NVIDIA Cg

reply "Sean L. Palmer" <seanpalmer earthlink.net> writes:
Hey have any of you checked out NVIDIA's new Cg language?

http://developer.nvidia.com/view.asp?PAGE=cg_main

Perhaps there are ideas there to be analyzed.

Their standard library has many functions that would be nice to have in a D
standard math library, for one thing.

Their language is also array-centric, and borrows in, out, and inout from D

Most of the data types in Cg are value types.  There are no pointers (NVIDIA
GPU's don't have pointers, but they do have arrays which are basically the
same thing just another way to say it, and hardware can be built optimal for
arrays or pointers or both.  At least this way it's safer and there's only
one syntax needed (array access))

Alot of it is special case stuff for graphics processor architecture of
today but the idea is interesting as it has the potential to make the vertex
shader / pixel shader concepts kind of "portable".

Sean
Jun 15 2002
parent "anderson" <anderson firestar.com.au> writes:
"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message
news:aef1tu$2f4f$1 digitaldaemon.com...
 Hey have any of you checked out NVIDIA's new Cg language?

 http://developer.nvidia.com/view.asp?PAGE=cg_main
<snip> Although I havn't looked toughly into this, it looks strangly simular to opengl 2's c syntax for shaders. http://www.3dlabs.com/support/developer/ogl2/whitepapers/index.htm
Jun 15 2002