1 /* 2 * This is a modified version of the original header as provided by 3 * NVidia; original copyright appears below. 4 * 5 * Modified by Christopher Kline, May 2003: Stripped down and hacked to get 6 * around macro interpretation problems. 7 */ 8 9 /* 10 * 11 * Copyright (c) 2002-2004, NVIDIA Corporation. 12 * 13 * 14 * 15 * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration 16 * of your agreement to the following terms, and your use, installation, 17 * modification or redistribution of this NVIDIA software constitutes 18 * acceptance of these terms. If you do not agree with these terms, please do 19 * not use, install, modify or redistribute this NVIDIA software. 20 * 21 * 22 * 23 * In consideration of your agreement to abide by the following terms, and 24 * subject to these terms, NVIDIA grants you a personal, non-exclusive license, 25 * under NVIDIA�s copyrights in this original NVIDIA software (the "NVIDIA 26 * Software"), to use, reproduce, modify and redistribute the NVIDIA 27 * Software, with or without modifications, in source and/or binary forms; 28 * provided that if you redistribute the NVIDIA Software, you must retain the 29 * copyright notice of NVIDIA, this notice and the following text and 30 * disclaimers in all such redistributions of the NVIDIA Software. Neither the 31 * name, trademarks, service marks nor logos of NVIDIA Corporation may be used 32 * to endorse or promote products derived from the NVIDIA Software without 33 * specific prior written permission from NVIDIA. Except as expressly stated 34 * in this notice, no other rights or licenses express or implied, are granted 35 * by NVIDIA herein, including but not limited to any patent rights that may be 36 * infringed by your derivative works or by other works in which the NVIDIA 37 * Software may be incorporated. No hardware is licensed hereunder. 38 * 39 * 40 * 41 * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT 42 * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING 43 * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 44 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION 45 * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. 46 * 47 * 48 * 49 * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, 50 * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST 51 * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 52 * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, 53 * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, 54 * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING 55 * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED 56 * OF THE POSSIBILITY OF SUCH DAMAGE. 57 * 58 */ 59 60 61 #ifndef _cg_h 62 #define _cg_h 63 64 65 #define CG_VERSION_NUM 1400 66 67 // Set up for either Win32 import/export/lib. 68 #ifndef CGDLL_API 69 #ifdef WIN32 70 #ifdef CGDLL_EXPORTS 71 #define CGDLL_API /*__declspec(dllexport) */ 72 #elif defined (CG_LIB) 73 #define CGDLL_API 74 #else 75 #define CGDLL_API __declspec(dllimport) 76 #endif 77 #else 78 #define CGDLL_API 79 #endif 80 #endif 81 82 /*************************************************************************/ 83 /*** CG Run-Time Library API ***/ 84 /*************************************************************************/ 85 86 /*************************************************************************/ 87 /*** Data types and enumerants ***/ 88 /*************************************************************************/ 89 90 typedef int CGbool; 91 92 #define CG_FALSE ((CGbool)0) 93 #define CG_TRUE ((CGbool)1) 94 95 typedef struct _CGcontext *CGcontext; 96 typedef struct _CGprogram *CGprogram; 97 typedef struct _CGparameter *CGparameter; 98 typedef struct _CGeffect *CGeffect; 99 typedef struct _CGtechnique *CGtechnique; 100 typedef struct _CGpass *CGpass; 101 typedef struct _CGstate *CGstate; 102 typedef struct _CGstateassignment *CGstateassignment; 103 typedef struct _CGannotation *CGannotation; 104 typedef void *CGhandle; 105 106 typedef CGbool (*CGstatecallback)(CGstateassignment); 107 108 //!!! PREPROCESS BEGIN 109 110 typedef enum 111 { 112 CG_UNKNOWN_TYPE, 113 CG_STRUCT, 114 CG_ARRAY, 115 116 CG_TYPE_START_ENUM = 1024, 117 // # define CG_DATATYPE_MACRO(name, compiler_name, enum_name, base_name, ncols, nrows, pc) \ 118 // enum_name , 119 120 #include <CG/cg_datatypes.h> 121 122 } CGtype; 123 124 typedef enum 125 { 126 // # define CG_BINDLOCATION_MACRO(name,enum_name,compiler_name,\ 127 // enum_int,addressable,param_type) \ 128 // enum_name = enum_int, 129 130 #include <CG/cg_bindlocations.h> 131 132 CG_UNDEFINED, 133 134 } CGresource; 135 136 typedef enum 137 { 138 CG_PROFILE_START = 6144, 139 CG_PROFILE_UNKNOWN, 140 141 // # define CG_PROFILE_MACRO(name, compiler_id, compiler_id_caps, compiler_opt,int_id,vertex_profile) \ 142 // CG_PROFILE_##compiler_id_caps = int_id, 143 144 #include <CG/cg_profiles.h> 145 146 CG_PROFILE_MAX = 7100, 147 } CGprofile; 148 149 typedef enum 150 { 151 // # define CG_ERROR_MACRO(code, enum_name, message) \ 152 // enum_name = code, 153 # include <CG/cg_errors.h> 154 } CGerror; 155 156 typedef enum 157 { 158 CG_PARAMETERCLASS_UNKNOWN = 0, 159 CG_PARAMETERCLASS_SCALAR, 160 CG_PARAMETERCLASS_VECTOR, 161 CG_PARAMETERCLASS_MATRIX, 162 CG_PARAMETERCLASS_STRUCT, 163 CG_PARAMETERCLASS_ARRAY, 164 CG_PARAMETERCLASS_SAMPLER, 165 CG_PARAMETERCLASS_OBJECT 166 } CGparameterclass; 167 168 //!!! PREPROCESS END 169 170 typedef enum 171 { 172 // # define CG_ENUM_MACRO(enum_name, enum_val) \ 173 // enum_name = enum_val, 174 # include <CG/cg_enums.h> 175 } CGenum; 176 177 #include <stdarg.h> 178 179 #ifdef __cplusplus 180 extern "C" { 181 #endif 182 183 typedef void (*CGerrorCallbackFunc)(void); 184 typedef void (*CGerrorHandlerFunc)(CGcontext ctx, CGerror err, void *data); 185 186 /*************************************************************************/ 187 /*** Functions ***/ 188 /*************************************************************************/ 189 190 #ifndef CG_EXPLICIT 191 192 /*** Context functions ***/ 193 194 CGDLL_API CGcontext cgCreateContext(void); 195 CGDLL_API void cgDestroyContext(CGcontext ctx); 196 CGDLL_API CGbool cgIsContext(CGcontext ctx); 197 CGDLL_API const char *cgGetLastListing(CGcontext ctx); 198 CGDLL_API void cgSetLastListing(CGhandle handle, const char *listing); 199 CGDLL_API void cgSetAutoCompile(CGcontext ctx, CGenum flag); 200 CGDLL_API CGenum cgGetAutoCompile(CGcontext ctx); 201 202 /*** Program functions ***/ 203 CGDLL_API CGprogram cgCreateProgram(CGcontext ctx, 204 CGenum program_type, 205 const char *program, 206 CGprofile profile, 207 const char *entry, 208 const char **args); 209 CGDLL_API CGprogram cgCreateProgramFromFile(CGcontext ctx, 210 CGenum program_type, 211 const char *program_file, 212 CGprofile profile, 213 const char *entry, 214 const char **args); 215 CGDLL_API CGprogram cgCopyProgram(CGprogram program); 216 CGDLL_API void cgDestroyProgram(CGprogram program); 217 218 CGDLL_API CGprogram cgGetFirstProgram(CGcontext ctx); 219 CGDLL_API CGprogram cgGetNextProgram(CGprogram current); 220 CGDLL_API CGcontext cgGetProgramContext(CGprogram prog); 221 CGDLL_API CGbool cgIsProgram(CGprogram program); 222 223 CGDLL_API void cgCompileProgram(CGprogram program); 224 CGDLL_API CGbool cgIsProgramCompiled(CGprogram program); 225 CGDLL_API const char *cgGetProgramString(CGprogram prog, CGenum pname); 226 CGDLL_API CGprofile cgGetProgramProfile(CGprogram prog); 227 CGDLL_API char const * const *cgGetProgramOptions(CGprogram prog); 228 CGDLL_API void cgSetProgramProfile(CGprogram prog, CGprofile profile); 229 230 CGDLL_API void cgSetPassProgramParameters(CGprogram); 231 232 /*** Parameter functions ***/ 233 234 CGDLL_API CGparameter cgCreateParameter(CGcontext ctx, CGtype type); 235 CGDLL_API CGparameter cgCreateParameterArray(CGcontext ctx, 236 CGtype type, 237 int length); 238 CGDLL_API CGparameter cgCreateParameterMultiDimArray(CGcontext ctx, 239 CGtype type, 240 int dim, 241 const int *lengths); 242 CGDLL_API void cgDestroyParameter(CGparameter param); 243 CGDLL_API void cgConnectParameter(CGparameter from, CGparameter to); 244 CGDLL_API void cgDisconnectParameter(CGparameter param); 245 CGDLL_API CGparameter cgGetConnectedParameter(CGparameter param); 246 247 CGDLL_API int cgGetNumConnectedToParameters(CGparameter param); 248 CGDLL_API CGparameter cgGetConnectedToParameter(CGparameter param, int index); 249 250 CGDLL_API CGparameter cgGetNamedParameter(CGprogram prog, const char *name); 251 CGDLL_API CGparameter cgGetNamedProgramParameter(CGprogram prog, 252 CGenum name_space, 253 const char *name); 254 255 CGDLL_API CGparameter cgGetFirstParameter(CGprogram prog, CGenum name_space); 256 CGDLL_API CGparameter cgGetNextParameter(CGparameter current); 257 CGDLL_API CGparameter cgGetFirstLeafParameter(CGprogram prog, CGenum name_space); 258 CGDLL_API CGparameter cgGetNextLeafParameter(CGparameter current); 259 260 CGDLL_API CGparameter cgGetFirstStructParameter(CGparameter param); 261 CGDLL_API CGparameter cgGetNamedStructParameter(CGparameter param, 262 const char *name); 263 264 CGDLL_API CGparameter cgGetFirstDependentParameter(CGparameter param); 265 266 CGDLL_API CGparameter cgGetArrayParameter(CGparameter aparam, int index); 267 CGDLL_API int cgGetArrayDimension(CGparameter param); 268 CGDLL_API CGtype cgGetArrayType(CGparameter param); 269 CGDLL_API int cgGetArraySize(CGparameter param, int dimension); 270 CGDLL_API int cgGetArrayTotalSize(CGparameter param); 271 CGDLL_API void cgSetArraySize(CGparameter param, int size); 272 CGDLL_API void cgSetMultiDimArraySize(CGparameter param, const int *sizes); 273 274 CGDLL_API CGprogram cgGetParameterProgram(CGparameter param); 275 CGDLL_API CGcontext cgGetParameterContext(CGparameter param); 276 CGDLL_API CGbool cgIsParameter(CGparameter param); 277 CGDLL_API const char *cgGetParameterName(CGparameter param); 278 CGDLL_API CGtype cgGetParameterType(CGparameter param); 279 CGDLL_API CGtype cgGetParameterBaseType(CGparameter param); 280 CGDLL_API CGparameterclass cgGetParameterClass(CGparameter param); 281 CGDLL_API int cgGetParameterRows(CGparameter param); 282 CGDLL_API int cgGetParameterColumns(CGparameter param); 283 CGDLL_API CGtype cgGetParameterNamedType(CGparameter param); 284 CGDLL_API const char *cgGetParameterSemantic(CGparameter param); 285 CGDLL_API CGresource cgGetParameterResource(CGparameter param); 286 CGDLL_API CGresource cgGetParameterBaseResource(CGparameter param); 287 CGDLL_API unsigned long cgGetParameterResourceIndex(CGparameter param); 288 CGDLL_API CGenum cgGetParameterVariability(CGparameter param); 289 CGDLL_API CGenum cgGetParameterDirection(CGparameter param); 290 CGDLL_API CGbool cgIsParameterReferenced(CGparameter param); 291 CGDLL_API CGbool cgIsParameterUsed(CGparameter param, CGhandle handle); 292 CGDLL_API const double *cgGetParameterValues(CGparameter param, 293 CGenum value_type, 294 int *nvalues); 295 CGDLL_API void cgSetParameterValuedr(CGparameter param, int n, const double *vals); 296 CGDLL_API void cgSetParameterValuedc(CGparameter param, int n, const double *vals); 297 CGDLL_API void cgSetParameterValuefr(CGparameter param, int n, const float *vals); 298 CGDLL_API void cgSetParameterValuefc(CGparameter param, int n, const float *vals); 299 CGDLL_API void cgSetParameterValueir(CGparameter param, int n, const int *vals); 300 CGDLL_API void cgSetParameterValueic(CGparameter param, int n, const int *vals); 301 CGDLL_API int cgGetParameterValuedr(CGparameter param, int n, double *vals); 302 CGDLL_API int cgGetParameterValuedc(CGparameter param, int n, double *vals); 303 CGDLL_API int cgGetParameterValuefr(CGparameter param, int n, float *vals); 304 CGDLL_API int cgGetParameterValuefc(CGparameter param, int n, float *vals); 305 CGDLL_API int cgGetParameterValueir(CGparameter param, int n, int *vals); 306 CGDLL_API int cgGetParameterValueic(CGparameter param, int n, int *vals); 307 CGDLL_API const char *cgGetStringParameterValue(CGparameter param); 308 CGDLL_API void cgSetStringParameterValue(CGparameter param, const char *str); 309 310 CGDLL_API int cgGetParameterOrdinalNumber(CGparameter param); 311 CGDLL_API CGbool cgIsParameterGlobal(CGparameter param); 312 CGDLL_API int cgGetParameterIndex(CGparameter param); 313 314 CGDLL_API void cgSetParameterVariability(CGparameter param, CGenum vary); 315 CGDLL_API void cgSetParameterSemantic(CGparameter param, const char *semantic); 316 317 CGDLL_API void cgSetParameter1f(CGparameter param, float x); 318 CGDLL_API void cgSetParameter2f(CGparameter param, float x, float y); 319 CGDLL_API void cgSetParameter3f(CGparameter param, float x, float y, float z); 320 CGDLL_API void cgSetParameter4f(CGparameter param, 321 float x, 322 float y, 323 float z, 324 float w); 325 CGDLL_API void cgSetParameter1d(CGparameter param, double x); 326 CGDLL_API void cgSetParameter2d(CGparameter param, double x, double y); 327 CGDLL_API void cgSetParameter3d(CGparameter param, 328 double x, 329 double y, 330 double z); 331 CGDLL_API void cgSetParameter4d(CGparameter param, 332 double x, 333 double y, 334 double z, 335 double w); 336 CGDLL_API void cgSetParameter1i(CGparameter param, int x); 337 CGDLL_API void cgSetParameter2i(CGparameter param, int x, int y); 338 CGDLL_API void cgSetParameter3i(CGparameter param, int x, int y, int z); 339 CGDLL_API void cgSetParameter4i(CGparameter param, 340 int x, 341 int y, 342 int z, 343 int w); 344 345 346 CGDLL_API void cgSetParameter1iv(CGparameter param, const int *v); 347 CGDLL_API void cgSetParameter2iv(CGparameter param, const int *v); 348 CGDLL_API void cgSetParameter3iv(CGparameter param, const int *v); 349 CGDLL_API void cgSetParameter4iv(CGparameter param, const int *v); 350 CGDLL_API void cgSetParameter1fv(CGparameter param, const float *v); 351 CGDLL_API void cgSetParameter2fv(CGparameter param, const float *v); 352 CGDLL_API void cgSetParameter3fv(CGparameter param, const float *v); 353 CGDLL_API void cgSetParameter4fv(CGparameter param, const float *v); 354 CGDLL_API void cgSetParameter1dv(CGparameter param, const double *v); 355 CGDLL_API void cgSetParameter2dv(CGparameter param, const double *v); 356 CGDLL_API void cgSetParameter3dv(CGparameter param, const double *v); 357 CGDLL_API void cgSetParameter4dv(CGparameter param, const double *v); 358 359 CGDLL_API void cgSetMatrixParameterir(CGparameter param, const int *matrix); 360 CGDLL_API void cgSetMatrixParameterdr(CGparameter param, const double *matrix); 361 CGDLL_API void cgSetMatrixParameterfr(CGparameter param, const float *matrix); 362 CGDLL_API void cgSetMatrixParameteric(CGparameter param, const int *matrix); 363 CGDLL_API void cgSetMatrixParameterdc(CGparameter param, const double *matrix); 364 CGDLL_API void cgSetMatrixParameterfc(CGparameter param, const float *matrix); 365 366 CGDLL_API void cgGetMatrixParameterir(CGparameter param, int *matrix); 367 CGDLL_API void cgGetMatrixParameterdr(CGparameter param, double *matrix); 368 CGDLL_API void cgGetMatrixParameterfr(CGparameter param, float *matrix); 369 CGDLL_API void cgGetMatrixParameteric(CGparameter param, int *matrix); 370 CGDLL_API void cgGetMatrixParameterdc(CGparameter param, double *matrix); 371 CGDLL_API void cgGetMatrixParameterfc(CGparameter param, float *matrix); 372 373 /*** Type Functions ***/ 374 375 CGDLL_API const char *cgGetTypeString(CGtype type); 376 CGDLL_API CGtype cgGetType(const char *type_string); 377 378 CGDLL_API CGtype cgGetNamedUserType(CGhandle handle, const char *name); 379 380 CGDLL_API int cgGetNumUserTypes(CGhandle handle); 381 CGDLL_API CGtype cgGetUserType(CGhandle handle, int index); 382 383 CGDLL_API int cgGetNumParentTypes(CGtype type); 384 CGDLL_API CGtype cgGetParentType(CGtype type, int index); 385 386 CGDLL_API CGbool cgIsParentType(CGtype parent, CGtype child); 387 CGDLL_API CGbool cgIsInterfaceType(CGtype type); 388 389 /*** Resource Functions ***/ 390 391 CGDLL_API const char *cgGetResourceString(CGresource resource); 392 CGDLL_API CGresource cgGetResource(const char *resource_string); 393 394 /*** Enum Functions ***/ 395 396 CGDLL_API const char *cgGetEnumString(CGenum en); 397 CGDLL_API CGenum cgGetEnum(const char *enum_string); 398 399 /*** Profile Functions ***/ 400 401 CGDLL_API const char *cgGetProfileString(CGprofile profile); 402 CGDLL_API CGprofile cgGetProfile(const char *profile_string); 403 404 /*** Error Functions ***/ 405 406 CGDLL_API CGerror cgGetError(void); 407 CGDLL_API CGerror cgGetFirstError(void); 408 CGDLL_API const char *cgGetErrorString(CGerror error); 409 CGDLL_API const char *cgGetLastErrorString(CGerror *error); 410 CGDLL_API void cgSetErrorCallback(CGerrorCallbackFunc func); 411 CGDLL_API CGerrorCallbackFunc cgGetErrorCallback(void); 412 CGDLL_API void cgSetErrorHandler(CGerrorHandlerFunc func, void *data); 413 CGDLL_API CGerrorHandlerFunc cgGetErrorHandler(void **data); 414 415 /*** Misc Functions ***/ 416 417 CGDLL_API const char *cgGetString(CGenum sname); 418 419 420 /*** CgFX Functions ***/ 421 422 CGDLL_API CGeffect cgCreateEffect(CGcontext, const char *code, const char **args); 423 CGDLL_API CGeffect cgCreateEffectFromFile(CGcontext, const char *filename, 424 const char **args); 425 CGDLL_API void cgDestroyEffect(CGeffect); 426 CGDLL_API CGcontext cgGetEffectContext(CGeffect); 427 CGDLL_API CGbool cgIsEffect(CGeffect effect); 428 429 CGDLL_API CGeffect cgGetFirstEffect(CGcontext); 430 CGDLL_API CGeffect cgGetNextEffect(CGeffect); 431 432 CGDLL_API CGprogram cgCreateProgramFromEffect(CGeffect effect, 433 CGprofile profile, 434 const char *entry, 435 const char **args); 436 437 CGDLL_API CGtechnique cgGetFirstTechnique(CGeffect); 438 CGDLL_API CGtechnique cgGetNextTechnique(CGtechnique); 439 CGDLL_API CGtechnique cgGetNamedTechnique(CGeffect, const char *name); 440 CGDLL_API const char *cgGetTechniqueName(CGtechnique); 441 CGDLL_API CGbool cgIsTechnique(CGtechnique); 442 CGDLL_API CGbool cgValidateTechnique(CGtechnique); 443 CGDLL_API CGbool cgIsTechniqueValidated(CGtechnique); 444 CGDLL_API CGeffect cgGetTechniqueEffect(CGtechnique); 445 446 CGDLL_API CGpass cgGetFirstPass(CGtechnique); 447 CGDLL_API CGpass cgGetNamedPass(CGtechnique, const char *name); 448 CGDLL_API CGpass cgGetNextPass(CGpass); 449 CGDLL_API CGbool cgIsPass(CGpass); 450 CGDLL_API const char *cgGetPassName(CGpass); 451 CGDLL_API CGtechnique cgGetPassTechnique(CGpass); 452 453 CGDLL_API void cgSetPassState(CGpass); 454 CGDLL_API void cgResetPassState(CGpass); 455 456 CGDLL_API CGstateassignment cgGetFirstStateAssignment(CGpass); 457 CGDLL_API CGstateassignment cgGetNamedStateAssignment(CGpass, const char *name); 458 CGDLL_API CGstateassignment cgGetNextStateAssignment(CGstateassignment); 459 CGDLL_API CGbool cgIsStateAssignment(CGstateassignment); 460 CGDLL_API CGbool cgCallStateSetCallback(CGstateassignment); 461 CGDLL_API CGbool cgCallStateValidateCallback(CGstateassignment); 462 CGDLL_API CGbool cgCallStateResetCallback(CGstateassignment); 463 CGDLL_API CGpass cgGetStateAssignmentPass(CGstateassignment); 464 CGDLL_API CGparameter cgGetSamplerStateAssignmentParameter(CGstateassignment); 465 466 CGDLL_API const float *cgGetFloatStateAssignmentValues(CGstateassignment, int *nVals); 467 CGDLL_API const int *cgGetIntStateAssignmentValues(CGstateassignment, int *nVals); 468 CGDLL_API const CGbool *cgGetBoolStateAssignmentValues(CGstateassignment, int *nVals); 469 CGDLL_API const char *cgGetStringStateAssignmentValue(CGstateassignment); 470 CGDLL_API CGprogram cgGetProgramStateAssignmentValue(CGstateassignment); 471 CGDLL_API CGparameter cgGetTextureStateAssignmentValue(CGstateassignment); 472 CGDLL_API CGparameter cgGetSamplerStateAssignmentValue(CGstateassignment); 473 CGDLL_API int cgGetStateAssignmentIndex(CGstateassignment); 474 475 CGDLL_API int cgGetNumDependentStateAssignmentParameters(CGstateassignment); 476 CGDLL_API CGparameter cgGetDependentStateAssignmentParameter(CGstateassignment, int index); 477 478 CGDLL_API CGstate cgGetStateAssignmentState(CGstateassignment); 479 CGDLL_API CGstate cgGetSamplerStateAssignmentState(CGstateassignment); 480 481 CGDLL_API CGstate cgCreateState(CGcontext, const char *name, CGtype); 482 CGDLL_API CGstate cgCreateArrayState(CGcontext, const char *name, CGtype, int nelems); 483 CGDLL_API void cgSetStateCallbacks(CGstate, CGstatecallback set, CGstatecallback reset, 484 CGstatecallback validate); 485 CGDLL_API CGstatecallback cgGetStateSetCallback(CGstate); 486 CGDLL_API CGstatecallback cgGetStateResetCallback(CGstate); 487 CGDLL_API CGstatecallback cgGetStateValidateCallback(CGstate); 488 CGDLL_API CGtype cgGetStateType(CGstate); 489 CGDLL_API const char *cgGetStateName(CGstate); 490 CGDLL_API CGstate cgGetNamedState(CGcontext, const char *name); 491 CGDLL_API CGstate cgGetFirstState(CGcontext); 492 CGDLL_API CGstate cgGetNextState(CGstate); 493 CGDLL_API CGbool cgIsState(CGstate); 494 CGDLL_API void cgAddStateEnumerant(CGstate, const char *name, int value); 495 496 CGDLL_API CGstate cgCreateSamplerState(CGcontext, const char *name, CGtype); 497 CGDLL_API CGstate cgCreateArraySamplerState(CGcontext, const char *name, CGtype, int nelems); 498 CGDLL_API CGstate cgGetNamedSamplerState(CGcontext, const char *name); 499 CGDLL_API CGstate cgGetFirstSamplerState(CGcontext); 500 501 CGDLL_API CGstateassignment cgGetFirstSamplerStateAssignment(CGparameter); 502 CGDLL_API CGstateassignment cgGetNamedSamplerStateAssignment(CGparameter, const char *); 503 CGDLL_API void cgSetSamplerState(CGparameter); 504 505 CGDLL_API CGparameter cgGetNamedEffectParameter(CGeffect, const char *); 506 CGDLL_API CGparameter cgGetFirstLeafEffectParameter(CGeffect); 507 CGDLL_API CGparameter cgGetFirstEffectParameter(CGeffect); 508 CGDLL_API CGparameter cgGetEffectParameterBySemantic(CGeffect, const char *); 509 510 CGDLL_API CGannotation cgGetFirstTechniqueAnnotation(CGtechnique); 511 CGDLL_API CGannotation cgGetFirstPassAnnotation(CGpass); 512 CGDLL_API CGannotation cgGetFirstParameterAnnotation(CGparameter); 513 CGDLL_API CGannotation cgGetFirstProgramAnnotation(CGprogram); 514 CGDLL_API CGannotation cgGetNextAnnotation(CGannotation); 515 516 CGDLL_API CGannotation cgGetNamedTechniqueAnnotation(CGtechnique, const char *); 517 CGDLL_API CGannotation cgGetNamedPassAnnotation(CGpass, const char *); 518 CGDLL_API CGannotation cgGetNamedParameterAnnotation(CGparameter, const char *); 519 CGDLL_API CGannotation cgGetNamedProgramAnnotation(CGprogram, const char *); 520 521 CGDLL_API CGbool cgIsAnnotation(CGannotation); 522 523 CGDLL_API const char *cgGetAnnotationName(CGannotation); 524 CGDLL_API CGtype cgGetAnnotationType(CGannotation); 525 526 CGDLL_API const float *cgGetFloatAnnotationValues(CGannotation, int *nvalues); 527 CGDLL_API const int *cgGetIntAnnotationValues(CGannotation, int *nvalues); 528 CGDLL_API const char *cgGetStringAnnotationValue(CGannotation); 529 CGDLL_API const int *cgGetBooleanAnnotationValues(CGannotation, int *nvalues); 530 531 CGDLL_API int cgGetNumDependentAnnotationParameters(CGannotation); 532 CGDLL_API CGparameter cgGetDependentAnnotationParameter(CGannotation, int index); 533 534 CGDLL_API void cgEvaluateProgram(CGprogram, float *, int ncomps, int nx, int ny, int nz); 535 536 #endif 537 538 #ifdef __cplusplus 539 } 540 #endif 541 542 #endif 543