cg.h | cg.h | |||
---|---|---|---|---|
/* | /* | |||
* | * | |||
* Copyright (c) 2002-2010, NVIDIA Corporation. | * Copyright (c) 2002-2012, NVIDIA Corporation. | |||
* | * | |||
* | * | |||
* | * | |||
* NVIDIA Corporation("NVIDIA") supplies this software to you in considerat ion | * NVIDIA Corporation("NVIDIA") supplies this software to you in considerat ion | |||
* of your agreement to the following terms, and your use, installation, | * of your agreement to the following terms, and your use, installation, | |||
* modification or redistribution of this NVIDIA software constitutes | * modification or redistribution of this NVIDIA software constitutes | |||
* acceptance of these terms. If you do not agree with these terms, please do | * acceptance of these terms. If you do not agree with these terms, please do | |||
* not use, install, modify or redistribute this NVIDIA software. | * not use, install, modify or redistribute this NVIDIA software. | |||
* | * | |||
* | * | |||
skipping to change at line 59 | skipping to change at line 59 | |||
* | * | |||
*/ | */ | |||
#ifndef _cg_h | #ifndef _cg_h | |||
#define _cg_h | #define _cg_h | |||
/*************************************************************************/ | /*************************************************************************/ | |||
/*** CG Run-Time Library API ***/ | /*** CG Run-Time Library API ***/ | |||
/*************************************************************************/ | /*************************************************************************/ | |||
#define CG_VERSION_NUM 3000 | #define CG_VERSION_NUM 3100 | |||
#ifdef _WIN32 | #ifdef _WIN32 | |||
# ifndef APIENTRY /* From Win32's <windef.h> */ | # ifndef APIENTRY /* From Win32's <windef.h> */ | |||
# define CG_APIENTRY_DEFINED | # define CG_APIENTRY_DEFINED | |||
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLAND C__) || defined(__LCC__) | # if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLAND C__) || defined(__LCC__) | |||
# define APIENTRY __stdcall | # define APIENTRY __stdcall | |||
# else | # else | |||
# define APIENTRY | # define APIENTRY | |||
# endif | # endif | |||
# endif | # endif | |||
skipping to change at line 129 | skipping to change at line 129 | |||
#define CG_FALSE ((CGbool)0) | #define CG_FALSE ((CGbool)0) | |||
#define CG_TRUE ((CGbool)1) | #define CG_TRUE ((CGbool)1) | |||
typedef enum | typedef enum | |||
{ | { | |||
CG_BEHAVIOR_UNKNOWN = 0, | CG_BEHAVIOR_UNKNOWN = 0, | |||
CG_BEHAVIOR_LATEST = 1, /* latest behavior supported at r untime */ | CG_BEHAVIOR_LATEST = 1, /* latest behavior supported at r untime */ | |||
CG_BEHAVIOR_2200 = 1000, /* default behavior */ | CG_BEHAVIOR_2200 = 1000, /* default behavior */ | |||
CG_BEHAVIOR_3000 = 2000, | CG_BEHAVIOR_3000 = 2000, | |||
CG_BEHAVIOR_CURRENT = CG_BEHAVIOR_3000 /* latest behavior supported at c | CG_BEHAVIOR_3100 = 3000, | |||
ompile time */ | CG_BEHAVIOR_CURRENT = CG_BEHAVIOR_3100 /* latest behavior supported at c | |||
ompile time */ | ||||
} CGbehavior; | } CGbehavior; | |||
typedef enum | typedef enum | |||
{ | { | |||
CG_UNKNOWN_TYPE = 0, | CG_UNKNOWN_TYPE = 0, | |||
CG_ARRAY = 2, | CG_ARRAY = 2, | |||
CG_STRING = 1135, | CG_STRING = 1135, | |||
CG_STRUCT = 1, | CG_STRUCT = 1, | |||
CG_TYPELESS_STRUCT = 3, | CG_TYPELESS_STRUCT = 3, | |||
CG_TEXTURE = 1137, | CG_TEXTURE = 1137, | |||
CG_BUFFER = 1319, | ||||
CG_UNIFORMBUFFER = 1320, | ||||
CG_ADDRESS = 1321, | ||||
CG_PIXELSHADER_TYPE = 1142, | CG_PIXELSHADER_TYPE = 1142, | |||
CG_PROGRAM_TYPE = 1136, | CG_PROGRAM_TYPE = 1136, | |||
CG_VERTEXSHADER_TYPE = 1141, | CG_VERTEXSHADER_TYPE = 1141, | |||
CG_TYPE_START_ENUM = 1024, | ||||
CG_SAMPLER = 1143, | CG_SAMPLER = 1143, | |||
CG_SAMPLER1D = 1065, | CG_SAMPLER1D = 1065, | |||
CG_SAMPLER1DARRAY = 1138, | CG_SAMPLER1DARRAY = 1138, | |||
CG_SAMPLER1DSHADOW = 1313, | CG_SAMPLER1DSHADOW = 1313, | |||
CG_SAMPLER2D = 1066, | CG_SAMPLER2D = 1066, | |||
CG_SAMPLER2DARRAY = 1139, | CG_SAMPLER2DARRAY = 1139, | |||
CG_SAMPLER2DMS = 1317, /* ARB_texture_multisample */ | ||||
CG_SAMPLER2DMSARRAY = 1318, /* ARB_texture_multisample */ | ||||
CG_SAMPLER2DSHADOW = 1314, | CG_SAMPLER2DSHADOW = 1314, | |||
CG_SAMPLER3D = 1067, | CG_SAMPLER3D = 1067, | |||
CG_SAMPLERBUF = 1144, | CG_SAMPLERBUF = 1144, | |||
CG_SAMPLERCUBE = 1069, | CG_SAMPLERCUBE = 1069, | |||
CG_SAMPLERCUBEARRAY = 1140, | CG_SAMPLERCUBEARRAY = 1140, | |||
CG_SAMPLERRBUF = 1316, /* NV_explicit_multisample */ | ||||
CG_SAMPLERRECT = 1068, | CG_SAMPLERRECT = 1068, | |||
CG_SAMPLERRECTSHADOW = 1315, | CG_SAMPLERRECTSHADOW = 1315, | |||
CG_TYPE_START_ENUM = 1024, | ||||
CG_BOOL = 1114, | CG_BOOL = 1114, | |||
CG_BOOL1 = 1115, | CG_BOOL1 = 1115, | |||
CG_BOOL2 = 1116, | CG_BOOL2 = 1116, | |||
CG_BOOL3 = 1117, | CG_BOOL3 = 1117, | |||
CG_BOOL4 = 1118, | CG_BOOL4 = 1118, | |||
CG_BOOL1x1 = 1119, | CG_BOOL1x1 = 1119, | |||
CG_BOOL1x2 = 1120, | CG_BOOL1x2 = 1120, | |||
CG_BOOL1x3 = 1121, | CG_BOOL1x3 = 1121, | |||
CG_BOOL1x4 = 1122, | CG_BOOL1x4 = 1122, | |||
CG_BOOL2x1 = 1123, | CG_BOOL2x1 = 1123, | |||
skipping to change at line 746 | skipping to change at line 753 | |||
CG_FACE = 4410, | CG_FACE = 4410, | |||
CG_PRIMITIVEID = 4411, | CG_PRIMITIVEID = 4411, | |||
CG_INSTANCEID = 4412, | CG_INSTANCEID = 4412, | |||
CG_SAMPLEID = 4413, | CG_SAMPLEID = 4413, | |||
CG_VERTEXID = 4414, | CG_VERTEXID = 4414, | |||
CG_LAYER = 4415, | CG_LAYER = 4415, | |||
CG_SAMPLEMASK = 4416, | CG_SAMPLEMASK = 4416, | |||
CG_CONTROLPOINTID = 4417, | CG_CONTROLPOINTID = 4417, | |||
CG_EDGETESS = 4418, | CG_EDGETESS = 4418, | |||
CG_INNERTESS = 4419, | CG_INNERTESS = 4419, | |||
CG_SAMPLEPOS = 4420, | ||||
CG_NUMSAMPLES = 4421, | ||||
CG_UNDEFINED = 3256 | CG_UNDEFINED = 3256 | |||
} CGresource; | } CGresource; | |||
typedef enum | typedef enum | |||
{ | { | |||
CG_PROFILE_UNKNOWN = 6145, | CG_PROFILE_UNKNOWN = 6145, | |||
CG_PROFILE_VP20 = 6146, | CG_PROFILE_VP20 = 6146, | |||
CG_PROFILE_FP20 = 6147, | CG_PROFILE_FP20 = 6147, | |||
CG_PROFILE_VP30 = 6148, | CG_PROFILE_VP30 = 6148, | |||
CG_PROFILE_FP30 = 6149, | CG_PROFILE_FP30 = 6149, | |||
skipping to change at line 936 | skipping to change at line 945 | |||
typedef enum | typedef enum | |||
{ | { | |||
CG_PARAMETERCLASS_UNKNOWN = 0, | CG_PARAMETERCLASS_UNKNOWN = 0, | |||
CG_PARAMETERCLASS_SCALAR = 1, | CG_PARAMETERCLASS_SCALAR = 1, | |||
CG_PARAMETERCLASS_VECTOR = 2, | CG_PARAMETERCLASS_VECTOR = 2, | |||
CG_PARAMETERCLASS_MATRIX = 3, | CG_PARAMETERCLASS_MATRIX = 3, | |||
CG_PARAMETERCLASS_STRUCT = 4, | CG_PARAMETERCLASS_STRUCT = 4, | |||
CG_PARAMETERCLASS_ARRAY = 5, | CG_PARAMETERCLASS_ARRAY = 5, | |||
CG_PARAMETERCLASS_SAMPLER = 6, | CG_PARAMETERCLASS_SAMPLER = 6, | |||
CG_PARAMETERCLASS_OBJECT = 7 | CG_PARAMETERCLASS_OBJECT = 7, | |||
CG_PARAMETERCLASS_BUFFER = 8 | ||||
} CGparameterclass; | } CGparameterclass; | |||
typedef enum | typedef enum | |||
{ | { | |||
CG_UNKNOWN_DOMAIN = 0, | CG_UNKNOWN_DOMAIN = 0, | |||
CG_FIRST_DOMAIN = 1, | CG_FIRST_DOMAIN = 1, | |||
CG_VERTEX_DOMAIN = 1, | CG_VERTEX_DOMAIN = 1, | |||
CG_FRAGMENT_DOMAIN = 2, | CG_FRAGMENT_DOMAIN = 2, | |||
CG_GEOMETRY_DOMAIN = 3, | CG_GEOMETRY_DOMAIN = 3, | |||
CG_TESSELLATION_CONTROL_DOMAIN = 4, | CG_TESSELLATION_CONTROL_DOMAIN = 4, | |||
skipping to change at line 1025 | skipping to change at line 1035 | |||
CG_API CGcontext CGENTRY cgGetProgramContext(CGprogram program); | CG_API CGcontext CGENTRY cgGetProgramContext(CGprogram program); | |||
CG_API CGbool CGENTRY cgIsProgram(CGprogram program); | CG_API CGbool CGENTRY cgIsProgram(CGprogram program); | |||
CG_API void CGENTRY cgCompileProgram(CGprogram program); | CG_API void CGENTRY cgCompileProgram(CGprogram program); | |||
CG_API CGbool CGENTRY cgIsProgramCompiled(CGprogram program); | CG_API CGbool CGENTRY cgIsProgramCompiled(CGprogram program); | |||
CG_API const char * CGENTRY cgGetProgramString(CGprogram program, CGenum pn ame); | CG_API const char * CGENTRY cgGetProgramString(CGprogram program, CGenum pn ame); | |||
CG_API CGprofile CGENTRY cgGetProgramProfile(CGprogram program); | CG_API CGprofile CGENTRY cgGetProgramProfile(CGprogram program); | |||
CG_API char const * const * CGENTRY cgGetProgramOptions(CGprogram program); | CG_API char const * const * CGENTRY cgGetProgramOptions(CGprogram program); | |||
CG_API void CGENTRY cgSetProgramProfile(CGprogram program, CGprofile profil e); | CG_API void CGENTRY cgSetProgramProfile(CGprogram program, CGprofile profil e); | |||
CG_API CGenum CGENTRY cgGetProgramInput(CGprogram program); | CG_API CGenum CGENTRY cgGetProgramInput(CGprogram program); | |||
CG_API CGenum CGENTRY cgGetProgramOutput(CGprogram program); | CG_API CGenum CGENTRY cgGetProgramOutput(CGprogram program); | |||
CG_API int CGENTRY cgGetProgramOutputVertices(CGprogram program); | ||||
CG_API void CGENTRY cgSetProgramOutputVertices(CGprogram program, int verti | ||||
ces); | ||||
CG_API void CGENTRY cgSetPassProgramParameters(CGprogram program); | CG_API void CGENTRY cgSetPassProgramParameters(CGprogram program); | |||
CG_API void CGENTRY cgUpdateProgramParameters(CGprogram program); | CG_API void CGENTRY cgUpdateProgramParameters(CGprogram program); | |||
CG_API void CGENTRY cgUpdatePassParameters(CGpass pass); | CG_API void CGENTRY cgUpdatePassParameters(CGpass pass); | |||
CG_API CGparameter CGENTRY cgCreateParameter(CGcontext context, CGtype type ); | CG_API CGparameter CGENTRY cgCreateParameter(CGcontext context, CGtype type ); | |||
CG_API CGparameter CGENTRY cgCreateParameterArray(CGcontext context, CGtype type, int length); | CG_API CGparameter CGENTRY cgCreateParameterArray(CGcontext context, CGtype type, int length); | |||
CG_API CGparameter CGENTRY cgCreateParameterMultiDimArray(CGcontext context , CGtype type, int dim, const int *lengths); | CG_API CGparameter CGENTRY cgCreateParameterMultiDimArray(CGcontext context , CGtype type, int dim, const int *lengths); | |||
CG_API void CGENTRY cgDestroyParameter(CGparameter param); | CG_API void CGENTRY cgDestroyParameter(CGparameter param); | |||
CG_API void CGENTRY cgConnectParameter(CGparameter from, CGparameter to); | CG_API void CGENTRY cgConnectParameter(CGparameter from, CGparameter to); | |||
CG_API void CGENTRY cgDisconnectParameter(CGparameter param); | CG_API void CGENTRY cgDisconnectParameter(CGparameter param); | |||
CG_API CGparameter CGENTRY cgGetConnectedParameter(CGparameter param); | CG_API CGparameter CGENTRY cgGetConnectedParameter(CGparameter param); | |||
CG_API int CGENTRY cgGetNumConnectedToParameters(CGparameter param); | CG_API int CGENTRY cgGetNumConnectedToParameters(CGparameter param); | |||
CG_API CGparameter CGENTRY cgGetConnectedToParameter(CGparameter param, int index); | CG_API CGparameter CGENTRY cgGetConnectedToParameter(CGparameter param, int index); | |||
CG_API CGparameter CGENTRY cgGetNamedParameter(CGprogram program, const cha r *name); | CG_API CGparameter CGENTRY cgGetNamedParameter(CGprogram program, const cha r *name); | |||
CG_API CGparameter CGENTRY cgGetNamedProgramParameter(CGprogram program, CG enum name_space, const char *name); | CG_API CGparameter CGENTRY cgGetNamedProgramParameter(CGprogram program, CG enum name_space, const char *name); | |||
CG_API CGparameter CGENTRY cgGetNamedProgramUniformBuffer(CGprogram program | ||||
, const char *blockName); | ||||
CG_API CGparameter CGENTRY cgGetNamedEffectUniformBuffer(CGeffect effect, c | ||||
onst char *blockName); | ||||
CG_API const char * CGENTRY cgGetUniformBufferBlockName(CGparameter param); | ||||
CG_API CGparameter CGENTRY cgGetFirstParameter(CGprogram program, CGenum na me_space); | CG_API CGparameter CGENTRY cgGetFirstParameter(CGprogram program, CGenum na me_space); | |||
CG_API CGparameter CGENTRY cgGetNextParameter(CGparameter current); | CG_API CGparameter CGENTRY cgGetNextParameter(CGparameter current); | |||
CG_API CGparameter CGENTRY cgGetFirstLeafParameter(CGprogram program, CGenu m name_space); | CG_API CGparameter CGENTRY cgGetFirstLeafParameter(CGprogram program, CGenu m name_space); | |||
CG_API CGparameter CGENTRY cgGetNextLeafParameter(CGparameter current); | CG_API CGparameter CGENTRY cgGetNextLeafParameter(CGparameter current); | |||
CG_API CGparameter CGENTRY cgGetFirstStructParameter(CGparameter param); | CG_API CGparameter CGENTRY cgGetFirstStructParameter(CGparameter param); | |||
CG_API CGparameter CGENTRY cgGetFirstUniformBufferParameter(CGparameter par am); | ||||
CG_API CGparameter CGENTRY cgGetNamedStructParameter(CGparameter param, con st char *name); | CG_API CGparameter CGENTRY cgGetNamedStructParameter(CGparameter param, con st char *name); | |||
CG_API CGparameter CGENTRY cgGetNamedUniformBufferParameter(CGparameter par am, const char *name); | ||||
CG_API CGparameter CGENTRY cgGetFirstDependentParameter(CGparameter param); | CG_API CGparameter CGENTRY cgGetFirstDependentParameter(CGparameter param); | |||
CG_API CGparameter CGENTRY cgGetArrayParameter(CGparameter aparam, int inde x); | CG_API CGparameter CGENTRY cgGetArrayParameter(CGparameter aparam, int inde x); | |||
CG_API int CGENTRY cgGetArrayDimension(CGparameter param); | CG_API int CGENTRY cgGetArrayDimension(CGparameter param); | |||
CG_API CGtype CGENTRY cgGetArrayType(CGparameter param); | CG_API CGtype CGENTRY cgGetArrayType(CGparameter param); | |||
CG_API int CGENTRY cgGetArraySize(CGparameter param, int dimension); | CG_API int CGENTRY cgGetArraySize(CGparameter param, int dimension); | |||
CG_API int CGENTRY cgGetArrayTotalSize(CGparameter param); | CG_API int CGENTRY cgGetArrayTotalSize(CGparameter param); | |||
CG_API void CGENTRY cgSetArraySize(CGparameter param, int size); | CG_API void CGENTRY cgSetArraySize(CGparameter param, int size); | |||
CG_API void CGENTRY cgSetMultiDimArraySize(CGparameter param, const int *si zes); | CG_API void CGENTRY cgSetMultiDimArraySize(CGparameter param, const int *si zes); | |||
CG_API CGprogram CGENTRY cgGetParameterProgram(CGparameter param); | CG_API CGprogram CGENTRY cgGetParameterProgram(CGparameter param); | |||
CG_API CGcontext CGENTRY cgGetParameterContext(CGparameter param); | CG_API CGcontext CGENTRY cgGetParameterContext(CGparameter param); | |||
skipping to change at line 1309 | skipping to change at line 1326 | |||
CG_API const char * CGENTRY cgGetStateEnumerant(CGstate state, int index, i nt *value); | CG_API const char * CGENTRY cgGetStateEnumerant(CGstate state, int index, i nt *value); | |||
CG_API const char * CGENTRY cgGetStateEnumerantName(CGstate state, int valu e); | CG_API const char * CGENTRY cgGetStateEnumerantName(CGstate state, int valu e); | |||
CG_API int CGENTRY cgGetStateEnumerantValue(CGstate state, const char *name ); | CG_API int CGENTRY cgGetStateEnumerantValue(CGstate state, const char *name ); | |||
CG_API CGeffect CGENTRY cgGetParameterEffect(CGparameter param); | CG_API CGeffect CGENTRY cgGetParameterEffect(CGparameter param); | |||
CG_API CGparameterclass CGENTRY cgGetTypeClass(CGtype type); | CG_API CGparameterclass CGENTRY cgGetTypeClass(CGtype type); | |||
CG_API CGtype CGENTRY cgGetTypeBase(CGtype type); | CG_API CGtype CGENTRY cgGetTypeBase(CGtype type); | |||
CG_API CGbool CGENTRY cgGetTypeSizes(CGtype type, int *nrows, int *ncols); | CG_API CGbool CGENTRY cgGetTypeSizes(CGtype type, int *nrows, int *ncols); | |||
CG_API void CGENTRY cgGetMatrixSize(CGtype type, int *nrows, int *ncols); | CG_API void CGENTRY cgGetMatrixSize(CGtype type, int *nrows, int *ncols); | |||
CG_API int CGENTRY cgGetNumProgramDomains(CGprogram program); | CG_API int CGENTRY cgGetNumProgramDomains(CGprogram program); | |||
CG_API CGdomain CGENTRY cgGetProfileDomain(CGprofile profile); | CG_API CGdomain CGENTRY cgGetProfileDomain(CGprofile profile); | |||
CG_API CGprofile CGENTRY cgGetProfileSibling(CGprofile profile, CGdomain do main); | ||||
CG_API CGprogram CGENTRY cgCombinePrograms(int n, const CGprogram *exeList) ; | CG_API CGprogram CGENTRY cgCombinePrograms(int n, const CGprogram *exeList) ; | |||
CG_API CGprogram CGENTRY cgCombinePrograms2(const CGprogram exe1, const CGp rogram exe2); | CG_API CGprogram CGENTRY cgCombinePrograms2(const CGprogram exe1, const CGp rogram exe2); | |||
CG_API CGprogram CGENTRY cgCombinePrograms3(const CGprogram exe1, const CGp rogram exe2, const CGprogram exe3); | CG_API CGprogram CGENTRY cgCombinePrograms3(const CGprogram exe1, const CGp rogram exe2, const CGprogram exe3); | |||
CG_API CGprogram CGENTRY cgCombinePrograms4(const CGprogram exe1, const CGp rogram exe2, const CGprogram exe3, const CGprogram exe4); | CG_API CGprogram CGENTRY cgCombinePrograms4(const CGprogram exe1, const CGp rogram exe2, const CGprogram exe3, const CGprogram exe4); | |||
CG_API CGprogram CGENTRY cgCombinePrograms5(const CGprogram exe1, const CGp rogram exe2, const CGprogram exe3, const CGprogram exe4, const CGprogram ex e5); | CG_API CGprogram CGENTRY cgCombinePrograms5(const CGprogram exe1, const CGp rogram exe2, const CGprogram exe3, const CGprogram exe4, const CGprogram ex e5); | |||
CG_API CGprofile CGENTRY cgGetProgramDomainProfile(CGprogram program, int i ndex); | CG_API CGprofile CGENTRY cgGetProgramDomainProfile(CGprogram program, int i ndex); | |||
CG_API CGprogram CGENTRY cgGetProgramDomainProgram(CGprogram program, int i ndex); | CG_API CGprogram CGENTRY cgGetProgramDomainProgram(CGprogram program, int i ndex); | |||
CG_API CGobj CGENTRY cgCreateObj(CGcontext context, CGenum program_type, co nst char *source, CGprofile profile, const char **args); | CG_API CGobj CGENTRY cgCreateObj(CGcontext context, CGenum program_type, co nst char *source, CGprofile profile, const char **args); | |||
CG_API CGobj CGENTRY cgCreateObjFromFile(CGcontext context, CGenum program_ type, const char *source_file, CGprofile profile, const char **args); | CG_API CGobj CGENTRY cgCreateObjFromFile(CGcontext context, CGenum program_ type, const char *source_file, CGprofile profile, const char **args); | |||
CG_API void CGENTRY cgDestroyObj(CGobj obj); | CG_API void CGENTRY cgDestroyObj(CGobj obj); | |||
CG_API long CGENTRY cgGetParameterResourceSize(CGparameter param); | CG_API long CGENTRY cgGetParameterResourceSize(CGparameter param); | |||
CG_API CGtype CGENTRY cgGetParameterResourceType(CGparameter param); | CG_API CGtype CGENTRY cgGetParameterResourceType(CGparameter param); | |||
CG_API const char * CGENTRY cgGetParameterResourceName(CGparameter param); | CG_API const char * CGENTRY cgGetParameterResourceName(CGparameter param); | |||
CG_API int CGENTRY cgGetParameterBufferIndex(CGparameter param); | CG_API int CGENTRY cgGetParameterBufferIndex(CGparameter param); | |||
CG_API int CGENTRY cgGetParameterBufferOffset(CGparameter param); | CG_API int CGENTRY cgGetParameterBufferOffset(CGparameter param); | |||
CG_API CGbuffer CGENTRY cgCreateBuffer(CGcontext context, int size, const v oid *data, CGbufferusage bufferUsage); | CG_API CGbuffer CGENTRY cgCreateBuffer(CGcontext context, int size, const v oid *data, CGbufferusage bufferUsage); | |||
CG_API CGbool CGENTRY cgIsBuffer(CGbuffer buffer); | ||||
CG_API void CGENTRY cgSetBufferData(CGbuffer buffer, int size, const void * data); | CG_API void CGENTRY cgSetBufferData(CGbuffer buffer, int size, const void * data); | |||
CG_API void CGENTRY cgSetBufferSubData(CGbuffer buffer, int offset, int siz e, const void *data); | CG_API void CGENTRY cgSetBufferSubData(CGbuffer buffer, int offset, int siz e, const void *data); | |||
CG_API void CGENTRY cgSetProgramBuffer(CGprogram program, int bufferIndex, CGbuffer buffer); | CG_API void CGENTRY cgSetProgramBuffer(CGprogram program, int bufferIndex, CGbuffer buffer); | |||
CG_API void CGENTRY cgSetUniformBufferParameter(CGparameter param, CGbuffer buffer); | ||||
CG_API void * CGENTRY cgMapBuffer(CGbuffer buffer, CGbufferaccess access); | CG_API void * CGENTRY cgMapBuffer(CGbuffer buffer, CGbufferaccess access); | |||
CG_API void CGENTRY cgUnmapBuffer(CGbuffer buffer); | CG_API void CGENTRY cgUnmapBuffer(CGbuffer buffer); | |||
CG_API void CGENTRY cgDestroyBuffer(CGbuffer buffer); | CG_API void CGENTRY cgDestroyBuffer(CGbuffer buffer); | |||
CG_API CGbuffer CGENTRY cgGetProgramBuffer(CGprogram program, int bufferInd ex); | CG_API CGbuffer CGENTRY cgGetProgramBuffer(CGprogram program, int bufferInd ex); | |||
CG_API CGbuffer CGENTRY cgGetUniformBufferParameter(CGparameter param); | ||||
CG_API int CGENTRY cgGetBufferSize(CGbuffer buffer); | CG_API int CGENTRY cgGetBufferSize(CGbuffer buffer); | |||
CG_API int CGENTRY cgGetProgramBufferMaxSize(CGprofile profile); | CG_API int CGENTRY cgGetProgramBufferMaxSize(CGprofile profile); | |||
CG_API int CGENTRY cgGetProgramBufferMaxIndex(CGprofile profile); | CG_API int CGENTRY cgGetProgramBufferMaxIndex(CGprofile profile); | |||
CG_API CGbuffer CGENTRY cgGetEffectParameterBuffer(CGparameter param); | CG_API CGbuffer CGENTRY cgGetEffectParameterBuffer(CGparameter param); | |||
CG_API void CGENTRY cgSetEffectParameterBuffer(CGparameter param, CGbuffer buffer); | CG_API void CGENTRY cgSetEffectParameterBuffer(CGparameter param, CGbuffer buffer); | |||
#endif | #endif | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
End of changes. 18 change blocks. | ||||
6 lines changed or deleted | 30 lines changed or added | |||
cgGL.h | cgGL.h | |||
---|---|---|---|---|
/* | /* | |||
* | * | |||
* Copyright (c) 2002-2010, NVIDIA Corporation. | * Copyright (c) 2002-2012, NVIDIA Corporation. | |||
* | * | |||
* | * | |||
* | * | |||
* NVIDIA Corporation("NVIDIA") supplies this software to you in considerat ion | * NVIDIA Corporation("NVIDIA") supplies this software to you in considerat ion | |||
* of your agreement to the following terms, and your use, installation, | * of your agreement to the following terms, and your use, installation, | |||
* modification or redistribution of this NVIDIA software constitutes | * modification or redistribution of this NVIDIA software constitutes | |||
* acceptance of these terms. If you do not agree with these terms, please do | * acceptance of these terms. If you do not agree with these terms, please do | |||
* not use, install, modify or redistribute this NVIDIA software. | * not use, install, modify or redistribute this NVIDIA software. | |||
* | * | |||
* | * | |||
skipping to change at line 102 | skipping to change at line 102 | |||
#endif | #endif | |||
#ifndef CGGLENTRY | #ifndef CGGLENTRY | |||
# ifdef _WIN32 | # ifdef _WIN32 | |||
# define CGGLENTRY __cdecl | # define CGGLENTRY __cdecl | |||
# else | # else | |||
# define CGGLENTRY | # define CGGLENTRY | |||
# endif | # endif | |||
#endif | #endif | |||
#ifdef __APPLE__ | /* Use CGGL_NO_OPENGL to avoid including OpenGL headers. */ | |||
#include <OpenGL/gl.h> | ||||
#else | #ifndef CGGL_NO_OPENGL | |||
#include <GL/gl.h> | # ifdef __APPLE__ | |||
# include <OpenGL/gl.h> | ||||
# else | ||||
# include <GL/gl.h> | ||||
# endif | ||||
#endif | #endif | |||
/*************************************************************************/ | /*************************************************************************/ | |||
/*** Data types and enumerants ***/ | /*** Data types and enumerants ***/ | |||
/*************************************************************************/ | /*************************************************************************/ | |||
typedef enum | typedef enum | |||
{ | { | |||
CG_GL_MATRIX_IDENTITY = 0, | CG_GL_MATRIX_IDENTITY = 0, | |||
CG_GL_MATRIX_TRANSPOSE = 1, | CG_GL_MATRIX_TRANSPOSE = 1, | |||
skipping to change at line 129 | skipping to change at line 133 | |||
CG_GL_PROJECTION_MATRIX = 5, | CG_GL_PROJECTION_MATRIX = 5, | |||
CG_GL_TEXTURE_MATRIX = 6, | CG_GL_TEXTURE_MATRIX = 6, | |||
CG_GL_MODELVIEW_PROJECTION_MATRIX = 7, | CG_GL_MODELVIEW_PROJECTION_MATRIX = 7, | |||
CG_GL_VERTEX = 8, | CG_GL_VERTEX = 8, | |||
CG_GL_FRAGMENT = 9, | CG_GL_FRAGMENT = 9, | |||
CG_GL_GEOMETRY = 10, | CG_GL_GEOMETRY = 10, | |||
CG_GL_TESSELLATION_CONTROL = 11, | CG_GL_TESSELLATION_CONTROL = 11, | |||
CG_GL_TESSELLATION_EVALUATION = 12 | CG_GL_TESSELLATION_EVALUATION = 12 | |||
} CGGLenum; | } CGGLenum; | |||
typedef enum | ||||
{ | ||||
CG_GL_GLSL_DEFAULT = 0, | ||||
CG_GL_GLSL_100 = 1, | ||||
CG_GL_GLSL_110 = 2, | ||||
CG_GL_GLSL_120 = 3 | ||||
} CGGLglslversion; | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" | extern "C" | |||
{ | { | |||
#endif | #endif | |||
/*************************************************************************/ | /*************************************************************************/ | |||
/*** Functions ***/ | /*** Functions ***/ | |||
/*************************************************************************/ | /*************************************************************************/ | |||
#ifndef CGGL_EXPLICIT | #ifndef CGGL_EXPLICIT | |||
skipping to change at line 226 | skipping to change at line 238 | |||
CGGL_API GLenum CGGLENTRY cgGLGetTextureEnum(CGparameter param); | CGGL_API GLenum CGGLENTRY cgGLGetTextureEnum(CGparameter param); | |||
CGGL_API void CGGLENTRY cgGLSetManageTextureParameters(CGcontext ctx, CGboo l flag); | CGGL_API void CGGLENTRY cgGLSetManageTextureParameters(CGcontext ctx, CGboo l flag); | |||
CGGL_API CGbool CGGLENTRY cgGLGetManageTextureParameters(CGcontext ctx); | CGGL_API CGbool CGGLENTRY cgGLGetManageTextureParameters(CGcontext ctx); | |||
CGGL_API void CGGLENTRY cgGLSetupSampler(CGparameter param, GLuint texobj); | CGGL_API void CGGLENTRY cgGLSetupSampler(CGparameter param, GLuint texobj); | |||
CGGL_API void CGGLENTRY cgGLRegisterStates(CGcontext ctx); | CGGL_API void CGGLENTRY cgGLRegisterStates(CGcontext ctx); | |||
CGGL_API void CGGLENTRY cgGLEnableProgramProfiles(CGprogram program); | CGGL_API void CGGLENTRY cgGLEnableProgramProfiles(CGprogram program); | |||
CGGL_API void CGGLENTRY cgGLDisableProgramProfiles(CGprogram program); | CGGL_API void CGGLENTRY cgGLDisableProgramProfiles(CGprogram program); | |||
CGGL_API void CGGLENTRY cgGLSetDebugMode(CGbool debug); | CGGL_API void CGGLENTRY cgGLSetDebugMode(CGbool debug); | |||
CGGL_API CGbuffer CGGLENTRY cgGLCreateBuffer(CGcontext context, int size, c onst void *data, GLenum bufferUsage); | CGGL_API CGbuffer CGGLENTRY cgGLCreateBuffer(CGcontext context, int size, c onst void *data, GLenum bufferUsage); | |||
CGGL_API GLuint CGGLENTRY cgGLGetBufferObject(CGbuffer buffer); | CGGL_API GLuint CGGLENTRY cgGLGetBufferObject(CGbuffer buffer); | |||
CGGL_API CGbuffer CGGLENTRY cgGLCreateBufferFromObject(CGcontext context, G | ||||
Luint obj, CGbool manageObject); | ||||
CGGL_API void CGGLENTRY cgGLSetContextOptimalOptions(CGcontext context, CGp | ||||
rofile profile); | ||||
CGGL_API char const ** CGGLENTRY cgGLGetContextOptimalOptions(CGcontext con | ||||
text, CGprofile profile); | ||||
CGGL_API void CGGLENTRY cgGLSetContextGLSLVersion(CGcontext context, CGGLgl | ||||
slversion version); | ||||
CGGL_API CGGLglslversion CGGLENTRY cgGLGetContextGLSLVersion(CGcontext cont | ||||
ext); | ||||
CGGL_API const char * CGGLENTRY cgGLGetGLSLVersionString(CGGLglslversion ve | ||||
rsion); | ||||
CGGL_API CGGLglslversion CGGLENTRY cgGLGetGLSLVersion(const char *version_s | ||||
tring); | ||||
CGGL_API CGGLglslversion CGGLENTRY cgGLDetectGLSLVersion(void); | ||||
#endif | #endif | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#ifdef CGGL_APIENTRY_DEFINED | #ifdef CGGL_APIENTRY_DEFINED | |||
# undef CGGL_APIENTRY_DEFINED | # undef CGGL_APIENTRY_DEFINED | |||
# undef APIENTRY | # undef APIENTRY | |||
End of changes. 4 change blocks. | ||||
5 lines changed or deleted | 32 lines changed or added | |||