visual studio 中显示cg,hlsl语法高亮
2010-07-24 21:06
337 查看
这个对提升编程效率和感觉挺有帮助的,share下,hope it can help!
最开始是在gamedev上看到的,摘;录如下:
----------------------------
You have to download the CG Toolkit from the nVidia site.
Then in the folder /NVIDIA Corporation/Cg/msdev_syntax_highlighting/ its gonna be a file called usertype.dat then you will have to do this..
1. Copy the usertype.dat file to
32位: /Microsoft Visual Studio 8/Common7/IDE
64位下是\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\这里
2. Open up the registry editor and go to the following location -
32位: HKLM/SOFTWARE/Microsoft/VisualStudio/8.0/Languages/File Extensions
64位:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\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(.fx 或者其他什么名字)
5. Paste the value you just copied into the default value.
6. Restart Visual Studio and your shaders should now have syntax highlighting.
-----------------------------
后面部分不修改注册表也可以的,在tool->option->text editor->file extention添加fx,hlsl,cg解释为c++语法高亮就可以了。
最开始是在gamedev上看到的,摘;录如下:
----------------------------
You have to download the CG Toolkit from the nVidia site.
Then in the folder /NVIDIA Corporation/Cg/msdev_syntax_highlighting/ its gonna be a file called usertype.dat then you will have to do this..
1. Copy the usertype.dat file to
32位: /Microsoft Visual Studio 8/Common7/IDE
64位下是\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\这里
2. Open up the registry editor and go to the following location -
32位: HKLM/SOFTWARE/Microsoft/VisualStudio/8.0/Languages/File Extensions
64位:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\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(.fx 或者其他什么名字)
5. Paste the value you just copied into the default value.
6. Restart Visual Studio and your shaders should now have syntax highlighting.
-----------------------------
后面部分不修改注册表也可以的,在tool->option->text editor->file extention添加fx,hlsl,cg解释为c++语法高亮就可以了。
相关文章推荐
- 在visual studio中设置cg语法高亮
- Visual Studio 2008/2010的一个GLSL, HLSL, Cg语法加亮插件-NShader
- 如何在Visual Studio 2008中设置Cg语法高亮
- 使用Visual Studio IDE编写程序时不显示窗口或窗口一闪而逝的解决方法
- 设置MAC 下 Vim 语法高亮显示
- 在VIM中设置 显示行号,语法高亮,自动缩进
- vim显示行号、语法高亮、自动缩进的设置
- Visual Studio用户自定义控件如何显示在ToolBox中
- 使用MPLex实现语法高亮显示的功能
- 使用MPLex实现语法高亮显示的功能代码解释
- GeSHi——通用语法高亮显示
- Java 语法高亮显示JHighlight 1.0 初版发布
- [vim]设置vim语法高亮显示和自动缩进
- visual studio最近项目没有显示的解决方法
- 如何在Visual Studio 2005/2008中显示代码的行号?
- 改写vim配置文件vimrc来实现显示行号,语法高亮,自动缩进功能
- vim显示行号、语法高亮、自动缩进的设置
- Unity build-in shader 阅读-------HLSLSupporting.cginc
- VI(M)在debian中开启语法高亮显示,并在SecureCRT中支持VI语法高亮显示
- HLSL语法高亮插件