Cg关键字(keywords)

本文为作者原创,转载请注明出处:https://www.cnblogs.com/zhaoqingqing/p/4051086.html



保留标识符#

除了下面列出的,任何以两个的下划线作为前缀(例如,__ newType)的标识符被保留。

注意,矩阵(matrix)和向量类型(vector types)(如half2x3float4)不在该列表中,因为它们可以被用作标识符。不过,我们建议你把矩阵和向量类型的保留字,从而避免混淆

Cg 关键字#

下方是Cg(NVIDIA C for graphics)保留字列表,标有星号不区分大小写

asm*              explicit           pixelfragment*       template

asm_fragment      extern             pixelshader*         texture*

auto              FALSE              private              texture1D

bool              fixed              protected            texture2D

break             float*             public               texture3D

case              for                register             textureCUBE

catch             friend             reinterpret_cast     textureRECT

char              get                return               this

class             goto               row_major            throw

column_major      half               sampler              TRUE

compile           if                 sampler_state        try

const             in                 sampler1D            typedef

const_cast        inline             sampler2D            typeid

continue          inout              sampler3D            typename

decl*             int                samplerCUBE          uniform

default           interface          shared               union

delete            long               short                unsigned

discard           matrix*            signed               using

do                mutable            sizeof               vector*

double            namespace          static               vertexfragment*

dword*            new                static_cast          vertexshader*

dynamic_cast      operator           string*              virtual

else              out                struct               void

emit              packed             switch               volatile

enum              pass*              technique*           while

 

说明#

版权归 NVIDIA公司:http://http.developer.nvidia.com/CgTutorial/cg_tutorial_appendix_d.html

作者:赵青青   一名在【网易游戏】做游戏开发的程序员,擅长Unity3D,游戏开发,.NET等领域。
本文版权归作者和博客园共有,欢迎转载,转载之后请务必在文章明显位置标出原文链接和作者,谢谢。
如果本文对您有帮助,请点击【推荐】您的赞赏将鼓励我继续创作!想跟我一起进步么?那就【关注】我吧。
posted @   赵青青  阅读(1118)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· C++代码改造为UTF-8编码问题的总结
· DeepSeek 解答了困扰我五年的技术问题
· 为什么说在企业级应用开发中,后端往往是效率杀手?
阅读排行:
· 10亿数据,如何做迁移?
· 推荐几款开源且免费的 .NET MAUI 组件库
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 易语言 —— 开山篇
· Trae初体验
历史上的今天:
2013-10-25 NGUI学习笔记汇总
点击右上角即可分享
微信分享提示
CONTENTS