How to Use vc.net to compile nvidia cg source code

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.