Opentk/Source
Stefanos A 6ccab1784f Use StdCall calling convention by default
It appears that calli callsites cannot be decorated with the
“platformapi” calling convention like DllImport signatures can. This is
problematic since Windows uses stdcall by default and most other
platforms use cdecl.

There are three approaches to this issue, without going back to
delegate calls: (a) generate an unmanaged thunk that cleans up the
stack after a GL call; (b) use libFFI; (c) use cdecl *or* stdcall
everywhere and hope that the runtime can cope.

.Net 2.0 can detect and fix stdcall functions invoked through a cdecl
callsite. .Net 4.0 adds a configuration option to enable or disable
this fixup (faster p/invoke if disabled) and raise a MDA exception when
this condition is detected. (This affects x86 only.)

Mono appears to be able to cope with cdecl functions invoked through a
stdcall callsite.

More testing is required.
2013-12-01 21:25:03 +01:00
..
Bind Mark slots with [DllImport]; remove "core" and "delegates" generation 2013-12-01 21:17:15 +01:00
Build.UpdateVersion Normalized line endings 2013-10-11 01:58:54 +02:00
Compatibility Added MonoDevelop artifacts 2013-11-27 00:05:26 +01:00
Converter Added MonoDevelop artifacts 2013-11-27 00:05:26 +01:00
Examples Added MonoDevelop artifacts 2013-11-27 00:05:26 +01:00
GLControl Setup correct class style for OpenGL 2013-11-16 22:38:17 +01:00
OpenTK Mark slots with [DllImport]; remove "core" and "delegates" generation 2013-12-01 21:17:15 +01:00
OpenTK.Rewrite Use StdCall calling convention by default 2013-12-01 21:25:03 +01:00