[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.
This commit is contained in:
thefiddler 2014-02-06 15:01:05 +01:00
parent bb741579c6
commit 63dd4597c7
4 changed files with 14 additions and 0 deletions

View file

@ -30,6 +30,7 @@ using System.Collections.Generic;
#if !MINIMAL
using System.Drawing;
#endif
using System.Runtime.InteropServices;
using System.Text;
namespace OpenTK.Graphics.ES20
@ -455,11 +456,13 @@ namespace OpenTK.Graphics.ES20
#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,

View file

@ -30,6 +30,7 @@ using System.Collections.Generic;
#if !MINIMAL
using System.Drawing;
#endif
using System.Runtime.InteropServices;
using System.Text;
namespace OpenTK.Graphics.ES30
@ -446,11 +447,13 @@ namespace OpenTK.Graphics.ES30
#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,

View file

@ -1267,20 +1267,24 @@ namespace OpenTK.Graphics.OpenGL
#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,

View file

@ -30,6 +30,7 @@ using System.Collections.Generic;
#if !MINIMAL
using System.Drawing;
#endif
using System.Runtime.InteropServices;
using System.Text;
namespace OpenTK.Graphics.OpenGL4
@ -455,16 +456,19 @@ namespace OpenTK.Graphics.OpenGL4
#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,