Permalink
Browse files

[GL][ES] Mark DebugProc* delegates as unmanaged function pointers

Calling convention is platform-dependent: stdcall on Windows, cdecl
elsewhere. This maps to CallingConvention.Winapi in .Net parlance.
  • Loading branch information...
1 parent bb74157 commit 63dd4597c7a14b87278a78be663fa35055a1d7f6 @thefiddler thefiddler committed Feb 6, 2014
@@ -30,6 +30,7 @@
#if !MINIMAL
using System.Drawing;
#endif
+using System.Runtime.InteropServices;
using System.Text;
namespace OpenTK.Graphics.ES20
@@ -455,11 +456,13 @@ public static void Viewport(OpenTK.Rectangle rectangle)
#endregion
}
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
@@ -30,6 +30,7 @@
#if !MINIMAL
using System.Drawing;
#endif
+using System.Runtime.InteropServices;
using System.Text;
namespace OpenTK.Graphics.ES30
@@ -446,11 +447,13 @@ public static void Viewport(OpenTK.Rectangle rectangle)
#endregion
}
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
@@ -1267,20 +1267,24 @@ public static void ProgramParameter(UInt32 program, ExtGeometryShader4 pname, In
#endregion
}
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcAmd(int id,
AmdDebugOutput category, AmdDebugOutput severity,
int length, IntPtr message, IntPtr userParam);
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcArb(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
@@ -30,6 +30,7 @@
#if !MINIMAL
using System.Drawing;
#endif
+using System.Runtime.InteropServices;
using System.Text;
namespace OpenTK.Graphics.OpenGL4
@@ -455,16 +456,19 @@ public static void Viewport(OpenTK.Rectangle rectangle)
#endregion
}
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcArb(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,

0 comments on commit 63dd459

Please sign in to comment.