Lambda the Ultimate

inactiveTopic NVIDIA's Cg technology
started 6/16/2002; 10:02:40 AM - last post 7/8/2002; 9:36:36 AM
Dan Shappir - NVIDIA's Cg technology  blueArrow
6/16/2002; 10:02:40 AM (reads: 2358, responses: 4)
NVIDIA's Cg technology
(via Slashdot)

Cg ("C" for graphics) is a high-level graphics programming language NVIDIA has developed in cooperation with Microsoft for game developers and other 3D content developers to ease the process of bringing 3D objects to life on your computer screen

I'd be the last one to begrudge anybody their right to create their own DSL, but given that this looks like C with some domain-specific types and functions one has to wonder why they couldn't make this happen with C++ and an appropriate library.


Posted to DSL by Dan Shappir on 6/16/02; 10:05:07 AM

jon fernquest - Re: NVIDIA's Cg technology  blueArrow
6/17/2002; 2:33:09 AM (reads: 1249, responses: 0)
> Cg (“C” for graphics) is a high-level graphics programming
> language NVIDIA has developed in cooperation with Microsoft.

No mention whether Cg is slated for eventual inclusion in .NET but right now Cg seems a lot more portable than .NET:

"Once the program is written, the compiler can output code for DirectX or OpenGL. Since Cg is designed specifically for vertex and pixel shader programs, DirectX versions 8 and 9 are supported as well as OpenGL 1.4. The compiler itself is cross platform; in particular programs written for Windows, Linux, Macintosh, and Xbox are supported."

Microsoft's multimedia API's (like DirectX and Media Player) are glaringly absent from .NET API's. Is there some reason behind this or was it just due to lack of time? Is it slated for eventual inclusion?

You can do a lot of cool things with .NET but integrating audio into an application like I need to do with English language listening test software is not one of them. Macromedia's Director and Flash, other multimedia authoring tools, and JMF still have this functionality locked down for ease of use.

>I'd be the last one to begrudge anybody their right to create
>their own DSL, but given that this looks like C with some
>domain-specific types and functions one has to wonder why
>they couldn't make this happen with C++ and an
>appropriate library.

DSL's seem like a good device for proprietary lock-in.

It's not that they couldn't, it's that they don't have to. They have something for which their is no open source substitute and they are going to extract some revenue from it and perhaps lock some people in to NVIDIA and monopolize some market share:

" Cg could bring us one step closer to an NVIDIA-dominated world. What happens if developers choose not to dedicate enough time to ensure that non-NVIDIA cards work well with their Cg-compiled code, or aren’t optimized for the best performance?"

.....until either .NET is available on all those platforms....Xbox?.. Highly unlikely....

The browser with the 3D images in it also doesn't look too portable.

IMHO Value is added to proprietary software by adding features that make it different, unique, and supposedly better rather than incrementally adding to already existing functionality in an open sourced generic software system....which in the long run is more useful.

Look at the way Apache and the Jakarta Project are structured as opposed to monolithic branded server systems that are marketed commercially. Instead of aiming for generic functionality and generic skills that can be applied to any server system, the computer "professional" gets "certified" on his knowledge of the particular settings, terminology, and problems of a commercial product that is bound to change in the near future anyway so that the company can maintain its revenue stream.....sell new books....certification programs.....generate new hype. This typical pattern/cycle is counter-productive to computer science education.

Paul Snively - Re: NVIDIA's Cg technology  blueArrow
6/17/2002; 4:38:57 PM (reads: 1194, responses: 0)
I posted some thoughts about this topic on my weblog.

Ehud Lamm - Re: NVIDIA's Cg technology  blueArrow
6/24/2002; 3:35:25 AM (reads: 1095, responses: 0)
Paul, I think Dan meant writing a required C++ classes, not implementing a C++ compiler.

One question always worth asking when discussing DSLs, is whether they could just as easily have been implemented as subroutine/class libraries.

Dan Shappir - Re: NVIDIA's Cg technology  blueArrow
7/8/2002; 9:36:36 AM (reads: 1029, responses: 0)
Here is a bit more information about Cg in an interview with David Kirk, Nvidia's chief scientist.