diff --git a/src/SDL2.cs b/src/SDL2.cs index f3fbd8e..29737dd 100644 --- a/src/SDL2.cs +++ b/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* */ - [DllImport(nativeLibName, EntryPoint = "SDL_GL_GetProcAddress", CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] 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)] private static extern SDL_bool INTERNAL_SDL_GL_ExtensionSupported( byte[] extension