If you do not know what CG isProgramCodeIt doesn't matter. I will tell you simply: This is a code that can be run on the graphics GPU after compilation. For more information, visit the NVIDIA homepage: http://developer.nvidia.com/Cg or www.gpgpu.org.
In my blog, I have introduced how to use vc6.0 to compile and troubleshoot CG code. Here I will introduce how to integrate the CG compiler in vc.net IDE.
1. download and install the CG toolkit correctly.
2. Assume that your CG toolkit is installed in the C:/program files/NVIDIA Corporation/CG/directory.
In the menu of vc2003/2005, choose tools> external tools> Add )".
3. Enter:
Title: CG Compiler
Command: C:/program files/NVIDIA Corporation/CG/bin/cgc.exe
Parameter (arguments): $ (itempath)-entry main-profile vp30
Main is the program entry. If it is different, modify it accordingly. For segment coloring, use fp30,
Initial directory (initial directory): $ (itemdir)
Check the following "use output window )".
4. Good. Open a *. CG file in vc.net and click "CG compiler" under the Tools menu to start compilation.
What's the problem? Please send me E-MAIL: huawenguang@sina.com