示例#1
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgCreateStateAssignment creates a state assignment for the specified pass.</para>
 /// <para>The new state assignment is appended to the pass' existing list of state assignments.</para>
 /// <para>If the state is actually a state array, the created state assignment is created for array index zero.</para>
 /// <para>Use cgCreateStateAssignmentIndex to create state assignments for other indices of an array state.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass. CG_INVALID_STATE_HANDLE_ERROR is generated if state is not a valid state.</para>
 /// <para>VERSION: cgCreateStateAssignment was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="pass">The pass in which to create the state assignment.</param>
 /// <param name="state">The state used to create the state assignment.</param>
 /// <returns>Returns the handle to the created state assignment. Returns NULL if an error occurs.</returns>
 public static CgStateAssignment CreateStateAssignment(CgPass pass, CgState state)
 {
     return cgCreateStateAssignment(pass, state);
 }
示例#2
0
 private static extern void cgSetPassState(CgPass pass);
示例#3
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgResetPassState resets all of the graphics state defined in a pass by calling the state resetting callbacks for all of the state assignments in the pass.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass. CG_INVALID_TECHNIQUE_ERROR is generated if the technique of which pass is a part has failed validation.</para>
 /// <para>VERSION: cgResetPassState was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="pass">The pass handle.</param>
 public static void ResetPassState(CgPass pass)
 {
     cgResetPassState(pass);
 }
示例#4
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgUpdatePassParameters is a convenience routine which calls cgUpdateProgramParameters for all programs of a pass.</para>
 /// <para>ERROR: CG_INVALID_PROGRAM_HANDLE_ERROR is generated if pass is not a valid pass handle.</para>
 /// <para>VERSION: cgUpdatePassParameters was introduced in Cg 2.1.</para>
 /// </summary>
 /// <param name="pass">The pass for which deferred parameters will be updated.</param>
 public static void UpdatePassParameters(CgPass pass)
 {
     cgUpdatePassParameters(pass);
 }
示例#5
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgGetPassName allows the application to retrieve the name of a pass in a Cg program.</para>
 /// <para>This name can be used later to retrieve the pass from the program using cgGetNamedPass.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass.</para>
 /// <para>VERSION: cgGetPassName was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="pass">The pass.</param>
 /// <returns>Returns the NULL-terminated name string for the pass. Returns NULL if pass is invalid.</returns>
 public static string GetPassName(CgPass pass)
 {
     return cgGetPassName(pass);
 }
示例#6
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgGetPassTechnique allows the application to retrieve a handle to the technique to which a given pass belongs.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass.</para>
 /// <para>VERSION: cgGetPassTechnique was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="pass">The pass.</param>
 /// <returns>Returns a CGtechnique handle to the technique. Returns NULL if an error occurs.</returns>
 public static CgTechnique GetPassTechnique(CgPass pass)
 {
     return cgGetPassTechnique(pass);
 }
示例#7
0
 private static extern CgStateAssignment cgGetFirstStateAssignment(CgPass pass);
示例#8
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>The state assignments of a pass can be retrieved directly by name using cgGetNamedStateAssignment.</para>
 /// <para>The names of the state assignments in a pass can be discovered by iterating through the pass's state assignments (see cgGetFirstStateAssignment and cgGetNextStateAssignment), calling cgGetStateAssignmentState then cgGetStateName for each one in turn.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass.</para>
 /// <para>VERSION: cgGetNamedStateAssignment was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="pass">The pass from which to retrieve the state assignment.</param>
 /// <param name="name">The name of the state assignment to retrieve.</param>
 /// <returns>Returns the named state assignment from the pass. Returns NULL if the pass has no state assignment corresponding to name.</returns>
 public static CgStateAssignment GetNamedStateAssignment(CgPass pass, [In]string name)
 {
     return cgGetNamedStateAssignment(pass, name);
 }
示例#9
0
 private static extern CgStateAssignment cgCreateStateAssignmentIndex(CgPass pass, CgState state, int index);
示例#10
0
 private static extern CgAnnotation cgGetFirstPassAnnotation(CgPass pass);
示例#11
0
 private static extern CgStateAssignment cgCreateStateAssignment(CgPass pass, CgState state);
示例#12
0
 private static extern CgAnnotation cgCreatePassAnnotation(CgPass pass, [In]string name, CgType type);
示例#13
0
 private static extern void cgUpdatePassParameters(CgPass pass);
示例#14
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgGetFirstStateAssignment is used to begin iteration over all of the state assignment contained within a pass.</para>
 /// <para>See cgGetNextStateAssignment for more information.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass.</para>
 /// <para>VERSION: cgGetFirstStateAssignment was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="pass">The pass from which to retrieve the first state assignment.</param>
 /// <returns>Returns the first CGstateassignment object in pass. Returns NULL if pass contains no state assignments or an error occurs.</returns>
 public static CgStateAssignment GetFirstStateAssignment(CgPass pass)
 {
     return cgGetFirstStateAssignment(pass);
 }
示例#15
0
 private static extern CgAnnotation cgGetNamedPassAnnotation(CgPass pass, [In] string name);
示例#16
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>The annotations associated with a pass can be retrieved directly by name using cgGetNamedPassAnnotation.</para>
 /// <para>The names of a pass's annotations can be discovered by iterating through the annotations (see cgGetFirstPassAnnotation and cgGetNextAnnotation), calling cgGetAnnotationName for each one in turn.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass.</para>
 /// <para>VERSION: cgGetNamedPassAnnotation was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="pass">The pass from which to retrieve the annotation.</param>
 /// <param name="name">The name of the annotation to retrieve.</param>
 /// <returns>Returns the named annotation. Returns NULL if the pass has no annotation corresponding to name.</returns>
 public static CgAnnotation GetNamedPassAnnotation(CgPass pass, [In]string name)
 {
     return cgGetNamedPassAnnotation(pass, name);
 }
示例#17
0
 private static extern CgStateAssignment cgGetNamedStateAssignment(CgPass pass, [In]string name);
示例#18
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>The passes within a technique can be iterated over using cgGetNextPass.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass.</para>
 /// <para>VERSION: cgGetNextPass was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="pass">The current pass.</param>
 /// <returns>Returns the next pass in the technique's internal sequence of passes. Returns NULL when pass is the last pass in the technique.</returns>
 public static CgPass GetNextPass(CgPass pass)
 {
     return cgGetNextPass(pass);
 }
示例#19
0
 private static extern CgPass cgGetNextPass(CgPass pass);
示例#20
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgGetPassProgram allows the application to retrieve the program associated with a specific domain from a pass.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass. CG_INVALID_ENUMERANT_ERROR is generated if domain is not CG_VERTEX_DOMAIN, CG_FRAGMENT_DOMAIN, or CG_GEOMETRY_DOMAIN.</para>
 /// <para>VERSION: cgGetPassProgram was introduced in Cg 2.1.</para>
 /// </summary>
 /// <param name="pass">The pass from which to get a program.</param>
 /// <param name="domain">The domain for which a program will be retrieved.</param>
 /// <returns>Returns the program associated with a specified domain from the given pass. Returns NULL if pass or domain is invalid.</returns>
 public static CgProgram GetPassProgram(CgPass pass, CgDomain domain)
 {
     return cgGetPassProgram(pass, domain);
 }
示例#21
0
 private static extern string cgGetPassName(CgPass pass);
示例#22
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgIsPass returns CG_TRUE if pass references a valid pass, CG_FALSE otherwise.</para>
 /// <para>VERSION: cgIsPass was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="pass">The pass handle to check.</param>
 /// <returns>Returns CG_TRUE if pass references a valid pass. Returns CG_FALSE otherwise.</returns>
 public static CgBool IsPass(CgPass pass)
 {
     return cgIsPass(pass);
 }
示例#23
0
 private static extern CgProgram cgGetPassProgram(CgPass pass, CgDomain domain);
示例#24
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgSetPassState sets all of the graphics state defined in a pass by calling the state setting callbacks for all of the state assignments in the pass.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass. CG_INVALID_TECHNIQUE_ERROR is generated if the technique of which pass is a part has failed validation.</para>
 /// <para>VERSION: cgSetPassState was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="pass">The pass handle.</param>
 public static void SetPassState(CgPass pass)
 {
     cgSetPassState(pass);
 }
示例#25
0
 private static extern CgTechnique cgGetPassTechnique(CgPass pass);
示例#26
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgCreatePassAnnotation adds a new annotation to a pass.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass. CG_DUPLICATE_NAME_ERROR is generated if name is already used by an annotation for this pass. CG_INVALID_ENUMERANT_ERROR is generated if type is not CG_INT, CG_FLOAT, CG_BOOL, or CG_STRING.</para>
 /// <para>VERSION: cgCreatePassAnnotation was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="pass">The pass to which the new annotation will be added.</param>
 /// <param name="name">The name of the new annotation.</param>
 /// <param name="type">The type of the new annotation.</param>
 /// <returns>Returns the new CGannotation handle on success. Returns NULL if an error occurs.</returns>
 public static CgAnnotation CreatePassAnnotation(CgPass pass, [In]string name, CgType type)
 {
     return cgCreatePassAnnotation(pass, name, type);
 }
示例#27
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>The annotations associated with a pass can be retrieved using cgGetFirstPassAnnotation.</para>
 /// <para>The remainder of the pass's annotations can be discovered by iterating through the parameters, calling cgGetNextAnnotation to get to the next one.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass.</para>
 /// <para>VERSION: cgGetFirstPassAnnotation was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="pass">The pass from which to retrieve the annotation.</param>
 /// <returns>Returns the first annotation from the given pass. Returns NULL if the pass has no annotations or an error occurs.</returns>
 public static CgAnnotation GetFirstPassAnnotation(CgPass pass)
 {
     return cgGetFirstPassAnnotation(pass);
 }
示例#28
0
文件: Cg.cs 项目: primuszp/OpenCg
 /// <summary>
 /// <para>cgCreateStateAssignmentIndex creates a state assignment for the specified pass.</para>
 /// <para>The new state assignment is appended to the pass's existing list of state assignments.</para>
 /// <para>The state assignment is for the given index of for the specified array state.</para>
 /// <para>ERROR: CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass. CG_INVALID_STATE_HANDLE_ERROR is generated if state is not a valid state. If the index is negative or index is greater than or equal the number of elements for the state array, no error is generated but NULL is returned.</para>
 /// <para>VERSION: cgCreateStateAssignmentIndex was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="pass">The pass in which to create the state assignment.</param>
 /// <param name="state">The state array used to create the state assignment.</param>
 /// <param name="index">The index for the state array.</param>
 /// <returns>Returns the new state assignment handle. Returns NULL if an error occurs.</returns>
 public static CgStateAssignment CreateStateAssignmentIndex(CgPass pass, CgState state, int index)
 {
     return cgCreateStateAssignmentIndex(pass, state, index);
 }
示例#29
0
 private static extern CgBool cgIsPass(CgPass pass);