Example #1
0
 private static extern CgParameter cgGetEffectParameterBySemantic(CgEffect effect, [In] string name);
Example #2
0
 /// <summary>
 /// <para>cgSetEffectName allows the application to set the name of an effect.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgSetEffectName was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="effect">The effect in which the name will be set.</param>
 /// <param name="name">The new name for effect.</param>
 /// <returns>Returns CG_TRUE if it succeeds. Returns CG_FALSE otherwise.</returns>
 public static CgBool SetEffectName(CgEffect effect, [In]string name)
 {
     return cgSetEffectName(effect, name);
 }
Example #3
0
 /// <summary>
 /// <para>cgCreateTechnique adds a new technique to the specified effect.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgCreateTechnique was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="effect">The effect to which the new technique will be added.</param>
 /// <param name="name">The name for the new technique.</param>
 /// <returns>Returns the handle to the new technique on success. Returns NULL if an error occurs.</returns>
 public static CgTechnique CreateTechnique(CgEffect effect, [In]string name)
 {
     return cgCreateTechnique(effect, name);
 }
Example #4
0
 /// <summary>
 /// <para>cgCreateEffectParameter adds a new param to the specified effect.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect. CG_INVALID_VALUE_TYPE_ERROR is generated if type is invalid.</para>
 /// <para>VERSION: cgCreateEffectParameter was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="effect">The effect to which the new param will be added.</param>
 /// <param name="name">The name of the new param.</param>
 /// <param name="type">The type of the new param.</param>
 /// <returns>Returns the handle to the new param.</returns>
 public static CgParameter CreateEffectParameter(CgEffect effect, [In]string name, CgType type)
 {
     return cgCreateEffectParameter(effect, name, type);
 }
Example #5
0
 /// <summary>
 /// <para>cgIsEffect returns CG_TRUE if effect references a valid effect, CG_FALSE otherwise.</para>
 /// <para>VERSION: cgIsEffect was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="effect">The effect handle to check.</param>
 /// <returns>Returns CG_TRUE if effect references a valid effect. Returns CG_FALSE otherwise.</returns>
 public static CgBool IsEffect(CgEffect effect)
 {
     return cgIsEffect(effect);
 }
Example #6
0
 /// <summary>
 /// <para>The techniques of an effect can be retrieved directly by name using cgGetNamedTechnique.</para>
 /// <para>The names of the techniques in a effect can be discovered by iterating through the effect's techniques (see cgGetFirstTechnique and cgGetNextTechnique), calling cgGetTechniqueName for each one in turn.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgGetNamedTechnique was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="effect">The effect from which to retrieve the technique.</param>
 /// <param name="name">The name of the technique to retrieve.</param>
 /// <returns>Returns the named technique from the effect. Returns NULL if the effect has no technique corresponding to name.</returns>
 public static CgTechnique GetNamedTechnique(CgEffect effect, [In]string name)
 {
     return cgGetNamedTechnique(effect, name);
 }
Example #7
0
 /// <summary>
 /// <para>cgCopyEffect creates a new effect object that is a copy of effect and adds it to the same context as effect.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgCopyEffect was introduced in Cg 2.0. cgCopyEffect is not operational as of Cg 3.0.</para>
 /// </summary>
 /// <param name="effect">The effect object to be copied.</param>
 /// <returns>Returns a copy of effect on success. Returns NULL if effect is invalid or the copy fails.</returns>
 public static CgEffect CopyEffect(CgEffect effect)
 {
     return cgCopyEffect(effect);
 }
Example #8
0
 private static extern CgTechnique cgGetNamedTechnique(CgEffect effect, [In] string name);
Example #9
0
 private static extern CgEffect cgGetNextEffect(CgEffect effect);
Example #10
0
 private static extern CgAnnotation cgGetNamedEffectAnnotation(CgEffect effect, [In] string name);
Example #11
0
 private static extern CgParameter cgGetNamedEffectParameter(CgEffect effect, [In] string name);
Example #12
0
 private static extern CgTechnique cgGetFirstTechnique(CgEffect effect);
Example #13
0
 private static extern CgParameter cgGetFirstLeafEffectParameter(CgEffect effect);
Example #14
0
 private static extern CgAnnotation cgGetFirstEffectAnnotation(CgEffect effect);
Example #15
0
 /// <summary>
 /// <para>The annotations associated with an effect can be retrieved directly by name using cgGetNamedEffectAnnotation.</para>
 /// <para>The names of a effect's annotations can be  discovered by iterating through the annotations (see cgGetFirstEffectAnnotation and cgGetNextAnnotation), calling cgGetAnnotationName for each one in turn.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect. CG_INVALID_POINTER_ERROR is generated if name is NULL.</para>
 /// <para>VERSION: cgGetNamedEffectAnnotation was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="effect">The effect 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 effect has no annotation corresponding to name.</returns>
 public static CgAnnotation GetNamedEffectAnnotation(CgEffect effect, [In]string name)
 {
     return cgGetNamedEffectAnnotation(effect, name);
 }
Example #16
0
 private static extern CgEffect cgCopyEffect(CgEffect effect);
Example #17
0
 /// <summary>
 /// <para>The parameters of a effect can be retrieved directly by name using cgGetNamedEffectParameter.</para>
 /// <para>The names of the parameters in a effect can be discovered by iterating through the effect's parameters (see cgGetFirstEffectParameter and cgGetNextParameter), calling cgGetParameterName for each one in turn.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgGetNamedEffectParameter was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="effect">The effect from which to retrieve the param.</param>
 /// <param name="name">The name of the param to retrieve.</param>
 /// <returns>Returns the named param from the effect. Returns NULL if the effect has no param corresponding to name.</returns>
 public static CgParameter GetNamedEffectParameter(CgEffect effect, [In]string name)
 {
     return cgGetNamedEffectParameter(effect, name);
 }
Example #18
0
 /// <summary>
 /// <para>cgGetEffectContext allows the application to retrieve a handle to the context to which a given effect belongs.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgGetEffectContext was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="effect">The effect.</param>
 /// <returns>Returns the context to which effect belongs. Returns NULL if an error occurs.</returns>
 public static CgContext GetEffectContext(CgEffect effect)
 {
     return cgGetEffectContext(effect);
 }
Example #19
0
 /// <summary>
 /// <para>The effects within a context can be iterated over with cgGetNextEffect.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgGetNextEffect was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="effect">The current effect.</param>
 /// <returns>Returns the next effect in the context's internal sequence of effects. Returns NULL when effect is the last effect in the context.</returns>
 public static CgEffect GetNextEffect(CgEffect effect)
 {
     return cgGetNextEffect(effect);
 }
Example #20
0
 /// <summary>
 /// <para>cgGetEffectName returns the name from the specified effect.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgGetEffectName was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="effect">The effect from which the name will be retrieved.</param>
 /// <returns>Returns the name from the specified effect. Returns NULL if the effect doesn't have a valid name or an error occurs.</returns>
 public static string GetEffectName(CgEffect effect)
 {
     return cgGetEffectName(effect);
 }
Example #21
0
 /// <summary>
 /// <para>cgCreateEffectAnnotation adds a new annotation to the effect.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect. CG_DUPLICATE_NAME_ERROR is generated if name is already used by an annotation for this effect. CG_INVALID_ENUMERANT_ERROR is generated if type is not CG_INT, CG_FLOAT, CG_BOOL, or CG_STRING.</para>
 /// <para>VERSION: cgCreateEffectAnnotation was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="effect">The effect 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 CreateEffectAnnotation(CgEffect effect, [In]string name, CgType type)
 {
     return cgCreateEffectAnnotation(effect, name, type);
 }
Example #22
0
 /// <summary>
 /// <para>cgGetEffectParameterBySemantic returns the param in an effect which is associated with the given semantic.</para>
 /// <para>It multiple parameters in the effect have this semantic, an arbitrary one of them will be returned.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect. CG_INVALID_PARAMETER_ERROR is generated if semantic is NULL or the empty string.</para>
 /// <para>VERSION: cgGetEffectParameterBySemantic was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="effect">The effect from which to retrieve the param.</param>
 /// <param name="semantic">The name of the semantic.</param>
 /// <returns>Returns the CgParameter object in effect that has the given semantic. Returns NULL if effect is invalid or does not have any parameters with the given semantic.</returns>
 public static CgParameter GetEffectParameterBySemantic(CgEffect effect, [In]string semantic)
 {
     return cgGetEffectParameterBySemantic(effect, semantic);
 }
Example #23
0
 /// <summary>
 /// <para>cgCreateEffectParameterArray adds a new array param to the specificed effect.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect. CG_INVALID_VALUE_TYPE_ERROR is generated if type is invalid.</para>
 /// <para>VERSION: cgCreateEffectParameterArray was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="effect">The effect to which the new param will be added.</param>
 /// <param name="name">The name of the new param.</param>
 /// <param name="type">The type of the new param.</param>
 /// <param name="length">The size of the array.</param>
 /// <returns>Returns the handle to the new array param on success. Returns NULL if an error occurs.</returns>
 public static CgParameter CreateEffectParameterArray(CgEffect effect, [In]string name, CgType type, int length)
 {
     return cgCreateEffectParameterArray(effect, name, type, length);
 }
Example #24
0
 /// <summary>
 /// <para>The first annotation associated with an effect can be retrieved using cgGetFirstEffectAnnotation.</para>
 /// <para>The rest of the effect's annotations can be discovered by iterating through them using cgGetNextAnnotation.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgGetFirstEffectAnnotation was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="effect">The effect from which to retrieve the first annotation.</param>
 /// <returns>Returns the first annotation in an effect. Returns NULL if the effect has no annotations.</returns>
 public static CgAnnotation GetFirstEffectAnnotation(CgEffect effect)
 {
     return cgGetFirstEffectAnnotation(effect);
 }
Example #25
0
 /// <summary>
 /// <para>cgCreateEffectParameterMultiDimArray adds a new multidimensional array param to the specified effect.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect. CG_INVALID_VALUE_TYPE_ERROR is generated if type is invalid.</para>
 /// <para>VERSION: cgCreateEffectParameterMultiDimArray was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="effect">The effect to which the new param will be added.</param>
 /// <param name="name">The name of the new param.</param>
 /// <param name="type">The type of the new param.</param>
 /// <param name="dim">The dimension of the array.</param>
 /// <param name="lengths">The sizes for each dimension of the array.</param>
 /// <returns>Returns the handle of the new param on success. Returns NULL if an error occurs.</returns>
 public static CgParameter CreateEffectParameterMultiDimArray(CgEffect effect, [In]string name, CgType type, int dim, [In]int[] lengths)
 {
     return cgCreateEffectParameterMultiDimArray(effect, name, type, dim, lengths);
 }
Example #26
0
 /// <summary>
 /// <para>cgGetFirstLeafEffectParameter returns the first leaf param in an effect.</para>
 /// <para>The combination of cgGetFirstLeafEffectParameter and cgGetNextLeafParameter allows the iteration through all of the parameters of basic data types (not structs or arrays) without recursion.</para>
 /// <para>See cgGetNextLeafParameter for more information.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgGetFirstLeafEffectParameter was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="effect">The effect from which to retrieve the first leaf param.</param>
 /// <returns>Returns the first leaf CgParameter object in effect. Returns NULL if effect is invalid or if effect does not have any parameters.</returns>
 public static CgParameter GetFirstLeafEffectParameter(CgEffect effect)
 {
     return cgGetFirstLeafEffectParameter(effect);
 }
Example #27
0
 /// <summary>
 /// <para>cgCreateProgramFromEffect generates a new CgProgram object and adds it to the effect's Cg context.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect. CG_UNKNOWN_PROFILE_ERROR is generated if profile is not a supported profile. CG_COMPILER_ERROR is generated if compilation fails.</para>
 /// <para>VERSION: cgCreateProgramFromEffect was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="effect">The effect containing the program source source from which to create the program.</param>
 /// <param name="profile">The profile enumerant for the program.</param>
 /// <param name="entry">The entry point to the program in the Cg source.  If NULL, the entry point defaults to "main".</param>
 /// <param name="args">If args is not NULL it is assumed to be an array of NULL-terminated  strings that will be passed directly to the compiler as arguments.  The last value of the array must be a NULL.</param>
 /// <returns>Returns a CgProgram handle on success. Returns NULL if an error occurs.</returns>
 public static IntPtr CreateProgramFromEffect(CgEffect effect, CgProfile profile, [In]string entry, [In]string[] args)
 {
     return cgCreateProgramFromEffect(effect, profile, entry, args);
 }
Example #28
0
 /// <summary>
 /// <para>cgGetFirstTechnique is used to begin iteration over all of the techniques contained within a effect.</para>
 /// <para>See cgGetNextTechnique for more information.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgGetFirstTechnique was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="effect">The effect from which to retrieve the first technique.</param>
 /// <returns>Returns the first CGtechnique object in effect. Returns NULL if effect contains no techniques or an error occurs.</returns>
 public static CgTechnique GetFirstTechnique(CgEffect effect)
 {
     return cgGetFirstTechnique(effect);
 }
Example #29
0
 /// <summary>
 /// <para>cgDestroyEffect removes the specified effect object and all its associated data.</para>
 /// <para>Any CGeffect handles that reference this effect will become invalid after the effect is deleted.</para>
 /// <para>Likewise, all techniques, passes, and parameters contained in the effect also become invalid after the effect is destroyed.</para>
 /// <para>ERROR: CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.</para>
 /// <para>VERSION: cgDestroyEffect was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="effect">The effect object to delete.</param>
 public static void DestroyEffect(CgEffect effect)
 {
     cgDestroyEffect(effect);
 }
Example #30
0
 private static extern string cgGetEffectName(CgEffect effect);