Пример #1
0
 /// <summary>
 /// <para>Each Cg context maintains a NULL-terminated string containing warning and error messages generated by the Cg compiler, state managers and the like.</para>
 /// <para>cgSetLastListing allows applications and custom state managers to set the listing text.</para>
 /// <para>ERROR: CG_INVALID_PARAMETER_ERROR is generated if handle is invalid.</para>
 /// <para>VERSION: cgSetLastListing was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="handle">A CgContext, CGstateassignment, CGeffect, CGpass, or CGtechnique belonging to the context whose listing text is to be set.</param>
 /// <param name="listing">The new listing text.</param>
 public static void SetLastListing(CgHandle handle, string listing)
 {
     cgSetLastListing(handle, listing);
 }
Пример #2
0
 /// <summary>
 /// <para>cgGetUserType returns the enumerant associated with the user-defined type with the given index in the given CgProgram or CGeffect.</para>
 /// <para>ERROR: CG_INVALID_PROGRAM_HANDLE_ERROR is generated if handle is not a valid program or effect handle. CG_OUT_OF_ARRAY_BOUNDS_ERROR is generated if index is outside the proper range.</para>
 /// <para>VERSION: cgGetUserType was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="handle">The CgProgram or CGeffect in which the type is defined.</param>
 /// <param name="index">The index of the user-defined type.  index must be greater than or equal to 0 and less than the value returned by cgGetNumUserTypes.</param>
 /// <returns>Returns the type enumerant associated with the type with the given index.</returns>
 public static CgType GetUserType(CgHandle handle, int index)
 {
     return cgGetUserType(handle, index);
 }
Пример #3
0
 /// <summary>
 /// <para>cgIsParameterUsed returns CG_TRUE if param is potentially used by the given container.</para>
 /// <para>If param is a struct or array, CG_TRUE is returned if any of its children are potentially used by container.</para>
 /// <para>It otherwise returns CG_FALSE.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param, or if container is not the handle of a valid container.</para>
 /// <para>VERSION: cgIsParameterUsed was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="param">The param to check.</param>
 /// <param name="container">Specifies the CGeffect, CGtechnique, CGpass, CGstateassignment, or CgProgram that may potentially use param.</param>
 /// <returns>Returns CG_TRUE if param is potentially used by container. Returns CG_FALSE otherwise.</returns>
 public static CgBool IsParameterUsed(CgParameter param, CgHandle handle)
 {
     return cgIsParameterUsed(param, handle);
 }
Пример #4
0
 /// <summary>
 /// <para>cgGetNamedUserType returns the enumerant associated with the named type defined in the constuct associated with handle, which may be a CgProgram or CGeffect.</para>
 /// <para>ERROR: CG_INVALID_PARAMETER_ERROR is generated if handle is not a valid program or effect.</para>
 /// <para>VERSION: cgGetNamedUserType was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="handle">The CgProgram or CGeffect in which the type is defined.</param>
 /// <param name="name">A string containing the case-sensitive type name.</param>
 /// <returns>Returns the type enumerant associated with name. Returns CG_UNKNOWN_TYPE if no such type exists.</returns>
 public static CgType GetNamedUserType(CgHandle handle, [In]string name)
 {
     return cgGetNamedUserType(handle, name);
 }
Пример #5
0
 /// <summary>
 /// <para>cgGetNumUserTypes returns the number of user-defined types in a given CgProgram or CGeffect.</para>
 /// <para>ERROR: CG_INVALID_PROGRAM_HANDLE_ERROR is generated if handle is not a valid program or effect handle.</para>
 /// <para>VERSION: cgGetNumUserTypes was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="handle">The CgProgram or CGeffect in which the types are defined.</param>
 /// <returns>Returns the number of user defined types.</returns>
 public static int GetNumUserTypes(CgHandle handle)
 {
     return cgGetNumUserTypes(handle);
 }
Пример #6
0
 private static extern int cgGetNumUserTypes(CgHandle handle);
Пример #7
0
 private static extern CgType cgGetNamedUserType(CgHandle handle, [In] string name);
Пример #8
0
 private static extern void cgSetLastListing(CgHandle handle, string listing);
Пример #9
0
 private static extern CgBool cgIsParameterUsed(CgParameter param, CgHandle handle);
Пример #10
0
 private static extern CgType cgGetUserType(CgHandle handle, int index);