
Cg Language
What is Cg? C for Graphics. Cg is the high-level language for programming GPUs developed by NVIDIA.
Is Cg proprietary? The Cg Language Specification is published and open in the sense that other vendors may implement products based on it. To encourage this, NVIDIA open sourced the Cg Compiler technology under a nonrestrictive, free license.
Vendor implementations of Cg Compilers are typically proprietary and owned by their creators. NVIDIA has developed and owns the NVIDIA Cg Compiler, and other vendors are expected and encouraged to develop their own Cg Compiler products.
Does Cg replace OpenGL? No, Cg operates as a layer above OpenGL. Cg Compilers output assembly code in the formats defined by OpenGL extensions such as ARB_vertex_program, ARB_fragment_program and NV_vertex_program, and in the format defined by OpenGL 1.4.
Does Cg replace C/C++? No, Cg is a shading language. A shading language is a type of programming language that tells the GPU how to shade pixels. Your main program will still be written in C, C++, C#, Java, or other CPU programming language.
What’s the difference between the Cg language and a Cg compiler? The Cg language has a syntax and grammar suitable for real-time programmable GPUs.
A Cg compiler is an application that accepts Cg language input, and produces output in one of several standard assembly language formats that are accepted by modern programmable GPUs.
What is NVIDIA's involvement in the future of OpenGL? NVIDIA is committed to the advancement of OpenGL, and will actively work to the next natural stage in the evolution of OpenGL. NVIDIA proposed and led the development of OpenGL 1.4, whose primary component is an assembly language interface to programmable GPU vertex hardware. Having successfully completed this OpenGL revision, NVIDIA is now working with the ARB to define and develop the next revision of OpenGL (including the OpenGL Shading Language), with fragment/pixel programmability as its expected core capability.
Platforms
What platforms does the NVIDIA Cg Compiler support?
What about other platforms? NVIDIA has provided source code for key portions of the NVIDIA Cg Compiler front-end to enable rapid adoption for alternative platforms.
How will Cg support future GPUs? Cg is designed to provide support for very sophisticated programmable GPUs and NVIDIA expects Cg to be a key enabling technology, allowing developers to access and use future, increasingly programmable GPU architectures.
NVIDIA Cg Toolkit
What is NVIDIA providing to developers? NVIDIA is currently providing developers with the NVIDIA Cg Toolkit, comprised of:
- NVIDIA Cg Compiler:
- OpenGL ARB_vertex_program, OpenGL ARB_fragment_program
- NV_vertex_program[2], NV_fragment_program
- Cg Language Specification
- Cg Standard Library
- Cg Runtime Libraries
- Cg User’s Manual
- NVIDIA Cg Browser (with many example shaders and demos)
- GeForce FX sample shaders
Will there be other versions of the tookit? Yes, later versions of the NVIDIA Cg Toolkit will support and include:
- Increasing optimization of the compiler
- Comprehensive courseware and examples
- Further support for .fx runtime compilation
Will the NVIDIA Cg Compiler perform any platform specific optimizations? Yes, the NVIDIA Cg Compiler will aggressively optimize shaders for multiple target GPU architectures.
Why doesn't Cg work on my old TNT/Voodoo/Matrox graphics board? The NVIDIA Cg Toolkit requires a programmable GPU such as a GPU from the GeForce FX family.
How do I get started with Cg? Start by learning about the technology. Then, take a look at The Cg Tutorial book, which teaches you the Cg language itself in an organized manner.
Who is Using Cg?
Hundreds of developers endorse Cg: Hundreds of developers began training on an earlier incarnation of Cg beginning late in 2001, and many contributed to the evolution of the language.
Some developers supporting Cg include: Auran, Bethesda Softworks, Beyond Games, Bioware, Blizzard Entertainment, Cat Daddy, CodeCult, Codemasters, Contraband, Core Design, Croteam, Cryptic Studios, Crytek, Dark Black, Destineer, Electronic Arts, Elixir, EMG, Ensemble Studios, Fox Interactive, Grin, Headgate, High Voltage, Inevitable, Ion Storm, Kaboom, Kuju, Lego Media, Lionhead, Lithtech, Massive, Maxis, Nadeo, NAMCO, NemoSoft, Novalogic, Pivotal, Rage Sheffield, Relic Entertainment, Ritual, Sega-AM2 Co. Ltd., Sony Online Entertainment, SpinVector, Steel Monkeys, Valve, Vupine and more.
Middleware developers are endorsing Cg:
NDL, Criterion, Intrinsic Graphics DCC applications and tools, such as, Alias|Wavefront Maya, Discreet 3ds max, Softimage|XSI and Right Hemisphere's Deep Exploration are embedding Cg into the digital artist's workflow.
|