コード例 #1
0
ファイル: Cg.cs プロジェクト: primuszp/OpenCg
 /// <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));
 }
コード例 #2
0
ファイル: CgNativeMethods.cs プロジェクト: primuszp/OpenCg
 private static extern IntPtr cgGetLastErrorString(out CgError error);
コード例 #3
0
ファイル: Cg.cs プロジェクト: primuszp/OpenCg
 /// <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));
 }
コード例 #4
0
ファイル: CgNativeMethods.cs プロジェクト: primuszp/OpenCg
 private static extern IntPtr cgGetErrorString(CgError error);