[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 #if !MINIMAL
using System.Drawing; using System.Drawing;
#endif #endif
using System.Runtime.InteropServices;
using System.Text; using System.Text;
namespace OpenTK.Graphics.ES20 namespace OpenTK.Graphics.ES20
@ -455,11 +456,13 @@ namespace OpenTK.Graphics.ES20
#endregion #endregion
} }
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc( public delegate void DebugProc(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr( public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,

View file

@ -30,6 +30,7 @@ using System.Collections.Generic;
#if !MINIMAL #if !MINIMAL
using System.Drawing; using System.Drawing;
#endif #endif
using System.Runtime.InteropServices;
using System.Text; using System.Text;
namespace OpenTK.Graphics.ES30 namespace OpenTK.Graphics.ES30
@ -446,11 +447,13 @@ namespace OpenTK.Graphics.ES30
#endregion #endregion
} }
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc( public delegate void DebugProc(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr( public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,

View file

@ -1267,20 +1267,24 @@ namespace OpenTK.Graphics.OpenGL
#endregion #endregion
} }
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcAmd(int id, public delegate void DebugProcAmd(int id,
AmdDebugOutput category, AmdDebugOutput severity, AmdDebugOutput category, AmdDebugOutput severity,
int length, IntPtr message, IntPtr userParam); int length, IntPtr message, IntPtr userParam);
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcArb( public delegate void DebugProcArb(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc( public delegate void DebugProc(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr( public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,

View file

@ -30,6 +30,7 @@ using System.Collections.Generic;
#if !MINIMAL #if !MINIMAL
using System.Drawing; using System.Drawing;
#endif #endif
using System.Runtime.InteropServices;
using System.Text; using System.Text;
namespace OpenTK.Graphics.OpenGL4 namespace OpenTK.Graphics.OpenGL4
@ -455,16 +456,19 @@ namespace OpenTK.Graphics.OpenGL4
#endregion #endregion
} }
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc( public delegate void DebugProc(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcArb( public delegate void DebugProcArb(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,
IntPtr userParam); IntPtr userParam);
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr( public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id, DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message, DebugSeverity severity, int length, IntPtr message,