mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2025-01-10 22:05:37 +00:00
Add SDL_GL_LoadLibrary
This commit is contained in:
parent
d5b0e14cf5
commit
162bbe0ba4
14
src/SDL2.cs
14
src/SDL2.cs
|
@ -1421,10 +1421,22 @@ namespace SDL2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport(nativeLibName, EntryPoint = "SDL_GL_LoadLibrary", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
private static extern int INTERNAL_SDL_GL_LoadLibrary(byte[] path);
|
||||||
|
public static int SDL_GL_LoadLibrary(string path)
|
||||||
|
{
|
||||||
|
return INTERNAL_SDL_GL_LoadLibrary(
|
||||||
|
UTF8_ToNative(path)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/* IntPtr refers to a function pointer, proc to a const char* */
|
/* IntPtr refers to a function pointer, proc to a const char* */
|
||||||
[DllImport(nativeLibName, EntryPoint = "SDL_GL_GetProcAddress", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern IntPtr SDL_GL_GetProcAddress(IntPtr proc);
|
public static extern IntPtr SDL_GL_GetProcAddress(IntPtr proc);
|
||||||
|
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void SDL_GL_UnloadLibrary();
|
||||||
|
|
||||||
[DllImport(nativeLibName, EntryPoint = "SDL_GL_ExtensionSupported", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, EntryPoint = "SDL_GL_ExtensionSupported", CallingConvention = CallingConvention.Cdecl)]
|
||||||
private static extern SDL_bool INTERNAL_SDL_GL_ExtensionSupported(
|
private static extern SDL_bool INTERNAL_SDL_GL_ExtensionSupported(
|
||||||
byte[] extension
|
byte[] extension
|
||||||
|
|
Loading…
Reference in a new issue