Beispiel #1
0
 /// <summary>
 /// <para>cgGetLastErrorString returns the current error condition and error condition string.</para>
 /// <para>It's similar to calling cgGetErrorString with the result of cgGetError.</para>
 /// <para>However in certain cases the error string may contain more information about the specific error that  last ocurred than what cgGetErrorString would return.</para>
 /// <para>ERROR: None.</para>
 /// <para>VERSION: cgGetLastErrorString was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="error">A pointer to a CGerror variable for returning the last error source.</param>
 /// <returns>Returns the last error string. Returns NULL if there was no error. If error is not NULL, the last error source will be returned in the location specified by error. This is the same value that would be returned by cgGetError.</returns>
 public static string GetLastErrorString(out CgError error)
 {
     return Marshal.PtrToStringAnsi(cgGetLastErrorString(out error));
 }
Beispiel #2
0
 private static extern IntPtr cgGetLastErrorString(out CgError error);
Beispiel #3
0
 /// <summary>
 /// <para>cgGetErrorString returns a human readable error string for the given error condition.</para>
 /// <para>VERSION: cgGetErrorString was introduced in Cg 1.1.</para>
 /// </summary>
 /// <param name="error">The error condition.</param>
 /// <returns>Returns a human readable error string for the given error condition.</returns>
 public static string GetErrorString(CgError error)
 {
     return Marshal.PtrToStringAnsi(cgGetErrorString(error));
 }
Beispiel #4
0
 private static extern IntPtr cgGetErrorString(CgError error);