From 48e13433b3758dcaf651e7132e872f76d79588fd Mon Sep 17 00:00:00 2001 From: smack0007 Date: Thu, 19 Jul 2018 17:46:57 +0200 Subject: [PATCH] Add overload to SDL_GL_SetAttribute which accepts the SDL_GLprofile enum to prevent having to cast. --- src/SDL2.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/SDL2.cs b/src/SDL2.cs index 8625567..e4b4d4b 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -1431,6 +1431,13 @@ namespace SDL2 SDL_GLattr attr, int value ); + + public static int SDL_GL_SetAttribute( + SDL_GLattr attr, + SDL_GLprofile profile + ) { + return SDL_GL_SetAttribute(attr, (int)profile); + } [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern int SDL_GL_SetSwapInterval(int interval);