If you have are making a program using CG and OpenGL can someone with an ATI card use it? I have a 9800 pro and i have noticed that alot of demos on cg dont work.

Here’s a reply from “

Was Cg designed for NVIDIA chips only?

No. Cg was designed to simplify graphics programming, regardless of the hardware that it runs on. Cg allows graphics chip manufacturers to easily and effectively expose the capabilities of their hardware by writing their own Cg compilers. These manufacturers have a unique understanding of their products, and are therefore the most capable compiler writers for their particular hardware. Programs compiled with Cg run today on DirectX 8-compatible hardware, and on any other vendor’s implementation of OpenGL, if it supports the NV_vertex_program extension (ARB_vertex_program support is coming soon, since it was only recently approved by the ARB).

You can find it, here :

thanks. So you write cg code in vertex programs? not in a normal cpp or c file?

No, the source code is written in a cpp file or c and for the vertex program you have 2 choices :

  1. In a text file
  2. In your program

The result is the same but it’s more easy to modify the vertex program code in a text file instead of modifing the source code and re-compiling.

If you want a simple example for vertex program, take a look on my website, “Download”-“Extension” section.

In my demo, I use the second choice, the vertex program is written in the source code instead of a text file.


[This message has been edited by Leyder Dylan (edited 10-07-2003).]