Logo Search packages:      
Sourcecode: taoframework version File versions  Download package

Tao::Cg::Cg Class Reference

List of all members.


Detailed Description

Cg core runtime binding for .NET, implementing Cg 1.4.1.

Binds functions and definitions in cg.dll or libcg.so.

Definition at line 42 of file Cg.cs.


Public Member Functions

static void cgAddStateEnumerant (IntPtr state, string name, int value)
static int cgCallStateResetCallback (IntPtr stateassignment)
static int cgCallStateSetCallback (IntPtr stateassignment)
static int cgCallStateValidateCallback (IntPtr stateassignment)
static void cgCompileProgram (IntPtr prog)
 Compile a program object.
static void cgConnectParameter (IntPtr from, IntPtr to)
static IntPtr cgCopyProgram (IntPtr program)
 Makes a copy of the specified Cg program within the same context.
static IntPtr cgCreateArraySamplerState (IntPtr ctx, string name, int type, int nelems)
static IntPtr cgCreateArrayState (IntPtr ctx, string name, int type, int nelems)
static IntPtr cgCreateContext ()
 Creates a new Cg context to use.
static IntPtr cgCreateEffect (IntPtr ctx, string code, string[] args)
static IntPtr cgCreateEffectFromFile (IntPtr ctx, string filename, string[] args)
static IntPtr cgCreateParameter (IntPtr ctx, int type)
static IntPtr cgCreateParameterArray (IntPtr ctx, int type, int length)
static IntPtr cgCreateParameterMultiDimArray (IntPtr ctx, int type, int dim, out int lengths)
static IntPtr cgCreateProgram (IntPtr context, int type, string source, int profile, string entry, string[] args)
 Compiles and creates a Cg program.
static IntPtr cgCreateProgramFromEffect (IntPtr effect, int profile, string entry, string[] args)
static IntPtr cgCreateProgramFromFile (IntPtr context, int type, string file, int profile, string entry, string[] args)
 Creates a Cg program from the specified file.
static IntPtr cgCreateSamplerState (IntPtr ctx, string name, int type)
static IntPtr cgCreateState (IntPtr ctx, string name, int type)
static void cgDestroyContext (IntPtr context)
 Destroys the specified Cg context.
static void cgDestroyEffect (IntPtr effect)
static void cgDestroyParameter (IntPtr param)
static void cgDestroyProgram (IntPtr program)
 Destroys the specified Cg program.
static void cgDisconnectParameter (IntPtr param)
delegate void CGerrorCallbackFuncDelegate ()
delegate void CGerrorHandlerFuncDelegate (IntPtr ctx, int err, IntPtr data)
static void cgEvaluateProgram (IntPtr prog, float[] f, int ncomps, int nx, int ny, int nz)
static string cgGetAnnotationName (IntPtr annotation)
static int cgGetAnnotationType (IntPtr annotation)
static int cgGetArrayDimension (IntPtr param)
 Gets the dimension of an array parameter.
static IntPtr cgGetArrayParameter (IntPtr aparam, int index)
 Gets the parameter from an array.
static int cgGetArraySize (IntPtr param, int dimension)
 Gets the size of an array.
static int cgGetArrayTotalSize (IntPtr param)
static int cgGetArrayType (IntPtr param)
static int cgGetAutoCompile (IntPtr ctx)
static int[] cgGetBooleanAnnotationValues (IntPtr annotation, out int nvalues)
static int[] cgGetBoolStateAssignmentValues (IntPtr stateassignment, int[] nVals)
static IntPtr cgGetConnectedParameter (IntPtr param)
static IntPtr cgGetConnectedToParameter (IntPtr param, int index)
static IntPtr cgGetDependentAnnotationParameter (IntPtr annotation, int index)
static IntPtr cgGetDependentStateAssignmentParameter (IntPtr stateassignment, int index)
static IntPtr cgGetEffectContext (IntPtr effect)
static IntPtr cgGetEffectParameterBySemantic (IntPtr effect, string name)
static int cgGetEnum (string enum_string)
static string cgGetEnumString (int en)
static int cgGetError ()
 Returns an error enum if an error has occured in the last Cg method call.
static CGerrorCallbackFuncDelegate cgGetErrorCallback ()
static CGerrorHandlerFuncDelegate cgGetErrorHandler (IntPtr data)
static IntPtr cgGetFirstDependentParameter (IntPtr param)
static IntPtr cgGetFirstEffect (IntPtr ctx)
static IntPtr cgGetFirstEffectParameter (IntPtr effect)
static int cgGetFirstError ()
static IntPtr cgGetFirstLeafEffectParameter (IntPtr effect)
static IntPtr cgGetFirstLeafParameter (IntPtr program, int nameSpace)
 Used to get the first leaf parameter from the specified program.
static IntPtr cgGetFirstParameter (IntPtr prog, int name_space)
 Gets the first parameter in specified program.
static IntPtr cgGetFirstParameterAnnotation (IntPtr param)
static IntPtr cgGetFirstPass (IntPtr technique)
static IntPtr cgGetFirstPassAnnotation (IntPtr pass)
static IntPtr cgGetFirstProgram (IntPtr context)
 Gets the first program in a context.
static IntPtr cgGetFirstProgramAnnotation (IntPtr prog)
static IntPtr cgGetFirstSamplerState (IntPtr ctx)
static IntPtr cgGetFirstSamplerStateAssignment (IntPtr param)
static IntPtr cgGetFirstState (IntPtr ctx)
static IntPtr cgGetFirstStateAssignment (IntPtr pass)
static IntPtr cgGetFirstStructParameter (IntPtr param)
 Gets the first child parameter in a struct parameter.
static IntPtr cgGetFirstTechnique (IntPtr effect)
static IntPtr cgGetFirstTechniqueAnnotation (IntPtr technique)
static float[] cgGetFloatAnnotationValues (IntPtr annotation, out int nvalues)
static float[] cgGetFloatStateAssignmentValues (IntPtr stateassignment, int[] nVals)
static int[] cgGetIntAnnotationValues (IntPtr annotation, out int nvalues)
static int[] cgGetIntStateAssignmentValues (IntPtr stateassignment, int[] nVals)
static string cgGetLastErrorString (out int error)
static void cgGetMatrixParameterdc (IntPtr param, out double matrix)
static void cgGetMatrixParameterdr (IntPtr param, out double matrix)
static void cgGetMatrixParameterfc (IntPtr param, out float matrix)
static void cgGetMatrixParameterfr (IntPtr param, out float matrix)
static void cgGetMatrixParameteric (IntPtr param, out int matrix)
static void cgGetMatrixParameterir (IntPtr param, out int matrix)
static IntPtr cgGetNamedEffectParameter (IntPtr effect, string name)
static IntPtr cgGetNamedParameter (IntPtr program, string parameter)
 Gets the named parameter from the program.
static IntPtr cgGetNamedParameterAnnotation (IntPtr param, string name)
static IntPtr cgGetNamedPass (IntPtr technique, string name)
static IntPtr cgGetNamedPassAnnotation (IntPtr pass, string name)
static IntPtr cgGetNamedProgramAnnotation (IntPtr prog, string name)
static IntPtr cgGetNamedProgramParameter (IntPtr prog, int name_space, string name)
static IntPtr cgGetNamedSamplerState (IntPtr ctx, string name)
static IntPtr cgGetNamedSamplerStateAssignment (IntPtr param, string name)
static IntPtr cgGetNamedState (IntPtr ctx, string name)
static IntPtr cgGetNamedStateAssignment (IntPtr pass, string name)
static IntPtr cgGetNamedStructParameter (IntPtr param, string name)
static IntPtr cgGetNamedTechnique (IntPtr effect, string name)
static IntPtr cgGetNamedTechniqueAnnotation (IntPtr technique, string name)
static int cgGetNamedUserType (IntPtr handle, string name)
static IntPtr cgGetNextAnnotation (IntPtr annotation)
static IntPtr cgGetNextEffect (IntPtr effect)
static IntPtr cgGetNextLeafParameter (IntPtr currentParam)
 Gets a handle to the leaf parameter directly following the specified param.
static IntPtr cgGetNextParameter (IntPtr currentParam)
 Iterates to next parameter in program.
static IntPtr cgGetNextPass (IntPtr pass)
static IntPtr cgGetNextProgram (IntPtr current)
 Iterate trough programs in a context.
static IntPtr cgGetNextState (IntPtr state)
static IntPtr cgGetNextStateAssignment (IntPtr stateassignment)
static IntPtr cgGetNextTechnique (IntPtr technique)
static int cgGetNumConnectedToParameters (IntPtr param)
static int cgGetNumDependentAnnotationParameters (IntPtr annotation)
static int cgGetNumDependentStateAssignmentParameters (IntPtr stateassignment)
static int cgGetNumParentTypes (int type)
static int cgGetNumUserTypes (IntPtr handle)
static int cgGetParameterBaseResource (IntPtr param)
 Gets a parameter's base resource.
static int cgGetParameterBaseType (IntPtr param)
static int cgGetParameterClass (IntPtr param)
static int cgGetParameterColumns (IntPtr param)
static IntPtr cgGetParameterContext (IntPtr param)
static int cgGetParameterDirection (IntPtr param)
 Gets the direction of this parameter, i.e. CG_IN, CG_OUT, CG_INOUT.
static int cgGetParameterIndex (IntPtr param)
static int cgGetParameterNamedType (IntPtr param)
static int cgGetParameterOrdinalNumber (IntPtr param)
 Returns an integer that represents the position of a parameter when it was declared within the Cg program.
static IntPtr cgGetParameterProgram (IntPtr param)
 Gets program that specified parameter belongs to.
static int cgGetParameterResource (IntPtr param)
 Gets a parameter's resource.
static int cgGetParameterResourceIndex (IntPtr param)
 Retrieves the index of the specifed parameter according to its type and variability.
static int cgGetParameterRows (IntPtr param)
static int cgGetParameterType (IntPtr param)
 Gets the data type of the specified parameter.
static int cgGetParameterValuedc (IntPtr param, int n, out double vals)
static int cgGetParameterValuedr (IntPtr param, int n, out double vals)
static int cgGetParameterValuefc (IntPtr param, int n, out float vals)
static int cgGetParameterValuefr (IntPtr param, int n, out float vals)
static int cgGetParameterValueic (IntPtr param, int n, out int vals)
static int cgGetParameterValueir (IntPtr param, int n, out int vals)
static IntPtr cgGetParameterValues (IntPtr param, int value_type, IntPtr nvalues)
 Gets a program parameter's values.
static unsafe double * cgGetParameterValues (IntPtr param, int value_type, int *nvalues)
 Gets a program parameter's values.
static double[] cgGetParameterValues (IntPtr param, int value_type, int[] nvalues)
 Gets a program parameter's values.
static int cgGetParameterVariability (IntPtr param)
 Gets the variability of the specified param (i.e, uniform, varying, etc).
static int cgGetParentType (int type, int index)
static string cgGetPassName (IntPtr pass)
static IntPtr cgGetPassTechnique (IntPtr pass)
static int cgGetProfile (string profile)
 Returns a profile enum value based on the string representation of the profile.
static string cgGetProfileString (int profile)
static IntPtr cgGetProgramContext (IntPtr prog)
 Gets a programs parent context.
static string[] cgGetProgramOptions (IntPtr prog)
static int cgGetProgramProfile (IntPtr prog)
 Gets the profile enumeration of the program.
static IntPtr cgGetProgramStateAssignmentValue (IntPtr stateassignment)
static int cgGetResource (string resource_name)
 Gets the resource enumerant assigned to a resource name.
static IntPtr cgGetSamplerStateAssignmentParameter (IntPtr stateassignment)
static IntPtr cgGetSamplerStateAssignmentState (IntPtr stateassignment)
static IntPtr cgGetSamplerStateAssignmentValue (IntPtr stateassignment)
static int cgGetStateAssignmentIndex (IntPtr stateassignment)
static IntPtr cgGetStateAssignmentPass (IntPtr stateassignment)
static IntPtr cgGetStateAssignmentState (IntPtr stateassignment)
static string cgGetStateName (IntPtr state)
static CGstatecallbackDelegate cgGetStateResetCallback (IntPtr state)
static CGstatecallbackDelegate cgGetStateSetCallback (IntPtr state)
static int cgGetStateType (IntPtr state)
static CGstatecallbackDelegate cgGetStateValidateCallback (IntPtr state)
static string cgGetString (int sname)
static string cgGetStringAnnotationValue (IntPtr annotation)
static string cgGetStringParameterValue (IntPtr param)
static string cgGetStringStateAssignmentValue (IntPtr stateassignment)
static IntPtr cgGetTechniqueEffect (IntPtr technique)
static string cgGetTechniqueName (IntPtr technique)
static IntPtr cgGetTextureStateAssignmentValue (IntPtr stateassignment)
static int cgGetType (string type_string)
static string cgGetTypeString (int type)
static int cgGetUserType (IntPtr handle, int index)
static int cgIsAnnotation (IntPtr annotation)
static int cgIsContext (IntPtr context)
 Given the specified context handle, returns true if it is a valid Cg context.
static int cgIsEffect (IntPtr effect)
static int cgIsInterfaceType (int type)
static bool cgIsParameter (IntPtr param)
 Determines if parameter is valid Cg parameter object.
static int cgIsParameterGlobal (IntPtr param)
static int cgIsParameterReferenced (IntPtr param)
 Queries whether the specified program will be used in the final compiled program.
static int cgIsParameterUsed (IntPtr param, IntPtr handle)
static int cgIsParentType (int parent, int child)
static int cgIsPass (IntPtr pass)
static bool cgIsProgram (IntPtr prog)
 Determine if a program handle references a Cg program object.
static bool cgIsProgramCompiled (IntPtr prog)
 Determines if a program has been compiled.
static int cgIsState (IntPtr state)
static int cgIsStateAssignment (IntPtr stateassignment)
static int cgIsTechnique (IntPtr technique)
static int cgIsTechniqueValidated (IntPtr technique)
static void cgResetPassState (IntPtr pass)
static void cgSetArraySize (IntPtr param, int size)
static void cgSetAutoCompile (IntPtr ctx, int flag)
static void cgSetErrorCallback (CGerrorCallbackFuncDelegate func)
static void cgSetErrorHandler (CGerrorHandlerFuncDelegate func, IntPtr data)
static void cgSetLastListing (IntPtr handle, string listing)
static void cgSetMatrixParameterdc (IntPtr param, out double matrix)
static void cgSetMatrixParameterdr (IntPtr param, out double matrix)
static void cgSetMatrixParameterfc (IntPtr param, out float matrix)
static void cgSetMatrixParameterfr (IntPtr param, out float matrix)
static void cgSetMatrixParameteric (IntPtr param, out int matrix)
static void cgSetMatrixParameterir (IntPtr param, out int matrix)
static void cgSetMultiDimArraySize (IntPtr param, out int sizes)
static void cgSetParameter1d (IntPtr param, double x)
static void cgSetParameter1dv (IntPtr param, out double v)
static void cgSetParameter1f (IntPtr param, float x)
static void cgSetParameter1fv (IntPtr param, out float v)
static void cgSetParameter1i (IntPtr param, int x)
static void cgSetParameter1iv (IntPtr param, out int v)
static void cgSetParameter2d (IntPtr param, double x, double y)
static void cgSetParameter2dv (IntPtr param, out double v)
static void cgSetParameter2f (IntPtr param, float x, float y)
static void cgSetParameter2fv (IntPtr param, out float v)
static void cgSetParameter2i (IntPtr param, int x, int y)
static void cgSetParameter2iv (IntPtr param, out int v)
static void cgSetParameter3d (IntPtr param, double x, double y, double z)
static void cgSetParameter3dv (IntPtr param, out double v)
static void cgSetParameter3f (IntPtr param, float x, float y, float z)
static void cgSetParameter3fv (IntPtr param, out float v)
static void cgSetParameter3i (IntPtr param, int x, int y, int z)
static void cgSetParameter3iv (IntPtr param, out int v)
static void cgSetParameter4d (IntPtr param, double x, double y, double z, double w)
static void cgSetParameter4dv (IntPtr param, out double v)
static void cgSetParameter4f (IntPtr param, float x, float y, float z, float w)
static void cgSetParameter4fv (IntPtr param, out float v)
static void cgSetParameter4i (IntPtr param, int x, int y, int z, int w)
static void cgSetParameter4iv (IntPtr param, out int v)
static void cgSetParameterSemantic (IntPtr param, string semantic)
static void cgSetParameterValuedc (IntPtr param, int n, out double vals)
static void cgSetParameterValuedr (IntPtr param, int n, out double vals)
static void cgSetParameterValuefc (IntPtr param, int n, out float vals)
static void cgSetParameterValuefr (IntPtr param, int n, out float vals)
static void cgSetParameterValueic (IntPtr param, int n, out int vals)
static void cgSetParameterValueir (IntPtr param, int n, out int vals)
static void cgSetParameterVariability (IntPtr param, int vary)
static void cgSetPassProgramParameters (IntPtr prog)
static void cgSetPassState (IntPtr pass)
static void cgSetProgramProfile (IntPtr prog, int profile)
static void cgSetSamplerState (IntPtr param)
static void cgSetStateCallbacks (IntPtr state, CGstatecallbackDelegate set, CGstatecallbackDelegate reset, CGstatecallbackDelegate validate)
static void cgSetStringParameterValue (IntPtr param, string str)
delegate int CGstatecallbackDelegate (IntPtr CGstateassignment)
static int cgValidateTechnique (IntPtr technique)

Static Public Member Functions

static string cgGetErrorString (int error)
 Returns an error description from the specified error enum value.
static string cgGetLastListing (IntPtr context)
 Gets the compiler output from the results of the most recent program compilation for the given Cg context.
static string cgGetParameterName (IntPtr param)
 Gets the name of the specified program.
static string cgGetParameterSemantic (IntPtr param)
 Gets the parameter's semantic string.
static string cgGetProgramString (IntPtr program, int sourceType)
 Gets the specified source from the program.
static string cgGetResourceString (int resource)
 get the resource name associated with a resource enumerant

Public Attributes

const int CG_ARRAY = 2
 A collection of one or more elements of the same type.
const int CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR = 37
 Cannot bind the given parameters. Array dimensions do not match.
const int CG_ARRAY_HAS_WRONG_DIMENSION_ERROR = 38
 The array is has the wrong dimension.
const int CG_ARRAY_PARAM_ERROR = 22
 The parameter must be an array.
const int CG_ARRAY_SIZE_MISMATCH_ERROR = 53
 The specified array sizes are not compatible with the given array.
const int CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR = 36
 Cannot bind the given parameters. Array types do not match.
const int CG_ATTR0 = 2113
const int CG_ATTR1 = 2114
const int CG_ATTR10 = 2123
const int CG_ATTR11 = 2124
const int CG_ATTR12 = 2125
const int CG_ATTR13 = 2126
const int CG_ATTR14 = 2127
const int CG_ATTR15 = 2128
const int CG_ATTR2 = 2115
const int CG_ATTR3 = 2116
const int CG_ATTR4 = 2117
const int CG_ATTR5 = 2118
const int CG_ATTR6 = 2119
const int CG_ATTR7 = 2120
const int CG_ATTR8 = 2121
const int CG_ATTR9 = 2122
const int CG_BIND_CREATES_CYCLE_ERROR = 35
 Cannot bind the given parameters. Binding will form a cycle.
const int CG_BINORMAL0 = 2885
const int CG_BINORMAL1 = 2886
const int CG_BINORMAL10 = 2895
const int CG_BINORMAL11 = 2896
const int CG_BINORMAL12 = 2897
const int CG_BINORMAL13 = 2898
const int CG_BINORMAL14 = 2899
const int CG_BINORMAL15 = 2900
const int CG_BINORMAL2 = 2887
const int CG_BINORMAL3 = 2888
const int CG_BINORMAL4 = 2889
const int CG_BINORMAL5 = 2890
const int CG_BINORMAL6 = 2891
const int CG_BINORMAL7 = 2892
const int CG_BINORMAL8 = 2893
const int CG_BINORMAL9 = 2894
const int CG_BLENDINDICES0 = 2693
const int CG_BLENDINDICES1 = 2694
const int CG_BLENDINDICES10 = 2703
const int CG_BLENDINDICES11 = 2704
const int CG_BLENDINDICES12 = 2705
const int CG_BLENDINDICES13 = 2706
const int CG_BLENDINDICES14 = 2707
const int CG_BLENDINDICES15 = 2708
const int CG_BLENDINDICES2 = 2695
const int CG_BLENDINDICES3 = 2696
const int CG_BLENDINDICES4 = 2697
const int CG_BLENDINDICES5 = 2698
const int CG_BLENDINDICES6 = 2699
const int CG_BLENDINDICES7 = 2700
const int CG_BLENDINDICES8 = 2701
const int CG_BLENDINDICES9 = 2702
const int CG_BLENDWEIGHT0 = 3028
const int CG_BLENDWEIGHT1 = 3029
const int CG_BLENDWEIGHT10 = 3038
const int CG_BLENDWEIGHT11 = 3039
const int CG_BLENDWEIGHT12 = 3040
const int CG_BLENDWEIGHT13 = 3041
const int CG_BLENDWEIGHT14 = 3042
const int CG_BLENDWEIGHT15 = 3043
const int CG_BLENDWEIGHT2 = 3030
const int CG_BLENDWEIGHT3 = 3031
const int CG_BLENDWEIGHT4 = 3032
const int CG_BLENDWEIGHT5 = 3033
const int CG_BLENDWEIGHT6 = 3034
const int CG_BLENDWEIGHT7 = 3035
const int CG_BLENDWEIGHT8 = 3036
const int CG_BLENDWEIGHT9 = 3037
const int CG_BOOL = 1114
 The bool type represents Boolean values. Objects of bool type are either true or false.
const int CG_BOOL1 = 1115
 Single-element, packed, bool array (vector type).
const int CG_BOOL1x1 = 1119
 1x1, packed, bool array (matrix type).
const int CG_BOOL1x2 = 1120
 1x2, packed, bool array (matrix type).
const int CG_BOOL1x3 = 1121
 1x3, packed, bool array (matrix type).
const int CG_BOOL1x4 = 1122
 1x4, packed, bool array (matrix type).
const int CG_BOOL2 = 1116
 Two-element, packed, bool array (vector type).
const int CG_BOOL2x1 = 1123
 2x1, packed, bool array (matrix type).
const int CG_BOOL2x2 = 1124
 2x2, packed, bool array (matrix type).
const int CG_BOOL2x3 = 1125
 2x3, packed, bool array (matrix type).
const int CG_BOOL2x4 = 1126
 2x4, packed, bool array (matrix type).
const int CG_BOOL3 = 1117
 Three-element, packed, bool array (vector type).
const int CG_BOOL3x1 = 1127
 3x1, packed, bool array (matrix type).
const int CG_BOOL3x2 = 1128
 3x2, packed, bool array (matrix type).
const int CG_BOOL3x3 = 1129
 3x3, packed, bool array (matrix type).
const int CG_BOOL3x4 = 1130
 3x4, packed, bool array (matrix type).
const int CG_BOOL4 = 1118
 Four-element, packed, bool array (vector type).
const int CG_BOOL4x1 = 1131
 4x1, packed, bool array (matrix type).
const int CG_BOOL4x2 = 1132
 4x2, packed, bool array (matrix type).
const int CG_BOOL4x3 = 1133
 4x3, packed, bool array (matrix type).
const int CG_BOOL4x4 = 1134
 4x4, packed, bool array (matrix type).
const int CG_C = 2178
const int CG_CANNOT_DESTROY_PARAMETER_ERROR = 28
 Cannot destroy the parameter. It is bound to other parameters or is not a root parameter.
const int CG_COL0 = 2245
const int CG_COL1 = 2246
const int CG_COL2 = 2247
const int CG_COL3 = 2248
const int CG_COLOR0 = 2757
const int CG_COLOR1 = 2758
const int CG_COLOR10 = 2767
const int CG_COLOR11 = 2768
const int CG_COLOR12 = 2769
const int CG_COLOR13 = 2770
const int CG_COLOR14 = 2771
const int CG_COLOR15 = 2772
const int CG_COLOR2 = 2759
const int CG_COLOR3 = 2760
const int CG_COLOR4 = 2761
const int CG_COLOR5 = 2762
const int CG_COLOR6 = 2763
const int CG_COLOR7 = 2764
const int CG_COLOR8 = 2765
const int CG_COLOR9 = 2766
const int CG_COLUMN_MAJOR = 4121
const int CG_COMBINER_CONST0 = 3284
const int CG_COMBINER_CONST1 = 3285
const int CG_COMBINER_STAGE_CONST0 = 3286
const int CG_COMBINER_STAGE_CONST1 = 3287
const int CG_COMPILE_IMMEDIATE = 4115
const int CG_COMPILE_LAZY = 4116
const int CG_COMPILE_MANUAL = 4114
const int CG_COMPILED_PROGRAM = 4106
 The string for the compiled program.
const int CG_COMPILER_ERROR = 1
 The compile returned an error.
const int CG_CONFLICTING_PARAMETER_TYPES_ERROR = 25
 A type being added to the context conflicts with an existing type.
const int CG_CONFLICTING_TYPES_ERROR = 24
 A type being added to the context conflicts with an existing type.
const int CG_CONST_EYE = 3291
const int CG_CONSTANT = 4103
 A constant parameter never changes for the life of a compiled program. Modifying a constant parameter requires program recompilation.
const int CG_CURRENT = 4117
const int CG_DEFAULT = 4110
 The default values for a uniform parameter.
const int CG_DEPTH0 = 2933
const int CG_DEPTH1 = 2934
const int CG_DEPTH10 = 2943
const int CG_DEPTH11 = 2944
const int CG_DEPTH12 = 2945
const int CG_DEPTH13 = 2946
const int CG_DEPTH14 = 2947
const int CG_DEPTH15 = 2948
const int CG_DEPTH2 = 2935
const int CG_DEPTH3 = 2936
const int CG_DEPTH4 = 2937
const int CG_DEPTH5 = 2938
const int CG_DEPTH6 = 2939
const int CG_DEPTH7 = 2940
const int CG_DEPTH8 = 2941
const int CG_DEPTH9 = 29542
const int CG_DIFFUSE0 = 2501
const int CG_ERROR = 4111
 An error.
const int CG_FALSE = 0
 False.
const int CG_FILE_READ_ERROR = 12
 The file could not be read.
const int CG_FILE_WRITE_ERROR = 13
 The file could not be written.
const int CG_FIXED = 1070
 The fixed type is a signed type with a range of at least [-2,2) and with at least 10 bits of fractional precision. Overflow operations on the data type clamp rather than wrap. Fragment profiles must support the fixed type, but may implement it with the same precision as the half or float types. Vertex profiles are required to provide partial support for the fixed type. Vertex profiles have the option to provide full support for the fixed type or to implement the fixed type with the same precision as the half or float types.
const int CG_FIXED1 = 1092
 Single-element, packed, fixed array (vector type).
const int CG_FIXED1x1 = 1074
 1x1, packed, fixed array (matrix type).
const int CG_FIXED1x2 = 1075
 1x2, packed, fixed array (matrix type).
const int CG_FIXED1x3 = 1076
 1x3, packed, fixed array (matrix type).
const int CG_FIXED1x4 = 1077
 1x4, packed, fixed array (matrix type).
const int CG_FIXED2 = 1071
 Two-element, packed, fixed array (vector type).
const int CG_FIXED2x1 = 1078
 2x1, packed, fixed array (matrix type).
const int CG_FIXED2x2 = 1079
 2x2, packed, fixed array (matrix type).
const int CG_FIXED2x3 = 1080
 2x3, packed, fixed array (matrix type).
const int CG_FIXED2x4 = 1081
 2x4, packed, fixed array (matrix type).
const int CG_FIXED3 = 1072
 Three-element, packed, fixed array (vector type).
const int CG_FIXED3x1 = 1082
 3x1, packed, fixed array (matrix type).
const int CG_FIXED3x2 = 1083
 3x2, packed, fixed array (matrix type).
const int CG_FIXED3x3 = 1084
 3x3, packed, fixed array (matrix type).
const int CG_FIXED3x4 = 1085
 3x4, packed, fixed array (matrix type).
const int CG_FIXED4 = 1073
 Four-element, packed, fixed array (vector type).
const int CG_FIXED4x1 = 1086
 4x1, packed, fixed array (matrix type).
const int CG_FIXED4x2 = 1087
 4x2, packed, fixed array (matrix type).
const int CG_FIXED4x3 = 1088
 4x3, packed, fixed array (matrix type).
const int CG_FIXED4x4 = 1089
 4x4, packed, fixed array (matrix type).
const int CG_FLOAT = 1045
 The float type is as close as possible to the IEEE single precision (32-bit) floating point. Profiles must support the float data type.
const int CG_FLOAT1 = 1091
 Single-element, packed, float array (vector type).
const int CG_FLOAT1x1 = 1049
 1x1, packed, float array (matrix type).
const int CG_FLOAT1x2 = 1050
 1x2, packed, float array (matrix type).
const int CG_FLOAT1x3 = 1051
 1x3, packed, float array (matrix type).
const int CG_FLOAT1x4 = 1052
 1x4, packed, float array (matrix type).
const int CG_FLOAT2 = 1046
 Two-element, packed, float array (vector type).
const int CG_FLOAT2x1 = 1053
 2x1, packed, float array (matrix type).
const int CG_FLOAT2x2 = 1054
 2x2, packed, float array (matrix type).
const int CG_FLOAT2x3 = 1055
 2x3, packed, float array (matrix type).
const int CG_FLOAT2x4 = 1056
 2x4, packed, float array (matrix type).
const int CG_FLOAT3 = 1047
 Three-element, packed, float array (vector type).
const int CG_FLOAT3x1 = 1057
 3x1, packed, float array (matrix type).
const int CG_FLOAT3x2 = 1058
 3x2, packed, float array (matrix type).
const int CG_FLOAT3x3 = 1059
 3x3, packed, float array (matrix type).
const int CG_FLOAT3x4 = 1060
 3x4, packed, float array (matrix type).
const int CG_FLOAT4 = 1048
 Four-element, packed, float array (vector type).
const int CG_FLOAT4x1 = 1061
 4x1, packed, float array (matrix type).
const int CG_FLOAT4x2 = 1062
 4x2, packed, float array (matrix type).
const int CG_FLOAT4x3 = 1063
 4x3, packed, float array (matrix type).
const int CG_FLOAT4x4 = 1064
 4x4, packed, float array (matrix type).
const int CG_FOG0 = 2917
const int CG_FOG1 = 2918
const int CG_FOG10 = 2927
const int CG_FOG11 = 2928
const int CG_FOG12 = 2929
const int CG_FOG13 = 2930
const int CG_FOG14 = 2931
const int CG_FOG15 = 2932
const int CG_FOG2 = 2919
const int CG_FOG3 = 2920
const int CG_FOG4 = 2921
const int CG_FOG5 = 2922
const int CG_FOG6 = 2923
const int CG_FOG7 = 2924
const int CG_FOG8 = 2925
const int CG_FOG9 = 2926
const int CG_FOGCOORD = 3156
const int CG_GLOBAL = 4108
 A global.
const int CG_HALF = 1025
 The half type is lower-precision IEEE-like floating point. Profiles must support the half type, but may choose to implement it with the same precision as the float type.
const int CG_HALF1 = 1090
 Single-element, packed, half array (vector type).
const int CG_HALF1x1 = 1029
 1x1, packed, half array (matrix type).
const int CG_HALF1x2 = 1030
 1x2, packed, half array (matrix type).
const int CG_HALF1x3 = 1031
 1x3, packed, half array (matrix type).
const int CG_HALF1x4 = 1032
 1x4, packed, half array (matrix type).
const int CG_HALF2 = 1026
 Two-element, packed, half array (vector type).
const int CG_HALF2x1 = 1033
 2x1, packed, half array (matrix type).
const int CG_HALF2x2 = 1034
 2x2, packed, half array (matrix type).
const int CG_HALF2x3 = 1035
 2x3, packed, half array (matrix type).
const int CG_HALF2x4 = 1036
 2x4, packed, half array (matrix type).
const int CG_HALF3 = 1027
 Three-element, packed, half array (vector type).
const int CG_HALF3x1 = 1037
 3x1, packed, half array (matrix type).
const int CG_HALF3x2 = 1038
 3x2, packed, half array (matrix type).
const int CG_HALF3x3 = 1039
 3x3, packed, half array (matrix type).
const int CG_HALF3x4 = 1040
 3x4, packed, half array (matrix type).
const int CG_HALF4 = 1028
 Four-element, packed, half array (vector type).
const int CG_HALF4x1 = 1041
 4x1, packed, half array (matrix type).
const int CG_HALF4x2 = 1042
 4x2, packed, half array (matrix type).
const int CG_HALF4x3 = 1043
 4x3, packed, half array (matrix type).
const int CG_HALF4x4 = 1044
 4x4, packed, half array (matrix type).
const int CG_HPOS = 2243
const int CG_IN = 4097
 Specifies an input parameter.
const int CG_INOUT = 4099
 Specifies a parameter that is both input and output.
const int CG_INT = 1093
 The int type is preferably 32-bit two’s complement. Profiles may optionally treat int as float.
const int CG_INT1 = 1094
 Single-element, packed, int array (vector type).
const int CG_INT1x1 = 1098
 1x1, packed, int array (matrix type).
const int CG_INT1x2 = 1099
 1x2, packed, int array (matrix type).
const int CG_INT1x3 = 1100
 1x3, packed, int array (matrix type).
const int CG_INT1x4 = 1101
 1x4, packed, int array (matrix type).
const int CG_INT2 = 1095
 Two-element, packed, int array (vector type).
const int CG_INT2x1 = 1102
 2x1, packed, int array (matrix type).
const int CG_INT2x2 = 1103
 2x2, packed, int array (matrix type).
const int CG_INT2x3 = 1104
 2x3, packed, int array (matrix type).
const int CG_INT2x4 = 1105
 2x4, packed, int array (matrix type).
const int CG_INT3 = 1096
 Three-element, packed, int array (vector type).
const int CG_INT3x1 = 1106
 3x1, packed, int array (matrix type).
const int CG_INT3x2 = 1107
 3x2, packed, int array (matrix type).
const int CG_INT3x3 = 1108
 3x3, packed, int array (matrix type).
const int CG_INT3x4 = 1109
 3x4, packed, int array (matrix type).
const int CG_INT4 = 1097
 Four-element, packed, int array (vector type).
const int CG_INT4x1 = 1110
 4x1, packed, int array (matrix type).
const int CG_INT4x2 = 1111
 4x2, packed, int array (matrix type).
const int CG_INT4x3 = 1112
 4x3, packed, int array (matrix type).
const int CG_INT4x4 = 1113
 4x4, packed, int array (matrix type).
const int CG_INVALID_ANNOTATION_HANDLE_ERROR = 44
 Invalid annotation handle.
const int CG_INVALID_CONTEXT_HANDLE_ERROR = 16
 Invalid context handle.
const int CG_INVALID_DIMENSION_ERROR = 21
 The dimension value is invalid.
const int CG_INVALID_EFFECT_HANDLE_ERROR = 40
 Invalid effect handle.
const int CG_INVALID_ENUMERANT_ERROR = 10
 The enumerant parameter has an invalid value.
const int CG_INVALID_FUNCTION_HANDLE_ERROR = 48
 Invalid function handle.
const int CG_INVALID_PARAM_HANDLE_ERROR = 18
 Invalid parameter handle.
const int CG_INVALID_PARAMETER_ERROR = 2
 The parameter used is invalid.
const int CG_INVALID_PARAMETER_HANDLE_ERROR = 46
 Invalid parameter handle.
const int CG_INVALID_PARAMETER_TYPE_ERROR = 32
 The type of the parameter is invalid.
const int CG_INVALID_PARAMETER_VARIABILITY_ERROR = 27
 The parameter could not be changed to the given variability.
const int CG_INVALID_PASS_HANDLE_ERROR = 43
 Invalid pass handle.
const int CG_INVALID_POINTER_ERROR = 50
 The supplied pointer is NULL.
const int CG_INVALID_PROFILE_ERROR = 3
 The profile is not supported.
const int CG_INVALID_PROGRAM_HANDLE_ERROR = 17
 Invalid program handle.
const int CG_INVALID_SIZE_ERROR = 34
 The size value is invalid.
const int CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR = 42
 Invalid state assignment handle.
const int CG_INVALID_STATE_HANDLE_ERROR = 41
 Invalid state handle.
const int CG_INVALID_TECHNIQUE_ERROR = 49
 Technique did not pass validation.
const int CG_INVALID_TECHNIQUE_HANDLE_ERROR = 45
 Invalid technique handle.
const int CG_INVALID_VALUE_TYPE_ERROR = 8
 An unknown value type was assigned to a parameter.
const int CG_IS_NOT_PROGRAM_PARAMETER_ERROR = 31
 The parameter is not a program parameter.
const int CG_LITERAL = 4118
const int CG_MEMORY_ALLOC_ERROR = 15
 Memory allocation failed.
const int CG_MIXED = 4100
 A structure parameter that contains parameters that differ in variability.
const int CG_NO_ERROR = 0
 No error has occurred.
const int CG_NON_NUMERIC_PARAMETER_ERROR = 52
 The parameter is not of a numeric type.
const int CG_NORMAL0 = 3092
const int CG_NORMAL1 = 3093
const int CG_NORMAL10 = 3102
const int CG_NORMAL11 = 3103
const int CG_NORMAL12 = 3104
const int CG_NORMAL13 = 3105
const int CG_NORMAL14 = 3106
const int CG_NORMAL15 = 3107
const int CG_NORMAL2 = 3094
const int CG_NORMAL3 = 3095
const int CG_NORMAL4 = 3096
const int CG_NORMAL5 = 3097
const int CG_NORMAL6 = 3098
const int CG_NORMAL7 = 3099
const int CG_NORMAL8 = 3100
const int CG_NORMAL9 = 3101
const int CG_NOT_4x4_MATRIX_ERROR = 11
 The parameter must be a 4x4 matrix type.
const int CG_NOT_ENOUGH_DATA_ERROR = 51
 Not enough data was provided.
const int CG_NOT_MATRIX_PARAM_ERROR = 9
 The parameter is not of matrix type.
const int CG_NOT_ROOT_PARAMETER_ERROR = 29
 The parameter is not a root parameter.
const int CG_NVPARSE_ERROR = 14
 nvparse could not successfully parse the output from the Cg compiler backend.
const int CG_OBJECT = 4113
 A string that contains object code that resulted from the precompilation of some Cg source code.
const int CG_OFFSET_TEXTURE_BIAS = 3290
const int CG_OFFSET_TEXTURE_MATRIX = 3288
const int CG_OFFSET_TEXTURE_SCALE = 3289
const int CG_OUT = 4098
 Specifies an output parameter.
const int CG_OUT_OF_ARRAY_BOUNDS_ERROR = 23
 Index into the array is out of bounds.
const int CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR = 33
 The parameter must be a resizable array.
const int CG_PARAMETER_IS_NOT_SHARED_ERROR = 26
 The parameter must be global.
const int CG_PARAMETERCLASS_ARRAY = 5
const int CG_PARAMETERCLASS_MATRIX = 3
const int CG_PARAMETERCLASS_OBJECT = 7
const int CG_PARAMETERCLASS_SAMPLER = 6
const int CG_PARAMETERCLASS_SCALAR = 1
const int CG_PARAMETERCLASS_STRUCT = 4
const int CG_PARAMETERCLASS_UNKNOWN = 0
const int CG_PARAMETERCLASS_VECTOR = 2
const int CG_PARAMETERS_DO_NOT_MATCH_ERROR = 30
 The two parameters being bound do not match.
const int CG_POSITION0 = 2437
const int CG_POSITION1 = 2438
const int CG_POSITION10 = 2447
const int CG_POSITION11 = 2448
const int CG_POSITION12 = 2449
const int CG_POSITION13 = 2450
const int CG_POSITION14 = 2451
const int CG_POSITION15 = 2452
const int CG_POSITION2 = 2439
const int CG_POSITION3 = 2440
const int CG_POSITION4 = 2441
const int CG_POSITION5 = 2442
const int CG_POSITION6 = 2443
const int CG_POSITION7 = 2444
const int CG_POSITION8 = 2445
const int CG_POSITION9 = 2446
const int CG_PROFILE_ARBFP1 = 7000
 OpenGL ARB fragment programs 1.0.
const int CG_PROFILE_ARBVP1 = 6150
 OpenGL ARB vertex programs 1.0.
const int CG_PROFILE_FP20 = 6147
 OpenGL NV2x fragment programs.
const int CG_PROFILE_FP30 = 6149
 OpenGL NV30 fragment programs.
const int CG_PROFILE_GENERIC = 7002
 DirectX 9 vertex shaders.
const int CG_PROFILE_MAX = 7100
const int CG_PROFILE_PS_1_1 = 6159
 DirectX 8 pixel shaders.
const int CG_PROFILE_PS_1_2 = 6160
 DirectX 8 pixel shaders.
const int CG_PROFILE_PS_1_3 = 6161
 DirectX 8 pixel shaders.
const int CG_PROFILE_PS_2_0 = 6162
 DirectX 9 pixel shaders.
const int CG_PROFILE_PS_2_X = 6163
 DirectX 9 pixel shaders.
const int CG_PROFILE_START = 6144
const int CG_PROFILE_UNKNOWN = 6145
const int CG_PROFILE_VP20 = 6146
 OpenGL NV2x vertex programs.
const int CG_PROFILE_VP30 = 6148
 OpenGL NV30 vertex programs.
const int CG_PROFILE_VP40 = 7001
 OpenGL NV40 vertex programs.
const int CG_PROFILE_VS_1_1 = 6153
 DirectX 8 vertex shaders.
const int CG_PROFILE_VS_2_0 = 6154
 DirectX 9 vertex shaders.
const int CG_PROFILE_VS_2_X = 6155
 DirectX 9 vertex shaders.
const int CG_PROGRAM = 4109
 The program.
const int CG_PROGRAM_BIND_ERROR = 5
 The program could not bind.
const int CG_PROGRAM_ENTRY = 4105
 The main entry point for the program.
const int CG_PROGRAM_LOAD_ERROR = 4
 The program could not load.
const int CG_PROGRAM_NOT_LOADED_ERROR = 6
 The program must be loaded before this operation may be used.
const int CG_PROGRAM_PROFILE = 4107
 The profile for the program.
const int CG_PROGRAM_SOURCE = 4104
 The original Cg source program.
const int CG_PROGRAM_TYPE = 1136
const int CG_PSIZ = 2309
const int CG_PSIZE0 = 2821
const int CG_PSIZE1 = 2822
const int CG_PSIZE10 = 2831
const int CG_PSIZE11 = 2832
const int CG_PSIZE12 = 2833
const int CG_PSIZE13 = 2834
const int CG_PSIZE14 = 2835
const int CG_PSIZE15 = 2836
const int CG_PSIZE2 = 2823
const int CG_PSIZE3 = 2824
const int CG_PSIZE4 = 2825
const int CG_PSIZE5 = 2826
const int CG_PSIZE6 = 2827
const int CG_PSIZE7 = 2828
const int CG_PSIZE8 = 2829
const int CG_PSIZE9 = 2830
const int CG_ROW_MAJOR = 4120
const int CG_SAMPLE0 = 2949
const int CG_SAMPLE1 = 2950
const int CG_SAMPLE10 = 2959
const int CG_SAMPLE11 = 2960
const int CG_SAMPLE12 = 2961
const int CG_SAMPLE13 = 2962
const int CG_SAMPLE14 = 2963
const int CG_SAMPLE15 = 2964
const int CG_SAMPLE2 = 2951
const int CG_SAMPLE3 = 2952
const int CG_SAMPLE4 = 2953
const int CG_SAMPLE5 = 2954
const int CG_SAMPLE6 = 2955
const int CG_SAMPLE7 = 2956
const int CG_SAMPLE8 = 2957
const int CG_SAMPLE9 = 2958
const int CG_SAMPLER1D = 1065
 A handle to a 1-dimensional texture object.
const int CG_SAMPLER2D = 1066
 A handle to a 2-dimensional texture object.
const int CG_SAMPLER3D = 1067
 A handle to a 3-dimensional texture object.
const int CG_SAMPLERCUBE = 1069
 A handle to a texture object cube map.
const int CG_SAMPLERRECT = 1068
 A handle to a texture object rectangle.
const int CG_SOURCE = 4112
 A string that contains Cg source code.
const int CG_SPECULAR0 = 2629
const int CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR = 47
 Invalid parameter handle.
const int CG_STRING = 1135
const int CG_STRUCT = 1
 A collection of one or more members of possibly different types.
const int CG_TANGENT0 = 2565
const int CG_TANGENT1 = 2566
const int CG_TANGENT10 = 2575
const int CG_TANGENT11 = 2576
const int CG_TANGENT12 = 2577
const int CG_TANGENT13 = 2578
const int CG_TANGENT14 = 2579
const int CG_TANGENT15 = 2580
const int CG_TANGENT2 = 2567
const int CG_TANGENT3 = 2568
const int CG_TANGENT4 = 2569
const int CG_TANGENT5 = 2570
const int CG_TANGENT6 = 2571
const int CG_TANGENT7 = 2572
const int CG_TANGENT8 = 2573
const int CG_TANGENT9 = 2574
const int CG_TESSFACTOR = 3255
const int CG_TEX0 = 2179
const int CG_TEX1 = 2180
const int CG_TEX2 = 2181
const int CG_TEX3 = 2192
const int CG_TEX4 = 2193
const int CG_TEX5 = 2194
const int CG_TEX6 = 2195
const int CG_TEX7 = 2196
const int CG_TEXCOORD0 = 3220
const int CG_TEXCOORD1 = 3221
const int CG_TEXCOORD10 = 3230
const int CG_TEXCOORD11 = 3231
const int CG_TEXCOORD12 = 3232
const int CG_TEXCOORD13 = 3233
const int CG_TEXCOORD14 = 3234
const int CG_TEXCOORD15 = 3235
const int CG_TEXCOORD2 = 3222
const int CG_TEXCOORD3 = 3223
const int CG_TEXCOORD4 = 3224
const int CG_TEXCOORD5 = 3225
const int CG_TEXCOORD6 = 3226
const int CG_TEXCOORD7 = 3227
const int CG_TEXCOORD8 = 3228
const int CG_TEXCOORD9 = 3229
const int CG_TEXTURE = 1137
const int CG_TEXUNIT0 = 2048
 Texture unit.
const int CG_TEXUNIT1 = 2049
const int CG_TEXUNIT10 = 2058
const int CG_TEXUNIT11 = 2059
const int CG_TEXUNIT12 = 2060
const int CG_TEXUNIT13 = 2061
const int CG_TEXUNIT14 = 2062
const int CG_TEXUNIT15 = 2063
const int CG_TEXUNIT2 = 2050
const int CG_TEXUNIT3 = 2051
const int CG_TEXUNIT4 = 2052
const int CG_TEXUNIT5 = 2053
const int CG_TEXUNIT6 = 2054
const int CG_TEXUNIT7 = 2055
const int CG_TEXUNIT8 = 2056
const int CG_TEXUNIT9 = 2057
const int CG_TRUE = 1
 True.
const int CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR = 39
 Connecting the parameters failed because The type of the source parameter is not defined within the given program or does not match the type with the same name in the program.
const int CG_TYPE_START_ENUM = 1024
 Start of the Cg data type definitions.
const int CG_UNDEFINED = 0
const int CG_UNIFORM = 4102
 A uniform parameter is one whose value does not chance with each invocation of a program, but whose value can change between groups of program invocations.
const int CG_UNKNOWN = 4096
 Unknown resource.
const int CG_UNKNOWN_PROFILE_ERROR = 19
 The specified profile is unknown.
const int CG_UNKNOWN_TYPE = 0
 An unknown data type.
const int CG_UNSUPPORTED_GL_EXTENSION_ERROR = 7
 An unsupported GL extension was required to perform this operation.
const int CG_VAR_ARG_ERROR = 20
 The variable arguments were specified incorrectly.
const int CG_VARYING = 4101
 A varying parameter is one whose value changes with each invocation of the program.
const int CG_VERSION = 4119
const int CG_VERSION_NUM = 1400
const int CG_WPOS = 2373

Private Member Functions

static IntPtr cgGetErrorStringA (int error)
 Returns an error description from the specified error enum value.
static IntPtr cgGetLastListingA (IntPtr context)
 Gets the compiler output from the results of the most recent program compilation for the given Cg context.
static IntPtr cgGetParameterNameA (IntPtr param)
 Gets the name of the specified program.
static IntPtr cgGetParameterSemanticA (IntPtr param)
static IntPtr cgGetProgramStringA (IntPtr program, int sourceType)
 Gets the specified source from the program.
static IntPtr cgGetResourceStringA (int resource)

Private Attributes

const CallingConvention CALLING_CONVENTION = CallingConvention.Cdecl
 Specifies the calling convention.
const string CG_NATIVE_LIBRARY = "cg.dll"
 Specifies CG's native library archive.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index