VS2008与CG语言环境配置

建立vs2008文注册文件:   install_highlighting_vs9.reg

内容如下

 

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Languages\File Extensions\.cg]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Languages\File Extensions\.glsl]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"

 

保存文件后,双击即可注册,当然可以向下面的方式,手动注册也可。

 

CG语言开发环境语法高亮显示配置:

Want pretty syntax highlighting when editing your CG files in Visual Studio?
Heres how:

---
Visual Studio 6:

1. Copy the usertype.dat file to the Visual Studio bin directory (typically C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin).

2. Start regedit (Start -> Run -> regedit) and go to HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++

3. Add cg to the end of the FileExtensions key (separated with a semicolon)

4. Restart Visual Studio and your shaders should now have syntax highlighting

NOTE: You can use the install_highlighting.reg file to simplify steps 2-3. Simply double-click on the file and press OK when prompted.

---
Visual Studio .Net / 7.1:

1. Copy the usertype.dat file to your Microsoft Visual Studio .Net\Common7\IDE folder

2. Open up the registry editor and go to the following location - HKLM\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions.

3. Copy the default value from the .cpp key.

4. Create a new key under the File Extensions with the name of .cg

5. Paste the value you just copied into the default value

6. Restart Visual Studio and your shaders should now have syntax highlighting

NOTE: You can use the install_highlighting_vs7.reg file to simplify the above steps.  Simply double-click on the file and press OK when prompted.

---
Visual Studio 2005 / 8:

1. Copy the usertype.dat file to your Microsoft Visual Studio 8\Common7\IDE folder

2. Open up the registry editor and go to the following location - HKLM\SOFTWARE\Microsoft\VisualStudio\8.0\Languages\File Extensions.

3. Copy the default value from the .cpp key.

4. Create a new key under the File Extensions with the name of .cg

5. Paste the value you just copied into the default value

6. Restart Visual Studio and your shaders should now have syntax highlighting

NOTE: You can use the install_highlighting_vs8.reg file to simplify the above steps.  Simply double-click on the file and press OK when prompted.

---
Visual Studio 2008 / 9:

1. Copy the usertype.dat file to your Microsoft Visual Studio 8\Common7\IDE folder

2. Open up the registry editor and go to the following location - HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\Languages\File Extensions.

3. Copy the default value from the .cpp key.

4. Create a new key under the File Extensions with the name of .cg

5. Paste the value you just copied into the default value

6. Restart Visual Studio and your shaders should now have syntax highlighting

NOTE: You can use the install_highlighting_vs8.reg file to simplify the above steps.  Simply double-click on the file and press OK when prompted.

转载于:https://www.cnblogs.com/panxihua/archive/2013/02/06/2785617.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值