-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSDL3_GL.cs
142 lines (111 loc) · 4.99 KB
/
SDL3_GL.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
using System.Runtime.InteropServices;
namespace DeafMan1983.Interop.SDL3;
public static unsafe partial class SDL3
{
[NativeTypeName("unsigned int")]
public enum SDL_GLattr : uint
{
}
public static SDL_GLattr SDL_GL_RED_SIZE,
SDL_GL_GREEN_SIZE,
SDL_GL_BLUE_SIZE,
SDL_GL_ALPHA_SIZE,
SDL_GL_BUFFER_SIZE,
SDL_GL_DOUBLEBUFFER,
SDL_GL_DEPTH_SIZE,
SDL_GL_STENCIL_SIZE,
SDL_GL_ACCUM_RED_SIZE,
SDL_GL_ACCUM_GREEN_SIZE,
SDL_GL_ACCUM_BLUE_SIZE,
SDL_GL_ACCUM_ALPHA_SIZE,
SDL_GL_STEREO,
SDL_GL_MULTISAMPLEBUFFERS,
SDL_GL_MULTISAMPLESAMPLES,
SDL_GL_ACCELERATED_VISUAL,
SDL_GL_RETAINED_BACKING,
SDL_GL_CONTEXT_MAJOR_VERSION,
SDL_GL_CONTEXT_MINOR_VERSION,
SDL_GL_CONTEXT_FLAGS,
SDL_GL_CONTEXT_PROFILE_MASK,
SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
SDL_GL_CONTEXT_RESET_NOTIFICATION,
SDL_GL_CONTEXT_NO_ERROR,
SDL_GL_FLOATBUFFERS,
SDL_GL_EGL_PLATFORM;
[NativeTypeName("unsigned int")]
public enum SDL_GLprofile : uint
{
}
public const SDL_GLprofile SDL_GL_CONTEXT_PROFILE_CORE = (SDL_GLprofile)0x0001,
SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = (SDL_GLprofile)0x0002,
SDL_GL_CONTEXT_PROFILE_ES = (SDL_GLprofile)0x0004;
[NativeTypeName("unsigned int")]
public enum SDL_GLcontextFlag : uint
{
}
public const SDL_GLcontextFlag SDL_GL_CONTEXT_DEBUG_FLAG = (SDL_GLcontextFlag)0x0001,
SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = (SDL_GLcontextFlag)0x0002,
SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = (SDL_GLcontextFlag)0x0004,
SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = (SDL_GLcontextFlag)0x0008;
[NativeTypeName("unsigned int")]
public enum SDL_GLcontextReleaseFlag : uint
{
}
public const SDL_GLcontextReleaseFlag SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = 0x0000,
SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = (SDL_GLcontextReleaseFlag)0x0001;
[NativeTypeName("unsigned int")]
public enum SDL_GLContextResetNotification : uint
{
}
public const SDL_GLContextResetNotification SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,
SDL_GL_CONTEXT_RESET_LOSE_CONTEXT = (SDL_GLContextResetNotification)0x0001;
[DllImport(libSDL3)]
public static extern int SDL_GL_LoadLibrary([NativeTypeName("const char *")] sbyte* path);
[DllImport(libSDL3)]
[return: NativeTypeName("SDL_FunctionPointer")]
public static extern nint SDL_GL_GetProcAddress([NativeTypeName("const char *")] sbyte* proc);
[DllImport(libSDL3)]
[return: NativeTypeName("SDL_FunctionPointer")]
public static extern nint SDL_EGL_GetProcAddress([NativeTypeName("const char *")] sbyte* proc);
[DllImport(libSDL3)]
public static extern void SDL_GL_UnloadLibrary();
[DllImport(libSDL3)]
public static extern int SDL_GL_ExtensionSupported([NativeTypeName("const char *")] sbyte* extension);
[DllImport(libSDL3)]
public static extern void SDL_GL_ResetAttributes();
[DllImport(libSDL3)]
public static extern int SDL_GL_SetAttribute(SDL_GLattr attr, int value);
[DllImport(libSDL3)]
public static extern int SDL_GL_GetAttribute(SDL_GLattr attr, int* value);
[DllImport(libSDL3)]
[return: NativeTypeName("SDL_GLContext")]
public static extern void* SDL_GL_CreateContext(SDL_Window* window);
[DllImport(libSDL3)]
public static extern int SDL_GL_MakeCurrent(SDL_Window* window, [NativeTypeName("SDL_GLContext")] void* context);
[DllImport(libSDL3)]
public static extern SDL_Window* SDL_GL_GetCurrentWindow();
[DllImport(libSDL3)]
[return: NativeTypeName("SDL_GLContext")]
public static extern void* SDL_GL_GetCurrentContext();
[DllImport(libSDL3)]
[return: NativeTypeName("SDL_EGLDisplay")]
public static extern void* SDL_EGL_GetCurrentEGLDisplay();
[DllImport(libSDL3)]
[return: NativeTypeName("SDL_EGLConfig")]
public static extern void* SDL_EGL_GetCurrentEGLConfig();
[DllImport(libSDL3)]
[return: NativeTypeName("SDL_EGLSurface")]
public static extern void* SDL_EGL_GetWindowEGLSurface(SDL_Window* window);
[DllImport(libSDL3)]
public static extern void SDL_EGL_SetEGLAttributeCallbacks([NativeTypeName("SDL_EGLAttribArrayCallback")] delegate* unmanaged[Cdecl]<nint*> platformAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl]<int*> surfaceAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl]<int*> contextAttribCallback);
[DllImport(libSDL3)]
public static extern int SDL_GL_SetSwapInterval(int interval);
[DllImport(libSDL3)]
public static extern int SDL_GL_GetSwapInterval(int* interval);
[DllImport(libSDL3)]
public static extern int SDL_GL_SwapWindow(SDL_Window* window);
[DllImport(libSDL3)]
public static extern int SDL_GL_DeleteContext([NativeTypeName("SDL_GLContext")] void* context);
}