Added explicitly the calling convention for calls to the CSFML DLLs, to make SFML.Net compatible with .Net 4.0

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1517 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-04-24 12:52:20 +00:00
parent 7a415eea45
commit a48f71ee8e
19 changed files with 345 additions and 345 deletions

View file

@ -220,43 +220,43 @@ namespace SFML
Dictionary<string, Image> myTextures = new Dictionary<string, Image>();
#region Imports
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfShader_Create();
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfShader_CreateFromFile(string Filename);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfShader_CreateFromMemory(string Shader);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfShader_Copy(IntPtr Shader);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfShader_Destroy(IntPtr Shader);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfShader_SetParameter1(IntPtr Shader, string Name, float X);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfShader_SetParameter2(IntPtr Shader, string Name, float X, float Y);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfShader_SetParameter3(IntPtr Shader, string Name, float X, float Y, float Z);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfShader_SetParameter4(IntPtr Shader, string Name, float X, float Y, float Z, float W);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfShader_SetTexture(IntPtr Shader, string Name, IntPtr Texture);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfShader_Bind(IntPtr Shader);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfShader_Unbind(IntPtr Shader);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern bool sfShader_IsAvailable();
#endregion