PageRenderTime 108ms CodeModel.GetById 16ms app.highlight 82ms RepoModel.GetById 1ms app.codeStats 1ms

/src/Cg/include/Cg/cg.h

https://bitbucket.org/cabalistic/ogredeps/
C++ Header | 1375 lines | 1285 code | 30 blank | 60 comment | 6 complexity | d101ef2bf50322ea2195cfb60dbd1640 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/*
   2 *
   3 * Copyright (c) 2002-2012, NVIDIA Corporation.
   4 *
   5 *
   6 *
   7 * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
   8 * of your agreement to the following terms, and your use, installation,
   9 * modification or redistribution of this NVIDIA software constitutes
  10 * acceptance of these terms.  If you do not agree with these terms, please do
  11 * not use, install, modify or redistribute this NVIDIA software.
  12 *
  13 *
  14 *
  15 * In consideration of your agreement to abide by the following terms, and
  16 * subject to these terms, NVIDIA grants you a personal, non-exclusive license,
  17 * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
  18 * Software"), to use, reproduce, modify and redistribute the NVIDIA
  19 * Software, with or without modifications, in source and/or binary forms;
  20 * provided that if you redistribute the NVIDIA Software, you must retain the
  21 * copyright notice of NVIDIA, this notice and the following text and
  22 * disclaimers in all such redistributions of the NVIDIA Software. Neither the
  23 * name, trademarks, service marks nor logos of NVIDIA Corporation may be used
  24 * to endorse or promote products derived from the NVIDIA Software without
  25 * specific prior written permission from NVIDIA.  Except as expressly stated
  26 * in this notice, no other rights or licenses express or implied, are granted
  27 * by NVIDIA herein, including but not limited to any patent rights that may be
  28 * infringed by your derivative works or by other works in which the NVIDIA
  29 * Software may be incorporated. No hardware is licensed hereunder.
  30 *
  31 *
  32 *
  33 * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
  34 * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
  35 * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
  36 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
  37 * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
  38 *
  39 *
  40 *
  41 * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
  42 * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
  43 * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  44 * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
  45 * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
  46 * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
  47 * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
  48 * OF THE POSSIBILITY OF SUCH DAMAGE.
  49 *
  50 */
  51
  52#ifndef _cg_h
  53#define _cg_h
  54
  55/*************************************************************************/
  56/*** CG Run-Time Library API                                           ***/
  57/*************************************************************************/
  58
  59#define CG_VERSION_NUM                3100
  60
  61#ifdef _WIN32
  62# ifndef APIENTRY /* From Win32's <windef.h> */
  63#  define CG_APIENTRY_DEFINED
  64#  if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
  65#   define APIENTRY    __stdcall
  66#  else
  67#   define APIENTRY
  68#  endif
  69# endif
  70# ifndef WINGDIAPI /* From Win32's <wingdi.h> and <winnt.h> */
  71#  define CG_WINGDIAPI_DEFINED
  72#  define WINGDIAPI __declspec(dllimport)
  73# endif
  74#endif /* _WIN32 */
  75
  76/* Set up CG_API for Win32 dllexport or gcc visibility. */
  77
  78#ifndef CG_API
  79# ifdef CG_EXPORTS
  80#  ifdef _WIN32
  81#   define CG_API __declspec(dllexport)
  82#  elif defined(__GNUC__) && __GNUC__>=4
  83#   define CG_API __attribute__ ((visibility("default")))
  84#  elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
  85#   define CG_API __global
  86#  else
  87#   define CG_API
  88#  endif
  89# else
  90#  define CG_API
  91# endif
  92#endif
  93
  94#ifndef CGENTRY
  95# ifdef _WIN32
  96#  define CGENTRY __cdecl
  97# else
  98#  define CGENTRY
  99# endif
 100#endif
 101
 102/*************************************************************************/
 103/*** Data types and enumerants                                         ***/
 104/*************************************************************************/
 105
 106typedef int CGbool;
 107typedef struct _CGcontext *CGcontext;
 108typedef struct _CGprogram *CGprogram;
 109typedef struct _CGparameter *CGparameter;
 110typedef struct _CGobj *CGobj;
 111typedef struct _CGbuffer *CGbuffer;
 112typedef struct _CGeffect *CGeffect;
 113typedef struct _CGtechnique *CGtechnique;
 114typedef struct _CGpass *CGpass;
 115typedef struct _CGstate *CGstate;
 116typedef struct _CGstateassignment *CGstateassignment;
 117typedef struct _CGannotation *CGannotation;
 118typedef void *CGhandle;
 119
 120#define CG_FALSE ((CGbool)0)
 121#define CG_TRUE  ((CGbool)1)
 122
 123typedef enum
 124{
 125  CG_BEHAVIOR_UNKNOWN = 0,
 126  CG_BEHAVIOR_LATEST  = 1,                /* latest behavior supported at runtime      */
 127  CG_BEHAVIOR_2200    = 1000,             /* default behavior                          */
 128  CG_BEHAVIOR_3000    = 2000,
 129  CG_BEHAVIOR_3100    = 3000,
 130  CG_BEHAVIOR_CURRENT = CG_BEHAVIOR_3100  /* latest behavior supported at compile time */
 131} CGbehavior;
 132
 133typedef enum
 134{
 135  CG_UNKNOWN_TYPE      = 0,
 136  CG_ARRAY             = 2,
 137  CG_STRING            = 1135,
 138  CG_STRUCT            = 1,
 139  CG_TYPELESS_STRUCT   = 3,
 140  CG_TEXTURE           = 1137,
 141  CG_BUFFER            = 1319,
 142  CG_UNIFORMBUFFER     = 1320,
 143  CG_ADDRESS           = 1321,
 144  CG_PIXELSHADER_TYPE  = 1142,
 145  CG_PROGRAM_TYPE      = 1136,
 146  CG_VERTEXSHADER_TYPE = 1141,
 147  CG_SAMPLER           = 1143,
 148  CG_SAMPLER1D         = 1065,
 149  CG_SAMPLER1DARRAY    = 1138,
 150  CG_SAMPLER1DSHADOW   = 1313,
 151  CG_SAMPLER2D         = 1066,
 152  CG_SAMPLER2DARRAY    = 1139,
 153  CG_SAMPLER2DMS       = 1317, /* ARB_texture_multisample */
 154  CG_SAMPLER2DMSARRAY  = 1318, /* ARB_texture_multisample */
 155  CG_SAMPLER2DSHADOW   = 1314,
 156  CG_SAMPLER3D         = 1067,
 157  CG_SAMPLERBUF        = 1144,
 158  CG_SAMPLERCUBE       = 1069,
 159  CG_SAMPLERCUBEARRAY  = 1140,
 160  CG_SAMPLERRBUF       = 1316, /* NV_explicit_multisample */
 161  CG_SAMPLERRECT       = 1068,
 162  CG_SAMPLERRECTSHADOW = 1315,
 163  CG_TYPE_START_ENUM   = 1024,
 164  CG_BOOL              = 1114,
 165  CG_BOOL1             = 1115,
 166  CG_BOOL2             = 1116,
 167  CG_BOOL3             = 1117,
 168  CG_BOOL4             = 1118,
 169  CG_BOOL1x1           = 1119,
 170  CG_BOOL1x2           = 1120,
 171  CG_BOOL1x3           = 1121,
 172  CG_BOOL1x4           = 1122,
 173  CG_BOOL2x1           = 1123,
 174  CG_BOOL2x2           = 1124,
 175  CG_BOOL2x3           = 1125,
 176  CG_BOOL2x4           = 1126,
 177  CG_BOOL3x1           = 1127,
 178  CG_BOOL3x2           = 1128,
 179  CG_BOOL3x3           = 1129,
 180  CG_BOOL3x4           = 1130,
 181  CG_BOOL4x1           = 1131,
 182  CG_BOOL4x2           = 1132,
 183  CG_BOOL4x3           = 1133,
 184  CG_BOOL4x4           = 1134,
 185  CG_CHAR              = 1166,
 186  CG_CHAR1             = 1167,
 187  CG_CHAR2             = 1168,
 188  CG_CHAR3             = 1169,
 189  CG_CHAR4             = 1170,
 190  CG_CHAR1x1           = 1171,
 191  CG_CHAR1x2           = 1172,
 192  CG_CHAR1x3           = 1173,
 193  CG_CHAR1x4           = 1174,
 194  CG_CHAR2x1           = 1175,
 195  CG_CHAR2x2           = 1176,
 196  CG_CHAR2x3           = 1177,
 197  CG_CHAR2x4           = 1178,
 198  CG_CHAR3x1           = 1179,
 199  CG_CHAR3x2           = 1180,
 200  CG_CHAR3x3           = 1181,
 201  CG_CHAR3x4           = 1182,
 202  CG_CHAR4x1           = 1183,
 203  CG_CHAR4x2           = 1184,
 204  CG_CHAR4x3           = 1185,
 205  CG_CHAR4x4           = 1186,
 206  CG_DOUBLE            = 1145,
 207  CG_DOUBLE1           = 1146,
 208  CG_DOUBLE2           = 1147,
 209  CG_DOUBLE3           = 1148,
 210  CG_DOUBLE4           = 1149,
 211  CG_DOUBLE1x1         = 1150,
 212  CG_DOUBLE1x2         = 1151,
 213  CG_DOUBLE1x3         = 1152,
 214  CG_DOUBLE1x4         = 1153,
 215  CG_DOUBLE2x1         = 1154,
 216  CG_DOUBLE2x2         = 1155,
 217  CG_DOUBLE2x3         = 1156,
 218  CG_DOUBLE2x4         = 1157,
 219  CG_DOUBLE3x1         = 1158,
 220  CG_DOUBLE3x2         = 1159,
 221  CG_DOUBLE3x3         = 1160,
 222  CG_DOUBLE3x4         = 1161,
 223  CG_DOUBLE4x1         = 1162,
 224  CG_DOUBLE4x2         = 1163,
 225  CG_DOUBLE4x3         = 1164,
 226  CG_DOUBLE4x4         = 1165,
 227  CG_FIXED             = 1070,
 228  CG_FIXED1            = 1092,
 229  CG_FIXED2            = 1071,
 230  CG_FIXED3            = 1072,
 231  CG_FIXED4            = 1073,
 232  CG_FIXED1x1          = 1074,
 233  CG_FIXED1x2          = 1075,
 234  CG_FIXED1x3          = 1076,
 235  CG_FIXED1x4          = 1077,
 236  CG_FIXED2x1          = 1078,
 237  CG_FIXED2x2          = 1079,
 238  CG_FIXED2x3          = 1080,
 239  CG_FIXED2x4          = 1081,
 240  CG_FIXED3x1          = 1082,
 241  CG_FIXED3x2          = 1083,
 242  CG_FIXED3x3          = 1084,
 243  CG_FIXED3x4          = 1085,
 244  CG_FIXED4x1          = 1086,
 245  CG_FIXED4x2          = 1087,
 246  CG_FIXED4x3          = 1088,
 247  CG_FIXED4x4          = 1089,
 248  CG_FLOAT             = 1045,
 249  CG_FLOAT1            = 1091,
 250  CG_FLOAT2            = 1046,
 251  CG_FLOAT3            = 1047,
 252  CG_FLOAT4            = 1048,
 253  CG_FLOAT1x1          = 1049,
 254  CG_FLOAT1x2          = 1050,
 255  CG_FLOAT1x3          = 1051,
 256  CG_FLOAT1x4          = 1052,
 257  CG_FLOAT2x1          = 1053,
 258  CG_FLOAT2x2          = 1054,
 259  CG_FLOAT2x3          = 1055,
 260  CG_FLOAT2x4          = 1056,
 261  CG_FLOAT3x1          = 1057,
 262  CG_FLOAT3x2          = 1058,
 263  CG_FLOAT3x3          = 1059,
 264  CG_FLOAT3x4          = 1060,
 265  CG_FLOAT4x1          = 1061,
 266  CG_FLOAT4x2          = 1062,
 267  CG_FLOAT4x3          = 1063,
 268  CG_FLOAT4x4          = 1064,
 269  CG_HALF              = 1025,
 270  CG_HALF1             = 1090,
 271  CG_HALF2             = 1026,
 272  CG_HALF3             = 1027,
 273  CG_HALF4             = 1028,
 274  CG_HALF1x1           = 1029,
 275  CG_HALF1x2           = 1030,
 276  CG_HALF1x3           = 1031,
 277  CG_HALF1x4           = 1032,
 278  CG_HALF2x1           = 1033,
 279  CG_HALF2x2           = 1034,
 280  CG_HALF2x3           = 1035,
 281  CG_HALF2x4           = 1036,
 282  CG_HALF3x1           = 1037,
 283  CG_HALF3x2           = 1038,
 284  CG_HALF3x3           = 1039,
 285  CG_HALF3x4           = 1040,
 286  CG_HALF4x1           = 1041,
 287  CG_HALF4x2           = 1042,
 288  CG_HALF4x3           = 1043,
 289  CG_HALF4x4           = 1044,
 290  CG_INT               = 1093,
 291  CG_INT1              = 1094,
 292  CG_INT2              = 1095,
 293  CG_INT3              = 1096,
 294  CG_INT4              = 1097,
 295  CG_INT1x1            = 1098,
 296  CG_INT1x2            = 1099,
 297  CG_INT1x3            = 1100,
 298  CG_INT1x4            = 1101,
 299  CG_INT2x1            = 1102,
 300  CG_INT2x2            = 1103,
 301  CG_INT2x3            = 1104,
 302  CG_INT2x4            = 1105,
 303  CG_INT3x1            = 1106,
 304  CG_INT3x2            = 1107,
 305  CG_INT3x3            = 1108,
 306  CG_INT3x4            = 1109,
 307  CG_INT4x1            = 1110,
 308  CG_INT4x2            = 1111,
 309  CG_INT4x3            = 1112,
 310  CG_INT4x4            = 1113,
 311  CG_LONG              = 1271,
 312  CG_LONG1             = 1272,
 313  CG_LONG2             = 1273,
 314  CG_LONG3             = 1274,
 315  CG_LONG4             = 1275,
 316  CG_LONG1x1           = 1276,
 317  CG_LONG1x2           = 1277,
 318  CG_LONG1x3           = 1278,
 319  CG_LONG1x4           = 1279,
 320  CG_LONG2x1           = 1280,
 321  CG_LONG2x2           = 1281,
 322  CG_LONG2x3           = 1282,
 323  CG_LONG2x4           = 1283,
 324  CG_LONG3x1           = 1284,
 325  CG_LONG3x2           = 1285,
 326  CG_LONG3x3           = 1286,
 327  CG_LONG3x4           = 1287,
 328  CG_LONG4x1           = 1288,
 329  CG_LONG4x2           = 1289,
 330  CG_LONG4x3           = 1290,
 331  CG_LONG4x4           = 1291,
 332  CG_SHORT             = 1208,
 333  CG_SHORT1            = 1209,
 334  CG_SHORT2            = 1210,
 335  CG_SHORT3            = 1211,
 336  CG_SHORT4            = 1212,
 337  CG_SHORT1x1          = 1213,
 338  CG_SHORT1x2          = 1214,
 339  CG_SHORT1x3          = 1215,
 340  CG_SHORT1x4          = 1216,
 341  CG_SHORT2x1          = 1217,
 342  CG_SHORT2x2          = 1218,
 343  CG_SHORT2x3          = 1219,
 344  CG_SHORT2x4          = 1220,
 345  CG_SHORT3x1          = 1221,
 346  CG_SHORT3x2          = 1222,
 347  CG_SHORT3x3          = 1223,
 348  CG_SHORT3x4          = 1224,
 349  CG_SHORT4x1          = 1225,
 350  CG_SHORT4x2          = 1226,
 351  CG_SHORT4x3          = 1227,
 352  CG_SHORT4x4          = 1228,
 353  CG_UCHAR             = 1187,
 354  CG_UCHAR1            = 1188,
 355  CG_UCHAR2            = 1189,
 356  CG_UCHAR3            = 1190,
 357  CG_UCHAR4            = 1191,
 358  CG_UCHAR1x1          = 1192,
 359  CG_UCHAR1x2          = 1193,
 360  CG_UCHAR1x3          = 1194,
 361  CG_UCHAR1x4          = 1195,
 362  CG_UCHAR2x1          = 1196,
 363  CG_UCHAR2x2          = 1197,
 364  CG_UCHAR2x3          = 1198,
 365  CG_UCHAR2x4          = 1199,
 366  CG_UCHAR3x1          = 1200,
 367  CG_UCHAR3x2          = 1201,
 368  CG_UCHAR3x3          = 1202,
 369  CG_UCHAR3x4          = 1203,
 370  CG_UCHAR4x1          = 1204,
 371  CG_UCHAR4x2          = 1205,
 372  CG_UCHAR4x3          = 1206,
 373  CG_UCHAR4x4          = 1207,
 374  CG_UINT              = 1250,
 375  CG_UINT1             = 1251,
 376  CG_UINT2             = 1252,
 377  CG_UINT3             = 1253,
 378  CG_UINT4             = 1254,
 379  CG_UINT1x1           = 1255,
 380  CG_UINT1x2           = 1256,
 381  CG_UINT1x3           = 1257,
 382  CG_UINT1x4           = 1258,
 383  CG_UINT2x1           = 1259,
 384  CG_UINT2x2           = 1260,
 385  CG_UINT2x3           = 1261,
 386  CG_UINT2x4           = 1262,
 387  CG_UINT3x1           = 1263,
 388  CG_UINT3x2           = 1264,
 389  CG_UINT3x3           = 1265,
 390  CG_UINT3x4           = 1266,
 391  CG_UINT4x1           = 1267,
 392  CG_UINT4x2           = 1268,
 393  CG_UINT4x3           = 1269,
 394  CG_UINT4x4           = 1270,
 395  CG_ULONG             = 1292,
 396  CG_ULONG1            = 1293,
 397  CG_ULONG2            = 1294,
 398  CG_ULONG3            = 1295,
 399  CG_ULONG4            = 1296,
 400  CG_ULONG1x1          = 1297,
 401  CG_ULONG1x2          = 1298,
 402  CG_ULONG1x3          = 1299,
 403  CG_ULONG1x4          = 1300,
 404  CG_ULONG2x1          = 1301,
 405  CG_ULONG2x2          = 1302,
 406  CG_ULONG2x3          = 1303,
 407  CG_ULONG2x4          = 1304,
 408  CG_ULONG3x1          = 1305,
 409  CG_ULONG3x2          = 1306,
 410  CG_ULONG3x3          = 1307,
 411  CG_ULONG3x4          = 1308,
 412  CG_ULONG4x1          = 1309,
 413  CG_ULONG4x2          = 1310,
 414  CG_ULONG4x3          = 1311,
 415  CG_ULONG4x4          = 1312,
 416  CG_USHORT            = 1229,
 417  CG_USHORT1           = 1230,
 418  CG_USHORT2           = 1231,
 419  CG_USHORT3           = 1232,
 420  CG_USHORT4           = 1233,
 421  CG_USHORT1x1         = 1234,
 422  CG_USHORT1x2         = 1235,
 423  CG_USHORT1x3         = 1236,
 424  CG_USHORT1x4         = 1237,
 425  CG_USHORT2x1         = 1238,
 426  CG_USHORT2x2         = 1239,
 427  CG_USHORT2x3         = 1240,
 428  CG_USHORT2x4         = 1241,
 429  CG_USHORT3x1         = 1242,
 430  CG_USHORT3x2         = 1243,
 431  CG_USHORT3x3         = 1244,
 432  CG_USHORT3x4         = 1245,
 433  CG_USHORT4x1         = 1246,
 434  CG_USHORT4x2         = 1247,
 435  CG_USHORT4x3         = 1248,
 436  CG_USHORT4x4         = 1249
 437} CGtype;
 438
 439typedef enum
 440{
 441  CG_TEXUNIT0              = 2048,
 442  CG_TEXUNIT1              = 2049,
 443  CG_TEXUNIT2              = 2050,
 444  CG_TEXUNIT3              = 2051,
 445  CG_TEXUNIT4              = 2052,
 446  CG_TEXUNIT5              = 2053,
 447  CG_TEXUNIT6              = 2054,
 448  CG_TEXUNIT7              = 2055,
 449  CG_TEXUNIT8              = 2056,
 450  CG_TEXUNIT9              = 2057,
 451  CG_TEXUNIT10             = 2058,
 452  CG_TEXUNIT11             = 2059,
 453  CG_TEXUNIT12             = 2060,
 454  CG_TEXUNIT13             = 2061,
 455  CG_TEXUNIT14             = 2062,
 456  CG_TEXUNIT15             = 2063,
 457  CG_TEXUNIT16             = 4624,
 458  CG_TEXUNIT17             = 4625,
 459  CG_TEXUNIT18             = 4626,
 460  CG_TEXUNIT19             = 4627,
 461  CG_TEXUNIT20             = 4628,
 462  CG_TEXUNIT21             = 4629,
 463  CG_TEXUNIT22             = 4630,
 464  CG_TEXUNIT23             = 4631,
 465  CG_TEXUNIT24             = 4632,
 466  CG_TEXUNIT25             = 4633,
 467  CG_TEXUNIT26             = 4634,
 468  CG_TEXUNIT27             = 4635,
 469  CG_TEXUNIT28             = 4636,
 470  CG_TEXUNIT29             = 4637,
 471  CG_TEXUNIT30             = 4638,
 472  CG_TEXUNIT31             = 4639,
 473  CG_BUFFER0               = 2064,
 474  CG_BUFFER1               = 2065,
 475  CG_BUFFER2               = 2066,
 476  CG_BUFFER3               = 2067,
 477  CG_BUFFER4               = 2068,
 478  CG_BUFFER5               = 2069,
 479  CG_BUFFER6               = 2070,
 480  CG_BUFFER7               = 2071,
 481  CG_BUFFER8               = 2072,
 482  CG_BUFFER9               = 2073,
 483  CG_BUFFER10              = 2074,
 484  CG_BUFFER11              = 2075,
 485  CG_ATTR0                 = 2113,
 486  CG_ATTR1                 = 2114,
 487  CG_ATTR2                 = 2115,
 488  CG_ATTR3                 = 2116,
 489  CG_ATTR4                 = 2117,
 490  CG_ATTR5                 = 2118,
 491  CG_ATTR6                 = 2119,
 492  CG_ATTR7                 = 2120,
 493  CG_ATTR8                 = 2121,
 494  CG_ATTR9                 = 2122,
 495  CG_ATTR10                = 2123,
 496  CG_ATTR11                = 2124,
 497  CG_ATTR12                = 2125,
 498  CG_ATTR13                = 2126,
 499  CG_ATTR14                = 2127,
 500  CG_ATTR15                = 2128,
 501  CG_C                     = 2178,
 502  CG_TEX0                  = 2179,
 503  CG_TEX1                  = 2180,
 504  CG_TEX2                  = 2181,
 505  CG_TEX3                  = 2192,
 506  CG_TEX4                  = 2193,
 507  CG_TEX5                  = 2194,
 508  CG_TEX6                  = 2195,
 509  CG_TEX7                  = 2196,
 510  CG_HPOS                  = 2243,
 511  CG_COL0                  = 2245,
 512  CG_COL1                  = 2246,
 513  CG_COL2                  = 2247,
 514  CG_COL3                  = 2248,
 515  CG_PSIZ                  = 2309,
 516  CG_CLP0                  = 2310,
 517  CG_CLP1                  = 2311,
 518  CG_CLP2                  = 2312,
 519  CG_CLP3                  = 2313,
 520  CG_CLP4                  = 2314,
 521  CG_CLP5                  = 2315,
 522  CG_WPOS                  = 2373,
 523  CG_POINTCOORD            = 2374,
 524  CG_POSITION0             = 2437,
 525  CG_POSITION1             = 2438,
 526  CG_POSITION2             = 2439,
 527  CG_POSITION3             = 2440,
 528  CG_POSITION4             = 2441,
 529  CG_POSITION5             = 2442,
 530  CG_POSITION6             = 2443,
 531  CG_POSITION7             = 2444,
 532  CG_POSITION8             = 2445,
 533  CG_POSITION9             = 2446,
 534  CG_POSITION10            = 2447,
 535  CG_POSITION11            = 2448,
 536  CG_POSITION12            = 2449,
 537  CG_POSITION13            = 2450,
 538  CG_POSITION14            = 2451,
 539  CG_POSITION15            = 2452,
 540  CG_DIFFUSE0              = 2501,
 541  CG_TANGENT0              = 2565,
 542  CG_TANGENT1              = 2566,
 543  CG_TANGENT2              = 2567,
 544  CG_TANGENT3              = 2568,
 545  CG_TANGENT4              = 2569,
 546  CG_TANGENT5              = 2570,
 547  CG_TANGENT6              = 2571,
 548  CG_TANGENT7              = 2572,
 549  CG_TANGENT8              = 2573,
 550  CG_TANGENT9              = 2574,
 551  CG_TANGENT10             = 2575,
 552  CG_TANGENT11             = 2576,
 553  CG_TANGENT12             = 2577,
 554  CG_TANGENT13             = 2578,
 555  CG_TANGENT14             = 2579,
 556  CG_TANGENT15             = 2580,
 557  CG_SPECULAR0             = 2629,
 558  CG_BLENDINDICES0         = 2693,
 559  CG_BLENDINDICES1         = 2694,
 560  CG_BLENDINDICES2         = 2695,
 561  CG_BLENDINDICES3         = 2696,
 562  CG_BLENDINDICES4         = 2697,
 563  CG_BLENDINDICES5         = 2698,
 564  CG_BLENDINDICES6         = 2699,
 565  CG_BLENDINDICES7         = 2700,
 566  CG_BLENDINDICES8         = 2701,
 567  CG_BLENDINDICES9         = 2702,
 568  CG_BLENDINDICES10        = 2703,
 569  CG_BLENDINDICES11        = 2704,
 570  CG_BLENDINDICES12        = 2705,
 571  CG_BLENDINDICES13        = 2706,
 572  CG_BLENDINDICES14        = 2707,
 573  CG_BLENDINDICES15        = 2708,
 574  CG_COLOR0                = 2757,
 575  CG_COLOR1                = 2758,
 576  CG_COLOR2                = 2759,
 577  CG_COLOR3                = 2760,
 578  CG_COLOR4                = 2761,
 579  CG_COLOR5                = 2762,
 580  CG_COLOR6                = 2763,
 581  CG_COLOR7                = 2764,
 582  CG_COLOR8                = 2765,
 583  CG_COLOR9                = 2766,
 584  CG_COLOR10               = 2767,
 585  CG_COLOR11               = 2768,
 586  CG_COLOR12               = 2769,
 587  CG_COLOR13               = 2770,
 588  CG_COLOR14               = 2771,
 589  CG_COLOR15               = 2772,
 590  CG_PSIZE0                = 2821,
 591  CG_PSIZE1                = 2822,
 592  CG_PSIZE2                = 2823,
 593  CG_PSIZE3                = 2824,
 594  CG_PSIZE4                = 2825,
 595  CG_PSIZE5                = 2826,
 596  CG_PSIZE6                = 2827,
 597  CG_PSIZE7                = 2828,
 598  CG_PSIZE8                = 2829,
 599  CG_PSIZE9                = 2830,
 600  CG_PSIZE10               = 2831,
 601  CG_PSIZE11               = 2832,
 602  CG_PSIZE12               = 2833,
 603  CG_PSIZE13               = 2834,
 604  CG_PSIZE14               = 2835,
 605  CG_PSIZE15               = 2836,
 606  CG_BINORMAL0             = 2885,
 607  CG_BINORMAL1             = 2886,
 608  CG_BINORMAL2             = 2887,
 609  CG_BINORMAL3             = 2888,
 610  CG_BINORMAL4             = 2889,
 611  CG_BINORMAL5             = 2890,
 612  CG_BINORMAL6             = 2891,
 613  CG_BINORMAL7             = 2892,
 614  CG_BINORMAL8             = 2893,
 615  CG_BINORMAL9             = 2894,
 616  CG_BINORMAL10            = 2895,
 617  CG_BINORMAL11            = 2896,
 618  CG_BINORMAL12            = 2897,
 619  CG_BINORMAL13            = 2898,
 620  CG_BINORMAL14            = 2899,
 621  CG_BINORMAL15            = 2900,
 622  CG_FOG0                  = 2917,
 623  CG_FOG1                  = 2918,
 624  CG_FOG2                  = 2919,
 625  CG_FOG3                  = 2920,
 626  CG_FOG4                  = 2921,
 627  CG_FOG5                  = 2922,
 628  CG_FOG6                  = 2923,
 629  CG_FOG7                  = 2924,
 630  CG_FOG8                  = 2925,
 631  CG_FOG9                  = 2926,
 632  CG_FOG10                 = 2927,
 633  CG_FOG11                 = 2928,
 634  CG_FOG12                 = 2929,
 635  CG_FOG13                 = 2930,
 636  CG_FOG14                 = 2931,
 637  CG_FOG15                 = 2932,
 638  CG_DEPTH0                = 2933,
 639  CG_DEPTH1                = 2934,
 640  CG_DEPTH2                = 2935,
 641  CG_DEPTH3                = 2936,
 642  CG_DEPTH4                = 2937,
 643  CG_DEPTH5                = 2938,
 644  CG_DEPTH6                = 2939,
 645  CG_DEPTH7                = 2940,
 646  CG_DEPTH8                = 2941,
 647  CG_DEPTH9                = 2942,
 648  CG_DEPTH10               = 2943,
 649  CG_DEPTH11               = 2944,
 650  CG_DEPTH12               = 2945,
 651  CG_DEPTH13               = 2946,
 652  CG_DEPTH14               = 2947,
 653  CG_DEPTH15               = 2948,
 654  CG_SAMPLE0               = 2949,
 655  CG_SAMPLE1               = 2950,
 656  CG_SAMPLE2               = 2951,
 657  CG_SAMPLE3               = 2952,
 658  CG_SAMPLE4               = 2953,
 659  CG_SAMPLE5               = 2954,
 660  CG_SAMPLE6               = 2955,
 661  CG_SAMPLE7               = 2956,
 662  CG_SAMPLE8               = 2957,
 663  CG_SAMPLE9               = 2958,
 664  CG_SAMPLE10              = 2959,
 665  CG_SAMPLE11              = 2960,
 666  CG_SAMPLE12              = 2961,
 667  CG_SAMPLE13              = 2962,
 668  CG_SAMPLE14              = 2963,
 669  CG_SAMPLE15              = 2964,
 670  CG_BLENDWEIGHT0          = 3028,
 671  CG_BLENDWEIGHT1          = 3029,
 672  CG_BLENDWEIGHT2          = 3030,
 673  CG_BLENDWEIGHT3          = 3031,
 674  CG_BLENDWEIGHT4          = 3032,
 675  CG_BLENDWEIGHT5          = 3033,
 676  CG_BLENDWEIGHT6          = 3034,
 677  CG_BLENDWEIGHT7          = 3035,
 678  CG_BLENDWEIGHT8          = 3036,
 679  CG_BLENDWEIGHT9          = 3037,
 680  CG_BLENDWEIGHT10         = 3038,
 681  CG_BLENDWEIGHT11         = 3039,
 682  CG_BLENDWEIGHT12         = 3040,
 683  CG_BLENDWEIGHT13         = 3041,
 684  CG_BLENDWEIGHT14         = 3042,
 685  CG_BLENDWEIGHT15         = 3043,
 686  CG_NORMAL0               = 3092,
 687  CG_NORMAL1               = 3093,
 688  CG_NORMAL2               = 3094,
 689  CG_NORMAL3               = 3095,
 690  CG_NORMAL4               = 3096,
 691  CG_NORMAL5               = 3097,
 692  CG_NORMAL6               = 3098,
 693  CG_NORMAL7               = 3099,
 694  CG_NORMAL8               = 3100,
 695  CG_NORMAL9               = 3101,
 696  CG_NORMAL10              = 3102,
 697  CG_NORMAL11              = 3103,
 698  CG_NORMAL12              = 3104,
 699  CG_NORMAL13              = 3105,
 700  CG_NORMAL14              = 3106,
 701  CG_NORMAL15              = 3107,
 702  CG_FOGCOORD              = 3156,
 703  CG_TEXCOORD0             = 3220,
 704  CG_TEXCOORD1             = 3221,
 705  CG_TEXCOORD2             = 3222,
 706  CG_TEXCOORD3             = 3223,
 707  CG_TEXCOORD4             = 3224,
 708  CG_TEXCOORD5             = 3225,
 709  CG_TEXCOORD6             = 3226,
 710  CG_TEXCOORD7             = 3227,
 711  CG_TEXCOORD8             = 3228,
 712  CG_TEXCOORD9             = 3229,
 713  CG_TEXCOORD10            = 3230,
 714  CG_TEXCOORD11            = 3231,
 715  CG_TEXCOORD12            = 3232,
 716  CG_TEXCOORD13            = 3233,
 717  CG_TEXCOORD14            = 3234,
 718  CG_TEXCOORD15            = 3235,
 719  CG_COMBINER_CONST0       = 3284,
 720  CG_COMBINER_CONST1       = 3285,
 721  CG_COMBINER_STAGE_CONST0 = 3286,
 722  CG_COMBINER_STAGE_CONST1 = 3287,
 723  CG_OFFSET_TEXTURE_MATRIX = 3288,
 724  CG_OFFSET_TEXTURE_SCALE  = 3289,
 725  CG_OFFSET_TEXTURE_BIAS   = 3290,
 726  CG_CONST_EYE             = 3291,
 727  CG_COVERAGE              = 3292,
 728  CG_TESSFACTOR            = 3255,
 729  CG_GLSL_UNIFORM          = 3300,
 730  CG_GLSL_ATTRIB           = 3301,
 731  CG_ENV                   = 3302,
 732  CG_HLSL_UNIFORM          = 3559,
 733  CG_HLSL_VARYING          = 3560,
 734  CG_SAMPLER_RES           = 3561,
 735  CG_LASTCOL0              = 4400,
 736  CG_LASTCOL1              = 4401,
 737  CG_LASTCOL2              = 4402,
 738  CG_LASTCOL3              = 4403,
 739  CG_LASTCOL4              = 4404,
 740  CG_LASTCOL5              = 4405,
 741  CG_LASTCOL6              = 4406,
 742  CG_LASTCOL7              = 4407,
 743  CG_FACE                  = 4410,
 744  CG_PRIMITIVEID           = 4411,
 745  CG_INSTANCEID            = 4412,
 746  CG_SAMPLEID              = 4413,
 747  CG_VERTEXID              = 4414,
 748  CG_LAYER                 = 4415,
 749  CG_SAMPLEMASK            = 4416,
 750  CG_CONTROLPOINTID        = 4417,
 751  CG_EDGETESS              = 4418,
 752  CG_INNERTESS             = 4419,
 753  CG_SAMPLEPOS             = 4420,
 754  CG_NUMSAMPLES            = 4421,
 755  CG_UNDEFINED             = 3256
 756} CGresource;
 757
 758typedef enum
 759{
 760  CG_PROFILE_UNKNOWN = 6145,
 761  CG_PROFILE_VP20    = 6146,
 762  CG_PROFILE_FP20    = 6147,
 763  CG_PROFILE_VP30    = 6148,
 764  CG_PROFILE_FP30    = 6149,
 765  CG_PROFILE_ARBVP1  = 6150,
 766  CG_PROFILE_FP40    = 6151,
 767  CG_PROFILE_ARBFP1  = 7000,
 768  CG_PROFILE_VP40    = 7001,
 769  CG_PROFILE_GLSLV   = 7007, /* GLSL vertex shader                                       */
 770  CG_PROFILE_GLSLF   = 7008, /* GLSL fragment shader                                     */
 771  CG_PROFILE_GLSLG   = 7016, /* GLSL geometry shader                                     */
 772  CG_PROFILE_GLSLC   = 7009, /* Combined GLSL program                                    */
 773  CG_PROFILE_GPU_FP  = 7010, /* Deprecated alias for CG_PROFILE_GP4FP                    */
 774  CG_PROFILE_GPU_VP  = 7011, /* Deprecated alias for CG_PROFILE_GP4VP                    */
 775  CG_PROFILE_GPU_GP  = 7012, /* Deprecated alias for CG_PROFILE_GP4GP                    */
 776  CG_PROFILE_GP4FP   = 7010, /* NV_gpu_program4 fragment program                         */
 777  CG_PROFILE_GP4VP   = 7011, /* NV_gpu_program4 vertex program                           */
 778  CG_PROFILE_GP4GP   = 7012, /* NV_gpu_program4 geometry program                         */
 779  CG_PROFILE_GP5FP   = 7017, /* NV_gpu_program5 fragment program                         */
 780  CG_PROFILE_GP5VP   = 7018, /* NV_gpu_program5 vertex program                           */
 781  CG_PROFILE_GP5GP   = 7019, /* NV_gpu_program5 geometry program                         */
 782  CG_PROFILE_GP5TCP  = 7020, /* NV_tessellation_program5 tessellation control program    */
 783  CG_PROFILE_GP5TEP  = 7021, /* NV_tessellation_program5 tessellation evaluation program */
 784  CG_PROFILE_VS_1_1  = 6153,
 785  CG_PROFILE_VS_2_0  = 6154,
 786  CG_PROFILE_VS_2_X  = 6155,
 787  CG_PROFILE_VS_2_SW = 6156,
 788  CG_PROFILE_PS_1_1  = 6159,
 789  CG_PROFILE_PS_1_2  = 6160,
 790  CG_PROFILE_PS_1_3  = 6161,
 791  CG_PROFILE_PS_2_0  = 6162,
 792  CG_PROFILE_PS_2_X  = 6163,
 793  CG_PROFILE_PS_2_SW = 6164,
 794  CG_PROFILE_VS_3_0  = 6157, /* DX9 vertex shader                                        */
 795  CG_PROFILE_PS_3_0  = 6165, /* DX9 pixel shader                                         */
 796  CG_PROFILE_HLSLV   = 6158, /* DX9 HLSL vertex shader                                   */
 797  CG_PROFILE_HLSLF   = 6166, /* DX9 HLSL fragment shader                                 */
 798  CG_PROFILE_VS_4_0  = 6167, /* DX10 vertex shader                                       */
 799  CG_PROFILE_PS_4_0  = 6168, /* DX10 pixel shader                                        */
 800  CG_PROFILE_GS_4_0  = 6169, /* DX10 geometry shader                                     */
 801  CG_PROFILE_VS_5_0  = 6170, /* DX11 vertex shader                                       */
 802  CG_PROFILE_PS_5_0  = 6171, /* DX11 pixel shader                                        */
 803  CG_PROFILE_GS_5_0  = 6172, /* DX11 geometry shader                                     */
 804  CG_PROFILE_HS_5_0  = 6173, /* DX11 hull shader (tessellation control)                  */
 805  CG_PROFILE_DS_5_0  = 6174, /* DX11 domain shader (tessellation evaluation)             */
 806  CG_PROFILE_GENERIC = 7002
 807} CGprofile;
 808
 809typedef enum
 810{
 811  CG_NO_ERROR                               = 0,
 812  CG_COMPILER_ERROR                         = 1,
 813  CG_INVALID_PARAMETER_ERROR                = 2,
 814  CG_INVALID_PROFILE_ERROR                  = 3,
 815  CG_PROGRAM_LOAD_ERROR                     = 4,
 816  CG_PROGRAM_BIND_ERROR                     = 5,
 817  CG_PROGRAM_NOT_LOADED_ERROR               = 6,
 818  CG_UNSUPPORTED_GL_EXTENSION_ERROR         = 7,
 819  CG_INVALID_VALUE_TYPE_ERROR               = 8,
 820  CG_NOT_MATRIX_PARAM_ERROR                 = 9,
 821  CG_INVALID_ENUMERANT_ERROR                = 10,
 822  CG_NOT_4x4_MATRIX_ERROR                   = 11,
 823  CG_FILE_READ_ERROR                        = 12,
 824  CG_FILE_WRITE_ERROR                       = 13,
 825  CG_NVPARSE_ERROR                          = 14,
 826  CG_MEMORY_ALLOC_ERROR                     = 15,
 827  CG_INVALID_CONTEXT_HANDLE_ERROR           = 16,
 828  CG_INVALID_PROGRAM_HANDLE_ERROR           = 17,
 829  CG_INVALID_PARAM_HANDLE_ERROR             = 18,
 830  CG_UNKNOWN_PROFILE_ERROR                  = 19,
 831  CG_VAR_ARG_ERROR                          = 20,
 832  CG_INVALID_DIMENSION_ERROR                = 21,
 833  CG_ARRAY_PARAM_ERROR                      = 22,
 834  CG_OUT_OF_ARRAY_BOUNDS_ERROR              = 23,
 835  CG_CONFLICTING_TYPES_ERROR                = 24,
 836  CG_CONFLICTING_PARAMETER_TYPES_ERROR      = 25,
 837  CG_PARAMETER_IS_NOT_SHARED_ERROR          = 26,
 838  CG_INVALID_PARAMETER_VARIABILITY_ERROR    = 27,
 839  CG_CANNOT_DESTROY_PARAMETER_ERROR         = 28,
 840  CG_NOT_ROOT_PARAMETER_ERROR               = 29,
 841  CG_PARAMETERS_DO_NOT_MATCH_ERROR          = 30,
 842  CG_IS_NOT_PROGRAM_PARAMETER_ERROR         = 31,
 843  CG_INVALID_PARAMETER_TYPE_ERROR           = 32,
 844  CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR = 33,
 845  CG_INVALID_SIZE_ERROR                     = 34,
 846  CG_BIND_CREATES_CYCLE_ERROR               = 35,
 847  CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR         = 36,
 848  CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR    = 37,
 849  CG_ARRAY_HAS_WRONG_DIMENSION_ERROR        = 38,
 850  CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR   = 39,
 851  CG_INVALID_EFFECT_HANDLE_ERROR            = 40,
 852  CG_INVALID_STATE_HANDLE_ERROR             = 41,
 853  CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR  = 42,
 854  CG_INVALID_PASS_HANDLE_ERROR              = 43,
 855  CG_INVALID_ANNOTATION_HANDLE_ERROR        = 44,
 856  CG_INVALID_TECHNIQUE_HANDLE_ERROR         = 45,
 857  CG_INVALID_PARAMETER_HANDLE_ERROR         = 46,
 858  CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR   = 47,
 859  CG_INVALID_FUNCTION_HANDLE_ERROR          = 48,
 860  CG_INVALID_TECHNIQUE_ERROR                = 49,
 861  CG_INVALID_POINTER_ERROR                  = 50,
 862  CG_NOT_ENOUGH_DATA_ERROR                  = 51,
 863  CG_NON_NUMERIC_PARAMETER_ERROR            = 52,
 864  CG_ARRAY_SIZE_MISMATCH_ERROR              = 53,
 865  CG_CANNOT_SET_NON_UNIFORM_PARAMETER_ERROR = 54,
 866  CG_DUPLICATE_NAME_ERROR                   = 55,
 867  CG_INVALID_OBJ_HANDLE_ERROR               = 56,
 868  CG_INVALID_BUFFER_HANDLE_ERROR            = 57,
 869  CG_BUFFER_INDEX_OUT_OF_RANGE_ERROR        = 58,
 870  CG_BUFFER_ALREADY_MAPPED_ERROR            = 59,
 871  CG_BUFFER_UPDATE_NOT_ALLOWED_ERROR        = 60,
 872  CG_GLSLG_UNCOMBINED_LOAD_ERROR            = 61
 873} CGerror;
 874
 875typedef enum
 876{
 877  CG_UNKNOWN                            = 4096,
 878  CG_IN                                 = 4097,
 879  CG_OUT                                = 4098,
 880  CG_INOUT                              = 4099,
 881  CG_MIXED                              = 4100,
 882  CG_VARYING                            = 4101,
 883  CG_UNIFORM                            = 4102,
 884  CG_CONSTANT                           = 4103,
 885  CG_PROGRAM_SOURCE                     = 4104, /* cgGetProgramString                       */
 886  CG_PROGRAM_ENTRY                      = 4105, /* cgGetProgramString                       */
 887  CG_COMPILED_PROGRAM                   = 4106, /* cgGetProgramString                       */
 888  CG_PROGRAM_PROFILE                    = 4107, /* cgGetProgramString                       */
 889  CG_GLOBAL                             = 4108,
 890  CG_PROGRAM                            = 4109,
 891  CG_DEFAULT                            = 4110,
 892  CG_ERROR                              = 4111,
 893  CG_SOURCE                             = 4112,
 894  CG_OBJECT                             = 4113,
 895  CG_COMPILE_MANUAL                     = 4114,
 896  CG_COMPILE_IMMEDIATE                  = 4115,
 897  CG_COMPILE_LAZY                       = 4116,
 898  CG_CURRENT                            = 4117,
 899  CG_LITERAL                            = 4118,
 900  CG_VERSION                            = 4119, /* cgGetString                              */
 901  CG_ROW_MAJOR                          = 4120,
 902  CG_COLUMN_MAJOR                       = 4121,
 903  CG_FRAGMENT                           = 4122, /* cgGetProgramInput and cgGetProgramOutput */
 904  CG_VERTEX                             = 4123, /* cgGetProgramInput and cgGetProgramOutput */
 905  CG_POINT                              = 4124, /* Geometry program cgGetProgramInput       */
 906  CG_LINE                               = 4125, /* Geometry program cgGetProgramInput       */
 907  CG_LINE_ADJ                           = 4126, /* Geometry program cgGetProgramInput       */
 908  CG_TRIANGLE                           = 4127, /* Geometry program cgGetProgramInput       */
 909  CG_TRIANGLE_ADJ                       = 4128, /* Geometry program cgGetProgramInput       */
 910  CG_POINT_OUT                          = 4129, /* Geometry program cgGetProgramOutput      */
 911  CG_LINE_OUT                           = 4130, /* Geometry program cgGetProgramOutput      */
 912  CG_TRIANGLE_OUT                       = 4131, /* Geometry program cgGetProgramOutput      */
 913  CG_IMMEDIATE_PARAMETER_SETTING        = 4132,
 914  CG_DEFERRED_PARAMETER_SETTING         = 4133,
 915  CG_NO_LOCKS_POLICY                    = 4134,
 916  CG_THREAD_SAFE_POLICY                 = 4135,
 917  CG_FORCE_UPPER_CASE_POLICY            = 4136,
 918  CG_UNCHANGED_CASE_POLICY              = 4137,
 919  CG_IS_OPENGL_PROFILE                  = 4138,
 920  CG_IS_DIRECT3D_PROFILE                = 4139,
 921  CG_IS_DIRECT3D_8_PROFILE              = 4140,
 922  CG_IS_DIRECT3D_9_PROFILE              = 4141,
 923  CG_IS_DIRECT3D_10_PROFILE             = 4142,
 924  CG_IS_VERTEX_PROFILE                  = 4143,
 925  CG_IS_FRAGMENT_PROFILE                = 4144,
 926  CG_IS_GEOMETRY_PROFILE                = 4145,
 927  CG_IS_TRANSLATION_PROFILE             = 4146,
 928  CG_IS_HLSL_PROFILE                    = 4147,
 929  CG_IS_GLSL_PROFILE                    = 4148,
 930  CG_IS_TESSELLATION_CONTROL_PROFILE    = 4149,
 931  CG_IS_TESSELLATION_EVALUATION_PROFILE = 4150,
 932  CG_PATCH                              = 4152, /* cgGetProgramInput and cgGetProgramOutput */
 933  CG_IS_DIRECT3D_11_PROFILE             = 4153
 934} CGenum;
 935
 936typedef enum
 937{
 938  CG_PARAMETERCLASS_UNKNOWN = 0,
 939  CG_PARAMETERCLASS_SCALAR  = 1,
 940  CG_PARAMETERCLASS_VECTOR  = 2,
 941  CG_PARAMETERCLASS_MATRIX  = 3,
 942  CG_PARAMETERCLASS_STRUCT  = 4,
 943  CG_PARAMETERCLASS_ARRAY   = 5,
 944  CG_PARAMETERCLASS_SAMPLER = 6,
 945  CG_PARAMETERCLASS_OBJECT  = 7,
 946  CG_PARAMETERCLASS_BUFFER  = 8
 947} CGparameterclass;
 948
 949typedef enum
 950{
 951  CG_UNKNOWN_DOMAIN                 = 0,
 952  CG_FIRST_DOMAIN                   = 1,
 953  CG_VERTEX_DOMAIN                  = 1,
 954  CG_FRAGMENT_DOMAIN                = 2,
 955  CG_GEOMETRY_DOMAIN                = 3,
 956  CG_TESSELLATION_CONTROL_DOMAIN    = 4,
 957  CG_TESSELLATION_EVALUATION_DOMAIN = 5
 958} CGdomain;
 959
 960typedef enum
 961{
 962  CG_MAP_READ               = 0,
 963  CG_MAP_WRITE              = 1,
 964  CG_MAP_READ_WRITE         = 2,
 965  CG_MAP_WRITE_DISCARD      = 3,
 966  CG_MAP_WRITE_NO_OVERWRITE = 4
 967} CGbufferaccess;
 968
 969typedef enum
 970{
 971  CG_BUFFER_USAGE_STREAM_DRAW  = 0,
 972  CG_BUFFER_USAGE_STREAM_READ  = 1,
 973  CG_BUFFER_USAGE_STREAM_COPY  = 2,
 974  CG_BUFFER_USAGE_STATIC_DRAW  = 3,
 975  CG_BUFFER_USAGE_STATIC_READ  = 4,
 976  CG_BUFFER_USAGE_STATIC_COPY  = 5,
 977  CG_BUFFER_USAGE_DYNAMIC_DRAW = 6,
 978  CG_BUFFER_USAGE_DYNAMIC_READ = 7,
 979  CG_BUFFER_USAGE_DYNAMIC_COPY = 8
 980} CGbufferusage;
 981
 982#ifdef __cplusplus
 983extern "C"
 984{
 985#endif
 986
 987typedef CGbool (CGENTRY * CGstatecallback)(CGstateassignment);
 988typedef void (CGENTRY * CGerrorCallbackFunc)(void);
 989typedef void (CGENTRY * CGerrorHandlerFunc)(CGcontext, CGerror, void *);
 990typedef void (CGENTRY * CGIncludeCallbackFunc)(CGcontext, const char *);
 991
 992/*************************************************************************/
 993/*** Functions                                                         ***/
 994/*************************************************************************/
 995
 996#ifndef CG_EXPLICIT
 997
 998CG_API CGenum CGENTRY cgSetLockingPolicy(CGenum lockingPolicy);
 999CG_API CGenum CGENTRY cgGetLockingPolicy(void);
1000CG_API CGenum CGENTRY cgSetSemanticCasePolicy(CGenum casePolicy);
1001CG_API CGenum CGENTRY cgGetSemanticCasePolicy(void);
1002CG_API CGcontext CGENTRY cgCreateContext(void);
1003CG_API void CGENTRY cgSetContextBehavior(CGcontext context, CGbehavior behavior);
1004CG_API CGbehavior CGENTRY cgGetContextBehavior(CGcontext context);
1005CG_API const char * CGENTRY cgGetBehaviorString(CGbehavior behavior);
1006CG_API CGbehavior CGENTRY cgGetBehavior(const char *behavior_string);
1007CG_API void CGENTRY cgDestroyContext(CGcontext context);
1008CG_API CGbool CGENTRY cgIsContext(CGcontext context);
1009CG_API const char * CGENTRY cgGetLastListing(CGcontext context);
1010CG_API void CGENTRY cgSetLastListing(CGhandle handle, const char *listing);
1011CG_API void CGENTRY cgSetAutoCompile(CGcontext context, CGenum autoCompileMode);
1012CG_API CGenum CGENTRY cgGetAutoCompile(CGcontext context);
1013CG_API void CGENTRY cgSetParameterSettingMode(CGcontext context, CGenum parameterSettingMode);
1014CG_API CGenum CGENTRY cgGetParameterSettingMode(CGcontext context);
1015CG_API void CGENTRY cgSetCompilerIncludeString(CGcontext context, const char *name, const char *source);
1016CG_API void CGENTRY cgSetCompilerIncludeFile(CGcontext context, const char *name, const char *filename);
1017CG_API void CGENTRY cgSetCompilerIncludeCallback(CGcontext context, CGIncludeCallbackFunc func);
1018CG_API CGIncludeCallbackFunc CGENTRY cgGetCompilerIncludeCallback(CGcontext context);
1019CG_API CGprogram CGENTRY cgCreateProgram(CGcontext context, CGenum program_type, const char *program, CGprofile profile, const char *entry, const char **args);
1020CG_API CGprogram CGENTRY cgCreateProgramFromFile(CGcontext context, CGenum program_type, const char *program_file, CGprofile profile, const char *entry, const char **args);
1021CG_API CGprogram CGENTRY cgCopyProgram(CGprogram program);
1022CG_API void CGENTRY cgDestroyProgram(CGprogram program);
1023CG_API CGprogram CGENTRY cgGetFirstProgram(CGcontext context);
1024CG_API CGprogram CGENTRY cgGetNextProgram(CGprogram current);
1025CG_API CGcontext CGENTRY cgGetProgramContext(CGprogram program);
1026CG_API CGbool CGENTRY cgIsProgram(CGprogram program);
1027CG_API void CGENTRY cgCompileProgram(CGprogram program);
1028CG_API CGbool CGENTRY cgIsProgramCompiled(CGprogram program);
1029CG_API const char * CGENTRY cgGetProgramString(CGprogram program, CGenum pname);
1030CG_API CGprofile CGENTRY cgGetProgramProfile(CGprogram program);
1031CG_API char const * const * CGENTRY cgGetProgramOptions(CGprogram program);
1032CG_API void CGENTRY cgSetProgramProfile(CGprogram program, CGprofile profile);
1033CG_API CGenum CGENTRY cgGetProgramInput(CGprogram program);
1034CG_API CGenum CGENTRY cgGetProgramOutput(CGprogram program);
1035CG_API int CGENTRY cgGetProgramOutputVertices(CGprogram program);
1036CG_API void CGENTRY cgSetProgramOutputVertices(CGprogram program, int vertices);
1037CG_API void CGENTRY cgSetPassProgramParameters(CGprogram program);
1038CG_API void CGENTRY cgUpdateProgramParameters(CGprogram program);
1039CG_API void CGENTRY cgUpdatePassParameters(CGpass pass);
1040CG_API CGparameter CGENTRY cgCreateParameter(CGcontext context, CGtype type);
1041CG_API CGparameter CGENTRY cgCreateParameterArray(CGcontext context, CGtype type, int length);
1042CG_API CGparameter CGENTRY cgCreateParameterMultiDimArray(CGcontext context, CGtype type, int dim, const int *lengths);
1043CG_API void CGENTRY cgDestroyParameter(CGparameter param);
1044CG_API void CGENTRY cgConnectParameter(CGparameter from, CGparameter to);
1045CG_API void CGENTRY cgDisconnectParameter(CGparameter param);
1046CG_API CGparameter CGENTRY cgGetConnectedParameter(CGparameter param);
1047CG_API int CGENTRY cgGetNumConnectedToParameters(CGparameter param);
1048CG_API CGparameter CGENTRY cgGetConnectedToParameter(CGparameter param, int index);
1049CG_API CGparameter CGENTRY cgGetNamedParameter(CGprogram program, const char *name);
1050CG_API CGparameter CGENTRY cgGetNamedProgramParameter(CGprogram program, CGenum name_space, const char *name);
1051CG_API CGparameter CGENTRY cgGetNamedProgramUniformBuffer(CGprogram program, const char *blockName);
1052CG_API CGparameter CGENTRY cgGetNamedEffectUniformBuffer(CGeffect effect, const char *blockName);
1053CG_API const char * CGENTRY cgGetUniformBufferBlockName(CGparameter param);
1054CG_API CGparameter CGENTRY cgGetFirstParameter(CGprogram program, CGenum name_space);
1055CG_API CGparameter CGENTRY cgGetNextParameter(CGparameter current);
1056CG_API CGparameter CGENTRY cgGetFirstLeafParameter(CGprogram program, CGenum name_space);
1057CG_API CGparameter CGENTRY cgGetNextLeafParameter(CGparameter current);
1058CG_API CGparameter CGENTRY cgGetFirstStructParameter(CGparameter param);
1059CG_API CGparameter CGENTRY cgGetFirstUniformBufferParameter(CGparameter param);
1060CG_API CGparameter CGENTRY cgGetNamedStructParameter(CGparameter param, const char *name);
1061CG_API CGparameter CGENTRY cgGetNamedUniformBufferParameter(CGparameter param, const char *name);
1062CG_API CGparameter CGENTRY cgGetFirstDependentParameter(CGparameter param);
1063CG_API CGparameter CGENTRY cgGetArrayParameter(CGparameter aparam, int index);
1064CG_API int CGENTRY cgGetArrayDimension(CGparameter param);
1065CG_API CGtype CGENTRY cgGetArrayType(CGparameter param);
1066CG_API int CGENTRY cgGetArraySize(CGparameter param, int dimension);
1067CG_API int CGENTRY cgGetArrayTotalSize(CGparameter param);
1068CG_API void CGENTRY cgSetArraySize(CGparameter param, int size);
1069CG_API void CGENTRY cgSetMultiDimArraySize(CGparameter param, const int *sizes);
1070CG_API CGprogram CGENTRY cgGetParameterProgram(CGparameter param);
1071CG_API CGcontext CGENTRY cgGetParameterContext(CGparameter param);
1072CG_API CGbool CGENTRY cgIsParameter(CGparameter param);
1073CG_API const char * CGENTRY cgGetParameterName(CGparameter param);
1074CG_API CGtype CGENTRY cgGetParameterType(CGparameter param);
1075CG_API CGtype CGENTRY cgGetParameterBaseType(CGparameter param);
1076CG_API CGparameterclass CGENTRY cgGetParameterClass(CGparameter param);
1077CG_API int CGENTRY cgGetParameterRows(CGparameter param);
1078CG_API int CGENTRY cgGetParameterColumns(CGparameter param);
1079CG_API CGtype CGENTRY cgGetParameterNamedType(CGparameter param);
1080CG_API const char * CGENTRY cgGetParameterSemantic(CGparameter param);
1081CG_API CGresource CGENTRY cgGetParameterResource(CGparameter param);
1082CG_API CGresource CGENTRY cgGetParameterBaseResource(CGparameter param);
1083CG_API unsigned long CGENTRY cgGetParameterResourceIndex(CGparameter param);
1084CG_API CGenum CGENTRY cgGetParameterVariability(CGparameter param);
1085CG_API CGenum CGENTRY cgGetParameterDirection(CGparameter param);
1086CG_API CGbool CGENTRY cgIsParameterReferenced(CGparameter param);
1087CG_API CGbool CGENTRY cgIsParameterUsed(CGparameter param, CGhandle handle);
1088CG_API const double * CGENTRY cgGetParameterValues(CGparameter param, CGenum value_type, int *nvalues);
1089CG_API void CGENTRY cgSetParameterValuedr(CGparameter param, int nelements, const double *vals);
1090CG_API void CGENTRY cgSetParameterValuedc(CGparameter param, int nelements, const double *vals);
1091CG_API void CGENTRY cgSetParameterValuefr(CGparameter param, int nelements, const float *vals);
1092CG_API void CGENTRY cgSetParameterValuefc(CGparameter param, int nelements, const float *vals);
1093CG_API void CGENTRY cgSetParameterValueir(CGparameter param, int nelements, const int *vals);
1094CG_API void CGENTRY cgSetParameterValueic(CGparameter param, int nelements, const int *vals);
1095CG_API int CGENTRY cgGetParameterValuedr(CGparameter param, int nelements, double *vals);
1096CG_API int CGENTRY cgGetParameterValuedc(CGparameter param, int nelements, double *vals);
1097CG_API int CGENTRY cgGetParameterValuefr(CGparameter param, int nelements, float *vals);
1098CG_API int CGENTRY cgGetParameterValuefc(CGparameter param, int nelements, float *vals);
1099CG_API int CGENTRY cgGetParameterValueir(CGparameter param, int nelements, int *vals);
1100CG_API int CGENTRY cgGetParameterValueic(CGparameter param, int nelements, int *vals);
1101CG_API int CGENTRY cgGetParameterDefaultValuedr(CGparameter param, int nelements, double *vals);
1102CG_API int CGENTRY cgGetParameterDefaultValuedc(CGparameter param, int nelements, double *vals);
1103CG_API int CGENTRY cgGetParameterDefaultValuefr(CGparameter param, int nelements, float *vals);
1104CG_API int CGENTRY cgGetParameterDefaultValuefc(CGparameter param, int nelements, float *vals);
1105CG_API int CGENTRY cgGetParameterDefaultValueir(CGparameter param, int nelements, int *vals);
1106CG_API int CGENTRY cgGetParameterDefaultValueic(CGparameter param, int nelements, int *vals);
1107CG_API const char * CGENTRY cgGetStringParameterValue(CGparameter param);
1108CG_API void CGENTRY cgSetStringParameterValue(CGparameter param, const char *str);
1109CG_API int CGENTRY cgGetParameterOrdinalNumber(CGparameter param);
1110CG_API CGbool CGENTRY cgIsParameterGlobal(CGparameter param);
1111CG_API int CGENTRY cgGetParameterIndex(CGparameter param);
1112CG_API void CGENTRY cgSetParameterVariability(CGparameter param, CGenum vary);
1113CG_API void CGENTRY cgSetParameterSemantic(CGparameter param, const char *semantic);
1114CG_API void CGENTRY cgSetParameter1f(CGparameter param, float x);
1115CG_API void CGENTRY cgSetParameter2f(CGparameter param, float x, float y);
1116CG_API void CGENTRY cgSetParameter3f(CGparameter param, float x, float y, float z);
1117CG_API void CGENTRY cgSetParameter4f(CGparameter param, float x, float y, float z, float w);
1118CG_API void CGENTRY cgSetParameter1d(CGparameter param, double x);
1119CG_API void CGENTRY cgSetParameter2d(CGparameter param, double x, double y);
1120CG_API void CGENTRY cgSetParameter3d(CGparameter param, double x, double y, double z);
1121CG_API void CGENTRY cgSetParameter4d(CGparameter param, double x, double y, double z, double w);
1122CG_API void CGENTRY cgSetParameter1i(CGparameter param, int x);
1123CG_API void CGENTRY cgSetParameter2i(CGparameter param, int x, int y);
1124CG_API void CGENTRY cgSetParameter3i(CGparameter param, int x, int y, int z);
1125CG_API void CGENTRY cgSetParameter4i(CGparameter param, int x, int y, int z, int w);
1126CG_API void CGENTRY cgSetParameter1iv(CGparameter param, const int *v);
1127CG_API void CGENTRY cgSetParameter2iv(CGparameter param, const int *v);
1128CG_API void CGENTRY cgSetParameter3iv(CGparameter param, const int *v);
1129CG_API void CGENTRY cgSetParameter4iv(CGparameter param, const int *v);
1130CG_API void CGENTRY cgSetParameter1fv(CGparameter param, const float *v);
1131CG_API void CGENTRY cgSetParameter2fv(CGparameter param, const float *v);
1132CG_API void CGENTRY cgSetParameter3fv(CGparameter param, const float *v);
1133CG_API void CGENTRY cgSetParameter4fv(CGparameter param, const float *v);
1134CG_API void CGENTRY cgSetParameter1dv(CGparameter param, const double *v);
1135CG_API void CGENTRY cgSetParameter2dv(CGparameter param, const double *v);
1136CG_API void CGENTRY cgSetParameter3dv(CGparameter param, const double *v);
1137CG_API void CGENTRY cgSetParameter4dv(CGparameter param, const double *v);
1138CG_API void CGENTRY cgSetMatrixParameterir(CGparameter param, const int *matrix);
1139CG_API void CGENTRY cgSetMatrixParameterdr(CGparameter param, const double *matrix);
1140CG_API void CGENTRY cgSetMatrixParameterfr(CGparameter param, const float *matrix);
1141CG_API void CGENTRY cgSetMatrixParameteric(CGparameter param, const int *matrix);
1142CG_API void CGENTRY cgSetMatrixParameterdc(CGparameter param, const double *matrix);
1143CG_API void CGENTRY cgSetMatrixParameterfc(CGparameter param, const float *matrix);
1144CG_API void CGENTRY cgGetMatrixParameterir(CGparameter param, int *matrix);
1145CG_API void CGENTRY cgGetMatrixParameterdr(CGparameter param, double *matrix);
1146CG_API void CGENTRY cgGetMatrixParameterfr(CGparameter param, float *matrix);
1147CG_API void CGENTRY cgGetMatrixParameteric(CGparameter param, int *matrix);
1148CG_API void CGENTRY cgGetMatrixParameterdc(CGparameter param, double *matrix);
1149CG_API void CGENTRY cgGetMatrixParameterfc(CGparameter param, float *matrix);
1150CG_API CGenum CGENTRY cgGetMatrixParameterOrder(CGparameter param);
1151CG_API CGparameter CGENTRY cgGetNamedSubParameter(CGparameter param, const char *name);
1152CG_API const char * CGENTRY cgGetTypeString(CGtype type);
1153CG_API CGtype CGENTRY cgGetType(const char *type_string);
1154CG_API CGtype CGENTRY cgGetNamedUserType(CGhandle handle, const char *name);
1155CG_API int CGENTRY cgGetNumUserTypes(CGhandle handle);
1156CG_API CGtype CGENTRY cgGetUserType(CGhandle handle, int index);
1157CG_API int CGENTRY cgGetNumParentTypes(CGtype type);
1158CG_API CGtype CGENTRY cgGetParentType(CGtype type, int index);
1159CG_API CGbool CGENTRY cgIsParentType(CGtype parent, CGtype child);
1160CG_API CGbool CGENTRY cgIsInterfaceType(CGtype type);
1161CG_API const char * CGENTRY cgGetResourceString(CGresource resource);
1162CG_API CGresource CGENTRY cgGetResource(const char *resource_string);
1163CG_API const char * CGENTRY cgGetEnumString(CGenum en);
1164CG_API CGenum CGENTRY cgGetEnum(const char *enum_string);
1165CG_API const char * CGENTRY cgGetProfileString(CGprofile profile);
1166CG_API CGprofile CGENTRY cgGetProfile(const char *profile_string);
1167CG_API int CGENTRY cgGetNumSupportedProfiles(void);
1168CG_API CGprofile CGENTRY cgGetSupportedProfile(int index);
1169CG_API CGbool CGENTRY cgIsProfileSupported(CGprofile profile);
1170CG_API CGbool CGENTRY cgGetProfileProperty(CGprofile profile

Large files files are truncated, but you can click here to view the full file