Slashdot Mirror


NVidia announces Cg: "C" for Graphics

mr_sheel writes: "Thresh's FiringSquad has an article about Cg, a new language developed by NVidia in collaboration with Microsoft. 'Up until now,' Brandon Bell writes, 'game developers have had to use complex assembly language to create the lifelike graphics gamers experience in today's latest games.' Cg eases the process of bringing graphics to the screen and compiles for DirectX 8,9 and OpenGL 1.4. Many companies, including 3D Studio Max, Blizzard, and over 100 game developers, have already jumped onto the Cg bandwagon. Will this replace assembly graphics coding once and for all?"

4 of 176 comments (clear)

  1. Why it won't work (link) by Space+Coyote · · Score: 4, Interesting
    There's an interesting editorial at The Register pointing out some of the flaws in Cg, and speculating about NVidia's intention for future development of the language as it relates to their core graphics hardware busines.

    From the article:

    • No break, continue, goto, switch, case, default. These are useful features that can be used without penalty on other vector processors.
    • No pointers. This is Cg's most serious omission. Pointers are necessary for storing scene graphs, so this will quickly become a serious omission for vector processors that can store and process the entire scene or even sections of it.
    • No integers. This may be appropriate to NVIDIA, but is not a universal design decision.
    • Arrays use float indices. This is an odd design decision, relevant to DirectX 8 and Nvidia only.

    It may be possible that NVidia is holding back support for such rudimentary language features until such time as they are supported in their own hardware. I don't think this is a formula for a widely-adopted language at all, and smells a little of 3dfx's efforts with Glide.

    --
    ___
    Cogito cogito, ergo cogito sum.
  2. cgshaders.org and Linux Toolkit by Screaming+Lunatic · · Score: 5, Interesting

    The official community site is at cgshaders.org. There's a Linux Toolkit out now. There's a interview with CEO David Kirk. Along with articles, a shader repository, and forums for help.

  3. OpenGL 2.0 Shader Language by RoninM · · Score: 5, Interesting
    Cg looked awfully familiar to me (and not just because we had this article, before). You might want to compare it to the OpenGL 2.0 Shader Language defined here (PDF) and implemented here.

    All of this leaves me a little bit confused. I'm not sure why we need two (or, perhaps, more) C-based shader languages, at least one of which (Cg) is hardware-specific, but API neutral.

    --
    If a corporation is a personhood, is owning stock slavery?
  4. Re:What Are You Talking About? by fferreres · · Score: 4, Interesting

    Do you even read articles? How did you get modded insightful? Do moderators read articles?

    Yes, I think they do read them. There's nothing in the article that contradicts what he says. Actually, Nvidia IS IN BED with Microsoft. 3Dfx was not and got killed. 3DLabs was not and suffered.

    If it werent't for Id, i'd say OpenGL will be dead right now and you would not be able to play any 3D games but loading Windows.

    Now, all this can sound unsound, but if you really followed what happened in the 3D world since 1995 you will notice it's not a crazy idea.

    Microsoft needs the games to run under Windows and XBox, and to NOT run on any other plataform. This is as true as the sky is blue. So the original poster does have a valid point with I'd mod as Insightfull any day.

    --
    unfinished: (adj.)