Cg关键字(keywords)

本文介绍了Cg编程语言中的保留标识符和关键字列表,包括以双下划线开头的标识符、矩阵和向量类型等,并给出了详细的Cg关键字列表。此外,还提供了关于Cg编程的一些注意事项。



保留标识符

除了下面列出的,任何以两个的下划线作为前缀(例如,__ 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


本文转自赵青青博客园博客,原文链接:http://www.cnblogs.com/zhaoqingqing/p/4051086.html,如需转载请自行联系原作者

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值