summaryrefslogtreecommitdiff
path: root/src/contrib/SDL-3.2.20/include/SDL3
diff options
context:
space:
mode:
Diffstat (limited to 'src/contrib/SDL-3.2.20/include/SDL3')
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL.h90
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_assert.h662
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_asyncio.h546
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_atomic.h664
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_audio.h2203
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_begin_code.h486
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_bits.h147
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_blendmode.h202
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_camera.h519
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_clipboard.h331
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_close_code.h41
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_copying.h22
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_cpuinfo.h353
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_dialog.h341
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_egl.h2355
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_endian.h645
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_error.h226
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_events.h1576
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_filesystem.h503
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_gamepad.h1509
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_gpu.h4213
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_guid.h106
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_haptic.h1441
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_hidapi.h552
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_hints.h4486
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_init.h497
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_intrin.h407
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_iostream.h1354
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_joystick.h1202
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_keyboard.h609
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_keycode.h343
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_loadso.h145
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_locale.h117
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_log.h538
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_main.h675
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_main_impl.h151
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_messagebox.h226
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_metal.h107
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_misc.h78
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_mouse.h689
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_mutex.h1073
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_oldnames.h1327
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_opengl.h3101
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_opengl_glext.h13213
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles.h38
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2.h51
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2.h656
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2ext.h4033
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2platform.h27
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_khrplatform.h311
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_pen.h127
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_pixels.h1441
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_platform.h64
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_platform_defines.h476
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_power.h106
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_process.h430
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_properties.h543
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_rect.h507
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_render.h2645
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_revision.h56
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_scancode.h429
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_sensor.h320
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_stdinc.h6137
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_storage.h682
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_surface.h1563
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_system.h818
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test.h63
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test_assert.h98
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test_common.h289
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test_compare.h76
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test_crc32.h121
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test_font.h169
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test_fuzzer.h371
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test_harness.h151
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test_log.h75
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test_md5.h122
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_test_memory.h66
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_thread.h578
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_time.h231
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_timer.h450
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_touch.h184
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_tray.h544
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_version.h183
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_video.h3311
-rw-r--r--src/contrib/SDL-3.2.20/include/SDL3/SDL_vulkan.h287
85 files changed, 78900 insertions, 0 deletions
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL.h
new file mode 100644
index 0000000..587b541
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL.h
@@ -0,0 +1,90 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * Main include header for the SDL library, version 3.2.20
24 *
25 * It is almost always best to include just this one header instead of
26 * picking out individual headers included here. There are exceptions to
27 * this rule--SDL_main.h is special and not included here--but usually
28 * letting SDL.h include the kitchen sink for you is the correct approach.
29 */
30
31#ifndef SDL_h_
32#define SDL_h_
33
34#include <SDL3/SDL_stdinc.h>
35#include <SDL3/SDL_assert.h>
36#include <SDL3/SDL_asyncio.h>
37#include <SDL3/SDL_atomic.h>
38#include <SDL3/SDL_audio.h>
39#include <SDL3/SDL_bits.h>
40#include <SDL3/SDL_blendmode.h>
41#include <SDL3/SDL_camera.h>
42#include <SDL3/SDL_clipboard.h>
43#include <SDL3/SDL_cpuinfo.h>
44#include <SDL3/SDL_dialog.h>
45#include <SDL3/SDL_endian.h>
46#include <SDL3/SDL_error.h>
47#include <SDL3/SDL_events.h>
48#include <SDL3/SDL_filesystem.h>
49#include <SDL3/SDL_gamepad.h>
50#include <SDL3/SDL_gpu.h>
51#include <SDL3/SDL_guid.h>
52#include <SDL3/SDL_haptic.h>
53#include <SDL3/SDL_hidapi.h>
54#include <SDL3/SDL_hints.h>
55#include <SDL3/SDL_init.h>
56#include <SDL3/SDL_iostream.h>
57#include <SDL3/SDL_joystick.h>
58#include <SDL3/SDL_keyboard.h>
59#include <SDL3/SDL_keycode.h>
60#include <SDL3/SDL_loadso.h>
61#include <SDL3/SDL_locale.h>
62#include <SDL3/SDL_log.h>
63#include <SDL3/SDL_messagebox.h>
64#include <SDL3/SDL_metal.h>
65#include <SDL3/SDL_misc.h>
66#include <SDL3/SDL_mouse.h>
67#include <SDL3/SDL_mutex.h>
68#include <SDL3/SDL_pen.h>
69#include <SDL3/SDL_pixels.h>
70#include <SDL3/SDL_platform.h>
71#include <SDL3/SDL_power.h>
72#include <SDL3/SDL_process.h>
73#include <SDL3/SDL_properties.h>
74#include <SDL3/SDL_rect.h>
75#include <SDL3/SDL_render.h>
76#include <SDL3/SDL_scancode.h>
77#include <SDL3/SDL_sensor.h>
78#include <SDL3/SDL_storage.h>
79#include <SDL3/SDL_surface.h>
80#include <SDL3/SDL_system.h>
81#include <SDL3/SDL_thread.h>
82#include <SDL3/SDL_time.h>
83#include <SDL3/SDL_timer.h>
84#include <SDL3/SDL_tray.h>
85#include <SDL3/SDL_touch.h>
86#include <SDL3/SDL_version.h>
87#include <SDL3/SDL_video.h>
88#include <SDL3/SDL_oldnames.h>
89
90#endif /* SDL_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_assert.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_assert.h
new file mode 100644
index 0000000..053af13
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_assert.h
@@ -0,0 +1,662 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryAssert
24 *
25 * A helpful assertion macro!
26 *
27 * SDL assertions operate like your usual `assert` macro, but with some added
28 * features:
29 *
30 * - It uses a trick with the `sizeof` operator, so disabled assertions
31 * vaporize out of the compiled code, but variables only referenced in the
32 * assertion won't trigger compiler warnings about being unused.
33 * - It is safe to use with a dangling-else: `if (x) SDL_assert(y); else
34 * do_something();`
35 * - It works the same everywhere, instead of counting on various platforms'
36 * compiler and C runtime to behave.
37 * - It provides multiple levels of assertion (SDL_assert, SDL_assert_release,
38 * SDL_assert_paranoid) instead of a single all-or-nothing option.
39 * - It offers a variety of responses when an assertion fails (retry, trigger
40 * the debugger, abort the program, ignore the failure once, ignore it for
41 * the rest of the program's run).
42 * - It tries to show the user a dialog by default, if possible, but the app
43 * can provide a callback to handle assertion failures however they like.
44 * - It lets failed assertions be retried. Perhaps you had a network failure
45 * and just want to retry the test after plugging your network cable back
46 * in? You can.
47 * - It lets the user ignore an assertion failure, if there's a harmless
48 * problem that one can continue past.
49 * - It lets the user mark an assertion as ignored for the rest of the
50 * program's run; if there's a harmless problem that keeps popping up.
51 * - It provides statistics and data on all failed assertions to the app.
52 * - It allows the default assertion handler to be controlled with environment
53 * variables, in case an automated script needs to control it.
54 * - It can be used as an aid to Clang's static analysis; it will treat SDL
55 * assertions as universally true (under the assumption that you are serious
56 * about the asserted claims and that your debug builds will detect when
57 * these claims were wrong). This can help the analyzer avoid false
58 * positives.
59 *
60 * To use it: compile a debug build and just sprinkle around tests to check
61 * your code!
62 */
63
64#ifndef SDL_assert_h_
65#define SDL_assert_h_
66
67#include <SDL3/SDL_stdinc.h>
68
69#include <SDL3/SDL_begin_code.h>
70/* Set up for C function definitions, even when using C++ */
71#ifdef __cplusplus
72extern "C" {
73#endif
74
75#ifdef SDL_WIKI_DOCUMENTATION_SECTION
76
77/**
78 * The level of assertion aggressiveness.
79 *
80 * This value changes depending on compiler options and other preprocessor
81 * defines.
82 *
83 * It is currently one of the following values, but future SDL releases might
84 * add more:
85 *
86 * - 0: All SDL assertion macros are disabled.
87 * - 1: Release settings: SDL_assert disabled, SDL_assert_release enabled.
88 * - 2: Debug settings: SDL_assert and SDL_assert_release enabled.
89 * - 3: Paranoid settings: All SDL assertion macros enabled, including
90 * SDL_assert_paranoid.
91 *
92 * \since This macro is available since SDL 3.2.0.
93 */
94#define SDL_ASSERT_LEVEL SomeNumberBasedOnVariousFactors
95
96#elif !defined(SDL_ASSERT_LEVEL)
97#ifdef SDL_DEFAULT_ASSERT_LEVEL
98#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
99#elif defined(_DEBUG) || defined(DEBUG) || \
100 (defined(__GNUC__) && !defined(__OPTIMIZE__))
101#define SDL_ASSERT_LEVEL 2
102#else
103#define SDL_ASSERT_LEVEL 1
104#endif
105#endif
106
107#ifdef SDL_WIKI_DOCUMENTATION_SECTION
108
109/**
110 * Attempt to tell an attached debugger to pause.
111 *
112 * This allows an app to programmatically halt ("break") the debugger as if it
113 * had hit a breakpoint, allowing the developer to examine program state, etc.
114 *
115 * This is a macro--not a function--so that the debugger breaks on the source
116 * code line that used SDL_TriggerBreakpoint and not in some random guts of
117 * SDL. SDL_assert uses this macro for the same reason.
118 *
119 * If the program is not running under a debugger, SDL_TriggerBreakpoint will
120 * likely terminate the app, possibly without warning. If the current platform
121 * isn't supported, this macro is left undefined.
122 *
123 * \threadsafety It is safe to call this macro from any thread.
124 *
125 * \since This macro is available since SDL 3.2.0.
126 */
127#define SDL_TriggerBreakpoint() TriggerABreakpointInAPlatformSpecificManner
128
129#elif defined(_MSC_VER) && _MSC_VER >= 1310
130 /* Don't include intrin.h here because it contains C++ code */
131 extern void __cdecl __debugbreak(void);
132 #define SDL_TriggerBreakpoint() __debugbreak()
133#elif defined(_MSC_VER) && defined(_M_IX86)
134 #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
135#elif defined(ANDROID)
136 #include <assert.h>
137 #define SDL_TriggerBreakpoint() assert(0)
138#elif SDL_HAS_BUILTIN(__builtin_debugtrap)
139 #define SDL_TriggerBreakpoint() __builtin_debugtrap()
140#elif SDL_HAS_BUILTIN(__builtin_trap)
141 #define SDL_TriggerBreakpoint() __builtin_trap()
142#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
143 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
144#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
145 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
146#elif ( defined(SDL_PLATFORM_APPLE) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
147 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
148#elif defined(SDL_PLATFORM_APPLE) && defined(__arm__)
149 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
150#elif defined(_WIN32) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__arm64__) || defined(__aarch64__)) )
151 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #0xF000\n\t" )
152#elif defined(__GNUC__) || defined(__clang__)
153 #define SDL_TriggerBreakpoint() __builtin_trap() /* older gcc may not support SDL_HAS_BUILTIN(__builtin_trap) above */
154#elif defined(__386__) && defined(__WATCOMC__)
155 #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
156#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
157 #include <signal.h>
158 #define SDL_TriggerBreakpoint() raise(SIGTRAP)
159#else
160 /* SDL_TriggerBreakpoint is intentionally left undefined on unknown platforms. */
161#endif
162
163#ifdef SDL_WIKI_DOCUMENTATION_SECTION
164
165/**
166 * A macro that reports the current function being compiled.
167 *
168 * If SDL can't figure how the compiler reports this, it will use "???".
169 *
170 * \since This macro is available since SDL 3.2.0.
171 */
172#define SDL_FUNCTION __FUNCTION__
173
174#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
175# define SDL_FUNCTION __func__
176#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
177# define SDL_FUNCTION __FUNCTION__
178#else
179# define SDL_FUNCTION "???"
180#endif
181
182/**
183 * A macro that reports the current file being compiled.
184 *
185 * \since This macro is available since SDL 3.2.0.
186 */
187#define SDL_FILE __FILE__
188
189/**
190 * A macro that reports the current line number of the file being compiled.
191 *
192 * \since This macro is available since SDL 3.2.0.
193 */
194#define SDL_LINE __LINE__
195
196/*
197sizeof (x) makes the compiler still parse the expression even without
198assertions enabled, so the code is always checked at compile time, but
199doesn't actually generate code for it, so there are no side effects or
200expensive checks at run time, just the constant size of what x WOULD be,
201which presumably gets optimized out as unused.
202This also solves the problem of...
203
204 int somevalue = blah();
205 SDL_assert(somevalue == 1);
206
207...which would cause compiles to complain that somevalue is unused if we
208disable assertions.
209*/
210
211#ifdef SDL_WIKI_DOCUMENTATION_SECTION
212
213/**
214 * A macro for wrapping code in `do {} while (0);` without compiler warnings.
215 *
216 * Visual Studio with really aggressive warnings enabled needs this to avoid
217 * compiler complaints.
218 *
219 * the `do {} while (0);` trick is useful for wrapping code in a macro that
220 * may or may not be a single statement, to avoid various C language
221 * accidents.
222 *
223 * To use:
224 *
225 * ```c
226 * do { SomethingOnce(); } while (SDL_NULL_WHILE_LOOP_CONDITION (0));
227 * ```
228 *
229 * \since This macro is available since SDL 3.2.0.
230 */
231#define SDL_NULL_WHILE_LOOP_CONDITION (0)
232
233#elif defined(_MSC_VER) /* Avoid /W4 warnings. */
234/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
235 this condition isn't constant. And looks like an owl's face! */
236#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
237#else
238#define SDL_NULL_WHILE_LOOP_CONDITION (0)
239#endif
240
241/**
242 * The macro used when an assertion is disabled.
243 *
244 * This isn't for direct use by apps, but this is the code that is inserted
245 * when an SDL_assert is disabled (perhaps in a release build).
246 *
247 * The code does nothing, but wraps `condition` in a sizeof operator, which
248 * generates no code and has no side effects, but avoid compiler warnings
249 * about unused variables.
250 *
251 * \param condition the condition to assert (but not actually run here).
252 *
253 * \since This macro is available since SDL 3.2.0.
254 */
255#define SDL_disabled_assert(condition) \
256 do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
257
258/**
259 * Possible outcomes from a triggered assertion.
260 *
261 * When an enabled assertion triggers, it may call the assertion handler
262 * (possibly one provided by the app via SDL_SetAssertionHandler), which will
263 * return one of these values, possibly after asking the user.
264 *
265 * Then SDL will respond based on this outcome (loop around to retry the
266 * condition, try to break in a debugger, kill the program, or ignore the
267 * problem).
268 *
269 * \since This enum is available since SDL 3.2.0.
270 */
271typedef enum SDL_AssertState
272{
273 SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
274 SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
275 SDL_ASSERTION_ABORT, /**< Terminate the program. */
276 SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
277 SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
278} SDL_AssertState;
279
280/**
281 * Information about an assertion failure.
282 *
283 * This structure is filled in with information about a triggered assertion,
284 * used by the assertion handler, then added to the assertion report. This is
285 * returned as a linked list from SDL_GetAssertionReport().
286 *
287 * \since This struct is available since SDL 3.2.0.
288 */
289typedef struct SDL_AssertData
290{
291 bool always_ignore; /**< true if app should always continue when assertion is triggered. */
292 unsigned int trigger_count; /**< Number of times this assertion has been triggered. */
293 const char *condition; /**< A string of this assert's test code. */
294 const char *filename; /**< The source file where this assert lives. */
295 int linenum; /**< The line in `filename` where this assert lives. */
296 const char *function; /**< The name of the function where this assert lives. */
297 const struct SDL_AssertData *next; /**< next item in the linked list. */
298} SDL_AssertData;
299
300/**
301 * Never call this directly.
302 *
303 * Use the SDL_assert macros instead.
304 *
305 * \param data assert data structure.
306 * \param func function name.
307 * \param file file name.
308 * \param line line number.
309 * \returns assert state.
310 *
311 * \threadsafety It is safe to call this function from any thread.
312 *
313 * \since This function is available since SDL 3.2.0.
314 */
315extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *data,
316 const char *func,
317 const char *file, int line) SDL_ANALYZER_NORETURN;
318
319
320#ifdef SDL_WIKI_DOCUMENTATION_SECTION
321
322/**
323 * The macro used when an assertion triggers a breakpoint.
324 *
325 * This isn't for direct use by apps; use SDL_assert or SDL_TriggerBreakpoint
326 * instead.
327 *
328 * \since This macro is available since SDL 3.2.0.
329 */
330#define SDL_AssertBreakpoint() SDL_TriggerBreakpoint()
331
332#elif !defined(SDL_AssertBreakpoint)
333# if defined(ANDROID) && defined(assert)
334 /* Define this as empty in case assert() is defined as SDL_assert */
335# define SDL_AssertBreakpoint()
336# else
337# define SDL_AssertBreakpoint() SDL_TriggerBreakpoint()
338# endif
339#endif /* !SDL_AssertBreakpoint */
340
341/**
342 * The macro used when an assertion is enabled.
343 *
344 * This isn't for direct use by apps, but this is the code that is inserted
345 * when an SDL_assert is enabled.
346 *
347 * The `do {} while(0)` avoids dangling else problems:
348 *
349 * ```c
350 * if (x) SDL_assert(y); else blah();
351 * ```
352 *
353 * ... without the do/while, the "else" could attach to this macro's "if". We
354 * try to handle just the minimum we need here in a macro...the loop, the
355 * static vars, and break points. The heavy lifting is handled in
356 * SDL_ReportAssertion().
357 *
358 * \param condition the condition to assert.
359 *
360 * \since This macro is available since SDL 3.2.0.
361 */
362#define SDL_enabled_assert(condition) \
363 do { \
364 while ( !(condition) ) { \
365 static struct SDL_AssertData sdl_assert_data = { false, 0, #condition, NULL, 0, NULL, NULL }; \
366 const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
367 if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
368 continue; /* go again. */ \
369 } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
370 SDL_AssertBreakpoint(); \
371 } \
372 break; /* not retrying. */ \
373 } \
374 } while (SDL_NULL_WHILE_LOOP_CONDITION)
375
376#ifdef SDL_WIKI_DOCUMENTATION_SECTION
377
378/**
379 * An assertion test that is normally performed only in debug builds.
380 *
381 * This macro is enabled when the SDL_ASSERT_LEVEL is >= 2, otherwise it is
382 * disabled. This is meant to only do these tests in debug builds, so they can
383 * tend to be more expensive, and they are meant to bring everything to a halt
384 * when they fail, with the programmer there to assess the problem.
385 *
386 * In short: you can sprinkle these around liberally and assume they will
387 * evaporate out of the build when building for end-users.
388 *
389 * When assertions are disabled, this wraps `condition` in a `sizeof`
390 * operator, which means any function calls and side effects will not run, but
391 * the compiler will not complain about any otherwise-unused variables that
392 * are only referenced in the assertion.
393 *
394 * One can set the environment variable "SDL_ASSERT" to one of several strings
395 * ("abort", "break", "retry", "ignore", "always_ignore") to force a default
396 * behavior, which may be desirable for automation purposes. If your platform
397 * requires GUI interfaces to happen on the main thread but you're debugging
398 * an assertion in a background thread, it might be desirable to set this to
399 * "break" so that your debugger takes control as soon as assert is triggered,
400 * instead of risking a bad UI interaction (deadlock, etc) in the application.
401 *
402 * \param condition boolean value to test.
403 *
404 * \threadsafety It is safe to call this macro from any thread.
405 *
406 * \since This macro is available since SDL 3.2.0.
407 */
408#define SDL_assert(condition) if (assertion_enabled && (condition)) { trigger_assertion; }
409
410/**
411 * An assertion test that is performed even in release builds.
412 *
413 * This macro is enabled when the SDL_ASSERT_LEVEL is >= 1, otherwise it is
414 * disabled. This is meant to be for tests that are cheap to make and
415 * extremely unlikely to fail; generally it is frowned upon to have an
416 * assertion failure in a release build, so these assertions generally need to
417 * be of more than life-and-death importance if there's a chance they might
418 * trigger. You should almost always consider handling these cases more
419 * gracefully than an assert allows.
420 *
421 * When assertions are disabled, this wraps `condition` in a `sizeof`
422 * operator, which means any function calls and side effects will not run, but
423 * the compiler will not complain about any otherwise-unused variables that
424 * are only referenced in the assertion.
425 *
426 * One can set the environment variable "SDL_ASSERT" to one of several strings
427 * ("abort", "break", "retry", "ignore", "always_ignore") to force a default
428 * behavior, which may be desirable for automation purposes. If your platform
429 * requires GUI interfaces to happen on the main thread but you're debugging
430 * an assertion in a background thread, it might be desirable to set this to
431 * "break" so that your debugger takes control as soon as assert is triggered,
432 * instead of risking a bad UI interaction (deadlock, etc) in the application.
433 * *
434 *
435 * \param condition boolean value to test.
436 *
437 * \threadsafety It is safe to call this macro from any thread.
438 *
439 * \since This macro is available since SDL 3.2.0.
440 */
441#define SDL_assert_release(condition) SDL_disabled_assert(condition)
442
443/**
444 * An assertion test that is performed only when built with paranoid settings.
445 *
446 * This macro is enabled when the SDL_ASSERT_LEVEL is >= 3, otherwise it is
447 * disabled. This is a higher level than both release and debug, so these
448 * tests are meant to be expensive and only run when specifically looking for
449 * extremely unexpected failure cases in a special build.
450 *
451 * When assertions are disabled, this wraps `condition` in a `sizeof`
452 * operator, which means any function calls and side effects will not run, but
453 * the compiler will not complain about any otherwise-unused variables that
454 * are only referenced in the assertion.
455 *
456 * One can set the environment variable "SDL_ASSERT" to one of several strings
457 * ("abort", "break", "retry", "ignore", "always_ignore") to force a default
458 * behavior, which may be desirable for automation purposes. If your platform
459 * requires GUI interfaces to happen on the main thread but you're debugging
460 * an assertion in a background thread, it might be desirable to set this to
461 * "break" so that your debugger takes control as soon as assert is triggered,
462 * instead of risking a bad UI interaction (deadlock, etc) in the application.
463 *
464 * \param condition boolean value to test.
465 *
466 * \threadsafety It is safe to call this macro from any thread.
467 *
468 * \since This macro is available since SDL 3.2.0.
469 */
470#define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
471
472/* Enable various levels of assertions. */
473#elif SDL_ASSERT_LEVEL == 0 /* assertions disabled */
474# define SDL_assert(condition) SDL_disabled_assert(condition)
475# define SDL_assert_release(condition) SDL_disabled_assert(condition)
476# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
477#elif SDL_ASSERT_LEVEL == 1 /* release settings. */
478# define SDL_assert(condition) SDL_disabled_assert(condition)
479# define SDL_assert_release(condition) SDL_enabled_assert(condition)
480# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
481#elif SDL_ASSERT_LEVEL == 2 /* debug settings. */
482# define SDL_assert(condition) SDL_enabled_assert(condition)
483# define SDL_assert_release(condition) SDL_enabled_assert(condition)
484# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
485#elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
486# define SDL_assert(condition) SDL_enabled_assert(condition)
487# define SDL_assert_release(condition) SDL_enabled_assert(condition)
488# define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
489#else
490# error Unknown assertion level.
491#endif
492
493/**
494 * An assertion test that is always performed.
495 *
496 * This macro is always enabled no matter what SDL_ASSERT_LEVEL is set to. You
497 * almost never want to use this, as it could trigger on an end-user's system,
498 * crashing your program.
499 *
500 * One can set the environment variable "SDL_ASSERT" to one of several strings
501 * ("abort", "break", "retry", "ignore", "always_ignore") to force a default
502 * behavior, which may be desirable for automation purposes. If your platform
503 * requires GUI interfaces to happen on the main thread but you're debugging
504 * an assertion in a background thread, it might be desirable to set this to
505 * "break" so that your debugger takes control as soon as assert is triggered,
506 * instead of risking a bad UI interaction (deadlock, etc) in the application.
507 *
508 * \param condition boolean value to test.
509 *
510 * \threadsafety It is safe to call this macro from any thread.
511 *
512 * \since This macro is available since SDL 3.2.0.
513 */
514#define SDL_assert_always(condition) SDL_enabled_assert(condition)
515
516
517/**
518 * A callback that fires when an SDL assertion fails.
519 *
520 * \param data a pointer to the SDL_AssertData structure corresponding to the
521 * current assertion.
522 * \param userdata what was passed as `userdata` to SDL_SetAssertionHandler().
523 * \returns an SDL_AssertState value indicating how to handle the failure.
524 *
525 * \threadsafety This callback may be called from any thread that triggers an
526 * assert at any time.
527 *
528 * \since This datatype is available since SDL 3.2.0.
529 */
530typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
531 const SDL_AssertData *data, void *userdata);
532
533/**
534 * Set an application-defined assertion handler.
535 *
536 * This function allows an application to show its own assertion UI and/or
537 * force the response to an assertion failure. If the application doesn't
538 * provide this, SDL will try to do the right thing, popping up a
539 * system-specific GUI dialog, and probably minimizing any fullscreen windows.
540 *
541 * This callback may fire from any thread, but it runs wrapped in a mutex, so
542 * it will only fire from one thread at a time.
543 *
544 * This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
545 *
546 * \param handler the SDL_AssertionHandler function to call when an assertion
547 * fails or NULL for the default handler.
548 * \param userdata a pointer that is passed to `handler`.
549 *
550 * \threadsafety It is safe to call this function from any thread.
551 *
552 * \since This function is available since SDL 3.2.0.
553 *
554 * \sa SDL_GetAssertionHandler
555 */
556extern SDL_DECLSPEC void SDLCALL SDL_SetAssertionHandler(
557 SDL_AssertionHandler handler,
558 void *userdata);
559
560/**
561 * Get the default assertion handler.
562 *
563 * This returns the function pointer that is called by default when an
564 * assertion is triggered. This is an internal function provided by SDL, that
565 * is used for assertions when SDL_SetAssertionHandler() hasn't been used to
566 * provide a different function.
567 *
568 * \returns the default SDL_AssertionHandler that is called when an assert
569 * triggers.
570 *
571 * \threadsafety It is safe to call this function from any thread.
572 *
573 * \since This function is available since SDL 3.2.0.
574 *
575 * \sa SDL_GetAssertionHandler
576 */
577extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
578
579/**
580 * Get the current assertion handler.
581 *
582 * This returns the function pointer that is called when an assertion is
583 * triggered. This is either the value last passed to
584 * SDL_SetAssertionHandler(), or if no application-specified function is set,
585 * is equivalent to calling SDL_GetDefaultAssertionHandler().
586 *
587 * The parameter `puserdata` is a pointer to a void*, which will store the
588 * "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
589 * will always be NULL for the default handler. If you don't care about this
590 * data, it is safe to pass a NULL pointer to this function to ignore it.
591 *
592 * \param puserdata pointer which is filled with the "userdata" pointer that
593 * was passed to SDL_SetAssertionHandler().
594 * \returns the SDL_AssertionHandler that is called when an assert triggers.
595 *
596 * \threadsafety It is safe to call this function from any thread.
597 *
598 * \since This function is available since SDL 3.2.0.
599 *
600 * \sa SDL_SetAssertionHandler
601 */
602extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
603
604/**
605 * Get a list of all assertion failures.
606 *
607 * This function gets all assertions triggered since the last call to
608 * SDL_ResetAssertionReport(), or the start of the program.
609 *
610 * The proper way to examine this data looks something like this:
611 *
612 * ```c
613 * const SDL_AssertData *item = SDL_GetAssertionReport();
614 * while (item) {
615 * printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
616 * item->condition, item->function, item->filename,
617 * item->linenum, item->trigger_count,
618 * item->always_ignore ? "yes" : "no");
619 * item = item->next;
620 * }
621 * ```
622 *
623 * \returns a list of all failed assertions or NULL if the list is empty. This
624 * memory should not be modified or freed by the application. This
625 * pointer remains valid until the next call to SDL_Quit() or
626 * SDL_ResetAssertionReport().
627 *
628 * \threadsafety This function is not thread safe. Other threads calling
629 * SDL_ResetAssertionReport() simultaneously, may render the
630 * returned pointer invalid.
631 *
632 * \since This function is available since SDL 3.2.0.
633 *
634 * \sa SDL_ResetAssertionReport
635 */
636extern SDL_DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
637
638/**
639 * Clear the list of all assertion failures.
640 *
641 * This function will clear the list of all assertions triggered up to that
642 * point. Immediately following this call, SDL_GetAssertionReport will return
643 * no items. In addition, any previously-triggered assertions will be reset to
644 * a trigger_count of zero, and their always_ignore state will be false.
645 *
646 * \threadsafety This function is not thread safe. Other threads triggering an
647 * assertion, or simultaneously calling this function may cause
648 * memory leaks or crashes.
649 *
650 * \since This function is available since SDL 3.2.0.
651 *
652 * \sa SDL_GetAssertionReport
653 */
654extern SDL_DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
655
656/* Ends C function definitions when using C++ */
657#ifdef __cplusplus
658}
659#endif
660#include <SDL3/SDL_close_code.h>
661
662#endif /* SDL_assert_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_asyncio.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_asyncio.h
new file mode 100644
index 0000000..b36cb07
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_asyncio.h
@@ -0,0 +1,546 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: AsyncIO */
23
24/**
25 * # CategoryAsyncIO
26 *
27 * SDL offers a way to perform I/O asynchronously. This allows an app to read
28 * or write files without waiting for data to actually transfer; the functions
29 * that request I/O never block while the request is fulfilled.
30 *
31 * Instead, the data moves in the background and the app can check for results
32 * at their leisure.
33 *
34 * This is more complicated than just reading and writing files in a
35 * synchronous way, but it can allow for more efficiency, and never having
36 * framerate drops as the hard drive catches up, etc.
37 *
38 * The general usage pattern for async I/O is:
39 *
40 * - Create one or more SDL_AsyncIOQueue objects.
41 * - Open files with SDL_AsyncIOFromFile.
42 * - Start I/O tasks to the files with SDL_ReadAsyncIO or SDL_WriteAsyncIO,
43 * putting those tasks into one of the queues.
44 * - Later on, use SDL_GetAsyncIOResult on a queue to see if any task is
45 * finished without blocking. Tasks might finish in any order with success
46 * or failure.
47 * - When all your tasks are done, close the file with SDL_CloseAsyncIO. This
48 * also generates a task, since it might flush data to disk!
49 *
50 * This all works, without blocking, in a single thread, but one can also wait
51 * on a queue in a background thread, sleeping until new results have arrived:
52 *
53 * - Call SDL_WaitAsyncIOResult from one or more threads to efficiently block
54 * until new tasks complete.
55 * - When shutting down, call SDL_SignalAsyncIOQueue to unblock any sleeping
56 * threads despite there being no new tasks completed.
57 *
58 * And, of course, to match the synchronous SDL_LoadFile, we offer
59 * SDL_LoadFileAsync as a convenience function. This will handle allocating a
60 * buffer, slurping in the file data, and null-terminating it; you still check
61 * for results later.
62 *
63 * Behind the scenes, SDL will use newer, efficient APIs on platforms that
64 * support them: Linux's io_uring and Windows 11's IoRing, for example. If
65 * those technologies aren't available, SDL will offload the work to a thread
66 * pool that will manage otherwise-synchronous loads without blocking the app.
67 *
68 * ## Best Practices
69 *
70 * Simple non-blocking I/O--for an app that just wants to pick up data
71 * whenever it's ready without losing framerate waiting on disks to spin--can
72 * use whatever pattern works well for the program. In this case, simply call
73 * SDL_ReadAsyncIO, or maybe SDL_LoadFileAsync, as needed. Once a frame, call
74 * SDL_GetAsyncIOResult to check for any completed tasks and deal with the
75 * data as it arrives.
76 *
77 * If two separate pieces of the same program need their own I/O, it is legal
78 * for each to create their own queue. This will prevent either piece from
79 * accidentally consuming the other's completed tasks. Each queue does require
80 * some amount of resources, but it is not an overwhelming cost. Do not make a
81 * queue for each task, however. It is better to put many tasks into a single
82 * queue. They will be reported in order of completion, not in the order they
83 * were submitted, so it doesn't generally matter what order tasks are
84 * started.
85 *
86 * One async I/O queue can be shared by multiple threads, or one thread can
87 * have more than one queue, but the most efficient way--if ruthless
88 * efficiency is the goal--is to have one queue per thread, with multiple
89 * threads working in parallel, and attempt to keep each queue loaded with
90 * tasks that are both started by and consumed by the same thread. On modern
91 * platforms that can use newer interfaces, this can keep data flowing as
92 * efficiently as possible all the way from storage hardware to the app, with
93 * no contention between threads for access to the same queue.
94 *
95 * Written data is not guaranteed to make it to physical media by the time a
96 * closing task is completed, unless SDL_CloseAsyncIO is called with its
97 * `flush` parameter set to true, which is to say that a successful result
98 * here can still result in lost data during an unfortunately-timed power
99 * outage if not flushed. However, flushing will take longer and may be
100 * unnecessary, depending on the app's needs.
101 */
102
103#ifndef SDL_asyncio_h_
104#define SDL_asyncio_h_
105
106#include <SDL3/SDL_stdinc.h>
107
108#include <SDL3/SDL_begin_code.h>
109/* Set up for C function definitions, even when using C++ */
110#ifdef __cplusplus
111extern "C" {
112#endif
113
114/**
115 * The asynchronous I/O operation structure.
116 *
117 * This operates as an opaque handle. One can then request read or write
118 * operations on it.
119 *
120 * \since This struct is available since SDL 3.2.0.
121 *
122 * \sa SDL_AsyncIOFromFile
123 */
124typedef struct SDL_AsyncIO SDL_AsyncIO;
125
126/**
127 * Types of asynchronous I/O tasks.
128 *
129 * \since This enum is available since SDL 3.2.0.
130 */
131typedef enum SDL_AsyncIOTaskType
132{
133 SDL_ASYNCIO_TASK_READ, /**< A read operation. */
134 SDL_ASYNCIO_TASK_WRITE, /**< A write operation. */
135 SDL_ASYNCIO_TASK_CLOSE /**< A close operation. */
136} SDL_AsyncIOTaskType;
137
138/**
139 * Possible outcomes of an asynchronous I/O task.
140 *
141 * \since This enum is available since SDL 3.2.0.
142 */
143typedef enum SDL_AsyncIOResult
144{
145 SDL_ASYNCIO_COMPLETE, /**< request was completed without error */
146 SDL_ASYNCIO_FAILURE, /**< request failed for some reason; check SDL_GetError()! */
147 SDL_ASYNCIO_CANCELED /**< request was canceled before completing. */
148} SDL_AsyncIOResult;
149
150/**
151 * Information about a completed asynchronous I/O request.
152 *
153 * \since This struct is available since SDL 3.2.0.
154 */
155typedef struct SDL_AsyncIOOutcome
156{
157 SDL_AsyncIO *asyncio; /**< what generated this task. This pointer will be invalid if it was closed! */
158 SDL_AsyncIOTaskType type; /**< What sort of task was this? Read, write, etc? */
159 SDL_AsyncIOResult result; /**< the result of the work (success, failure, cancellation). */
160 void *buffer; /**< buffer where data was read/written. */
161 Uint64 offset; /**< offset in the SDL_AsyncIO where data was read/written. */
162 Uint64 bytes_requested; /**< number of bytes the task was to read/write. */
163 Uint64 bytes_transferred; /**< actual number of bytes that were read/written. */
164 void *userdata; /**< pointer provided by the app when starting the task */
165} SDL_AsyncIOOutcome;
166
167/**
168 * A queue of completed asynchronous I/O tasks.
169 *
170 * When starting an asynchronous operation, you specify a queue for the new
171 * task. A queue can be asked later if any tasks in it have completed,
172 * allowing an app to manage multiple pending tasks in one place, in whatever
173 * order they complete.
174 *
175 * \since This struct is available since SDL 3.2.0.
176 *
177 * \sa SDL_CreateAsyncIOQueue
178 * \sa SDL_ReadAsyncIO
179 * \sa SDL_WriteAsyncIO
180 * \sa SDL_GetAsyncIOResult
181 * \sa SDL_WaitAsyncIOResult
182 */
183typedef struct SDL_AsyncIOQueue SDL_AsyncIOQueue;
184
185/**
186 * Use this function to create a new SDL_AsyncIO object for reading from
187 * and/or writing to a named file.
188 *
189 * The `mode` string understands the following values:
190 *
191 * - "r": Open a file for reading only. It must exist.
192 * - "w": Open a file for writing only. It will create missing files or
193 * truncate existing ones.
194 * - "r+": Open a file for update both reading and writing. The file must
195 * exist.
196 * - "w+": Create an empty file for both reading and writing. If a file with
197 * the same name already exists its content is erased and the file is
198 * treated as a new empty file.
199 *
200 * There is no "b" mode, as there is only "binary" style I/O, and no "a" mode
201 * for appending, since you specify the position when starting a task.
202 *
203 * This function supports Unicode filenames, but they must be encoded in UTF-8
204 * format, regardless of the underlying operating system.
205 *
206 * This call is _not_ asynchronous; it will open the file before returning,
207 * under the assumption that doing so is generally a fast operation. Future
208 * reads and writes to the opened file will be async, however.
209 *
210 * \param file a UTF-8 string representing the filename to open.
211 * \param mode an ASCII string representing the mode to be used for opening
212 * the file.
213 * \returns a pointer to the SDL_AsyncIO structure that is created or NULL on
214 * failure; call SDL_GetError() for more information.
215 *
216 * \since This function is available since SDL 3.2.0.
217 *
218 * \sa SDL_CloseAsyncIO
219 * \sa SDL_ReadAsyncIO
220 * \sa SDL_WriteAsyncIO
221 */
222extern SDL_DECLSPEC SDL_AsyncIO * SDLCALL SDL_AsyncIOFromFile(const char *file, const char *mode);
223
224/**
225 * Use this function to get the size of the data stream in an SDL_AsyncIO.
226 *
227 * This call is _not_ asynchronous; it assumes that obtaining this info is a
228 * non-blocking operation in most reasonable cases.
229 *
230 * \param asyncio the SDL_AsyncIO to get the size of the data stream from.
231 * \returns the size of the data stream in the SDL_IOStream on success or a
232 * negative error code on failure; call SDL_GetError() for more
233 * information.
234 *
235 * \threadsafety It is safe to call this function from any thread.
236 *
237 * \since This function is available since SDL 3.2.0.
238 */
239extern SDL_DECLSPEC Sint64 SDLCALL SDL_GetAsyncIOSize(SDL_AsyncIO *asyncio);
240
241/**
242 * Start an async read.
243 *
244 * This function reads up to `size` bytes from `offset` position in the data
245 * source to the area pointed at by `ptr`. This function may read less bytes
246 * than requested.
247 *
248 * This function returns as quickly as possible; it does not wait for the read
249 * to complete. On a successful return, this work will continue in the
250 * background. If the work begins, even failure is asynchronous: a failing
251 * return value from this function only means the work couldn't start at all.
252 *
253 * `ptr` must remain available until the work is done, and may be accessed by
254 * the system at any time until then. Do not allocate it on the stack, as this
255 * might take longer than the life of the calling function to complete!
256 *
257 * An SDL_AsyncIOQueue must be specified. The newly-created task will be added
258 * to it when it completes its work.
259 *
260 * \param asyncio a pointer to an SDL_AsyncIO structure.
261 * \param ptr a pointer to a buffer to read data into.
262 * \param offset the position to start reading in the data source.
263 * \param size the number of bytes to read from the data source.
264 * \param queue a queue to add the new SDL_AsyncIO to.
265 * \param userdata an app-defined pointer that will be provided with the task
266 * results.
267 * \returns true on success or false on failure; call SDL_GetError() for more
268 * information.
269 *
270 * \threadsafety It is safe to call this function from any thread.
271 *
272 * \since This function is available since SDL 3.2.0.
273 *
274 * \sa SDL_WriteAsyncIO
275 * \sa SDL_CreateAsyncIOQueue
276 */
277extern SDL_DECLSPEC bool SDLCALL SDL_ReadAsyncIO(SDL_AsyncIO *asyncio, void *ptr, Uint64 offset, Uint64 size, SDL_AsyncIOQueue *queue, void *userdata);
278
279/**
280 * Start an async write.
281 *
282 * This function writes `size` bytes from `offset` position in the data source
283 * to the area pointed at by `ptr`.
284 *
285 * This function returns as quickly as possible; it does not wait for the
286 * write to complete. On a successful return, this work will continue in the
287 * background. If the work begins, even failure is asynchronous: a failing
288 * return value from this function only means the work couldn't start at all.
289 *
290 * `ptr` must remain available until the work is done, and may be accessed by
291 * the system at any time until then. Do not allocate it on the stack, as this
292 * might take longer than the life of the calling function to complete!
293 *
294 * An SDL_AsyncIOQueue must be specified. The newly-created task will be added
295 * to it when it completes its work.
296 *
297 * \param asyncio a pointer to an SDL_AsyncIO structure.
298 * \param ptr a pointer to a buffer to write data from.
299 * \param offset the position to start writing to the data source.
300 * \param size the number of bytes to write to the data source.
301 * \param queue a queue to add the new SDL_AsyncIO to.
302 * \param userdata an app-defined pointer that will be provided with the task
303 * results.
304 * \returns true on success or false on failure; call SDL_GetError() for more
305 * information.
306 *
307 * \threadsafety It is safe to call this function from any thread.
308 *
309 * \since This function is available since SDL 3.2.0.
310 *
311 * \sa SDL_ReadAsyncIO
312 * \sa SDL_CreateAsyncIOQueue
313 */
314extern SDL_DECLSPEC bool SDLCALL SDL_WriteAsyncIO(SDL_AsyncIO *asyncio, void *ptr, Uint64 offset, Uint64 size, SDL_AsyncIOQueue *queue, void *userdata);
315
316/**
317 * Close and free any allocated resources for an async I/O object.
318 *
319 * Closing a file is _also_ an asynchronous task! If a write failure were to
320 * happen during the closing process, for example, the task results will
321 * report it as usual.
322 *
323 * Closing a file that has been written to does not guarantee the data has
324 * made it to physical media; it may remain in the operating system's file
325 * cache, for later writing to disk. This means that a successfully-closed
326 * file can be lost if the system crashes or loses power in this small window.
327 * To prevent this, call this function with the `flush` parameter set to true.
328 * This will make the operation take longer, and perhaps increase system load
329 * in general, but a successful result guarantees that the data has made it to
330 * physical storage. Don't use this for temporary files, caches, and
331 * unimportant data, and definitely use it for crucial irreplaceable files,
332 * like game saves.
333 *
334 * This function guarantees that the close will happen after any other pending
335 * tasks to `asyncio`, so it's safe to open a file, start several operations,
336 * close the file immediately, then check for all results later. This function
337 * will not block until the tasks have completed.
338 *
339 * Once this function returns true, `asyncio` is no longer valid, regardless
340 * of any future outcomes. Any completed tasks might still contain this
341 * pointer in their SDL_AsyncIOOutcome data, in case the app was using this
342 * value to track information, but it should not be used again.
343 *
344 * If this function returns false, the close wasn't started at all, and it's
345 * safe to attempt to close again later.
346 *
347 * An SDL_AsyncIOQueue must be specified. The newly-created task will be added
348 * to it when it completes its work.
349 *
350 * \param asyncio a pointer to an SDL_AsyncIO structure to close.
351 * \param flush true if data should sync to disk before the task completes.
352 * \param queue a queue to add the new SDL_AsyncIO to.
353 * \param userdata an app-defined pointer that will be provided with the task
354 * results.
355 * \returns true on success or false on failure; call SDL_GetError() for more
356 * information.
357 *
358 * \threadsafety It is safe to call this function from any thread, but two
359 * threads should not attempt to close the same object.
360 *
361 * \since This function is available since SDL 3.2.0.
362 */
363extern SDL_DECLSPEC bool SDLCALL SDL_CloseAsyncIO(SDL_AsyncIO *asyncio, bool flush, SDL_AsyncIOQueue *queue, void *userdata);
364
365/**
366 * Create a task queue for tracking multiple I/O operations.
367 *
368 * Async I/O operations are assigned to a queue when started. The queue can be
369 * checked for completed tasks thereafter.
370 *
371 * \returns a new task queue object or NULL if there was an error; call
372 * SDL_GetError() for more information.
373 *
374 * \threadsafety It is safe to call this function from any thread.
375 *
376 * \since This function is available since SDL 3.2.0.
377 *
378 * \sa SDL_DestroyAsyncIOQueue
379 * \sa SDL_GetAsyncIOResult
380 * \sa SDL_WaitAsyncIOResult
381 */
382extern SDL_DECLSPEC SDL_AsyncIOQueue * SDLCALL SDL_CreateAsyncIOQueue(void);
383
384/**
385 * Destroy a previously-created async I/O task queue.
386 *
387 * If there are still tasks pending for this queue, this call will block until
388 * those tasks are finished. All those tasks will be deallocated. Their
389 * results will be lost to the app.
390 *
391 * Any pending reads from SDL_LoadFileAsync() that are still in this queue
392 * will have their buffers deallocated by this function, to prevent a memory
393 * leak.
394 *
395 * Once this function is called, the queue is no longer valid and should not
396 * be used, including by other threads that might access it while destruction
397 * is blocking on pending tasks.
398 *
399 * Do not destroy a queue that still has threads waiting on it through
400 * SDL_WaitAsyncIOResult(). You can call SDL_SignalAsyncIOQueue() first to
401 * unblock those threads, and take measures (such as SDL_WaitThread()) to make
402 * sure they have finished their wait and won't wait on the queue again.
403 *
404 * \param queue the task queue to destroy.
405 *
406 * \threadsafety It is safe to call this function from any thread, so long as
407 * no other thread is waiting on the queue with
408 * SDL_WaitAsyncIOResult.
409 *
410 * \since This function is available since SDL 3.2.0.
411 */
412extern SDL_DECLSPEC void SDLCALL SDL_DestroyAsyncIOQueue(SDL_AsyncIOQueue *queue);
413
414/**
415 * Query an async I/O task queue for completed tasks.
416 *
417 * If a task assigned to this queue has finished, this will return true and
418 * fill in `outcome` with the details of the task. If no task in the queue has
419 * finished, this function will return false. This function does not block.
420 *
421 * If a task has completed, this function will free its resources and the task
422 * pointer will no longer be valid. The task will be removed from the queue.
423 *
424 * It is safe for multiple threads to call this function on the same queue at
425 * once; a completed task will only go to one of the threads.
426 *
427 * \param queue the async I/O task queue to query.
428 * \param outcome details of a finished task will be written here. May not be
429 * NULL.
430 * \returns true if a task has completed, false otherwise.
431 *
432 * \threadsafety It is safe to call this function from any thread.
433 *
434 * \since This function is available since SDL 3.2.0.
435 *
436 * \sa SDL_WaitAsyncIOResult
437 */
438extern SDL_DECLSPEC bool SDLCALL SDL_GetAsyncIOResult(SDL_AsyncIOQueue *queue, SDL_AsyncIOOutcome *outcome);
439
440/**
441 * Block until an async I/O task queue has a completed task.
442 *
443 * This function puts the calling thread to sleep until there a task assigned
444 * to the queue that has finished.
445 *
446 * If a task assigned to the queue has finished, this will return true and
447 * fill in `outcome` with the details of the task. If no task in the queue has
448 * finished, this function will return false.
449 *
450 * If a task has completed, this function will free its resources and the task
451 * pointer will no longer be valid. The task will be removed from the queue.
452 *
453 * It is safe for multiple threads to call this function on the same queue at
454 * once; a completed task will only go to one of the threads.
455 *
456 * Note that by the nature of various platforms, more than one waiting thread
457 * may wake to handle a single task, but only one will obtain it, so
458 * `timeoutMS` is a _maximum_ wait time, and this function may return false
459 * sooner.
460 *
461 * This function may return false if there was a system error, the OS
462 * inadvertently awoke multiple threads, or if SDL_SignalAsyncIOQueue() was
463 * called to wake up all waiting threads without a finished task.
464 *
465 * A timeout can be used to specify a maximum wait time, but rather than
466 * polling, it is possible to have a timeout of -1 to wait forever, and use
467 * SDL_SignalAsyncIOQueue() to wake up the waiting threads later.
468 *
469 * \param queue the async I/O task queue to wait on.
470 * \param outcome details of a finished task will be written here. May not be
471 * NULL.
472 * \param timeoutMS the maximum time to wait, in milliseconds, or -1 to wait
473 * indefinitely.
474 * \returns true if task has completed, false otherwise.
475 *
476 * \threadsafety It is safe to call this function from any thread.
477 *
478 * \since This function is available since SDL 3.2.0.
479 *
480 * \sa SDL_SignalAsyncIOQueue
481 */
482extern SDL_DECLSPEC bool SDLCALL SDL_WaitAsyncIOResult(SDL_AsyncIOQueue *queue, SDL_AsyncIOOutcome *outcome, Sint32 timeoutMS);
483
484/**
485 * Wake up any threads that are blocking in SDL_WaitAsyncIOResult().
486 *
487 * This will unblock any threads that are sleeping in a call to
488 * SDL_WaitAsyncIOResult for the specified queue, and cause them to return
489 * from that function.
490 *
491 * This can be useful when destroying a queue to make sure nothing is touching
492 * it indefinitely. In this case, once this call completes, the caller should
493 * take measures to make sure any previously-blocked threads have returned
494 * from their wait and will not touch the queue again (perhaps by setting a
495 * flag to tell the threads to terminate and then using SDL_WaitThread() to
496 * make sure they've done so).
497 *
498 * \param queue the async I/O task queue to signal.
499 *
500 * \threadsafety It is safe to call this function from any thread.
501 *
502 * \since This function is available since SDL 3.2.0.
503 *
504 * \sa SDL_WaitAsyncIOResult
505 */
506extern SDL_DECLSPEC void SDLCALL SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue *queue);
507
508/**
509 * Load all the data from a file path, asynchronously.
510 *
511 * This function returns as quickly as possible; it does not wait for the read
512 * to complete. On a successful return, this work will continue in the
513 * background. If the work begins, even failure is asynchronous: a failing
514 * return value from this function only means the work couldn't start at all.
515 *
516 * The data is allocated with a zero byte at the end (null terminated) for
517 * convenience. This extra byte is not included in SDL_AsyncIOOutcome's
518 * bytes_transferred value.
519 *
520 * This function will allocate the buffer to contain the file. It must be
521 * deallocated by calling SDL_free() on SDL_AsyncIOOutcome's buffer field
522 * after completion.
523 *
524 * An SDL_AsyncIOQueue must be specified. The newly-created task will be added
525 * to it when it completes its work.
526 *
527 * \param file the path to read all available data from.
528 * \param queue a queue to add the new SDL_AsyncIO to.
529 * \param userdata an app-defined pointer that will be provided with the task
530 * results.
531 * \returns true on success or false on failure; call SDL_GetError() for more
532 * information.
533 *
534 * \since This function is available since SDL 3.2.0.
535 *
536 * \sa SDL_LoadFile_IO
537 */
538extern SDL_DECLSPEC bool SDLCALL SDL_LoadFileAsync(const char *file, SDL_AsyncIOQueue *queue, void *userdata);
539
540/* Ends C function definitions when using C++ */
541#ifdef __cplusplus
542}
543#endif
544#include <SDL3/SDL_close_code.h>
545
546#endif /* SDL_asyncio_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_atomic.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_atomic.h
new file mode 100644
index 0000000..78b5e0f
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_atomic.h
@@ -0,0 +1,664 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryAtomic
24 *
25 * Atomic operations.
26 *
27 * IMPORTANT: If you are not an expert in concurrent lockless programming, you
28 * should not be using any functions in this file. You should be protecting
29 * your data structures with full mutexes instead.
30 *
31 * ***Seriously, here be dragons!***
32 *
33 * You can find out a little more about lockless programming and the subtle
34 * issues that can arise here:
35 * https://learn.microsoft.com/en-us/windows/win32/dxtecharts/lockless-programming
36 *
37 * There's also lots of good information here:
38 *
39 * - https://www.1024cores.net/home/lock-free-algorithms
40 * - https://preshing.com/
41 *
42 * These operations may or may not actually be implemented using processor
43 * specific atomic operations. When possible they are implemented as true
44 * processor specific atomic operations. When that is not possible the are
45 * implemented using locks that *do* use the available atomic operations.
46 *
47 * All of the atomic operations that modify memory are full memory barriers.
48 */
49
50#ifndef SDL_atomic_h_
51#define SDL_atomic_h_
52
53#include <SDL3/SDL_stdinc.h>
54#include <SDL3/SDL_platform_defines.h>
55
56#include <SDL3/SDL_begin_code.h>
57
58/* Set up for C function definitions, even when using C++ */
59#ifdef __cplusplus
60extern "C" {
61#endif
62
63/**
64 * An atomic spinlock.
65 *
66 * The atomic locks are efficient spinlocks using CPU instructions, but are
67 * vulnerable to starvation and can spin forever if a thread holding a lock
68 * has been terminated. For this reason you should minimize the code executed
69 * inside an atomic lock and never do expensive things like API or system
70 * calls while holding them.
71 *
72 * They are also vulnerable to starvation if the thread holding the lock is
73 * lower priority than other threads and doesn't get scheduled. In general you
74 * should use mutexes instead, since they have better performance and
75 * contention behavior.
76 *
77 * The atomic locks are not safe to lock recursively.
78 *
79 * Porting Note: The spin lock functions and type are required and can not be
80 * emulated because they are used in the atomic emulation code.
81 */
82typedef int SDL_SpinLock;
83
84/**
85 * Try to lock a spin lock by setting it to a non-zero value.
86 *
87 * ***Please note that spinlocks are dangerous if you don't know what you're
88 * doing. Please be careful using any sort of spinlock!***
89 *
90 * \param lock a pointer to a lock variable.
91 * \returns true if the lock succeeded, false if the lock is already held.
92 *
93 * \threadsafety It is safe to call this function from any thread.
94 *
95 * \since This function is available since SDL 3.2.0.
96 *
97 * \sa SDL_LockSpinlock
98 * \sa SDL_UnlockSpinlock
99 */
100extern SDL_DECLSPEC bool SDLCALL SDL_TryLockSpinlock(SDL_SpinLock *lock);
101
102/**
103 * Lock a spin lock by setting it to a non-zero value.
104 *
105 * ***Please note that spinlocks are dangerous if you don't know what you're
106 * doing. Please be careful using any sort of spinlock!***
107 *
108 * \param lock a pointer to a lock variable.
109 *
110 * \threadsafety It is safe to call this function from any thread.
111 *
112 * \since This function is available since SDL 3.2.0.
113 *
114 * \sa SDL_TryLockSpinlock
115 * \sa SDL_UnlockSpinlock
116 */
117extern SDL_DECLSPEC void SDLCALL SDL_LockSpinlock(SDL_SpinLock *lock);
118
119/**
120 * Unlock a spin lock by setting it to 0.
121 *
122 * Always returns immediately.
123 *
124 * ***Please note that spinlocks are dangerous if you don't know what you're
125 * doing. Please be careful using any sort of spinlock!***
126 *
127 * \param lock a pointer to a lock variable.
128 *
129 * \threadsafety It is safe to call this function from any thread.
130 *
131 * \since This function is available since SDL 3.2.0.
132 *
133 * \sa SDL_LockSpinlock
134 * \sa SDL_TryLockSpinlock
135 */
136extern SDL_DECLSPEC void SDLCALL SDL_UnlockSpinlock(SDL_SpinLock *lock);
137
138
139#ifdef SDL_WIKI_DOCUMENTATION_SECTION
140
141/**
142 * Mark a compiler barrier.
143 *
144 * A compiler barrier prevents the compiler from reordering reads and writes
145 * to globally visible variables across the call.
146 *
147 * This macro only prevents the compiler from reordering reads and writes, it
148 * does not prevent the CPU from reordering reads and writes. However, all of
149 * the atomic operations that modify memory are full memory barriers.
150 *
151 * \threadsafety Obviously this macro is safe to use from any thread at any
152 * time, but if you find yourself needing this, you are probably
153 * dealing with some very sensitive code; be careful!
154 *
155 * \since This macro is available since SDL 3.2.0.
156 */
157#define SDL_CompilerBarrier() DoCompilerSpecificReadWriteBarrier()
158
159#elif defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
160void _ReadWriteBarrier(void);
161#pragma intrinsic(_ReadWriteBarrier)
162#define SDL_CompilerBarrier() _ReadWriteBarrier()
163#elif (defined(__GNUC__) && !defined(SDL_PLATFORM_EMSCRIPTEN)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
164/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
165#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
166#elif defined(__WATCOMC__)
167extern __inline void SDL_CompilerBarrier(void);
168#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
169#else
170#define SDL_CompilerBarrier() \
171{ SDL_SpinLock _tmp = 0; SDL_LockSpinlock(&_tmp); SDL_UnlockSpinlock(&_tmp); }
172#endif
173
174/**
175 * Insert a memory release barrier (function version).
176 *
177 * Please refer to SDL_MemoryBarrierRelease for details. This is a function
178 * version, which might be useful if you need to use this functionality from a
179 * scripting language, etc. Also, some of the macro versions call this
180 * function behind the scenes, where more heavy lifting can happen inside of
181 * SDL. Generally, though, an app written in C/C++/etc should use the macro
182 * version, as it will be more efficient.
183 *
184 * \threadsafety Obviously this function is safe to use from any thread at any
185 * time, but if you find yourself needing this, you are probably
186 * dealing with some very sensitive code; be careful!
187 *
188 * \since This function is available since SDL 3.2.0.
189 *
190 * \sa SDL_MemoryBarrierRelease
191 */
192extern SDL_DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
193
194/**
195 * Insert a memory acquire barrier (function version).
196 *
197 * Please refer to SDL_MemoryBarrierRelease for details. This is a function
198 * version, which might be useful if you need to use this functionality from a
199 * scripting language, etc. Also, some of the macro versions call this
200 * function behind the scenes, where more heavy lifting can happen inside of
201 * SDL. Generally, though, an app written in C/C++/etc should use the macro
202 * version, as it will be more efficient.
203 *
204 * \threadsafety Obviously this function is safe to use from any thread at any
205 * time, but if you find yourself needing this, you are probably
206 * dealing with some very sensitive code; be careful!
207 *
208 * \since This function is available since SDL 3.2.0.
209 *
210 * \sa SDL_MemoryBarrierAcquire
211 */
212extern SDL_DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
213
214
215#ifdef SDL_WIKI_DOCUMENTATION_SECTION
216
217/**
218 * Insert a memory release barrier (macro version).
219 *
220 * Memory barriers are designed to prevent reads and writes from being
221 * reordered by the compiler and being seen out of order on multi-core CPUs.
222 *
223 * A typical pattern would be for thread A to write some data and a flag, and
224 * for thread B to read the flag and get the data. In this case you would
225 * insert a release barrier between writing the data and the flag,
226 * guaranteeing that the data write completes no later than the flag is
227 * written, and you would insert an acquire barrier between reading the flag
228 * and reading the data, to ensure that all the reads associated with the flag
229 * have completed.
230 *
231 * In this pattern you should always see a release barrier paired with an
232 * acquire barrier and you should gate the data reads/writes with a single
233 * flag variable.
234 *
235 * For more information on these semantics, take a look at the blog post:
236 * http://preshing.com/20120913/acquire-and-release-semantics
237 *
238 * This is the macro version of this functionality; if possible, SDL will use
239 * compiler intrinsics or inline assembly, but some platforms might need to
240 * call the function version of this, SDL_MemoryBarrierReleaseFunction to do
241 * the heavy lifting. Apps that can use the macro should favor it over the
242 * function.
243 *
244 * \threadsafety Obviously this macro is safe to use from any thread at any
245 * time, but if you find yourself needing this, you are probably
246 * dealing with some very sensitive code; be careful!
247 *
248 * \since This macro is available since SDL 3.2.0.
249 *
250 * \sa SDL_MemoryBarrierAcquire
251 * \sa SDL_MemoryBarrierReleaseFunction
252 */
253#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
254
255/**
256 * Insert a memory acquire barrier (macro version).
257 *
258 * Please see SDL_MemoryBarrierRelease for the details on what memory barriers
259 * are and when to use them.
260 *
261 * This is the macro version of this functionality; if possible, SDL will use
262 * compiler intrinsics or inline assembly, but some platforms might need to
263 * call the function version of this, SDL_MemoryBarrierAcquireFunction, to do
264 * the heavy lifting. Apps that can use the macro should favor it over the
265 * function.
266 *
267 * \threadsafety Obviously this macro is safe to use from any thread at any
268 * time, but if you find yourself needing this, you are probably
269 * dealing with some very sensitive code; be careful!
270 *
271 * \since This macro is available since SDL 3.2.0.
272 *
273 * \sa SDL_MemoryBarrierRelease
274 * \sa SDL_MemoryBarrierAcquireFunction
275 */
276#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
277
278#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
279#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
280#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
281#elif defined(__GNUC__) && defined(__aarch64__)
282#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
283#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
284#elif defined(__GNUC__) && defined(__arm__)
285#if 0 /* defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_ANDROID) */
286/* Information from:
287 https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
288
289 The Linux kernel provides a helper function which provides the right code for a memory barrier,
290 hard-coded at address 0xffff0fa0
291*/
292typedef void (*SDL_KernelMemoryBarrierFunc)();
293#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
294#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
295#else
296#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
297#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
298#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
299#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
300#ifdef __thumb__
301/* The mcr instruction isn't available in thumb mode, use real functions */
302#define SDL_MEMORY_BARRIER_USES_FUNCTION
303#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
304#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
305#else
306#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
307#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
308#endif /* __thumb__ */
309#else
310#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
311#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
312#endif /* SDL_PLATFORM_LINUX || SDL_PLATFORM_ANDROID */
313#endif /* __GNUC__ && __arm__ */
314#else
315#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
316/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
317#include <mbarrier.h>
318#define SDL_MemoryBarrierRelease() __machine_rel_barrier()
319#define SDL_MemoryBarrierAcquire() __machine_acq_barrier()
320#else
321/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
322#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
323#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
324#endif
325#endif
326
327/* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
328#ifdef SDL_WIKI_DOCUMENTATION_SECTION
329
330/**
331 * A macro to insert a CPU-specific "pause" instruction into the program.
332 *
333 * This can be useful in busy-wait loops, as it serves as a hint to the CPU as
334 * to the program's intent; some CPUs can use this to do more efficient
335 * processing. On some platforms, this doesn't do anything, so using this
336 * macro might just be a harmless no-op.
337 *
338 * Note that if you are busy-waiting, there are often more-efficient
339 * approaches with other synchronization primitives: mutexes, semaphores,
340 * condition variables, etc.
341 *
342 * \threadsafety This macro is safe to use from any thread.
343 *
344 * \since This macro is available since SDL 3.2.0.
345 */
346#define SDL_CPUPauseInstruction() DoACPUPauseInACompilerAndArchitectureSpecificWay
347
348#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
349 #define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
350#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__)
351 #define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
352#elif (defined(__powerpc__) || defined(__powerpc64__))
353 #define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27");
354#elif (defined(__riscv) && __riscv_xlen == 64)
355 #define SDL_CPUPauseInstruction() __asm__ __volatile__(".insn i 0x0F, 0, x0, x0, 0x010");
356#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
357 #define SDL_CPUPauseInstruction() _mm_pause() /* this is actually "rep nop" and not a SIMD instruction. No inline asm in MSVC x86-64! */
358#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
359 #define SDL_CPUPauseInstruction() __yield()
360#elif defined(__WATCOMC__) && defined(__386__)
361 extern __inline void SDL_CPUPauseInstruction(void);
362 #pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause"
363#else
364 #define SDL_CPUPauseInstruction()
365#endif
366
367
368/**
369 * A type representing an atomic integer value.
370 *
371 * This can be used to manage a value that is synchronized across multiple
372 * CPUs without a race condition; when an app sets a value with
373 * SDL_SetAtomicInt all other threads, regardless of the CPU it is running on,
374 * will see that value when retrieved with SDL_GetAtomicInt, regardless of CPU
375 * caches, etc.
376 *
377 * This is also useful for atomic compare-and-swap operations: a thread can
378 * change the value as long as its current value matches expectations. When
379 * done in a loop, one can guarantee data consistency across threads without a
380 * lock (but the usual warnings apply: if you don't know what you're doing, or
381 * you don't do it carefully, you can confidently cause any number of
382 * disasters with this, so in most cases, you _should_ use a mutex instead of
383 * this!).
384 *
385 * This is a struct so people don't accidentally use numeric operations on it
386 * directly. You have to use SDL atomic functions.
387 *
388 * \since This struct is available since SDL 3.2.0.
389 *
390 * \sa SDL_CompareAndSwapAtomicInt
391 * \sa SDL_GetAtomicInt
392 * \sa SDL_SetAtomicInt
393 * \sa SDL_AddAtomicInt
394 */
395typedef struct SDL_AtomicInt { int value; } SDL_AtomicInt;
396
397/**
398 * Set an atomic variable to a new value if it is currently an old value.
399 *
400 * ***Note: If you don't know what this function is for, you shouldn't use
401 * it!***
402 *
403 * \param a a pointer to an SDL_AtomicInt variable to be modified.
404 * \param oldval the old value.
405 * \param newval the new value.
406 * \returns true if the atomic variable was set, false otherwise.
407 *
408 * \threadsafety It is safe to call this function from any thread.
409 *
410 * \since This function is available since SDL 3.2.0.
411 *
412 * \sa SDL_GetAtomicInt
413 * \sa SDL_SetAtomicInt
414 */
415extern SDL_DECLSPEC bool SDLCALL SDL_CompareAndSwapAtomicInt(SDL_AtomicInt *a, int oldval, int newval);
416
417/**
418 * Set an atomic variable to a value.
419 *
420 * This function also acts as a full memory barrier.
421 *
422 * ***Note: If you don't know what this function is for, you shouldn't use
423 * it!***
424 *
425 * \param a a pointer to an SDL_AtomicInt variable to be modified.
426 * \param v the desired value.
427 * \returns the previous value of the atomic variable.
428 *
429 * \threadsafety It is safe to call this function from any thread.
430 *
431 * \since This function is available since SDL 3.2.0.
432 *
433 * \sa SDL_GetAtomicInt
434 */
435extern SDL_DECLSPEC int SDLCALL SDL_SetAtomicInt(SDL_AtomicInt *a, int v);
436
437/**
438 * Get the value of an atomic variable.
439 *
440 * ***Note: If you don't know what this function is for, you shouldn't use
441 * it!***
442 *
443 * \param a a pointer to an SDL_AtomicInt variable.
444 * \returns the current value of an atomic variable.
445 *
446 * \threadsafety It is safe to call this function from any thread.
447 *
448 * \since This function is available since SDL 3.2.0.
449 *
450 * \sa SDL_SetAtomicInt
451 */
452extern SDL_DECLSPEC int SDLCALL SDL_GetAtomicInt(SDL_AtomicInt *a);
453
454/**
455 * Add to an atomic variable.
456 *
457 * This function also acts as a full memory barrier.
458 *
459 * ***Note: If you don't know what this function is for, you shouldn't use
460 * it!***
461 *
462 * \param a a pointer to an SDL_AtomicInt variable to be modified.
463 * \param v the desired value to add.
464 * \returns the previous value of the atomic variable.
465 *
466 * \threadsafety It is safe to call this function from any thread.
467 *
468 * \since This function is available since SDL 3.2.0.
469 *
470 * \sa SDL_AtomicDecRef
471 * \sa SDL_AtomicIncRef
472 */
473extern SDL_DECLSPEC int SDLCALL SDL_AddAtomicInt(SDL_AtomicInt *a, int v);
474
475#ifndef SDL_AtomicIncRef
476
477/**
478 * Increment an atomic variable used as a reference count.
479 *
480 * ***Note: If you don't know what this macro is for, you shouldn't use it!***
481 *
482 * \param a a pointer to an SDL_AtomicInt to increment.
483 * \returns the previous value of the atomic variable.
484 *
485 * \threadsafety It is safe to call this macro from any thread.
486 *
487 * \since This macro is available since SDL 3.2.0.
488 *
489 * \sa SDL_AtomicDecRef
490 */
491#define SDL_AtomicIncRef(a) SDL_AddAtomicInt(a, 1)
492#endif
493
494#ifndef SDL_AtomicDecRef
495
496/**
497 * Decrement an atomic variable used as a reference count.
498 *
499 * ***Note: If you don't know what this macro is for, you shouldn't use it!***
500 *
501 * \param a a pointer to an SDL_AtomicInt to decrement.
502 * \returns true if the variable reached zero after decrementing, false
503 * otherwise.
504 *
505 * \threadsafety It is safe to call this macro from any thread.
506 *
507 * \since This macro is available since SDL 3.2.0.
508 *
509 * \sa SDL_AtomicIncRef
510 */
511#define SDL_AtomicDecRef(a) (SDL_AddAtomicInt(a, -1) == 1)
512#endif
513
514/**
515 * A type representing an atomic unsigned 32-bit value.
516 *
517 * This can be used to manage a value that is synchronized across multiple
518 * CPUs without a race condition; when an app sets a value with
519 * SDL_SetAtomicU32 all other threads, regardless of the CPU it is running on,
520 * will see that value when retrieved with SDL_GetAtomicU32, regardless of CPU
521 * caches, etc.
522 *
523 * This is also useful for atomic compare-and-swap operations: a thread can
524 * change the value as long as its current value matches expectations. When
525 * done in a loop, one can guarantee data consistency across threads without a
526 * lock (but the usual warnings apply: if you don't know what you're doing, or
527 * you don't do it carefully, you can confidently cause any number of
528 * disasters with this, so in most cases, you _should_ use a mutex instead of
529 * this!).
530 *
531 * This is a struct so people don't accidentally use numeric operations on it
532 * directly. You have to use SDL atomic functions.
533 *
534 * \since This struct is available since SDL 3.2.0.
535 *
536 * \sa SDL_CompareAndSwapAtomicU32
537 * \sa SDL_GetAtomicU32
538 * \sa SDL_SetAtomicU32
539 */
540typedef struct SDL_AtomicU32 { Uint32 value; } SDL_AtomicU32;
541
542/**
543 * Set an atomic variable to a new value if it is currently an old value.
544 *
545 * ***Note: If you don't know what this function is for, you shouldn't use
546 * it!***
547 *
548 * \param a a pointer to an SDL_AtomicU32 variable to be modified.
549 * \param oldval the old value.
550 * \param newval the new value.
551 * \returns true if the atomic variable was set, false otherwise.
552 *
553 * \threadsafety It is safe to call this function from any thread.
554 *
555 * \since This function is available since SDL 3.2.0.
556 *
557 * \sa SDL_GetAtomicU32
558 * \sa SDL_SetAtomicU32
559 */
560extern SDL_DECLSPEC bool SDLCALL SDL_CompareAndSwapAtomicU32(SDL_AtomicU32 *a, Uint32 oldval, Uint32 newval);
561
562/**
563 * Set an atomic variable to a value.
564 *
565 * This function also acts as a full memory barrier.
566 *
567 * ***Note: If you don't know what this function is for, you shouldn't use
568 * it!***
569 *
570 * \param a a pointer to an SDL_AtomicU32 variable to be modified.
571 * \param v the desired value.
572 * \returns the previous value of the atomic variable.
573 *
574 * \threadsafety It is safe to call this function from any thread.
575 *
576 * \since This function is available since SDL 3.2.0.
577 *
578 * \sa SDL_GetAtomicU32
579 */
580extern SDL_DECLSPEC Uint32 SDLCALL SDL_SetAtomicU32(SDL_AtomicU32 *a, Uint32 v);
581
582/**
583 * Get the value of an atomic variable.
584 *
585 * ***Note: If you don't know what this function is for, you shouldn't use
586 * it!***
587 *
588 * \param a a pointer to an SDL_AtomicU32 variable.
589 * \returns the current value of an atomic variable.
590 *
591 * \threadsafety It is safe to call this function from any thread.
592 *
593 * \since This function is available since SDL 3.2.0.
594 *
595 * \sa SDL_SetAtomicU32
596 */
597extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetAtomicU32(SDL_AtomicU32 *a);
598
599/**
600 * Set a pointer to a new value if it is currently an old value.
601 *
602 * ***Note: If you don't know what this function is for, you shouldn't use
603 * it!***
604 *
605 * \param a a pointer to a pointer.
606 * \param oldval the old pointer value.
607 * \param newval the new pointer value.
608 * \returns true if the pointer was set, false otherwise.
609 *
610 * \threadsafety It is safe to call this function from any thread.
611 *
612 * \since This function is available since SDL 3.2.0.
613 *
614 * \sa SDL_CompareAndSwapAtomicInt
615 * \sa SDL_GetAtomicPointer
616 * \sa SDL_SetAtomicPointer
617 */
618extern SDL_DECLSPEC bool SDLCALL SDL_CompareAndSwapAtomicPointer(void **a, void *oldval, void *newval);
619
620/**
621 * Set a pointer to a value atomically.
622 *
623 * ***Note: If you don't know what this function is for, you shouldn't use
624 * it!***
625 *
626 * \param a a pointer to a pointer.
627 * \param v the desired pointer value.
628 * \returns the previous value of the pointer.
629 *
630 * \threadsafety It is safe to call this function from any thread.
631 *
632 * \since This function is available since SDL 3.2.0.
633 *
634 * \sa SDL_CompareAndSwapAtomicPointer
635 * \sa SDL_GetAtomicPointer
636 */
637extern SDL_DECLSPEC void * SDLCALL SDL_SetAtomicPointer(void **a, void *v);
638
639/**
640 * Get the value of a pointer atomically.
641 *
642 * ***Note: If you don't know what this function is for, you shouldn't use
643 * it!***
644 *
645 * \param a a pointer to a pointer.
646 * \returns the current value of a pointer.
647 *
648 * \threadsafety It is safe to call this function from any thread.
649 *
650 * \since This function is available since SDL 3.2.0.
651 *
652 * \sa SDL_CompareAndSwapAtomicPointer
653 * \sa SDL_SetAtomicPointer
654 */
655extern SDL_DECLSPEC void * SDLCALL SDL_GetAtomicPointer(void **a);
656
657/* Ends C function definitions when using C++ */
658#ifdef __cplusplus
659}
660#endif
661
662#include <SDL3/SDL_close_code.h>
663
664#endif /* SDL_atomic_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_audio.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_audio.h
new file mode 100644
index 0000000..51af40e
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_audio.h
@@ -0,0 +1,2203 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryAudio
24 *
25 * Audio functionality for the SDL library.
26 *
27 * All audio in SDL3 revolves around SDL_AudioStream. Whether you want to play
28 * or record audio, convert it, stream it, buffer it, or mix it, you're going
29 * to be passing it through an audio stream.
30 *
31 * Audio streams are quite flexible; they can accept any amount of data at a
32 * time, in any supported format, and output it as needed in any other format,
33 * even if the data format changes on either side halfway through.
34 *
35 * An app opens an audio device and binds any number of audio streams to it,
36 * feeding more data to the streams as available. When the device needs more
37 * data, it will pull it from all bound streams and mix them together for
38 * playback.
39 *
40 * Audio streams can also use an app-provided callback to supply data
41 * on-demand, which maps pretty closely to the SDL2 audio model.
42 *
43 * SDL also provides a simple .WAV loader in SDL_LoadWAV (and SDL_LoadWAV_IO
44 * if you aren't reading from a file) as a basic means to load sound data into
45 * your program.
46 *
47 * ## Logical audio devices
48 *
49 * In SDL3, opening a physical device (like a SoundBlaster 16 Pro) gives you a
50 * logical device ID that you can bind audio streams to. In almost all cases,
51 * logical devices can be used anywhere in the API that a physical device is
52 * normally used. However, since each device opening generates a new logical
53 * device, different parts of the program (say, a VoIP library, or
54 * text-to-speech framework, or maybe some other sort of mixer on top of SDL)
55 * can have their own device opens that do not interfere with each other; each
56 * logical device will mix its separate audio down to a single buffer, fed to
57 * the physical device, behind the scenes. As many logical devices as you like
58 * can come and go; SDL will only have to open the physical device at the OS
59 * level once, and will manage all the logical devices on top of it
60 * internally.
61 *
62 * One other benefit of logical devices: if you don't open a specific physical
63 * device, instead opting for the default, SDL can automatically migrate those
64 * logical devices to different hardware as circumstances change: a user
65 * plugged in headphones? The system default changed? SDL can transparently
66 * migrate the logical devices to the correct physical device seamlessly and
67 * keep playing; the app doesn't even have to know it happened if it doesn't
68 * want to.
69 *
70 * ## Simplified audio
71 *
72 * As a simplified model for when a single source of audio is all that's
73 * needed, an app can use SDL_OpenAudioDeviceStream, which is a single
74 * function to open an audio device, create an audio stream, bind that stream
75 * to the newly-opened device, and (optionally) provide a callback for
76 * obtaining audio data. When using this function, the primary interface is
77 * the SDL_AudioStream and the device handle is mostly hidden away; destroying
78 * a stream created through this function will also close the device, stream
79 * bindings cannot be changed, etc. One other quirk of this is that the device
80 * is started in a _paused_ state and must be explicitly resumed; this is
81 * partially to offer a clean migration for SDL2 apps and partially because
82 * the app might have to do more setup before playback begins; in the
83 * non-simplified form, nothing will play until a stream is bound to a device,
84 * so they start _unpaused_.
85 *
86 * ## Channel layouts
87 *
88 * Audio data passing through SDL is uncompressed PCM data, interleaved. One
89 * can provide their own decompression through an MP3, etc, decoder, but SDL
90 * does not provide this directly. Each interleaved channel of data is meant
91 * to be in a specific order.
92 *
93 * Abbreviations:
94 *
95 * - FRONT = single mono speaker
96 * - FL = front left speaker
97 * - FR = front right speaker
98 * - FC = front center speaker
99 * - BL = back left speaker
100 * - BR = back right speaker
101 * - SR = surround right speaker
102 * - SL = surround left speaker
103 * - BC = back center speaker
104 * - LFE = low-frequency speaker
105 *
106 * These are listed in the order they are laid out in memory, so "FL, FR"
107 * means "the front left speaker is laid out in memory first, then the front
108 * right, then it repeats for the next audio frame".
109 *
110 * - 1 channel (mono) layout: FRONT
111 * - 2 channels (stereo) layout: FL, FR
112 * - 3 channels (2.1) layout: FL, FR, LFE
113 * - 4 channels (quad) layout: FL, FR, BL, BR
114 * - 5 channels (4.1) layout: FL, FR, LFE, BL, BR
115 * - 6 channels (5.1) layout: FL, FR, FC, LFE, BL, BR (last two can also be
116 * SL, SR)
117 * - 7 channels (6.1) layout: FL, FR, FC, LFE, BC, SL, SR
118 * - 8 channels (7.1) layout: FL, FR, FC, LFE, BL, BR, SL, SR
119 *
120 * This is the same order as DirectSound expects, but applied to all
121 * platforms; SDL will swizzle the channels as necessary if a platform expects
122 * something different.
123 *
124 * SDL_AudioStream can also be provided channel maps to change this ordering
125 * to whatever is necessary, in other audio processing scenarios.
126 */
127
128#ifndef SDL_audio_h_
129#define SDL_audio_h_
130
131#include <SDL3/SDL_stdinc.h>
132#include <SDL3/SDL_endian.h>
133#include <SDL3/SDL_error.h>
134#include <SDL3/SDL_mutex.h>
135#include <SDL3/SDL_properties.h>
136#include <SDL3/SDL_iostream.h>
137
138#include <SDL3/SDL_begin_code.h>
139/* Set up for C function definitions, even when using C++ */
140#ifdef __cplusplus
141extern "C" {
142#endif
143
144/**
145 * Mask of bits in an SDL_AudioFormat that contains the format bit size.
146 *
147 * Generally one should use SDL_AUDIO_BITSIZE instead of this macro directly.
148 *
149 * \since This macro is available since SDL 3.2.0.
150 */
151#define SDL_AUDIO_MASK_BITSIZE (0xFFu)
152
153/**
154 * Mask of bits in an SDL_AudioFormat that contain the floating point flag.
155 *
156 * Generally one should use SDL_AUDIO_ISFLOAT instead of this macro directly.
157 *
158 * \since This macro is available since SDL 3.2.0.
159 */
160#define SDL_AUDIO_MASK_FLOAT (1u<<8)
161
162/**
163 * Mask of bits in an SDL_AudioFormat that contain the bigendian flag.
164 *
165 * Generally one should use SDL_AUDIO_ISBIGENDIAN or SDL_AUDIO_ISLITTLEENDIAN
166 * instead of this macro directly.
167 *
168 * \since This macro is available since SDL 3.2.0.
169 */
170#define SDL_AUDIO_MASK_BIG_ENDIAN (1u<<12)
171
172/**
173 * Mask of bits in an SDL_AudioFormat that contain the signed data flag.
174 *
175 * Generally one should use SDL_AUDIO_ISSIGNED instead of this macro directly.
176 *
177 * \since This macro is available since SDL 3.2.0.
178 */
179#define SDL_AUDIO_MASK_SIGNED (1u<<15)
180
181/**
182 * Define an SDL_AudioFormat value.
183 *
184 * SDL does not support custom audio formats, so this macro is not of much use
185 * externally, but it can be illustrative as to what the various bits of an
186 * SDL_AudioFormat mean.
187 *
188 * For example, SDL_AUDIO_S32LE looks like this:
189 *
190 * ```c
191 * SDL_DEFINE_AUDIO_FORMAT(1, 0, 0, 32)
192 * ```
193 *
194 * \param signed 1 for signed data, 0 for unsigned data.
195 * \param bigendian 1 for bigendian data, 0 for littleendian data.
196 * \param flt 1 for floating point data, 0 for integer data.
197 * \param size number of bits per sample.
198 * \returns a format value in the style of SDL_AudioFormat.
199 *
200 * \threadsafety It is safe to call this macro from any thread.
201 *
202 * \since This macro is available since SDL 3.2.0.
203 */
204#define SDL_DEFINE_AUDIO_FORMAT(signed, bigendian, flt, size) \
205 (((Uint16)(signed) << 15) | ((Uint16)(bigendian) << 12) | ((Uint16)(flt) << 8) | ((size) & SDL_AUDIO_MASK_BITSIZE))
206
207/**
208 * Audio format.
209 *
210 * \since This enum is available since SDL 3.2.0.
211 *
212 * \sa SDL_AUDIO_BITSIZE
213 * \sa SDL_AUDIO_BYTESIZE
214 * \sa SDL_AUDIO_ISINT
215 * \sa SDL_AUDIO_ISFLOAT
216 * \sa SDL_AUDIO_ISBIGENDIAN
217 * \sa SDL_AUDIO_ISLITTLEENDIAN
218 * \sa SDL_AUDIO_ISSIGNED
219 * \sa SDL_AUDIO_ISUNSIGNED
220 */
221typedef enum SDL_AudioFormat
222{
223 SDL_AUDIO_UNKNOWN = 0x0000u, /**< Unspecified audio format */
224 SDL_AUDIO_U8 = 0x0008u, /**< Unsigned 8-bit samples */
225 /* SDL_DEFINE_AUDIO_FORMAT(0, 0, 0, 8), */
226 SDL_AUDIO_S8 = 0x8008u, /**< Signed 8-bit samples */
227 /* SDL_DEFINE_AUDIO_FORMAT(1, 0, 0, 8), */
228 SDL_AUDIO_S16LE = 0x8010u, /**< Signed 16-bit samples */
229 /* SDL_DEFINE_AUDIO_FORMAT(1, 0, 0, 16), */
230 SDL_AUDIO_S16BE = 0x9010u, /**< As above, but big-endian byte order */
231 /* SDL_DEFINE_AUDIO_FORMAT(1, 1, 0, 16), */
232 SDL_AUDIO_S32LE = 0x8020u, /**< 32-bit integer samples */
233 /* SDL_DEFINE_AUDIO_FORMAT(1, 0, 0, 32), */
234 SDL_AUDIO_S32BE = 0x9020u, /**< As above, but big-endian byte order */
235 /* SDL_DEFINE_AUDIO_FORMAT(1, 1, 0, 32), */
236 SDL_AUDIO_F32LE = 0x8120u, /**< 32-bit floating point samples */
237 /* SDL_DEFINE_AUDIO_FORMAT(1, 0, 1, 32), */
238 SDL_AUDIO_F32BE = 0x9120u, /**< As above, but big-endian byte order */
239 /* SDL_DEFINE_AUDIO_FORMAT(1, 1, 1, 32), */
240
241 /* These represent the current system's byteorder. */
242 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
243 SDL_AUDIO_S16 = SDL_AUDIO_S16LE,
244 SDL_AUDIO_S32 = SDL_AUDIO_S32LE,
245 SDL_AUDIO_F32 = SDL_AUDIO_F32LE
246 #else
247 SDL_AUDIO_S16 = SDL_AUDIO_S16BE,
248 SDL_AUDIO_S32 = SDL_AUDIO_S32BE,
249 SDL_AUDIO_F32 = SDL_AUDIO_F32BE
250 #endif
251} SDL_AudioFormat;
252
253
254/**
255 * Retrieve the size, in bits, from an SDL_AudioFormat.
256 *
257 * For example, `SDL_AUDIO_BITSIZE(SDL_AUDIO_S16)` returns 16.
258 *
259 * \param x an SDL_AudioFormat value.
260 * \returns data size in bits.
261 *
262 * \threadsafety It is safe to call this macro from any thread.
263 *
264 * \since This macro is available since SDL 3.2.0.
265 */
266#define SDL_AUDIO_BITSIZE(x) ((x) & SDL_AUDIO_MASK_BITSIZE)
267
268/**
269 * Retrieve the size, in bytes, from an SDL_AudioFormat.
270 *
271 * For example, `SDL_AUDIO_BYTESIZE(SDL_AUDIO_S16)` returns 2.
272 *
273 * \param x an SDL_AudioFormat value.
274 * \returns data size in bytes.
275 *
276 * \threadsafety It is safe to call this macro from any thread.
277 *
278 * \since This macro is available since SDL 3.2.0.
279 */
280#define SDL_AUDIO_BYTESIZE(x) (SDL_AUDIO_BITSIZE(x) / 8)
281
282/**
283 * Determine if an SDL_AudioFormat represents floating point data.
284 *
285 * For example, `SDL_AUDIO_ISFLOAT(SDL_AUDIO_S16)` returns 0.
286 *
287 * \param x an SDL_AudioFormat value.
288 * \returns non-zero if format is floating point, zero otherwise.
289 *
290 * \threadsafety It is safe to call this macro from any thread.
291 *
292 * \since This macro is available since SDL 3.2.0.
293 */
294#define SDL_AUDIO_ISFLOAT(x) ((x) & SDL_AUDIO_MASK_FLOAT)
295
296/**
297 * Determine if an SDL_AudioFormat represents bigendian data.
298 *
299 * For example, `SDL_AUDIO_ISBIGENDIAN(SDL_AUDIO_S16LE)` returns 0.
300 *
301 * \param x an SDL_AudioFormat value.
302 * \returns non-zero if format is bigendian, zero otherwise.
303 *
304 * \threadsafety It is safe to call this macro from any thread.
305 *
306 * \since This macro is available since SDL 3.2.0.
307 */
308#define SDL_AUDIO_ISBIGENDIAN(x) ((x) & SDL_AUDIO_MASK_BIG_ENDIAN)
309
310/**
311 * Determine if an SDL_AudioFormat represents littleendian data.
312 *
313 * For example, `SDL_AUDIO_ISLITTLEENDIAN(SDL_AUDIO_S16BE)` returns 0.
314 *
315 * \param x an SDL_AudioFormat value.
316 * \returns non-zero if format is littleendian, zero otherwise.
317 *
318 * \threadsafety It is safe to call this macro from any thread.
319 *
320 * \since This macro is available since SDL 3.2.0.
321 */
322#define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x))
323
324/**
325 * Determine if an SDL_AudioFormat represents signed data.
326 *
327 * For example, `SDL_AUDIO_ISSIGNED(SDL_AUDIO_U8)` returns 0.
328 *
329 * \param x an SDL_AudioFormat value.
330 * \returns non-zero if format is signed, zero otherwise.
331 *
332 * \threadsafety It is safe to call this macro from any thread.
333 *
334 * \since This macro is available since SDL 3.2.0.
335 */
336#define SDL_AUDIO_ISSIGNED(x) ((x) & SDL_AUDIO_MASK_SIGNED)
337
338/**
339 * Determine if an SDL_AudioFormat represents integer data.
340 *
341 * For example, `SDL_AUDIO_ISINT(SDL_AUDIO_F32)` returns 0.
342 *
343 * \param x an SDL_AudioFormat value.
344 * \returns non-zero if format is integer, zero otherwise.
345 *
346 * \threadsafety It is safe to call this macro from any thread.
347 *
348 * \since This macro is available since SDL 3.2.0.
349 */
350#define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x))
351
352/**
353 * Determine if an SDL_AudioFormat represents unsigned data.
354 *
355 * For example, `SDL_AUDIO_ISUNSIGNED(SDL_AUDIO_S16)` returns 0.
356 *
357 * \param x an SDL_AudioFormat value.
358 * \returns non-zero if format is unsigned, zero otherwise.
359 *
360 * \threadsafety It is safe to call this macro from any thread.
361 *
362 * \since This macro is available since SDL 3.2.0.
363 */
364#define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x))
365
366
367/**
368 * SDL Audio Device instance IDs.
369 *
370 * Zero is used to signify an invalid/null device.
371 *
372 * \since This datatype is available since SDL 3.2.0.
373 */
374typedef Uint32 SDL_AudioDeviceID;
375
376/**
377 * A value used to request a default playback audio device.
378 *
379 * Several functions that require an SDL_AudioDeviceID will accept this value
380 * to signify the app just wants the system to choose a default device instead
381 * of the app providing a specific one.
382 *
383 * \since This macro is available since SDL 3.2.0.
384 */
385#define SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK ((SDL_AudioDeviceID) 0xFFFFFFFFu)
386
387/**
388 * A value used to request a default recording audio device.
389 *
390 * Several functions that require an SDL_AudioDeviceID will accept this value
391 * to signify the app just wants the system to choose a default device instead
392 * of the app providing a specific one.
393 *
394 * \since This macro is available since SDL 3.2.0.
395 */
396#define SDL_AUDIO_DEVICE_DEFAULT_RECORDING ((SDL_AudioDeviceID) 0xFFFFFFFEu)
397
398/**
399 * Format specifier for audio data.
400 *
401 * \since This struct is available since SDL 3.2.0.
402 *
403 * \sa SDL_AudioFormat
404 */
405typedef struct SDL_AudioSpec
406{
407 SDL_AudioFormat format; /**< Audio data format */
408 int channels; /**< Number of channels: 1 mono, 2 stereo, etc */
409 int freq; /**< sample rate: sample frames per second */
410} SDL_AudioSpec;
411
412/**
413 * Calculate the size of each audio frame (in bytes) from an SDL_AudioSpec.
414 *
415 * This reports on the size of an audio sample frame: stereo Sint16 data (2
416 * channels of 2 bytes each) would be 4 bytes per frame, for example.
417 *
418 * \param x an SDL_AudioSpec to query.
419 * \returns the number of bytes used per sample frame.
420 *
421 * \threadsafety It is safe to call this macro from any thread.
422 *
423 * \since This macro is available since SDL 3.2.0.
424 */
425#define SDL_AUDIO_FRAMESIZE(x) (SDL_AUDIO_BYTESIZE((x).format) * (x).channels)
426
427/**
428 * The opaque handle that represents an audio stream.
429 *
430 * SDL_AudioStream is an audio conversion interface.
431 *
432 * - It can handle resampling data in chunks without generating artifacts,
433 * when it doesn't have the complete buffer available.
434 * - It can handle incoming data in any variable size.
435 * - It can handle input/output format changes on the fly.
436 * - It can remap audio channels between inputs and outputs.
437 * - You push data as you have it, and pull it when you need it
438 * - It can also function as a basic audio data queue even if you just have
439 * sound that needs to pass from one place to another.
440 * - You can hook callbacks up to them when more data is added or requested,
441 * to manage data on-the-fly.
442 *
443 * Audio streams are the core of the SDL3 audio interface. You create one or
444 * more of them, bind them to an opened audio device, and feed data to them
445 * (or for recording, consume data from them).
446 *
447 * \since This struct is available since SDL 3.2.0.
448 *
449 * \sa SDL_CreateAudioStream
450 */
451typedef struct SDL_AudioStream SDL_AudioStream;
452
453
454/* Function prototypes */
455
456/**
457 * Use this function to get the number of built-in audio drivers.
458 *
459 * This function returns a hardcoded number. This never returns a negative
460 * value; if there are no drivers compiled into this build of SDL, this
461 * function returns zero. The presence of a driver in this list does not mean
462 * it will function, it just means SDL is capable of interacting with that
463 * interface. For example, a build of SDL might have esound support, but if
464 * there's no esound server available, SDL's esound driver would fail if used.
465 *
466 * By default, SDL tries all drivers, in its preferred order, until one is
467 * found to be usable.
468 *
469 * \returns the number of built-in audio drivers.
470 *
471 * \threadsafety It is safe to call this function from any thread.
472 *
473 * \since This function is available since SDL 3.2.0.
474 *
475 * \sa SDL_GetAudioDriver
476 */
477extern SDL_DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
478
479/**
480 * Use this function to get the name of a built in audio driver.
481 *
482 * The list of audio drivers is given in the order that they are normally
483 * initialized by default; the drivers that seem more reasonable to choose
484 * first (as far as the SDL developers believe) are earlier in the list.
485 *
486 * The names of drivers are all simple, low-ASCII identifiers, like "alsa",
487 * "coreaudio" or "wasapi". These never have Unicode characters, and are not
488 * meant to be proper names.
489 *
490 * \param index the index of the audio driver; the value ranges from 0 to
491 * SDL_GetNumAudioDrivers() - 1.
492 * \returns the name of the audio driver at the requested index, or NULL if an
493 * invalid index was specified.
494 *
495 * \threadsafety It is safe to call this function from any thread.
496 *
497 * \since This function is available since SDL 3.2.0.
498 *
499 * \sa SDL_GetNumAudioDrivers
500 */
501extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioDriver(int index);
502
503/**
504 * Get the name of the current audio driver.
505 *
506 * The names of drivers are all simple, low-ASCII identifiers, like "alsa",
507 * "coreaudio" or "wasapi". These never have Unicode characters, and are not
508 * meant to be proper names.
509 *
510 * \returns the name of the current audio driver or NULL if no driver has been
511 * initialized.
512 *
513 * \threadsafety It is safe to call this function from any thread.
514 *
515 * \since This function is available since SDL 3.2.0.
516 */
517extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentAudioDriver(void);
518
519/**
520 * Get a list of currently-connected audio playback devices.
521 *
522 * This returns of list of available devices that play sound, perhaps to
523 * speakers or headphones ("playback" devices). If you want devices that
524 * record audio, like a microphone ("recording" devices), use
525 * SDL_GetAudioRecordingDevices() instead.
526 *
527 * This only returns a list of physical devices; it will not have any device
528 * IDs returned by SDL_OpenAudioDevice().
529 *
530 * If this function returns NULL, to signify an error, `*count` will be set to
531 * zero.
532 *
533 * \param count a pointer filled in with the number of devices returned, may
534 * be NULL.
535 * \returns a 0 terminated array of device instance IDs or NULL on error; call
536 * SDL_GetError() for more information. This should be freed with
537 * SDL_free() when it is no longer needed.
538 *
539 * \threadsafety It is safe to call this function from any thread.
540 *
541 * \since This function is available since SDL 3.2.0.
542 *
543 * \sa SDL_OpenAudioDevice
544 * \sa SDL_GetAudioRecordingDevices
545 */
546extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioPlaybackDevices(int *count);
547
548/**
549 * Get a list of currently-connected audio recording devices.
550 *
551 * This returns of list of available devices that record audio, like a
552 * microphone ("recording" devices). If you want devices that play sound,
553 * perhaps to speakers or headphones ("playback" devices), use
554 * SDL_GetAudioPlaybackDevices() instead.
555 *
556 * This only returns a list of physical devices; it will not have any device
557 * IDs returned by SDL_OpenAudioDevice().
558 *
559 * If this function returns NULL, to signify an error, `*count` will be set to
560 * zero.
561 *
562 * \param count a pointer filled in with the number of devices returned, may
563 * be NULL.
564 * \returns a 0 terminated array of device instance IDs, or NULL on failure;
565 * call SDL_GetError() for more information. This should be freed
566 * with SDL_free() when it is no longer needed.
567 *
568 * \threadsafety It is safe to call this function from any thread.
569 *
570 * \since This function is available since SDL 3.2.0.
571 *
572 * \sa SDL_OpenAudioDevice
573 * \sa SDL_GetAudioPlaybackDevices
574 */
575extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioRecordingDevices(int *count);
576
577/**
578 * Get the human-readable name of a specific audio device.
579 *
580 * \param devid the instance ID of the device to query.
581 * \returns the name of the audio device, or NULL on failure; call
582 * SDL_GetError() for more information.
583 *
584 * \threadsafety It is safe to call this function from any thread.
585 *
586 * \since This function is available since SDL 3.2.0.
587 *
588 * \sa SDL_GetAudioPlaybackDevices
589 * \sa SDL_GetAudioRecordingDevices
590 */
591extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioDeviceName(SDL_AudioDeviceID devid);
592
593/**
594 * Get the current audio format of a specific audio device.
595 *
596 * For an opened device, this will report the format the device is currently
597 * using. If the device isn't yet opened, this will report the device's
598 * preferred format (or a reasonable default if this can't be determined).
599 *
600 * You may also specify SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK or
601 * SDL_AUDIO_DEVICE_DEFAULT_RECORDING here, which is useful for getting a
602 * reasonable recommendation before opening the system-recommended default
603 * device.
604 *
605 * You can also use this to request the current device buffer size. This is
606 * specified in sample frames and represents the amount of data SDL will feed
607 * to the physical hardware in each chunk. This can be converted to
608 * milliseconds of audio with the following equation:
609 *
610 * `ms = (int) ((((Sint64) frames) * 1000) / spec.freq);`
611 *
612 * Buffer size is only important if you need low-level control over the audio
613 * playback timing. Most apps do not need this.
614 *
615 * \param devid the instance ID of the device to query.
616 * \param spec on return, will be filled with device details.
617 * \param sample_frames pointer to store device buffer size, in sample frames.
618 * Can be NULL.
619 * \returns true on success or false on failure; call SDL_GetError() for more
620 * information.
621 *
622 * \threadsafety It is safe to call this function from any thread.
623 *
624 * \since This function is available since SDL 3.2.0.
625 */
626extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec *spec, int *sample_frames);
627
628/**
629 * Get the current channel map of an audio device.
630 *
631 * Channel maps are optional; most things do not need them, instead passing
632 * data in the [order that SDL expects](CategoryAudio#channel-layouts).
633 *
634 * Audio devices usually have no remapping applied. This is represented by
635 * returning NULL, and does not signify an error.
636 *
637 * \param devid the instance ID of the device to query.
638 * \param count On output, set to number of channels in the map. Can be NULL.
639 * \returns an array of the current channel mapping, with as many elements as
640 * the current output spec's channels, or NULL if default. This
641 * should be freed with SDL_free() when it is no longer needed.
642 *
643 * \threadsafety It is safe to call this function from any thread.
644 *
645 * \since This function is available since SDL 3.2.0.
646 *
647 * \sa SDL_SetAudioStreamInputChannelMap
648 */
649extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID devid, int *count);
650
651/**
652 * Open a specific audio device.
653 *
654 * You can open both playback and recording devices through this function.
655 * Playback devices will take data from bound audio streams, mix it, and send
656 * it to the hardware. Recording devices will feed any bound audio streams
657 * with a copy of any incoming data.
658 *
659 * An opened audio device starts out with no audio streams bound. To start
660 * audio playing, bind a stream and supply audio data to it. Unlike SDL2,
661 * there is no audio callback; you only bind audio streams and make sure they
662 * have data flowing into them (however, you can simulate SDL2's semantics
663 * fairly closely by using SDL_OpenAudioDeviceStream instead of this
664 * function).
665 *
666 * If you don't care about opening a specific device, pass a `devid` of either
667 * `SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK` or
668 * `SDL_AUDIO_DEVICE_DEFAULT_RECORDING`. In this case, SDL will try to pick
669 * the most reasonable default, and may also switch between physical devices
670 * seamlessly later, if the most reasonable default changes during the
671 * lifetime of this opened device (user changed the default in the OS's system
672 * preferences, the default got unplugged so the system jumped to a new
673 * default, the user plugged in headphones on a mobile device, etc). Unless
674 * you have a good reason to choose a specific device, this is probably what
675 * you want.
676 *
677 * You may request a specific format for the audio device, but there is no
678 * promise the device will honor that request for several reasons. As such,
679 * it's only meant to be a hint as to what data your app will provide. Audio
680 * streams will accept data in whatever format you specify and manage
681 * conversion for you as appropriate. SDL_GetAudioDeviceFormat can tell you
682 * the preferred format for the device before opening and the actual format
683 * the device is using after opening.
684 *
685 * It's legal to open the same device ID more than once; each successful open
686 * will generate a new logical SDL_AudioDeviceID that is managed separately
687 * from others on the same physical device. This allows libraries to open a
688 * device separately from the main app and bind its own streams without
689 * conflicting.
690 *
691 * It is also legal to open a device ID returned by a previous call to this
692 * function; doing so just creates another logical device on the same physical
693 * device. This may be useful for making logical groupings of audio streams.
694 *
695 * This function returns the opened device ID on success. This is a new,
696 * unique SDL_AudioDeviceID that represents a logical device.
697 *
698 * Some backends might offer arbitrary devices (for example, a networked audio
699 * protocol that can connect to an arbitrary server). For these, as a change
700 * from SDL2, you should open a default device ID and use an SDL hint to
701 * specify the target if you care, or otherwise let the backend figure out a
702 * reasonable default. Most backends don't offer anything like this, and often
703 * this would be an end user setting an environment variable for their custom
704 * need, and not something an application should specifically manage.
705 *
706 * When done with an audio device, possibly at the end of the app's life, one
707 * should call SDL_CloseAudioDevice() on the returned device id.
708 *
709 * \param devid the device instance id to open, or
710 * SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK or
711 * SDL_AUDIO_DEVICE_DEFAULT_RECORDING for the most reasonable
712 * default device.
713 * \param spec the requested device configuration. Can be NULL to use
714 * reasonable defaults.
715 * \returns the device ID on success or 0 on failure; call SDL_GetError() for
716 * more information.
717 *
718 * \threadsafety It is safe to call this function from any thread.
719 *
720 * \since This function is available since SDL 3.2.0.
721 *
722 * \sa SDL_CloseAudioDevice
723 * \sa SDL_GetAudioDeviceFormat
724 */
725extern SDL_DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(SDL_AudioDeviceID devid, const SDL_AudioSpec *spec);
726
727/**
728 * Determine if an audio device is physical (instead of logical).
729 *
730 * An SDL_AudioDeviceID that represents physical hardware is a physical
731 * device; there is one for each piece of hardware that SDL can see. Logical
732 * devices are created by calling SDL_OpenAudioDevice or
733 * SDL_OpenAudioDeviceStream, and while each is associated with a physical
734 * device, there can be any number of logical devices on one physical device.
735 *
736 * For the most part, logical and physical IDs are interchangeable--if you try
737 * to open a logical device, SDL understands to assign that effort to the
738 * underlying physical device, etc. However, it might be useful to know if an
739 * arbitrary device ID is physical or logical. This function reports which.
740 *
741 * This function may return either true or false for invalid device IDs.
742 *
743 * \param devid the device ID to query.
744 * \returns true if devid is a physical device, false if it is logical.
745 *
746 * \threadsafety It is safe to call this function from any thread.
747 *
748 * \since This function is available since SDL 3.2.0.
749 */
750extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePhysical(SDL_AudioDeviceID devid);
751
752/**
753 * Determine if an audio device is a playback device (instead of recording).
754 *
755 * This function may return either true or false for invalid device IDs.
756 *
757 * \param devid the device ID to query.
758 * \returns true if devid is a playback device, false if it is recording.
759 *
760 * \threadsafety It is safe to call this function from any thread.
761 *
762 * \since This function is available since SDL 3.2.0.
763 */
764extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePlayback(SDL_AudioDeviceID devid);
765
766/**
767 * Use this function to pause audio playback on a specified device.
768 *
769 * This function pauses audio processing for a given device. Any bound audio
770 * streams will not progress, and no audio will be generated. Pausing one
771 * device does not prevent other unpaused devices from running.
772 *
773 * Unlike in SDL2, audio devices start in an _unpaused_ state, since an app
774 * has to bind a stream before any audio will flow. Pausing a paused device is
775 * a legal no-op.
776 *
777 * Pausing a device can be useful to halt all audio without unbinding all the
778 * audio streams. This might be useful while a game is paused, or a level is
779 * loading, etc.
780 *
781 * Physical devices can not be paused or unpaused, only logical devices
782 * created through SDL_OpenAudioDevice() can be.
783 *
784 * \param devid a device opened by SDL_OpenAudioDevice().
785 * \returns true on success or false on failure; call SDL_GetError() for more
786 * information.
787 *
788 * \threadsafety It is safe to call this function from any thread.
789 *
790 * \since This function is available since SDL 3.2.0.
791 *
792 * \sa SDL_ResumeAudioDevice
793 * \sa SDL_AudioDevicePaused
794 */
795extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID devid);
796
797/**
798 * Use this function to unpause audio playback on a specified device.
799 *
800 * This function unpauses audio processing for a given device that has
801 * previously been paused with SDL_PauseAudioDevice(). Once unpaused, any
802 * bound audio streams will begin to progress again, and audio can be
803 * generated.
804 *
805 * Unlike in SDL2, audio devices start in an _unpaused_ state, since an app
806 * has to bind a stream before any audio will flow. Unpausing an unpaused
807 * device is a legal no-op.
808 *
809 * Physical devices can not be paused or unpaused, only logical devices
810 * created through SDL_OpenAudioDevice() can be.
811 *
812 * \param devid a device opened by SDL_OpenAudioDevice().
813 * \returns true on success or false on failure; call SDL_GetError() for more
814 * information.
815 *
816 * \threadsafety It is safe to call this function from any thread.
817 *
818 * \since This function is available since SDL 3.2.0.
819 *
820 * \sa SDL_AudioDevicePaused
821 * \sa SDL_PauseAudioDevice
822 */
823extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID devid);
824
825/**
826 * Use this function to query if an audio device is paused.
827 *
828 * Unlike in SDL2, audio devices start in an _unpaused_ state, since an app
829 * has to bind a stream before any audio will flow.
830 *
831 * Physical devices can not be paused or unpaused, only logical devices
832 * created through SDL_OpenAudioDevice() can be. Physical and invalid device
833 * IDs will report themselves as unpaused here.
834 *
835 * \param devid a device opened by SDL_OpenAudioDevice().
836 * \returns true if device is valid and paused, false otherwise.
837 *
838 * \threadsafety It is safe to call this function from any thread.
839 *
840 * \since This function is available since SDL 3.2.0.
841 *
842 * \sa SDL_PauseAudioDevice
843 * \sa SDL_ResumeAudioDevice
844 */
845extern SDL_DECLSPEC bool SDLCALL SDL_AudioDevicePaused(SDL_AudioDeviceID devid);
846
847/**
848 * Get the gain of an audio device.
849 *
850 * The gain of a device is its volume; a larger gain means a louder output,
851 * with a gain of zero being silence.
852 *
853 * Audio devices default to a gain of 1.0f (no change in output).
854 *
855 * Physical devices may not have their gain changed, only logical devices, and
856 * this function will always return -1.0f when used on physical devices.
857 *
858 * \param devid the audio device to query.
859 * \returns the gain of the device or -1.0f on failure; call SDL_GetError()
860 * for more information.
861 *
862 * \threadsafety It is safe to call this function from any thread.
863 *
864 * \since This function is available since SDL 3.2.0.
865 *
866 * \sa SDL_SetAudioDeviceGain
867 */
868extern SDL_DECLSPEC float SDLCALL SDL_GetAudioDeviceGain(SDL_AudioDeviceID devid);
869
870/**
871 * Change the gain of an audio device.
872 *
873 * The gain of a device is its volume; a larger gain means a louder output,
874 * with a gain of zero being silence.
875 *
876 * Audio devices default to a gain of 1.0f (no change in output).
877 *
878 * Physical devices may not have their gain changed, only logical devices, and
879 * this function will always return false when used on physical devices. While
880 * it might seem attractive to adjust several logical devices at once in this
881 * way, it would allow an app or library to interfere with another portion of
882 * the program's otherwise-isolated devices.
883 *
884 * This is applied, along with any per-audiostream gain, during playback to
885 * the hardware, and can be continuously changed to create various effects. On
886 * recording devices, this will adjust the gain before passing the data into
887 * an audiostream; that recording audiostream can then adjust its gain further
888 * when outputting the data elsewhere, if it likes, but that second gain is
889 * not applied until the data leaves the audiostream again.
890 *
891 * \param devid the audio device on which to change gain.
892 * \param gain the gain. 1.0f is no change, 0.0f is silence.
893 * \returns true on success or false on failure; call SDL_GetError() for more
894 * information.
895 *
896 * \threadsafety It is safe to call this function from any thread, as it holds
897 * a stream-specific mutex while running.
898 *
899 * \since This function is available since SDL 3.2.0.
900 *
901 * \sa SDL_GetAudioDeviceGain
902 */
903extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, float gain);
904
905/**
906 * Close a previously-opened audio device.
907 *
908 * The application should close open audio devices once they are no longer
909 * needed.
910 *
911 * This function may block briefly while pending audio data is played by the
912 * hardware, so that applications don't drop the last buffer of data they
913 * supplied if terminating immediately afterwards.
914 *
915 * \param devid an audio device id previously returned by
916 * SDL_OpenAudioDevice().
917 *
918 * \threadsafety It is safe to call this function from any thread.
919 *
920 * \since This function is available since SDL 3.2.0.
921 *
922 * \sa SDL_OpenAudioDevice
923 */
924extern SDL_DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID devid);
925
926/**
927 * Bind a list of audio streams to an audio device.
928 *
929 * Audio data will flow through any bound streams. For a playback device, data
930 * for all bound streams will be mixed together and fed to the device. For a
931 * recording device, a copy of recorded data will be provided to each bound
932 * stream.
933 *
934 * Audio streams can only be bound to an open device. This operation is
935 * atomic--all streams bound in the same call will start processing at the
936 * same time, so they can stay in sync. Also: either all streams will be bound
937 * or none of them will be.
938 *
939 * It is an error to bind an already-bound stream; it must be explicitly
940 * unbound first.
941 *
942 * Binding a stream to a device will set its output format for playback
943 * devices, and its input format for recording devices, so they match the
944 * device's settings. The caller is welcome to change the other end of the
945 * stream's format at any time with SDL_SetAudioStreamFormat(). If the other
946 * end of the stream's format has never been set (the audio stream was created
947 * with a NULL audio spec), this function will set it to match the device
948 * end's format.
949 *
950 * \param devid an audio device to bind a stream to.
951 * \param streams an array of audio streams to bind.
952 * \param num_streams number streams listed in the `streams` array.
953 * \returns true on success or false on failure; call SDL_GetError() for more
954 * information.
955 *
956 * \threadsafety It is safe to call this function from any thread.
957 *
958 * \since This function is available since SDL 3.2.0.
959 *
960 * \sa SDL_BindAudioStreams
961 * \sa SDL_UnbindAudioStream
962 * \sa SDL_GetAudioStreamDevice
963 */
964extern SDL_DECLSPEC bool SDLCALL SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream * const *streams, int num_streams);
965
966/**
967 * Bind a single audio stream to an audio device.
968 *
969 * This is a convenience function, equivalent to calling
970 * `SDL_BindAudioStreams(devid, &stream, 1)`.
971 *
972 * \param devid an audio device to bind a stream to.
973 * \param stream an audio stream to bind to a device.
974 * \returns true on success or false on failure; call SDL_GetError() for more
975 * information.
976 *
977 * \threadsafety It is safe to call this function from any thread.
978 *
979 * \since This function is available since SDL 3.2.0.
980 *
981 * \sa SDL_BindAudioStreams
982 * \sa SDL_UnbindAudioStream
983 * \sa SDL_GetAudioStreamDevice
984 */
985extern SDL_DECLSPEC bool SDLCALL SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream *stream);
986
987/**
988 * Unbind a list of audio streams from their audio devices.
989 *
990 * The streams being unbound do not all have to be on the same device. All
991 * streams on the same device will be unbound atomically (data will stop
992 * flowing through all unbound streams on the same device at the same time).
993 *
994 * Unbinding a stream that isn't bound to a device is a legal no-op.
995 *
996 * \param streams an array of audio streams to unbind. Can be NULL or contain
997 * NULL.
998 * \param num_streams number streams listed in the `streams` array.
999 *
1000 * \threadsafety It is safe to call this function from any thread.
1001 *
1002 * \since This function is available since SDL 3.2.0.
1003 *
1004 * \sa SDL_BindAudioStreams
1005 */
1006extern SDL_DECLSPEC void SDLCALL SDL_UnbindAudioStreams(SDL_AudioStream * const *streams, int num_streams);
1007
1008/**
1009 * Unbind a single audio stream from its audio device.
1010 *
1011 * This is a convenience function, equivalent to calling
1012 * `SDL_UnbindAudioStreams(&stream, 1)`.
1013 *
1014 * \param stream an audio stream to unbind from a device. Can be NULL.
1015 *
1016 * \threadsafety It is safe to call this function from any thread.
1017 *
1018 * \since This function is available since SDL 3.2.0.
1019 *
1020 * \sa SDL_BindAudioStream
1021 */
1022extern SDL_DECLSPEC void SDLCALL SDL_UnbindAudioStream(SDL_AudioStream *stream);
1023
1024/**
1025 * Query an audio stream for its currently-bound device.
1026 *
1027 * This reports the logical audio device that an audio stream is currently bound to.
1028 *
1029 * If not bound, or invalid, this returns zero, which is not a valid device
1030 * ID.
1031 *
1032 * \param stream the audio stream to query.
1033 * \returns the bound audio device, or 0 if not bound or invalid.
1034 *
1035 * \threadsafety It is safe to call this function from any thread.
1036 *
1037 * \since This function is available since SDL 3.2.0.
1038 *
1039 * \sa SDL_BindAudioStream
1040 * \sa SDL_BindAudioStreams
1041 */
1042extern SDL_DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamDevice(SDL_AudioStream *stream);
1043
1044/**
1045 * Create a new audio stream.
1046 *
1047 * \param src_spec the format details of the input audio.
1048 * \param dst_spec the format details of the output audio.
1049 * \returns a new audio stream on success or NULL on failure; call
1050 * SDL_GetError() for more information.
1051 *
1052 * \threadsafety It is safe to call this function from any thread.
1053 *
1054 * \since This function is available since SDL 3.2.0.
1055 *
1056 * \sa SDL_PutAudioStreamData
1057 * \sa SDL_GetAudioStreamData
1058 * \sa SDL_GetAudioStreamAvailable
1059 * \sa SDL_FlushAudioStream
1060 * \sa SDL_ClearAudioStream
1061 * \sa SDL_SetAudioStreamFormat
1062 * \sa SDL_DestroyAudioStream
1063 */
1064extern SDL_DECLSPEC SDL_AudioStream * SDLCALL SDL_CreateAudioStream(const SDL_AudioSpec *src_spec, const SDL_AudioSpec *dst_spec);
1065
1066/**
1067 * Get the properties associated with an audio stream.
1068 *
1069 * \param stream the SDL_AudioStream to query.
1070 * \returns a valid property ID on success or 0 on failure; call
1071 * SDL_GetError() for more information.
1072 *
1073 * \threadsafety It is safe to call this function from any thread.
1074 *
1075 * \since This function is available since SDL 3.2.0.
1076 */
1077extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetAudioStreamProperties(SDL_AudioStream *stream);
1078
1079/**
1080 * Query the current format of an audio stream.
1081 *
1082 * \param stream the SDL_AudioStream to query.
1083 * \param src_spec where to store the input audio format; ignored if NULL.
1084 * \param dst_spec where to store the output audio format; ignored if NULL.
1085 * \returns true on success or false on failure; call SDL_GetError() for more
1086 * information.
1087 *
1088 * \threadsafety It is safe to call this function from any thread, as it holds
1089 * a stream-specific mutex while running.
1090 *
1091 * \since This function is available since SDL 3.2.0.
1092 *
1093 * \sa SDL_SetAudioStreamFormat
1094 */
1095extern SDL_DECLSPEC bool SDLCALL SDL_GetAudioStreamFormat(SDL_AudioStream *stream, SDL_AudioSpec *src_spec, SDL_AudioSpec *dst_spec);
1096
1097/**
1098 * Change the input and output formats of an audio stream.
1099 *
1100 * Future calls to and SDL_GetAudioStreamAvailable and SDL_GetAudioStreamData
1101 * will reflect the new format, and future calls to SDL_PutAudioStreamData
1102 * must provide data in the new input formats.
1103 *
1104 * Data that was previously queued in the stream will still be operated on in
1105 * the format that was current when it was added, which is to say you can put
1106 * the end of a sound file in one format to a stream, change formats for the
1107 * next sound file, and start putting that new data while the previous sound
1108 * file is still queued, and everything will still play back correctly.
1109 *
1110 * If a stream is bound to a device, then the format of the side of the stream
1111 * bound to a device cannot be changed (src_spec for recording devices,
1112 * dst_spec for playback devices). Attempts to make a change to this side will
1113 * be ignored, but this will not report an error. The other side's format can
1114 * be changed.
1115 *
1116 * \param stream the stream the format is being changed.
1117 * \param src_spec the new format of the audio input; if NULL, it is not
1118 * changed.
1119 * \param dst_spec the new format of the audio output; if NULL, it is not
1120 * changed.
1121 * \returns true on success or false on failure; call SDL_GetError() for more
1122 * information.
1123 *
1124 * \threadsafety It is safe to call this function from any thread, as it holds
1125 * a stream-specific mutex while running.
1126 *
1127 * \since This function is available since SDL 3.2.0.
1128 *
1129 * \sa SDL_GetAudioStreamFormat
1130 * \sa SDL_SetAudioStreamFrequencyRatio
1131 */
1132extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamFormat(SDL_AudioStream *stream, const SDL_AudioSpec *src_spec, const SDL_AudioSpec *dst_spec);
1133
1134/**
1135 * Get the frequency ratio of an audio stream.
1136 *
1137 * \param stream the SDL_AudioStream to query.
1138 * \returns the frequency ratio of the stream or 0.0 on failure; call
1139 * SDL_GetError() for more information.
1140 *
1141 * \threadsafety It is safe to call this function from any thread, as it holds
1142 * a stream-specific mutex while running.
1143 *
1144 * \since This function is available since SDL 3.2.0.
1145 *
1146 * \sa SDL_SetAudioStreamFrequencyRatio
1147 */
1148extern SDL_DECLSPEC float SDLCALL SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream *stream);
1149
1150/**
1151 * Change the frequency ratio of an audio stream.
1152 *
1153 * The frequency ratio is used to adjust the rate at which input data is
1154 * consumed. Changing this effectively modifies the speed and pitch of the
1155 * audio. A value greater than 1.0 will play the audio faster, and at a higher
1156 * pitch. A value less than 1.0 will play the audio slower, and at a lower
1157 * pitch.
1158 *
1159 * This is applied during SDL_GetAudioStreamData, and can be continuously
1160 * changed to create various effects.
1161 *
1162 * \param stream the stream the frequency ratio is being changed.
1163 * \param ratio the frequency ratio. 1.0 is normal speed. Must be between 0.01
1164 * and 100.
1165 * \returns true on success or false on failure; call SDL_GetError() for more
1166 * information.
1167 *
1168 * \threadsafety It is safe to call this function from any thread, as it holds
1169 * a stream-specific mutex while running.
1170 *
1171 * \since This function is available since SDL 3.2.0.
1172 *
1173 * \sa SDL_GetAudioStreamFrequencyRatio
1174 * \sa SDL_SetAudioStreamFormat
1175 */
1176extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream *stream, float ratio);
1177
1178/**
1179 * Get the gain of an audio stream.
1180 *
1181 * The gain of a stream is its volume; a larger gain means a louder output,
1182 * with a gain of zero being silence.
1183 *
1184 * Audio streams default to a gain of 1.0f (no change in output).
1185 *
1186 * \param stream the SDL_AudioStream to query.
1187 * \returns the gain of the stream or -1.0f on failure; call SDL_GetError()
1188 * for more information.
1189 *
1190 * \threadsafety It is safe to call this function from any thread, as it holds
1191 * a stream-specific mutex while running.
1192 *
1193 * \since This function is available since SDL 3.2.0.
1194 *
1195 * \sa SDL_SetAudioStreamGain
1196 */
1197extern SDL_DECLSPEC float SDLCALL SDL_GetAudioStreamGain(SDL_AudioStream *stream);
1198
1199/**
1200 * Change the gain of an audio stream.
1201 *
1202 * The gain of a stream is its volume; a larger gain means a louder output,
1203 * with a gain of zero being silence.
1204 *
1205 * Audio streams default to a gain of 1.0f (no change in output).
1206 *
1207 * This is applied during SDL_GetAudioStreamData, and can be continuously
1208 * changed to create various effects.
1209 *
1210 * \param stream the stream on which the gain is being changed.
1211 * \param gain the gain. 1.0f is no change, 0.0f is silence.
1212 * \returns true on success or false on failure; call SDL_GetError() for more
1213 * information.
1214 *
1215 * \threadsafety It is safe to call this function from any thread, as it holds
1216 * a stream-specific mutex while running.
1217 *
1218 * \since This function is available since SDL 3.2.0.
1219 *
1220 * \sa SDL_GetAudioStreamGain
1221 */
1222extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamGain(SDL_AudioStream *stream, float gain);
1223
1224/**
1225 * Get the current input channel map of an audio stream.
1226 *
1227 * Channel maps are optional; most things do not need them, instead passing
1228 * data in the [order that SDL expects](CategoryAudio#channel-layouts).
1229 *
1230 * Audio streams default to no remapping applied. This is represented by
1231 * returning NULL, and does not signify an error.
1232 *
1233 * \param stream the SDL_AudioStream to query.
1234 * \param count On output, set to number of channels in the map. Can be NULL.
1235 * \returns an array of the current channel mapping, with as many elements as
1236 * the current output spec's channels, or NULL if default. This
1237 * should be freed with SDL_free() when it is no longer needed.
1238 *
1239 * \threadsafety It is safe to call this function from any thread, as it holds
1240 * a stream-specific mutex while running.
1241 *
1242 * \since This function is available since SDL 3.2.0.
1243 *
1244 * \sa SDL_SetAudioStreamInputChannelMap
1245 */
1246extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamInputChannelMap(SDL_AudioStream *stream, int *count);
1247
1248/**
1249 * Get the current output channel map of an audio stream.
1250 *
1251 * Channel maps are optional; most things do not need them, instead passing
1252 * data in the [order that SDL expects](CategoryAudio#channel-layouts).
1253 *
1254 * Audio streams default to no remapping applied. This is represented by
1255 * returning NULL, and does not signify an error.
1256 *
1257 * \param stream the SDL_AudioStream to query.
1258 * \param count On output, set to number of channels in the map. Can be NULL.
1259 * \returns an array of the current channel mapping, with as many elements as
1260 * the current output spec's channels, or NULL if default. This
1261 * should be freed with SDL_free() when it is no longer needed.
1262 *
1263 * \threadsafety It is safe to call this function from any thread, as it holds
1264 * a stream-specific mutex while running.
1265 *
1266 * \since This function is available since SDL 3.2.0.
1267 *
1268 * \sa SDL_SetAudioStreamInputChannelMap
1269 */
1270extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioStream *stream, int *count);
1271
1272/**
1273 * Set the current input channel map of an audio stream.
1274 *
1275 * Channel maps are optional; most things do not need them, instead passing
1276 * data in the [order that SDL expects](CategoryAudio#channel-layouts).
1277 *
1278 * The input channel map reorders data that is added to a stream via
1279 * SDL_PutAudioStreamData. Future calls to SDL_PutAudioStreamData must provide
1280 * data in the new channel order.
1281 *
1282 * Each item in the array represents an input channel, and its value is the
1283 * channel that it should be remapped to. To reverse a stereo signal's left
1284 * and right values, you'd have an array of `{ 1, 0 }`. It is legal to remap
1285 * multiple channels to the same thing, so `{ 1, 1 }` would duplicate the
1286 * right channel to both channels of a stereo signal. An element in the
1287 * channel map set to -1 instead of a valid channel will mute that channel,
1288 * setting it to a silence value.
1289 *
1290 * You cannot change the number of channels through a channel map, just
1291 * reorder/mute them.
1292 *
1293 * Data that was previously queued in the stream will still be operated on in
1294 * the order that was current when it was added, which is to say you can put
1295 * the end of a sound file in one order to a stream, change orders for the
1296 * next sound file, and start putting that new data while the previous sound
1297 * file is still queued, and everything will still play back correctly.
1298 *
1299 * Audio streams default to no remapping applied. Passing a NULL channel map
1300 * is legal, and turns off remapping.
1301 *
1302 * SDL will copy the channel map; the caller does not have to save this array
1303 * after this call.
1304 *
1305 * If `count` is not equal to the current number of channels in the audio
1306 * stream's format, this will fail. This is a safety measure to make sure a
1307 * race condition hasn't changed the format while this call is setting the
1308 * channel map.
1309 *
1310 * Unlike attempting to change the stream's format, the input channel map on a
1311 * stream bound to a recording device is permitted to change at any time; any
1312 * data added to the stream from the device after this call will have the new
1313 * mapping, but previously-added data will still have the prior mapping.
1314 *
1315 * \param stream the SDL_AudioStream to change.
1316 * \param chmap the new channel map, NULL to reset to default.
1317 * \param count The number of channels in the map.
1318 * \returns true on success or false on failure; call SDL_GetError() for more
1319 * information.
1320 *
1321 * \threadsafety It is safe to call this function from any thread, as it holds
1322 * a stream-specific mutex while running. Don't change the
1323 * stream's format to have a different number of channels from a
1324 * a different thread at the same time, though!
1325 *
1326 * \since This function is available since SDL 3.2.0.
1327 *
1328 * \sa SDL_SetAudioStreamInputChannelMap
1329 */
1330extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamInputChannelMap(SDL_AudioStream *stream, const int *chmap, int count);
1331
1332/**
1333 * Set the current output channel map of an audio stream.
1334 *
1335 * Channel maps are optional; most things do not need them, instead passing
1336 * data in the [order that SDL expects](CategoryAudio#channel-layouts).
1337 *
1338 * The output channel map reorders data that leaving a stream via
1339 * SDL_GetAudioStreamData.
1340 *
1341 * Each item in the array represents an input channel, and its value is the
1342 * channel that it should be remapped to. To reverse a stereo signal's left
1343 * and right values, you'd have an array of `{ 1, 0 }`. It is legal to remap
1344 * multiple channels to the same thing, so `{ 1, 1 }` would duplicate the
1345 * right channel to both channels of a stereo signal. An element in the
1346 * channel map set to -1 instead of a valid channel will mute that channel,
1347 * setting it to a silence value.
1348 *
1349 * You cannot change the number of channels through a channel map, just
1350 * reorder/mute them.
1351 *
1352 * The output channel map can be changed at any time, as output remapping is
1353 * applied during SDL_GetAudioStreamData.
1354 *
1355 * Audio streams default to no remapping applied. Passing a NULL channel map
1356 * is legal, and turns off remapping.
1357 *
1358 * SDL will copy the channel map; the caller does not have to save this array
1359 * after this call.
1360 *
1361 * If `count` is not equal to the current number of channels in the audio
1362 * stream's format, this will fail. This is a safety measure to make sure a
1363 * race condition hasn't changed the format while this call is setting the
1364 * channel map.
1365 *
1366 * Unlike attempting to change the stream's format, the output channel map on
1367 * a stream bound to a recording device is permitted to change at any time;
1368 * any data added to the stream after this call will have the new mapping, but
1369 * previously-added data will still have the prior mapping. When the channel
1370 * map doesn't match the hardware's channel layout, SDL will convert the data
1371 * before feeding it to the device for playback.
1372 *
1373 * \param stream the SDL_AudioStream to change.
1374 * \param chmap the new channel map, NULL to reset to default.
1375 * \param count The number of channels in the map.
1376 * \returns true on success or false on failure; call SDL_GetError() for more
1377 * information.
1378 *
1379 * \threadsafety It is safe to call this function from any thread, as it holds
1380 * a stream-specific mutex while running. Don't change the
1381 * stream's format to have a different number of channels from a
1382 * a different thread at the same time, though!
1383 *
1384 * \since This function is available since SDL 3.2.0.
1385 *
1386 * \sa SDL_SetAudioStreamInputChannelMap
1387 */
1388extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream *stream, const int *chmap, int count);
1389
1390/**
1391 * Add data to the stream.
1392 *
1393 * This data must match the format/channels/samplerate specified in the latest
1394 * call to SDL_SetAudioStreamFormat, or the format specified when creating the
1395 * stream if it hasn't been changed.
1396 *
1397 * Note that this call simply copies the unconverted data for later. This is
1398 * different than SDL2, where data was converted during the Put call and the
1399 * Get call would just dequeue the previously-converted data.
1400 *
1401 * \param stream the stream the audio data is being added to.
1402 * \param buf a pointer to the audio data to add.
1403 * \param len the number of bytes to write to the stream.
1404 * \returns true on success or false on failure; call SDL_GetError() for more
1405 * information.
1406 *
1407 * \threadsafety It is safe to call this function from any thread, but if the
1408 * stream has a callback set, the caller might need to manage
1409 * extra locking.
1410 *
1411 * \since This function is available since SDL 3.2.0.
1412 *
1413 * \sa SDL_ClearAudioStream
1414 * \sa SDL_FlushAudioStream
1415 * \sa SDL_GetAudioStreamData
1416 * \sa SDL_GetAudioStreamQueued
1417 */
1418extern SDL_DECLSPEC bool SDLCALL SDL_PutAudioStreamData(SDL_AudioStream *stream, const void *buf, int len);
1419
1420/**
1421 * Get converted/resampled data from the stream.
1422 *
1423 * The input/output data format/channels/samplerate is specified when creating
1424 * the stream, and can be changed after creation by calling
1425 * SDL_SetAudioStreamFormat.
1426 *
1427 * Note that any conversion and resampling necessary is done during this call,
1428 * and SDL_PutAudioStreamData simply queues unconverted data for later. This
1429 * is different than SDL2, where that work was done while inputting new data
1430 * to the stream and requesting the output just copied the converted data.
1431 *
1432 * \param stream the stream the audio is being requested from.
1433 * \param buf a buffer to fill with audio data.
1434 * \param len the maximum number of bytes to fill.
1435 * \returns the number of bytes read from the stream or -1 on failure; call
1436 * SDL_GetError() for more information.
1437 *
1438 * \threadsafety It is safe to call this function from any thread, but if the
1439 * stream has a callback set, the caller might need to manage
1440 * extra locking.
1441 *
1442 * \since This function is available since SDL 3.2.0.
1443 *
1444 * \sa SDL_ClearAudioStream
1445 * \sa SDL_GetAudioStreamAvailable
1446 * \sa SDL_PutAudioStreamData
1447 */
1448extern SDL_DECLSPEC int SDLCALL SDL_GetAudioStreamData(SDL_AudioStream *stream, void *buf, int len);
1449
1450/**
1451 * Get the number of converted/resampled bytes available.
1452 *
1453 * The stream may be buffering data behind the scenes until it has enough to
1454 * resample correctly, so this number might be lower than what you expect, or
1455 * even be zero. Add more data or flush the stream if you need the data now.
1456 *
1457 * If the stream has so much data that it would overflow an int, the return
1458 * value is clamped to a maximum value, but no queued data is lost; if there
1459 * are gigabytes of data queued, the app might need to read some of it with
1460 * SDL_GetAudioStreamData before this function's return value is no longer
1461 * clamped.
1462 *
1463 * \param stream the audio stream to query.
1464 * \returns the number of converted/resampled bytes available or -1 on
1465 * failure; call SDL_GetError() for more information.
1466 *
1467 * \threadsafety It is safe to call this function from any thread.
1468 *
1469 * \since This function is available since SDL 3.2.0.
1470 *
1471 * \sa SDL_GetAudioStreamData
1472 * \sa SDL_PutAudioStreamData
1473 */
1474extern SDL_DECLSPEC int SDLCALL SDL_GetAudioStreamAvailable(SDL_AudioStream *stream);
1475
1476
1477/**
1478 * Get the number of bytes currently queued.
1479 *
1480 * This is the number of bytes put into a stream as input, not the number that
1481 * can be retrieved as output. Because of several details, it's not possible
1482 * to calculate one number directly from the other. If you need to know how
1483 * much usable data can be retrieved right now, you should use
1484 * SDL_GetAudioStreamAvailable() and not this function.
1485 *
1486 * Note that audio streams can change their input format at any time, even if
1487 * there is still data queued in a different format, so the returned byte
1488 * count will not necessarily match the number of _sample frames_ available.
1489 * Users of this API should be aware of format changes they make when feeding
1490 * a stream and plan accordingly.
1491 *
1492 * Queued data is not converted until it is consumed by
1493 * SDL_GetAudioStreamData, so this value should be representative of the exact
1494 * data that was put into the stream.
1495 *
1496 * If the stream has so much data that it would overflow an int, the return
1497 * value is clamped to a maximum value, but no queued data is lost; if there
1498 * are gigabytes of data queued, the app might need to read some of it with
1499 * SDL_GetAudioStreamData before this function's return value is no longer
1500 * clamped.
1501 *
1502 * \param stream the audio stream to query.
1503 * \returns the number of bytes queued or -1 on failure; call SDL_GetError()
1504 * for more information.
1505 *
1506 * \threadsafety It is safe to call this function from any thread.
1507 *
1508 * \since This function is available since SDL 3.2.0.
1509 *
1510 * \sa SDL_PutAudioStreamData
1511 * \sa SDL_ClearAudioStream
1512 */
1513extern SDL_DECLSPEC int SDLCALL SDL_GetAudioStreamQueued(SDL_AudioStream *stream);
1514
1515
1516/**
1517 * Tell the stream that you're done sending data, and anything being buffered
1518 * should be converted/resampled and made available immediately.
1519 *
1520 * It is legal to add more data to a stream after flushing, but there may be
1521 * audio gaps in the output. Generally this is intended to signal the end of
1522 * input, so the complete output becomes available.
1523 *
1524 * \param stream the audio stream to flush.
1525 * \returns true on success or false on failure; call SDL_GetError() for more
1526 * information.
1527 *
1528 * \threadsafety It is safe to call this function from any thread.
1529 *
1530 * \since This function is available since SDL 3.2.0.
1531 *
1532 * \sa SDL_PutAudioStreamData
1533 */
1534extern SDL_DECLSPEC bool SDLCALL SDL_FlushAudioStream(SDL_AudioStream *stream);
1535
1536/**
1537 * Clear any pending data in the stream.
1538 *
1539 * This drops any queued data, so there will be nothing to read from the
1540 * stream until more is added.
1541 *
1542 * \param stream the audio stream to clear.
1543 * \returns true on success or false on failure; call SDL_GetError() for more
1544 * information.
1545 *
1546 * \threadsafety It is safe to call this function from any thread.
1547 *
1548 * \since This function is available since SDL 3.2.0.
1549 *
1550 * \sa SDL_GetAudioStreamAvailable
1551 * \sa SDL_GetAudioStreamData
1552 * \sa SDL_GetAudioStreamQueued
1553 * \sa SDL_PutAudioStreamData
1554 */
1555extern SDL_DECLSPEC bool SDLCALL SDL_ClearAudioStream(SDL_AudioStream *stream);
1556
1557/**
1558 * Use this function to pause audio playback on the audio device associated
1559 * with an audio stream.
1560 *
1561 * This function pauses audio processing for a given device. Any bound audio
1562 * streams will not progress, and no audio will be generated. Pausing one
1563 * device does not prevent other unpaused devices from running.
1564 *
1565 * Pausing a device can be useful to halt all audio without unbinding all the
1566 * audio streams. This might be useful while a game is paused, or a level is
1567 * loading, etc.
1568 *
1569 * \param stream the audio stream associated with the audio device to pause.
1570 * \returns true on success or false on failure; call SDL_GetError() for more
1571 * information.
1572 *
1573 * \threadsafety It is safe to call this function from any thread.
1574 *
1575 * \since This function is available since SDL 3.2.0.
1576 *
1577 * \sa SDL_ResumeAudioStreamDevice
1578 */
1579extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioStreamDevice(SDL_AudioStream *stream);
1580
1581/**
1582 * Use this function to unpause audio playback on the audio device associated
1583 * with an audio stream.
1584 *
1585 * This function unpauses audio processing for a given device that has
1586 * previously been paused. Once unpaused, any bound audio streams will begin
1587 * to progress again, and audio can be generated.
1588 *
1589 * Remember, SDL_OpenAudioDeviceStream opens device in a paused state, so this
1590 * function call is required for audio playback to begin on such device.
1591 *
1592 * \param stream the audio stream associated with the audio device to resume.
1593 * \returns true on success or false on failure; call SDL_GetError() for more
1594 * information.
1595 *
1596 * \threadsafety It is safe to call this function from any thread.
1597 *
1598 * \since This function is available since SDL 3.2.0.
1599 *
1600 * \sa SDL_PauseAudioStreamDevice
1601 */
1602extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioStreamDevice(SDL_AudioStream *stream);
1603
1604/**
1605 * Use this function to query if an audio device associated with a stream is
1606 * paused.
1607 *
1608 * Unlike in SDL2, audio devices start in an _unpaused_ state, since an app
1609 * has to bind a stream before any audio will flow.
1610 *
1611 * \param stream the audio stream associated with the audio device to query.
1612 * \returns true if device is valid and paused, false otherwise.
1613 *
1614 * \threadsafety It is safe to call this function from any thread.
1615 *
1616 * \since This function is available since SDL 3.2.0.
1617 *
1618 * \sa SDL_PauseAudioStreamDevice
1619 * \sa SDL_ResumeAudioStreamDevice
1620 */
1621extern SDL_DECLSPEC bool SDLCALL SDL_AudioStreamDevicePaused(SDL_AudioStream *stream);
1622
1623
1624/**
1625 * Lock an audio stream for serialized access.
1626 *
1627 * Each SDL_AudioStream has an internal mutex it uses to protect its data
1628 * structures from threading conflicts. This function allows an app to lock
1629 * that mutex, which could be useful if registering callbacks on this stream.
1630 *
1631 * One does not need to lock a stream to use in it most cases, as the stream
1632 * manages this lock internally. However, this lock is held during callbacks,
1633 * which may run from arbitrary threads at any time, so if an app needs to
1634 * protect shared data during those callbacks, locking the stream guarantees
1635 * that the callback is not running while the lock is held.
1636 *
1637 * As this is just a wrapper over SDL_LockMutex for an internal lock; it has
1638 * all the same attributes (recursive locks are allowed, etc).
1639 *
1640 * \param stream the audio stream to lock.
1641 * \returns true on success or false on failure; call SDL_GetError() for more
1642 * information.
1643 *
1644 * \threadsafety It is safe to call this function from any thread.
1645 *
1646 * \since This function is available since SDL 3.2.0.
1647 *
1648 * \sa SDL_UnlockAudioStream
1649 */
1650extern SDL_DECLSPEC bool SDLCALL SDL_LockAudioStream(SDL_AudioStream *stream);
1651
1652
1653/**
1654 * Unlock an audio stream for serialized access.
1655 *
1656 * This unlocks an audio stream after a call to SDL_LockAudioStream.
1657 *
1658 * \param stream the audio stream to unlock.
1659 * \returns true on success or false on failure; call SDL_GetError() for more
1660 * information.
1661 *
1662 * \threadsafety You should only call this from the same thread that
1663 * previously called SDL_LockAudioStream.
1664 *
1665 * \since This function is available since SDL 3.2.0.
1666 *
1667 * \sa SDL_LockAudioStream
1668 */
1669extern SDL_DECLSPEC bool SDLCALL SDL_UnlockAudioStream(SDL_AudioStream *stream);
1670
1671/**
1672 * A callback that fires when data passes through an SDL_AudioStream.
1673 *
1674 * Apps can (optionally) register a callback with an audio stream that is
1675 * called when data is added with SDL_PutAudioStreamData, or requested with
1676 * SDL_GetAudioStreamData.
1677 *
1678 * Two values are offered here: one is the amount of additional data needed to
1679 * satisfy the immediate request (which might be zero if the stream already
1680 * has enough data queued) and the other is the total amount being requested.
1681 * In a Get call triggering a Put callback, these values can be different. In
1682 * a Put call triggering a Get callback, these values are always the same.
1683 *
1684 * Byte counts might be slightly overestimated due to buffering or resampling,
1685 * and may change from call to call.
1686 *
1687 * This callback is not required to do anything. Generally this is useful for
1688 * adding/reading data on demand, and the app will often put/get data as
1689 * appropriate, but the system goes on with the data currently available to it
1690 * if this callback does nothing.
1691 *
1692 * \param stream the SDL audio stream associated with this callback.
1693 * \param additional_amount the amount of data, in bytes, that is needed right
1694 * now.
1695 * \param total_amount the total amount of data requested, in bytes, that is
1696 * requested or available.
1697 * \param userdata an opaque pointer provided by the app for their personal
1698 * use.
1699 *
1700 * \threadsafety This callbacks may run from any thread, so if you need to
1701 * protect shared data, you should use SDL_LockAudioStream to
1702 * serialize access; this lock will be held before your callback
1703 * is called, so your callback does not need to manage the lock
1704 * explicitly.
1705 *
1706 * \since This datatype is available since SDL 3.2.0.
1707 *
1708 * \sa SDL_SetAudioStreamGetCallback
1709 * \sa SDL_SetAudioStreamPutCallback
1710 */
1711typedef void (SDLCALL *SDL_AudioStreamCallback)(void *userdata, SDL_AudioStream *stream, int additional_amount, int total_amount);
1712
1713/**
1714 * Set a callback that runs when data is requested from an audio stream.
1715 *
1716 * This callback is called _before_ data is obtained from the stream, giving
1717 * the callback the chance to add more on-demand.
1718 *
1719 * The callback can (optionally) call SDL_PutAudioStreamData() to add more
1720 * audio to the stream during this call; if needed, the request that triggered
1721 * this callback will obtain the new data immediately.
1722 *
1723 * The callback's `additional_amount` argument is roughly how many bytes of
1724 * _unconverted_ data (in the stream's input format) is needed by the caller,
1725 * although this may overestimate a little for safety. This takes into account
1726 * how much is already in the stream and only asks for any extra necessary to
1727 * resolve the request, which means the callback may be asked for zero bytes,
1728 * and a different amount on each call.
1729 *
1730 * The callback is not required to supply exact amounts; it is allowed to
1731 * supply too much or too little or none at all. The caller will get what's
1732 * available, up to the amount they requested, regardless of this callback's
1733 * outcome.
1734 *
1735 * Clearing or flushing an audio stream does not call this callback.
1736 *
1737 * This function obtains the stream's lock, which means any existing callback
1738 * (get or put) in progress will finish running before setting the new
1739 * callback.
1740 *
1741 * Setting a NULL function turns off the callback.
1742 *
1743 * \param stream the audio stream to set the new callback on.
1744 * \param callback the new callback function to call when data is requested
1745 * from the stream.
1746 * \param userdata an opaque pointer provided to the callback for its own
1747 * personal use.
1748 * \returns true on success or false on failure; call SDL_GetError() for more
1749 * information. This only fails if `stream` is NULL.
1750 *
1751 * \threadsafety It is safe to call this function from any thread.
1752 *
1753 * \since This function is available since SDL 3.2.0.
1754 *
1755 * \sa SDL_SetAudioStreamPutCallback
1756 */
1757extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamGetCallback(SDL_AudioStream *stream, SDL_AudioStreamCallback callback, void *userdata);
1758
1759/**
1760 * Set a callback that runs when data is added to an audio stream.
1761 *
1762 * This callback is called _after_ the data is added to the stream, giving the
1763 * callback the chance to obtain it immediately.
1764 *
1765 * The callback can (optionally) call SDL_GetAudioStreamData() to obtain audio
1766 * from the stream during this call.
1767 *
1768 * The callback's `additional_amount` argument is how many bytes of
1769 * _converted_ data (in the stream's output format) was provided by the
1770 * caller, although this may underestimate a little for safety. This value
1771 * might be less than what is currently available in the stream, if data was
1772 * already there, and might be less than the caller provided if the stream
1773 * needs to keep a buffer to aid in resampling. Which means the callback may
1774 * be provided with zero bytes, and a different amount on each call.
1775 *
1776 * The callback may call SDL_GetAudioStreamAvailable to see the total amount
1777 * currently available to read from the stream, instead of the total provided
1778 * by the current call.
1779 *
1780 * The callback is not required to obtain all data. It is allowed to read less
1781 * or none at all. Anything not read now simply remains in the stream for
1782 * later access.
1783 *
1784 * Clearing or flushing an audio stream does not call this callback.
1785 *
1786 * This function obtains the stream's lock, which means any existing callback
1787 * (get or put) in progress will finish running before setting the new
1788 * callback.
1789 *
1790 * Setting a NULL function turns off the callback.
1791 *
1792 * \param stream the audio stream to set the new callback on.
1793 * \param callback the new callback function to call when data is added to the
1794 * stream.
1795 * \param userdata an opaque pointer provided to the callback for its own
1796 * personal use.
1797 * \returns true on success or false on failure; call SDL_GetError() for more
1798 * information. This only fails if `stream` is NULL.
1799 *
1800 * \threadsafety It is safe to call this function from any thread.
1801 *
1802 * \since This function is available since SDL 3.2.0.
1803 *
1804 * \sa SDL_SetAudioStreamGetCallback
1805 */
1806extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamPutCallback(SDL_AudioStream *stream, SDL_AudioStreamCallback callback, void *userdata);
1807
1808
1809/**
1810 * Free an audio stream.
1811 *
1812 * This will release all allocated data, including any audio that is still
1813 * queued. You do not need to manually clear the stream first.
1814 *
1815 * If this stream was bound to an audio device, it is unbound during this
1816 * call. If this stream was created with SDL_OpenAudioDeviceStream, the audio
1817 * device that was opened alongside this stream's creation will be closed,
1818 * too.
1819 *
1820 * \param stream the audio stream to destroy.
1821 *
1822 * \threadsafety It is safe to call this function from any thread.
1823 *
1824 * \since This function is available since SDL 3.2.0.
1825 *
1826 * \sa SDL_CreateAudioStream
1827 */
1828extern SDL_DECLSPEC void SDLCALL SDL_DestroyAudioStream(SDL_AudioStream *stream);
1829
1830
1831/**
1832 * Convenience function for straightforward audio init for the common case.
1833 *
1834 * If all your app intends to do is provide a single source of PCM audio, this
1835 * function allows you to do all your audio setup in a single call.
1836 *
1837 * This is also intended to be a clean means to migrate apps from SDL2.
1838 *
1839 * This function will open an audio device, create a stream and bind it.
1840 * Unlike other methods of setup, the audio device will be closed when this
1841 * stream is destroyed, so the app can treat the returned SDL_AudioStream as
1842 * the only object needed to manage audio playback.
1843 *
1844 * Also unlike other functions, the audio device begins paused. This is to map
1845 * more closely to SDL2-style behavior, since there is no extra step here to
1846 * bind a stream to begin audio flowing. The audio device should be resumed
1847 * with `SDL_ResumeAudioStreamDevice(stream);`
1848 *
1849 * This function works with both playback and recording devices.
1850 *
1851 * The `spec` parameter represents the app's side of the audio stream. That
1852 * is, for recording audio, this will be the output format, and for playing
1853 * audio, this will be the input format. If spec is NULL, the system will
1854 * choose the format, and the app can use SDL_GetAudioStreamFormat() to obtain
1855 * this information later.
1856 *
1857 * If you don't care about opening a specific audio device, you can (and
1858 * probably _should_), use SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK for playback and
1859 * SDL_AUDIO_DEVICE_DEFAULT_RECORDING for recording.
1860 *
1861 * One can optionally provide a callback function; if NULL, the app is
1862 * expected to queue audio data for playback (or unqueue audio data if
1863 * capturing). Otherwise, the callback will begin to fire once the device is
1864 * unpaused.
1865 *
1866 * Destroying the returned stream with SDL_DestroyAudioStream will also close
1867 * the audio device associated with this stream.
1868 *
1869 * \param devid an audio device to open, or SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK
1870 * or SDL_AUDIO_DEVICE_DEFAULT_RECORDING.
1871 * \param spec the audio stream's data format. Can be NULL.
1872 * \param callback a callback where the app will provide new data for
1873 * playback, or receive new data for recording. Can be NULL,
1874 * in which case the app will need to call
1875 * SDL_PutAudioStreamData or SDL_GetAudioStreamData as
1876 * necessary.
1877 * \param userdata app-controlled pointer passed to callback. Can be NULL.
1878 * Ignored if callback is NULL.
1879 * \returns an audio stream on success, ready to use, or NULL on failure; call
1880 * SDL_GetError() for more information. When done with this stream,
1881 * call SDL_DestroyAudioStream to free resources and close the
1882 * device.
1883 *
1884 * \threadsafety It is safe to call this function from any thread.
1885 *
1886 * \since This function is available since SDL 3.2.0.
1887 *
1888 * \sa SDL_GetAudioStreamDevice
1889 * \sa SDL_ResumeAudioStreamDevice
1890 */
1891extern SDL_DECLSPEC SDL_AudioStream * SDLCALL SDL_OpenAudioDeviceStream(SDL_AudioDeviceID devid, const SDL_AudioSpec *spec, SDL_AudioStreamCallback callback, void *userdata);
1892
1893/**
1894 * A callback that fires when data is about to be fed to an audio device.
1895 *
1896 * This is useful for accessing the final mix, perhaps for writing a
1897 * visualizer or applying a final effect to the audio data before playback.
1898 *
1899 * This callback should run as quickly as possible and not block for any
1900 * significant time, as this callback delays submission of data to the audio
1901 * device, which can cause audio playback problems.
1902 *
1903 * The postmix callback _must_ be able to handle any audio data format
1904 * specified in `spec`, which can change between callbacks if the audio device
1905 * changed. However, this only covers frequency and channel count; data is
1906 * always provided here in SDL_AUDIO_F32 format.
1907 *
1908 * The postmix callback runs _after_ logical device gain and audiostream gain
1909 * have been applied, which is to say you can make the output data louder at
1910 * this point than the gain settings would suggest.
1911 *
1912 * \param userdata a pointer provided by the app through
1913 * SDL_SetAudioPostmixCallback, for its own use.
1914 * \param spec the current format of audio that is to be submitted to the
1915 * audio device.
1916 * \param buffer the buffer of audio samples to be submitted. The callback can
1917 * inspect and/or modify this data.
1918 * \param buflen the size of `buffer` in bytes.
1919 *
1920 * \threadsafety This will run from a background thread owned by SDL. The
1921 * application is responsible for locking resources the callback
1922 * touches that need to be protected.
1923 *
1924 * \since This datatype is available since SDL 3.2.0.
1925 *
1926 * \sa SDL_SetAudioPostmixCallback
1927 */
1928typedef void (SDLCALL *SDL_AudioPostmixCallback)(void *userdata, const SDL_AudioSpec *spec, float *buffer, int buflen);
1929
1930/**
1931 * Set a callback that fires when data is about to be fed to an audio device.
1932 *
1933 * This is useful for accessing the final mix, perhaps for writing a
1934 * visualizer or applying a final effect to the audio data before playback.
1935 *
1936 * The buffer is the final mix of all bound audio streams on an opened device;
1937 * this callback will fire regularly for any device that is both opened and
1938 * unpaused. If there is no new data to mix, either because no streams are
1939 * bound to the device or all the streams are empty, this callback will still
1940 * fire with the entire buffer set to silence.
1941 *
1942 * This callback is allowed to make changes to the data; the contents of the
1943 * buffer after this call is what is ultimately passed along to the hardware.
1944 *
1945 * The callback is always provided the data in float format (values from -1.0f
1946 * to 1.0f), but the number of channels or sample rate may be different than
1947 * the format the app requested when opening the device; SDL might have had to
1948 * manage a conversion behind the scenes, or the playback might have jumped to
1949 * new physical hardware when a system default changed, etc. These details may
1950 * change between calls. Accordingly, the size of the buffer might change
1951 * between calls as well.
1952 *
1953 * This callback can run at any time, and from any thread; if you need to
1954 * serialize access to your app's data, you should provide and use a mutex or
1955 * other synchronization device.
1956 *
1957 * All of this to say: there are specific needs this callback can fulfill, but
1958 * it is not the simplest interface. Apps should generally provide audio in
1959 * their preferred format through an SDL_AudioStream and let SDL handle the
1960 * difference.
1961 *
1962 * This function is extremely time-sensitive; the callback should do the least
1963 * amount of work possible and return as quickly as it can. The longer the
1964 * callback runs, the higher the risk of audio dropouts or other problems.
1965 *
1966 * This function will block until the audio device is in between iterations,
1967 * so any existing callback that might be running will finish before this
1968 * function sets the new callback and returns.
1969 *
1970 * Setting a NULL callback function disables any previously-set callback.
1971 *
1972 * \param devid the ID of an opened audio device.
1973 * \param callback a callback function to be called. Can be NULL.
1974 * \param userdata app-controlled pointer passed to callback. Can be NULL.
1975 * \returns true on success or false on failure; call SDL_GetError() for more
1976 * information.
1977 *
1978 * \threadsafety It is safe to call this function from any thread.
1979 *
1980 * \since This function is available since SDL 3.2.0.
1981 */
1982extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, SDL_AudioPostmixCallback callback, void *userdata);
1983
1984
1985/**
1986 * Load the audio data of a WAVE file into memory.
1987 *
1988 * Loading a WAVE file requires `src`, `spec`, `audio_buf` and `audio_len` to
1989 * be valid pointers. The entire data portion of the file is then loaded into
1990 * memory and decoded if necessary.
1991 *
1992 * Supported formats are RIFF WAVE files with the formats PCM (8, 16, 24, and
1993 * 32 bits), IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and
1994 * A-law and mu-law (8 bits). Other formats are currently unsupported and
1995 * cause an error.
1996 *
1997 * If this function succeeds, the return value is zero and the pointer to the
1998 * audio data allocated by the function is written to `audio_buf` and its
1999 * length in bytes to `audio_len`. The SDL_AudioSpec members `freq`,
2000 * `channels`, and `format` are set to the values of the audio data in the
2001 * buffer.
2002 *
2003 * It's necessary to use SDL_free() to free the audio data returned in
2004 * `audio_buf` when it is no longer used.
2005 *
2006 * Because of the underspecification of the .WAV format, there are many
2007 * problematic files in the wild that cause issues with strict decoders. To
2008 * provide compatibility with these files, this decoder is lenient in regards
2009 * to the truncation of the file, the fact chunk, and the size of the RIFF
2010 * chunk. The hints `SDL_HINT_WAVE_RIFF_CHUNK_SIZE`,
2011 * `SDL_HINT_WAVE_TRUNCATION`, and `SDL_HINT_WAVE_FACT_CHUNK` can be used to
2012 * tune the behavior of the loading process.
2013 *
2014 * Any file that is invalid (due to truncation, corruption, or wrong values in
2015 * the headers), too big, or unsupported causes an error. Additionally, any
2016 * critical I/O error from the data source will terminate the loading process
2017 * with an error. The function returns NULL on error and in all cases (with
2018 * the exception of `src` being NULL), an appropriate error message will be
2019 * set.
2020 *
2021 * It is required that the data source supports seeking.
2022 *
2023 * Example:
2024 *
2025 * ```c
2026 * SDL_LoadWAV_IO(SDL_IOFromFile("sample.wav", "rb"), true, &spec, &buf, &len);
2027 * ```
2028 *
2029 * Note that the SDL_LoadWAV function does this same thing for you, but in a
2030 * less messy way:
2031 *
2032 * ```c
2033 * SDL_LoadWAV("sample.wav", &spec, &buf, &len);
2034 * ```
2035 *
2036 * \param src the data source for the WAVE data.
2037 * \param closeio if true, calls SDL_CloseIO() on `src` before returning, even
2038 * in the case of an error.
2039 * \param spec a pointer to an SDL_AudioSpec that will be set to the WAVE
2040 * data's format details on successful return.
2041 * \param audio_buf a pointer filled with the audio data, allocated by the
2042 * function.
2043 * \param audio_len a pointer filled with the length of the audio data buffer
2044 * in bytes.
2045 * \returns true on success. `audio_buf` will be filled with a pointer to an
2046 * allocated buffer containing the audio data, and `audio_len` is
2047 * filled with the length of that audio buffer in bytes.
2048 *
2049 * This function returns false if the .WAV file cannot be opened,
2050 * uses an unknown data format, or is corrupt; call SDL_GetError()
2051 * for more information.
2052 *
2053 * When the application is done with the data returned in
2054 * `audio_buf`, it should call SDL_free() to dispose of it.
2055 *
2056 * \threadsafety It is safe to call this function from any thread.
2057 *
2058 * \since This function is available since SDL 3.2.0.
2059 *
2060 * \sa SDL_free
2061 * \sa SDL_LoadWAV
2062 */
2063extern SDL_DECLSPEC bool SDLCALL SDL_LoadWAV_IO(SDL_IOStream *src, bool closeio, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);
2064
2065/**
2066 * Loads a WAV from a file path.
2067 *
2068 * This is a convenience function that is effectively the same as:
2069 *
2070 * ```c
2071 * SDL_LoadWAV_IO(SDL_IOFromFile(path, "rb"), true, spec, audio_buf, audio_len);
2072 * ```
2073 *
2074 * \param path the file path of the WAV file to open.
2075 * \param spec a pointer to an SDL_AudioSpec that will be set to the WAVE
2076 * data's format details on successful return.
2077 * \param audio_buf a pointer filled with the audio data, allocated by the
2078 * function.
2079 * \param audio_len a pointer filled with the length of the audio data buffer
2080 * in bytes.
2081 * \returns true on success. `audio_buf` will be filled with a pointer to an
2082 * allocated buffer containing the audio data, and `audio_len` is
2083 * filled with the length of that audio buffer in bytes.
2084 *
2085 * This function returns false if the .WAV file cannot be opened,
2086 * uses an unknown data format, or is corrupt; call SDL_GetError()
2087 * for more information.
2088 *
2089 * When the application is done with the data returned in
2090 * `audio_buf`, it should call SDL_free() to dispose of it.
2091 *
2092 * \threadsafety It is safe to call this function from any thread.
2093 *
2094 * \since This function is available since SDL 3.2.0.
2095 *
2096 * \sa SDL_free
2097 * \sa SDL_LoadWAV_IO
2098 */
2099extern SDL_DECLSPEC bool SDLCALL SDL_LoadWAV(const char *path, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);
2100
2101/**
2102 * Mix audio data in a specified format.
2103 *
2104 * This takes an audio buffer `src` of `len` bytes of `format` data and mixes
2105 * it into `dst`, performing addition, volume adjustment, and overflow
2106 * clipping. The buffer pointed to by `dst` must also be `len` bytes of
2107 * `format` data.
2108 *
2109 * This is provided for convenience -- you can mix your own audio data.
2110 *
2111 * Do not use this function for mixing together more than two streams of
2112 * sample data. The output from repeated application of this function may be
2113 * distorted by clipping, because there is no accumulator with greater range
2114 * than the input (not to mention this being an inefficient way of doing it).
2115 *
2116 * It is a common misconception that this function is required to write audio
2117 * data to an output stream in an audio callback. While you can do that,
2118 * SDL_MixAudio() is really only needed when you're mixing a single audio
2119 * stream with a volume adjustment.
2120 *
2121 * \param dst the destination for the mixed audio.
2122 * \param src the source audio buffer to be mixed.
2123 * \param format the SDL_AudioFormat structure representing the desired audio
2124 * format.
2125 * \param len the length of the audio buffer in bytes.
2126 * \param volume ranges from 0.0 - 1.0, and should be set to 1.0 for full
2127 * audio volume.
2128 * \returns true on success or false on failure; call SDL_GetError() for more
2129 * information.
2130 *
2131 * \threadsafety It is safe to call this function from any thread.
2132 *
2133 * \since This function is available since SDL 3.2.0.
2134 */
2135extern SDL_DECLSPEC bool SDLCALL SDL_MixAudio(Uint8 *dst, const Uint8 *src, SDL_AudioFormat format, Uint32 len, float volume);
2136
2137/**
2138 * Convert some audio data of one format to another format.
2139 *
2140 * Please note that this function is for convenience, but should not be used
2141 * to resample audio in blocks, as it will introduce audio artifacts on the
2142 * boundaries. You should only use this function if you are converting audio
2143 * data in its entirety in one call. If you want to convert audio in smaller
2144 * chunks, use an SDL_AudioStream, which is designed for this situation.
2145 *
2146 * Internally, this function creates and destroys an SDL_AudioStream on each
2147 * use, so it's also less efficient than using one directly, if you need to
2148 * convert multiple times.
2149 *
2150 * \param src_spec the format details of the input audio.
2151 * \param src_data the audio data to be converted.
2152 * \param src_len the len of src_data.
2153 * \param dst_spec the format details of the output audio.
2154 * \param dst_data will be filled with a pointer to converted audio data,
2155 * which should be freed with SDL_free(). On error, it will be
2156 * NULL.
2157 * \param dst_len will be filled with the len of dst_data.
2158 * \returns true on success or false on failure; call SDL_GetError() for more
2159 * information.
2160 *
2161 * \threadsafety It is safe to call this function from any thread.
2162 *
2163 * \since This function is available since SDL 3.2.0.
2164 */
2165extern SDL_DECLSPEC bool SDLCALL SDL_ConvertAudioSamples(const SDL_AudioSpec *src_spec, const Uint8 *src_data, int src_len, const SDL_AudioSpec *dst_spec, Uint8 **dst_data, int *dst_len);
2166
2167/**
2168 * Get the human readable name of an audio format.
2169 *
2170 * \param format the audio format to query.
2171 * \returns the human readable name of the specified audio format or
2172 * "SDL_AUDIO_UNKNOWN" if the format isn't recognized.
2173 *
2174 * \threadsafety It is safe to call this function from any thread.
2175 *
2176 * \since This function is available since SDL 3.2.0.
2177 */
2178extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioFormatName(SDL_AudioFormat format);
2179
2180/**
2181 * Get the appropriate memset value for silencing an audio format.
2182 *
2183 * The value returned by this function can be used as the second argument to
2184 * memset (or SDL_memset) to set an audio buffer in a specific format to
2185 * silence.
2186 *
2187 * \param format the audio data format to query.
2188 * \returns a byte value that can be passed to memset.
2189 *
2190 * \threadsafety It is safe to call this function from any thread.
2191 *
2192 * \since This function is available since SDL 3.2.0.
2193 */
2194extern SDL_DECLSPEC int SDLCALL SDL_GetSilenceValueForFormat(SDL_AudioFormat format);
2195
2196
2197/* Ends C function definitions when using C++ */
2198#ifdef __cplusplus
2199}
2200#endif
2201#include <SDL3/SDL_close_code.h>
2202
2203#endif /* SDL_audio_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_begin_code.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_begin_code.h
new file mode 100644
index 0000000..a6b47cf
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_begin_code.h
@@ -0,0 +1,486 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: BeginCode */
23
24/**
25 * # CategoryBeginCode
26 *
27 * `SDL_begin_code.h` sets things up for C dynamic library function
28 * definitions, static inlined functions, and structures aligned at 4-byte
29 * alignment. If you don't like ugly C preprocessor code, don't look at this
30 * file. :)
31 *
32 * SDL's headers use this; applications generally should not include this
33 * header directly.
34 */
35
36/* This shouldn't be nested -- included it around code only. */
37#ifdef SDL_begin_code_h
38#error Nested inclusion of SDL_begin_code.h
39#endif
40#define SDL_begin_code_h
41
42#ifdef SDL_WIKI_DOCUMENTATION_SECTION
43
44/**
45 * A macro to tag a symbol as deprecated.
46 *
47 * A function is marked deprecated by adding this macro to its declaration:
48 *
49 * ```c
50 * extern SDL_DEPRECATED int ThisFunctionWasABadIdea(void);
51 * ```
52 *
53 * Compilers with deprecation support can give a warning when a deprecated
54 * function is used. This symbol may be used in SDL's headers, but apps are
55 * welcome to use it for their own interfaces as well.
56 *
57 * SDL, on occasion, might deprecate a function for various reasons. However,
58 * SDL never removes symbols before major versions, so deprecated interfaces
59 * in SDL3 will remain available until SDL4, where it would be expected an app
60 * would have to take steps to migrate anyhow.
61 *
62 * On compilers without a deprecation mechanism, this is defined to nothing,
63 * and using a deprecated function will not generate a warning.
64 *
65 * \since This macro is available since SDL 3.2.0.
66 */
67#define SDL_DEPRECATED __attribute__((deprecated))
68
69/**
70 * A macro to tag a symbol as a public API.
71 *
72 * SDL uses this macro for all its public functions. On some targets, it is
73 * used to signal to the compiler that this function needs to be exported from
74 * a shared library, but it might have other side effects.
75 *
76 * This symbol is used in SDL's headers, but apps and other libraries are
77 * welcome to use it for their own interfaces as well.
78 *
79 * \since This macro is available since SDL 3.2.0.
80 */
81#define SDL_DECLSPEC __attribute__ ((visibility("default")))
82
83/**
84 * A macro to set a function's calling conventions.
85 *
86 * SDL uses this macro for all its public functions, and any callbacks it
87 * defines. This macro guarantees that calling conventions match between SDL
88 * and the app, even if the two were built with different compilers or
89 * optimization settings.
90 *
91 * When writing a callback function, it is very important for it to be
92 * correctly tagged with SDLCALL, as mismatched calling conventions can cause
93 * strange behaviors and can be difficult to diagnose. Plus, on many
94 * platforms, SDLCALL is defined to nothing, so compilers won't be able to
95 * warn that the tag is missing.
96 *
97 * This symbol is used in SDL's headers, but apps and other libraries are
98 * welcome to use it for their own interfaces as well.
99 *
100 * \since This macro is available since SDL 3.2.0.
101 */
102#define SDLCALL __cdecl
103
104/**
105 * A macro to request a function be inlined.
106 *
107 * This is a hint to the compiler to inline a function. The compiler is free
108 * to ignore this request. On compilers without inline support, this is
109 * defined to nothing.
110 *
111 * \since This macro is available since SDL 3.2.0.
112 */
113#define SDL_INLINE __inline
114
115/**
116 * A macro to demand a function be inlined.
117 *
118 * This is a command to the compiler to inline a function. SDL uses this macro
119 * in its public headers for a handful of simple functions. On compilers
120 * without forceinline support, this is defined to `static SDL_INLINE`, which
121 * is often good enough.
122 *
123 * This symbol is used in SDL's headers, but apps and other libraries are
124 * welcome to use it for their own interfaces as well.
125 *
126 * \since This macro is available since SDL 3.2.0.
127 */
128#define SDL_FORCE_INLINE __forceinline
129
130/**
131 * A macro to tag a function as never-returning.
132 *
133 * This is a hint to the compiler that a function does not return. An example
134 * of a function like this is the C runtime's exit() function.
135 *
136 * This hint can lead to code optimizations, and help analyzers understand
137 * code flow better. On compilers without noreturn support, this is defined to
138 * nothing.
139 *
140 * This symbol is used in SDL's headers, but apps and other libraries are
141 * welcome to use it for their own interfaces as well.
142 *
143 * \since This macro is available since SDL 3.2.0.
144 */
145#define SDL_NORETURN __attribute__((noreturn))
146
147/**
148 * A macro to tag a function as never-returning (for analysis purposes).
149 *
150 * This is almost identical to SDL_NORETURN, except functions marked with this
151 * _can_ actually return. The difference is that this isn't used for code
152 * generation, but rather static analyzers use this information to assume
153 * truths about program state and available code paths. Specifically, this tag
154 * is useful for writing an assertion mechanism. Indeed, SDL_assert uses this
155 * tag behind the scenes. Generally, apps that don't understand the specific
156 * use-case for this tag should avoid using it directly.
157 *
158 * On compilers without analyzer_noreturn support, this is defined to nothing.
159 *
160 * This symbol is used in SDL's headers, but apps and other libraries are
161 * welcome to use it for their own interfaces as well.
162 *
163 * \since This macro is available since SDL 3.2.0.
164 */
165#define SDL_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
166
167
168/**
169 * A macro to signal that a case statement without a `break` is intentional.
170 *
171 * C compilers have gotten more aggressive about warning when a switch's
172 * `case` block does not end with a `break` or other flow control statement,
173 * flowing into the next case's code, as this is a common accident that leads
174 * to strange bugs. But sometimes falling through to the next case is the
175 * correct and desired behavior. This symbol lets an app communicate this
176 * intention to the compiler, so it doesn't generate a warning.
177 *
178 * It is used like this:
179 *
180 * ```c
181 * switch (x) {
182 * case 1:
183 * DoSomethingOnlyForOne();
184 * SDL_FALLTHROUGH; // tell the compiler this was intentional.
185 * case 2:
186 * DoSomethingForOneAndTwo();
187 * break;
188 * }
189 * ```
190 *
191 * \since This macro is available since SDL 3.2.0.
192 */
193#define SDL_FALLTHROUGH [[fallthrough]]
194
195/**
196 * A macro to tag a function's return value as critical.
197 *
198 * This is a hint to the compiler that a function's return value should not be
199 * ignored.
200 *
201 * If an NODISCARD function's return value is thrown away (the function is
202 * called as if it returns `void`), the compiler will issue a warning.
203 *
204 * While it's generally good practice to check return values for errors, often
205 * times legitimate programs do not for good reasons. Be careful about what
206 * functions are tagged as NODISCARD. It operates best when used on a function
207 * that's failure is surprising and catastrophic; a good example would be a
208 * program that checks the return values of all its file write function calls
209 * but not the call to close the file, which it assumes incorrectly never
210 * fails.
211 *
212 * Function callers that want to throw away a NODISCARD return value can call
213 * the function with a `(void)` cast, which informs the compiler the act is
214 * intentional.
215 *
216 * On compilers without nodiscard support, this is defined to nothing.
217 *
218 * \since This macro is available since SDL 3.2.0.
219 */
220#define SDL_NODISCARD [[nodiscard]]
221
222/**
223 * A macro to tag a function as an allocator.
224 *
225 * This is a hint to the compiler that a function is an allocator, like
226 * malloc(), with certain rules. A description of how GCC treats this hint is
227 * here:
228 *
229 * https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-malloc-function-attribute
230 *
231 * On compilers without allocator tag support, this is defined to nothing.
232 *
233 * Most apps don't need to, and should not, use this directly.
234 *
235 * \since This macro is available since SDL 3.2.0.
236 */
237#define SDL_MALLOC __declspec(allocator) __desclspec(restrict)
238
239/**
240 * A macro to tag a function as returning a certain allocation.
241 *
242 * This is a hint to the compiler that a function allocates and returns a
243 * specific amount of memory based on one of its arguments. For example, the C
244 * runtime's malloc() function could use this macro with an argument of 1
245 * (first argument to malloc is the size of the allocation).
246 *
247 * On compilers without alloc_size support, this is defined to nothing.
248 *
249 * Most apps don't need to, and should not, use this directly.
250 *
251 * \since This macro is available since SDL 3.2.0.
252 */
253#define SDL_ALLOC_SIZE(p) __attribute__((alloc_size(p)))
254
255/**
256 * A macro to tag a pointer variable, to help with pointer aliasing.
257 *
258 * A good explanation of the restrict keyword is here:
259 *
260 * https://en.wikipedia.org/wiki/Restrict
261 *
262 * On compilers without restrict support, this is defined to nothing.
263 *
264 * \since This macro is available since SDL 3.2.0.
265 */
266#define SDL_RESTRICT __restrict__
267
268/**
269 * Check if the compiler supports a given builtin functionality.
270 *
271 * This allows preprocessor checks for things that otherwise might fail to
272 * compile.
273 *
274 * Supported by virtually all clang versions and more-recent GCCs. Use this
275 * instead of checking the clang version if possible.
276 *
277 * On compilers without has_builtin support, this is defined to 0 (always
278 * false).
279 *
280 * \since This macro is available since SDL 3.2.0.
281 */
282#define SDL_HAS_BUILTIN(x) __has_builtin(x)
283
284/* end of wiki documentation section. */
285#endif
286
287#ifndef SDL_HAS_BUILTIN
288#ifdef __has_builtin
289#define SDL_HAS_BUILTIN(x) __has_builtin(x)
290#else
291#define SDL_HAS_BUILTIN(x) 0
292#endif
293#endif
294
295#ifndef SDL_DEPRECATED
296# if defined(__GNUC__) && (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */
297# define SDL_DEPRECATED __attribute__((deprecated))
298# elif defined(_MSC_VER)
299# define SDL_DEPRECATED __declspec(deprecated)
300# else
301# define SDL_DEPRECATED
302# endif
303#endif
304
305#ifndef SDL_UNUSED
306# ifdef __GNUC__
307# define SDL_UNUSED __attribute__((unused))
308# else
309# define SDL_UNUSED
310# endif
311#endif
312
313/* Some compilers use a special export keyword */
314#ifndef SDL_DECLSPEC
315# if defined(SDL_PLATFORM_WINDOWS)
316# ifdef DLL_EXPORT
317# define SDL_DECLSPEC __declspec(dllexport)
318# else
319# define SDL_DECLSPEC
320# endif
321# else
322# if defined(__GNUC__) && __GNUC__ >= 4
323# define SDL_DECLSPEC __attribute__ ((visibility("default")))
324# else
325# define SDL_DECLSPEC
326# endif
327# endif
328#endif
329
330/* By default SDL uses the C calling convention */
331#ifndef SDLCALL
332#if defined(SDL_PLATFORM_WINDOWS) && !defined(__GNUC__)
333#define SDLCALL __cdecl
334#else
335#define SDLCALL
336#endif
337#endif /* SDLCALL */
338
339/* Force structure packing at 4 byte alignment.
340 This is necessary if the header is included in code which has structure
341 packing set to an alternate value, say for loading structures from disk.
342 The packing is reset to the previous value in SDL_close_code.h
343 */
344#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
345#ifdef _MSC_VER
346#pragma warning(disable: 4103)
347#endif
348#ifdef __clang__
349#pragma clang diagnostic ignored "-Wpragma-pack"
350#endif
351#ifdef __BORLANDC__
352#pragma nopackwarning
353#endif
354#ifdef _WIN64
355/* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */
356#pragma pack(push,8)
357#else
358#pragma pack(push,4)
359#endif
360#endif /* Compiler needs structure packing set */
361
362#ifndef SDL_INLINE
363#ifdef __GNUC__
364#define SDL_INLINE __inline__
365#elif defined(_MSC_VER) || defined(__BORLANDC__) || \
366 defined(__DMC__) || defined(__SC__) || \
367 defined(__WATCOMC__) || defined(__LCC__) || \
368 defined(__DECC) || defined(__CC_ARM)
369#define SDL_INLINE __inline
370#ifndef __inline__
371#define __inline__ __inline
372#endif
373#else
374#define SDL_INLINE inline
375#ifndef __inline__
376#define __inline__ inline
377#endif
378#endif
379#endif /* SDL_INLINE not defined */
380
381#ifndef SDL_FORCE_INLINE
382#ifdef _MSC_VER
383#define SDL_FORCE_INLINE __forceinline
384#elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )
385#define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__
386#else
387#define SDL_FORCE_INLINE static SDL_INLINE
388#endif
389#endif /* SDL_FORCE_INLINE not defined */
390
391#ifndef SDL_NORETURN
392#ifdef __GNUC__
393#define SDL_NORETURN __attribute__((noreturn))
394#elif defined(_MSC_VER)
395#define SDL_NORETURN __declspec(noreturn)
396#else
397#define SDL_NORETURN
398#endif
399#endif /* SDL_NORETURN not defined */
400
401#ifdef __clang__
402#if __has_feature(attribute_analyzer_noreturn)
403#define SDL_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
404#endif
405#endif
406
407#ifndef SDL_ANALYZER_NORETURN
408#define SDL_ANALYZER_NORETURN
409#endif
410
411/* Apparently this is needed by several Windows compilers */
412#ifndef __MACH__
413#ifndef NULL
414#ifdef __cplusplus
415#define NULL 0
416#else
417#define NULL ((void *)0)
418#endif
419#endif /* NULL */
420#endif /* ! macOS - breaks precompiled headers */
421
422#ifndef SDL_FALLTHROUGH
423#if (defined(__cplusplus) && __cplusplus >= 201703L) || \
424 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L)
425#define SDL_FALLTHROUGH [[fallthrough]]
426#else
427#if defined(__has_attribute) && !defined(__SUNPRO_C) && !defined(__SUNPRO_CC)
428#define SDL_HAS_FALLTHROUGH __has_attribute(__fallthrough__)
429#else
430#define SDL_HAS_FALLTHROUGH 0
431#endif /* __has_attribute */
432#if SDL_HAS_FALLTHROUGH && \
433 ((defined(__GNUC__) && __GNUC__ >= 7) || \
434 (defined(__clang_major__) && __clang_major__ >= 10))
435#define SDL_FALLTHROUGH __attribute__((__fallthrough__))
436#else
437#define SDL_FALLTHROUGH do {} while (0) /* fallthrough */
438#endif /* SDL_HAS_FALLTHROUGH */
439#undef SDL_HAS_FALLTHROUGH
440#endif /* C++17 or C2x */
441#endif /* SDL_FALLTHROUGH not defined */
442
443#ifndef SDL_NODISCARD
444#if (defined(__cplusplus) && __cplusplus >= 201703L) || \
445 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L)
446#define SDL_NODISCARD [[nodiscard]]
447#elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )
448#define SDL_NODISCARD __attribute__((warn_unused_result))
449#elif defined(_MSC_VER) && (_MSC_VER >= 1700)
450#define SDL_NODISCARD _Check_return_
451#else
452#define SDL_NODISCARD
453#endif /* C++17 or C23 */
454#endif /* SDL_NODISCARD not defined */
455
456#ifndef SDL_MALLOC
457#if defined(__GNUC__) && (__GNUC__ >= 3)
458#define SDL_MALLOC __attribute__((malloc))
459/** FIXME
460#elif defined(_MSC_VER)
461#define SDL_MALLOC __declspec(allocator) __desclspec(restrict)
462**/
463#else
464#define SDL_MALLOC
465#endif
466#endif /* SDL_MALLOC not defined */
467
468#ifndef SDL_ALLOC_SIZE
469#if (defined(__clang__) && __clang_major__ >= 4) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
470#define SDL_ALLOC_SIZE(p) __attribute__((alloc_size(p)))
471#elif defined(_MSC_VER)
472#define SDL_ALLOC_SIZE(p)
473#else
474#define SDL_ALLOC_SIZE(p)
475#endif
476#endif /* SDL_ALLOC_SIZE not defined */
477
478#ifndef SDL_ALLOC_SIZE2
479#if (defined(__clang__) && __clang_major__ >= 4) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
480#define SDL_ALLOC_SIZE2(p1, p2) __attribute__((alloc_size(p1, p2)))
481#elif defined(_MSC_VER)
482#define SDL_ALLOC_SIZE2(p1, p2)
483#else
484#define SDL_ALLOC_SIZE2(p1, p2)
485#endif
486#endif /* SDL_ALLOC_SIZE2 not defined */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_bits.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_bits.h
new file mode 100644
index 0000000..7435ce6
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_bits.h
@@ -0,0 +1,147 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryBits
24 *
25 * Functions for fiddling with bits and bitmasks.
26 */
27
28#ifndef SDL_bits_h_
29#define SDL_bits_h_
30
31#include <SDL3/SDL_stdinc.h>
32
33#include <SDL3/SDL_begin_code.h>
34/* Set up for C function definitions, even when using C++ */
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39#if defined(__WATCOMC__) && defined(__386__)
40extern __inline int _SDL_bsr_watcom(Uint32);
41#pragma aux _SDL_bsr_watcom = \
42 "bsr eax, eax" \
43 parm [eax] nomemory \
44 value [eax] \
45 modify exact [eax] nomemory;
46#endif
47
48/**
49 * Get the index of the most significant (set) bit in a 32-bit number.
50 *
51 * Result is undefined when called with 0. This operation can also be stated
52 * as "count leading zeroes" and "log base 2".
53 *
54 * Note that this is a forced-inline function in a header, and not a public
55 * API function available in the SDL library (which is to say, the code is
56 * embedded in the calling program and the linker and dynamic loader will not
57 * be able to find this function inside SDL itself).
58 *
59 * \param x the 32-bit value to examine.
60 * \returns the index of the most significant bit, or -1 if the value is 0.
61 *
62 * \threadsafety It is safe to call this function from any thread.
63 *
64 * \since This function is available since SDL 3.2.0.
65 */
66SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x)
67{
68#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
69 /* Count Leading Zeroes builtin in GCC.
70 * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
71 */
72 if (x == 0) {
73 return -1;
74 }
75 return 31 - __builtin_clz(x);
76#elif defined(__WATCOMC__) && defined(__386__)
77 if (x == 0) {
78 return -1;
79 }
80 return _SDL_bsr_watcom(x);
81#elif defined(_MSC_VER) && _MSC_VER >= 1400
82 unsigned long index;
83 if (_BitScanReverse(&index, x)) {
84 return (int)index;
85 }
86 return -1;
87#else
88 /* Based off of Bit Twiddling Hacks by Sean Eron Anderson
89 * <seander@cs.stanford.edu>, released in the public domain.
90 * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
91 */
92 const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
93 const int S[] = {1, 2, 4, 8, 16};
94
95 int msbIndex = 0;
96 int i;
97
98 if (x == 0) {
99 return -1;
100 }
101
102 for (i = 4; i >= 0; i--)
103 {
104 if (x & b[i])
105 {
106 x >>= S[i];
107 msbIndex |= S[i];
108 }
109 }
110
111 return msbIndex;
112#endif
113}
114
115/**
116 * Determine if a unsigned 32-bit value has exactly one bit set.
117 *
118 * If there are no bits set (`x` is zero), or more than one bit set, this
119 * returns false. If any one bit is exclusively set, this returns true.
120 *
121 * Note that this is a forced-inline function in a header, and not a public
122 * API function available in the SDL library (which is to say, the code is
123 * embedded in the calling program and the linker and dynamic loader will not
124 * be able to find this function inside SDL itself).
125 *
126 * \param x the 32-bit value to examine.
127 * \returns true if exactly one bit is set in `x`, false otherwise.
128 *
129 * \threadsafety It is safe to call this function from any thread.
130 *
131 * \since This function is available since SDL 3.2.0.
132 */
133SDL_FORCE_INLINE bool SDL_HasExactlyOneBitSet32(Uint32 x)
134{
135 if (x && !(x & (x - 1))) {
136 return true;
137 }
138 return false;
139}
140
141/* Ends C function definitions when using C++ */
142#ifdef __cplusplus
143}
144#endif
145#include <SDL3/SDL_close_code.h>
146
147#endif /* SDL_bits_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_blendmode.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_blendmode.h
new file mode 100644
index 0000000..8f00cbc
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_blendmode.h
@@ -0,0 +1,202 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryBlendmode
24 *
25 * Blend modes decide how two colors will mix together. There are both
26 * standard modes for basic needs and a means to create custom modes,
27 * dictating what sort of math to do on what color components.
28 */
29
30#ifndef SDL_blendmode_h_
31#define SDL_blendmode_h_
32
33#include <SDL3/SDL_stdinc.h>
34
35#include <SDL3/SDL_begin_code.h>
36/* Set up for C function definitions, even when using C++ */
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/**
42 * A set of blend modes used in drawing operations.
43 *
44 * These predefined blend modes are supported everywhere.
45 *
46 * Additional values may be obtained from SDL_ComposeCustomBlendMode.
47 *
48 * \since This datatype is available since SDL 3.2.0.
49 *
50 * \sa SDL_ComposeCustomBlendMode
51 */
52typedef Uint32 SDL_BlendMode;
53
54#define SDL_BLENDMODE_NONE 0x00000000u /**< no blending: dstRGBA = srcRGBA */
55#define SDL_BLENDMODE_BLEND 0x00000001u /**< alpha blending: dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)), dstA = srcA + (dstA * (1-srcA)) */
56#define SDL_BLENDMODE_BLEND_PREMULTIPLIED 0x00000010u /**< pre-multiplied alpha blending: dstRGBA = srcRGBA + (dstRGBA * (1-srcA)) */
57#define SDL_BLENDMODE_ADD 0x00000002u /**< additive blending: dstRGB = (srcRGB * srcA) + dstRGB, dstA = dstA */
58#define SDL_BLENDMODE_ADD_PREMULTIPLIED 0x00000020u /**< pre-multiplied additive blending: dstRGB = srcRGB + dstRGB, dstA = dstA */
59#define SDL_BLENDMODE_MOD 0x00000004u /**< color modulate: dstRGB = srcRGB * dstRGB, dstA = dstA */
60#define SDL_BLENDMODE_MUL 0x00000008u /**< color multiply: dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)), dstA = dstA */
61#define SDL_BLENDMODE_INVALID 0x7FFFFFFFu
62
63/**
64 * The blend operation used when combining source and destination pixel
65 * components.
66 *
67 * \since This enum is available since SDL 3.2.0.
68 */
69typedef enum SDL_BlendOperation
70{
71 SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
72 SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan */
73 SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan */
74 SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan */
75 SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan */
76} SDL_BlendOperation;
77
78/**
79 * The normalized factor used to multiply pixel components.
80 *
81 * The blend factors are multiplied with the pixels from a drawing operation
82 * (src) and the pixels from the render target (dst) before the blend
83 * operation. The comma-separated factors listed above are always applied in
84 * the component order red, green, blue, and alpha.
85 *
86 * \since This enum is available since SDL 3.2.0.
87 */
88typedef enum SDL_BlendFactor
89{
90 SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */
91 SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */
92 SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */
93 SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */
94 SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */
95 SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */
96 SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */
97 SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
98 SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
99 SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
100} SDL_BlendFactor;
101
102/**
103 * Compose a custom blend mode for renderers.
104 *
105 * The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
106 * the SDL_BlendMode returned by this function if the renderer supports it.
107 *
108 * A blend mode controls how the pixels from a drawing operation (source) get
109 * combined with the pixels from the render target (destination). First, the
110 * components of the source and destination pixels get multiplied with their
111 * blend factors. Then, the blend operation takes the two products and
112 * calculates the result that will get stored in the render target.
113 *
114 * Expressed in pseudocode, it would look like this:
115 *
116 * ```c
117 * dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
118 * dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
119 * ```
120 *
121 * Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
122 * dst)` can return one of the following:
123 *
124 * - `src + dst`
125 * - `src - dst`
126 * - `dst - src`
127 * - `min(src, dst)`
128 * - `max(src, dst)`
129 *
130 * The red, green, and blue components are always multiplied with the first,
131 * second, and third components of the SDL_BlendFactor, respectively. The
132 * fourth component is not used.
133 *
134 * The alpha component is always multiplied with the fourth component of the
135 * SDL_BlendFactor. The other components are not used in the alpha
136 * calculation.
137 *
138 * Support for these blend modes varies for each renderer. To check if a
139 * specific SDL_BlendMode is supported, create a renderer and pass it to
140 * either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
141 * return with an error if the blend mode is not supported.
142 *
143 * This list describes the support of custom blend modes for each renderer.
144 * All renderers support the four blend modes listed in the SDL_BlendMode
145 * enumeration.
146 *
147 * - **direct3d**: Supports all operations with all factors. However, some
148 * factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
149 * `SDL_BLENDOPERATION_MAXIMUM`.
150 * - **direct3d11**: Same as Direct3D 9.
151 * - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
152 * factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly here.
153 * - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
154 * `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
155 * operations with all factors.
156 * - **psp**: No custom blend mode support.
157 * - **software**: No custom blend mode support.
158 *
159 * Some renderers do not provide an alpha component for the default render
160 * target. The `SDL_BLENDFACTOR_DST_ALPHA` and
161 * `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
162 * case.
163 *
164 * \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
165 * blue components of the source pixels.
166 * \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
167 * blue components of the destination pixels.
168 * \param colorOperation the SDL_BlendOperation used to combine the red,
169 * green, and blue components of the source and
170 * destination pixels.
171 * \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
172 * the source pixels.
173 * \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
174 * the destination pixels.
175 * \param alphaOperation the SDL_BlendOperation used to combine the alpha
176 * component of the source and destination pixels.
177 * \returns an SDL_BlendMode that represents the chosen factors and
178 * operations.
179 *
180 * \threadsafety It is safe to call this function from any thread.
181 *
182 * \since This function is available since SDL 3.2.0.
183 *
184 * \sa SDL_SetRenderDrawBlendMode
185 * \sa SDL_GetRenderDrawBlendMode
186 * \sa SDL_SetTextureBlendMode
187 * \sa SDL_GetTextureBlendMode
188 */
189extern SDL_DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
190 SDL_BlendFactor dstColorFactor,
191 SDL_BlendOperation colorOperation,
192 SDL_BlendFactor srcAlphaFactor,
193 SDL_BlendFactor dstAlphaFactor,
194 SDL_BlendOperation alphaOperation);
195
196/* Ends C function definitions when using C++ */
197#ifdef __cplusplus
198}
199#endif
200#include <SDL3/SDL_close_code.h>
201
202#endif /* SDL_blendmode_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_camera.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_camera.h
new file mode 100644
index 0000000..5f3911f
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_camera.h
@@ -0,0 +1,519 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryCamera
24 *
25 * Video capture for the SDL library.
26 *
27 * This API lets apps read input from video sources, like webcams. Camera
28 * devices can be enumerated, queried, and opened. Once opened, it will
29 * provide SDL_Surface objects as new frames of video come in. These surfaces
30 * can be uploaded to an SDL_Texture or processed as pixels in memory.
31 *
32 * Several platforms will alert the user if an app tries to access a camera,
33 * and some will present a UI asking the user if your application should be
34 * allowed to obtain images at all, which they can deny. A successfully opened
35 * camera will not provide images until permission is granted. Applications,
36 * after opening a camera device, can see if they were granted access by
37 * either polling with the SDL_GetCameraPermissionState() function, or waiting
38 * for an SDL_EVENT_CAMERA_DEVICE_APPROVED or SDL_EVENT_CAMERA_DEVICE_DENIED
39 * event. Platforms that don't have any user approval process will report
40 * approval immediately.
41 *
42 * Note that SDL cameras only provide video as individual frames; they will
43 * not provide full-motion video encoded in a movie file format, although an
44 * app is free to encode the acquired frames into any format it likes. It also
45 * does not provide audio from the camera hardware through this API; not only
46 * do many webcams not have microphones at all, many people--from streamers to
47 * people on Zoom calls--will want to use a separate microphone regardless of
48 * the camera. In any case, recorded audio will be available through SDL's
49 * audio API no matter what hardware provides the microphone.
50 *
51 * ## Camera gotchas
52 *
53 * Consumer-level camera hardware tends to take a little while to warm up,
54 * once the device has been opened. Generally most camera apps have some sort
55 * of UI to take a picture (a button to snap a pic while a preview is showing,
56 * some sort of multi-second countdown for the user to pose, like a photo
57 * booth), which puts control in the users' hands, or they are intended to
58 * stay on for long times (Pokemon Go, etc).
59 *
60 * It's not uncommon that a newly-opened camera will provide a couple of
61 * completely black frames, maybe followed by some under-exposed images. If
62 * taking a single frame automatically, or recording video from a camera's
63 * input without the user initiating it from a preview, it could be wise to
64 * drop the first several frames (if not the first several _seconds_ worth of
65 * frames!) before using images from a camera.
66 */
67
68#ifndef SDL_camera_h_
69#define SDL_camera_h_
70
71#include <SDL3/SDL_stdinc.h>
72#include <SDL3/SDL_error.h>
73#include <SDL3/SDL_pixels.h>
74#include <SDL3/SDL_properties.h>
75#include <SDL3/SDL_surface.h>
76
77#include <SDL3/SDL_begin_code.h>
78/* Set up for C function definitions, even when using C++ */
79#ifdef __cplusplus
80extern "C" {
81#endif
82
83/**
84 * This is a unique ID for a camera device for the time it is connected to the
85 * system, and is never reused for the lifetime of the application.
86 *
87 * If the device is disconnected and reconnected, it will get a new ID.
88 *
89 * The value 0 is an invalid ID.
90 *
91 * \since This datatype is available since SDL 3.2.0.
92 *
93 * \sa SDL_GetCameras
94 */
95typedef Uint32 SDL_CameraID;
96
97/**
98 * The opaque structure used to identify an opened SDL camera.
99 *
100 * \since This struct is available since SDL 3.2.0.
101 */
102typedef struct SDL_Camera SDL_Camera;
103
104/**
105 * The details of an output format for a camera device.
106 *
107 * Cameras often support multiple formats; each one will be encapsulated in
108 * this struct.
109 *
110 * \since This struct is available since SDL 3.2.0.
111 *
112 * \sa SDL_GetCameraSupportedFormats
113 * \sa SDL_GetCameraFormat
114 */
115typedef struct SDL_CameraSpec
116{
117 SDL_PixelFormat format; /**< Frame format */
118 SDL_Colorspace colorspace; /**< Frame colorspace */
119 int width; /**< Frame width */
120 int height; /**< Frame height */
121 int framerate_numerator; /**< Frame rate numerator ((num / denom) == FPS, (denom / num) == duration in seconds) */
122 int framerate_denominator; /**< Frame rate demoninator ((num / denom) == FPS, (denom / num) == duration in seconds) */
123} SDL_CameraSpec;
124
125/**
126 * The position of camera in relation to system device.
127 *
128 * \since This enum is available since SDL 3.2.0.
129 *
130 * \sa SDL_GetCameraPosition
131 */
132typedef enum SDL_CameraPosition
133{
134 SDL_CAMERA_POSITION_UNKNOWN,
135 SDL_CAMERA_POSITION_FRONT_FACING,
136 SDL_CAMERA_POSITION_BACK_FACING
137} SDL_CameraPosition;
138
139
140/**
141 * Use this function to get the number of built-in camera drivers.
142 *
143 * This function returns a hardcoded number. This never returns a negative
144 * value; if there are no drivers compiled into this build of SDL, this
145 * function returns zero. The presence of a driver in this list does not mean
146 * it will function, it just means SDL is capable of interacting with that
147 * interface. For example, a build of SDL might have v4l2 support, but if
148 * there's no kernel support available, SDL's v4l2 driver would fail if used.
149 *
150 * By default, SDL tries all drivers, in its preferred order, until one is
151 * found to be usable.
152 *
153 * \returns the number of built-in camera drivers.
154 *
155 * \threadsafety It is safe to call this function from any thread.
156 *
157 * \since This function is available since SDL 3.2.0.
158 *
159 * \sa SDL_GetCameraDriver
160 */
161extern SDL_DECLSPEC int SDLCALL SDL_GetNumCameraDrivers(void);
162
163/**
164 * Use this function to get the name of a built in camera driver.
165 *
166 * The list of camera drivers is given in the order that they are normally
167 * initialized by default; the drivers that seem more reasonable to choose
168 * first (as far as the SDL developers believe) are earlier in the list.
169 *
170 * The names of drivers are all simple, low-ASCII identifiers, like "v4l2",
171 * "coremedia" or "android". These never have Unicode characters, and are not
172 * meant to be proper names.
173 *
174 * \param index the index of the camera driver; the value ranges from 0 to
175 * SDL_GetNumCameraDrivers() - 1.
176 * \returns the name of the camera driver at the requested index, or NULL if
177 * an invalid index was specified.
178 *
179 * \threadsafety It is safe to call this function from any thread.
180 *
181 * \since This function is available since SDL 3.2.0.
182 *
183 * \sa SDL_GetNumCameraDrivers
184 */
185extern SDL_DECLSPEC const char * SDLCALL SDL_GetCameraDriver(int index);
186
187/**
188 * Get the name of the current camera driver.
189 *
190 * The names of drivers are all simple, low-ASCII identifiers, like "v4l2",
191 * "coremedia" or "android". These never have Unicode characters, and are not
192 * meant to be proper names.
193 *
194 * \returns the name of the current camera driver or NULL if no driver has
195 * been initialized.
196 *
197 * \threadsafety It is safe to call this function from any thread.
198 *
199 * \since This function is available since SDL 3.2.0.
200 */
201extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentCameraDriver(void);
202
203/**
204 * Get a list of currently connected camera devices.
205 *
206 * \param count a pointer filled in with the number of cameras returned, may
207 * be NULL.
208 * \returns a 0 terminated array of camera instance IDs or NULL on failure;
209 * call SDL_GetError() for more information. This should be freed
210 * with SDL_free() when it is no longer needed.
211 *
212 * \threadsafety It is safe to call this function from any thread.
213 *
214 * \since This function is available since SDL 3.2.0.
215 *
216 * \sa SDL_OpenCamera
217 */
218extern SDL_DECLSPEC SDL_CameraID * SDLCALL SDL_GetCameras(int *count);
219
220/**
221 * Get the list of native formats/sizes a camera supports.
222 *
223 * This returns a list of all formats and frame sizes that a specific camera
224 * can offer. This is useful if your app can accept a variety of image formats
225 * and sizes and so want to find the optimal spec that doesn't require
226 * conversion.
227 *
228 * This function isn't strictly required; if you call SDL_OpenCamera with a
229 * NULL spec, SDL will choose a native format for you, and if you instead
230 * specify a desired format, it will transparently convert to the requested
231 * format on your behalf.
232 *
233 * If `count` is not NULL, it will be filled with the number of elements in
234 * the returned array.
235 *
236 * Note that it's legal for a camera to supply an empty list. This is what
237 * will happen on Emscripten builds, since that platform won't tell _anything_
238 * about available cameras until you've opened one, and won't even tell if
239 * there _is_ a camera until the user has given you permission to check
240 * through a scary warning popup.
241 *
242 * \param instance_id the camera device instance ID.
243 * \param count a pointer filled in with the number of elements in the list,
244 * may be NULL.
245 * \returns a NULL terminated array of pointers to SDL_CameraSpec or NULL on
246 * failure; call SDL_GetError() for more information. This is a
247 * single allocation that should be freed with SDL_free() when it is
248 * no longer needed.
249 *
250 * \threadsafety It is safe to call this function from any thread.
251 *
252 * \since This function is available since SDL 3.2.0.
253 *
254 * \sa SDL_GetCameras
255 * \sa SDL_OpenCamera
256 */
257extern SDL_DECLSPEC SDL_CameraSpec ** SDLCALL SDL_GetCameraSupportedFormats(SDL_CameraID instance_id, int *count);
258
259/**
260 * Get the human-readable device name for a camera.
261 *
262 * \param instance_id the camera device instance ID.
263 * \returns a human-readable device name or NULL on failure; call
264 * SDL_GetError() for more information.
265 *
266 * \threadsafety It is safe to call this function from any thread.
267 *
268 * \since This function is available since SDL 3.2.0.
269 *
270 * \sa SDL_GetCameras
271 */
272extern SDL_DECLSPEC const char * SDLCALL SDL_GetCameraName(SDL_CameraID instance_id);
273
274/**
275 * Get the position of the camera in relation to the system.
276 *
277 * Most platforms will report UNKNOWN, but mobile devices, like phones, can
278 * often make a distinction between cameras on the front of the device (that
279 * points towards the user, for taking "selfies") and cameras on the back (for
280 * filming in the direction the user is facing).
281 *
282 * \param instance_id the camera device instance ID.
283 * \returns the position of the camera on the system hardware.
284 *
285 * \threadsafety It is safe to call this function from any thread.
286 *
287 * \since This function is available since SDL 3.2.0.
288 *
289 * \sa SDL_GetCameras
290 */
291extern SDL_DECLSPEC SDL_CameraPosition SDLCALL SDL_GetCameraPosition(SDL_CameraID instance_id);
292
293/**
294 * Open a video recording device (a "camera").
295 *
296 * You can open the device with any reasonable spec, and if the hardware can't
297 * directly support it, it will convert data seamlessly to the requested
298 * format. This might incur overhead, including scaling of image data.
299 *
300 * If you would rather accept whatever format the device offers, you can pass
301 * a NULL spec here and it will choose one for you (and you can use
302 * SDL_Surface's conversion/scaling functions directly if necessary).
303 *
304 * You can call SDL_GetCameraFormat() to get the actual data format if passing
305 * a NULL spec here. You can see the exact specs a device can support without
306 * conversion with SDL_GetCameraSupportedFormats().
307 *
308 * SDL will not attempt to emulate framerate; it will try to set the hardware
309 * to the rate closest to the requested speed, but it won't attempt to limit
310 * or duplicate frames artificially; call SDL_GetCameraFormat() to see the
311 * actual framerate of the opened the device, and check your timestamps if
312 * this is crucial to your app!
313 *
314 * Note that the camera is not usable until the user approves its use! On some
315 * platforms, the operating system will prompt the user to permit access to
316 * the camera, and they can choose Yes or No at that point. Until they do, the
317 * camera will not be usable. The app should either wait for an
318 * SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event,
319 * or poll SDL_GetCameraPermissionState() occasionally until it returns
320 * non-zero. On platforms that don't require explicit user approval (and
321 * perhaps in places where the user previously permitted access), the approval
322 * event might come immediately, but it might come seconds, minutes, or hours
323 * later!
324 *
325 * \param instance_id the camera device instance ID.
326 * \param spec the desired format for data the device will provide. Can be
327 * NULL.
328 * \returns an SDL_Camera object or NULL on failure; call SDL_GetError() for
329 * more information.
330 *
331 * \threadsafety It is safe to call this function from any thread.
332 *
333 * \since This function is available since SDL 3.2.0.
334 *
335 * \sa SDL_GetCameras
336 * \sa SDL_GetCameraFormat
337 */
338extern SDL_DECLSPEC SDL_Camera * SDLCALL SDL_OpenCamera(SDL_CameraID instance_id, const SDL_CameraSpec *spec);
339
340/**
341 * Query if camera access has been approved by the user.
342 *
343 * Cameras will not function between when the device is opened by the app and
344 * when the user permits access to the hardware. On some platforms, this
345 * presents as a popup dialog where the user has to explicitly approve access;
346 * on others the approval might be implicit and not alert the user at all.
347 *
348 * This function can be used to check the status of that approval. It will
349 * return 0 if still waiting for user response, 1 if the camera is approved
350 * for use, and -1 if the user denied access.
351 *
352 * Instead of polling with this function, you can wait for a
353 * SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event
354 * in the standard SDL event loop, which is guaranteed to be sent once when
355 * permission to use the camera is decided.
356 *
357 * If a camera is declined, there's nothing to be done but call
358 * SDL_CloseCamera() to dispose of it.
359 *
360 * \param camera the opened camera device to query.
361 * \returns -1 if user denied access to the camera, 1 if user approved access,
362 * 0 if no decision has been made yet.
363 *
364 * \threadsafety It is safe to call this function from any thread.
365 *
366 * \since This function is available since SDL 3.2.0.
367 *
368 * \sa SDL_OpenCamera
369 * \sa SDL_CloseCamera
370 */
371extern SDL_DECLSPEC int SDLCALL SDL_GetCameraPermissionState(SDL_Camera *camera);
372
373/**
374 * Get the instance ID of an opened camera.
375 *
376 * \param camera an SDL_Camera to query.
377 * \returns the instance ID of the specified camera on success or 0 on
378 * failure; call SDL_GetError() for more information.
379 *
380 * \threadsafety It is safe to call this function from any thread.
381 *
382 * \since This function is available since SDL 3.2.0.
383 *
384 * \sa SDL_OpenCamera
385 */
386extern SDL_DECLSPEC SDL_CameraID SDLCALL SDL_GetCameraID(SDL_Camera *camera);
387
388/**
389 * Get the properties associated with an opened camera.
390 *
391 * \param camera the SDL_Camera obtained from SDL_OpenCamera().
392 * \returns a valid property ID on success or 0 on failure; call
393 * SDL_GetError() for more information.
394 *
395 * \threadsafety It is safe to call this function from any thread.
396 *
397 * \since This function is available since SDL 3.2.0.
398 */
399extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetCameraProperties(SDL_Camera *camera);
400
401/**
402 * Get the spec that a camera is using when generating images.
403 *
404 * Note that this might not be the native format of the hardware, as SDL might
405 * be converting to this format behind the scenes.
406 *
407 * If the system is waiting for the user to approve access to the camera, as
408 * some platforms require, this will return false, but this isn't necessarily
409 * a fatal error; you should either wait for an
410 * SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event,
411 * or poll SDL_GetCameraPermissionState() occasionally until it returns
412 * non-zero.
413 *
414 * \param camera opened camera device.
415 * \param spec the SDL_CameraSpec to be initialized by this function.
416 * \returns true on success or false on failure; call SDL_GetError() for more
417 * information.
418 *
419 * \threadsafety It is safe to call this function from any thread.
420 *
421 * \since This function is available since SDL 3.2.0.
422 *
423 * \sa SDL_OpenCamera
424 */
425extern SDL_DECLSPEC bool SDLCALL SDL_GetCameraFormat(SDL_Camera *camera, SDL_CameraSpec *spec);
426
427/**
428 * Acquire a frame.
429 *
430 * The frame is a memory pointer to the image data, whose size and format are
431 * given by the spec requested when opening the device.
432 *
433 * This is a non blocking API. If there is a frame available, a non-NULL
434 * surface is returned, and timestampNS will be filled with a non-zero value.
435 *
436 * Note that an error case can also return NULL, but a NULL by itself is
437 * normal and just signifies that a new frame is not yet available. Note that
438 * even if a camera device fails outright (a USB camera is unplugged while in
439 * use, etc), SDL will send an event separately to notify the app, but
440 * continue to provide blank frames at ongoing intervals until
441 * SDL_CloseCamera() is called, so real failure here is almost always an out
442 * of memory condition.
443 *
444 * After use, the frame should be released with SDL_ReleaseCameraFrame(). If
445 * you don't do this, the system may stop providing more video!
446 *
447 * Do not call SDL_DestroySurface() on the returned surface! It must be given
448 * back to the camera subsystem with SDL_ReleaseCameraFrame!
449 *
450 * If the system is waiting for the user to approve access to the camera, as
451 * some platforms require, this will return NULL (no frames available); you
452 * should either wait for an SDL_EVENT_CAMERA_DEVICE_APPROVED (or
453 * SDL_EVENT_CAMERA_DEVICE_DENIED) event, or poll
454 * SDL_GetCameraPermissionState() occasionally until it returns non-zero.
455 *
456 * \param camera opened camera device.
457 * \param timestampNS a pointer filled in with the frame's timestamp, or 0 on
458 * error. Can be NULL.
459 * \returns a new frame of video on success, NULL if none is currently
460 * available.
461 *
462 * \threadsafety It is safe to call this function from any thread.
463 *
464 * \since This function is available since SDL 3.2.0.
465 *
466 * \sa SDL_ReleaseCameraFrame
467 */
468extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_AcquireCameraFrame(SDL_Camera *camera, Uint64 *timestampNS);
469
470/**
471 * Release a frame of video acquired from a camera.
472 *
473 * Let the back-end re-use the internal buffer for camera.
474 *
475 * This function _must_ be called only on surface objects returned by
476 * SDL_AcquireCameraFrame(). This function should be called as quickly as
477 * possible after acquisition, as SDL keeps a small FIFO queue of surfaces for
478 * video frames; if surfaces aren't released in a timely manner, SDL may drop
479 * upcoming video frames from the camera.
480 *
481 * If the app needs to keep the surface for a significant time, they should
482 * make a copy of it and release the original.
483 *
484 * The app should not use the surface again after calling this function;
485 * assume the surface is freed and the pointer is invalid.
486 *
487 * \param camera opened camera device.
488 * \param frame the video frame surface to release.
489 *
490 * \threadsafety It is safe to call this function from any thread.
491 *
492 * \since This function is available since SDL 3.2.0.
493 *
494 * \sa SDL_AcquireCameraFrame
495 */
496extern SDL_DECLSPEC void SDLCALL SDL_ReleaseCameraFrame(SDL_Camera *camera, SDL_Surface *frame);
497
498/**
499 * Use this function to shut down camera processing and close the camera
500 * device.
501 *
502 * \param camera opened camera device.
503 *
504 * \threadsafety It is safe to call this function from any thread, but no
505 * thread may reference `device` once this function is called.
506 *
507 * \since This function is available since SDL 3.2.0.
508 *
509 * \sa SDL_OpenCamera
510 */
511extern SDL_DECLSPEC void SDLCALL SDL_CloseCamera(SDL_Camera *camera);
512
513/* Ends C function definitions when using C++ */
514#ifdef __cplusplus
515}
516#endif
517#include <SDL3/SDL_close_code.h>
518
519#endif /* SDL_camera_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_clipboard.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_clipboard.h
new file mode 100644
index 0000000..3ca56a4
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_clipboard.h
@@ -0,0 +1,331 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryClipboard
24 *
25 * SDL provides access to the system clipboard, both for reading information
26 * from other processes and publishing information of its own.
27 *
28 * This is not just text! SDL apps can access and publish data by mimetype.
29 *
30 * ## Basic use (text)
31 *
32 * Obtaining and publishing simple text to the system clipboard is as easy as
33 * calling SDL_GetClipboardText() and SDL_SetClipboardText(), respectively.
34 * These deal with C strings in UTF-8 encoding. Data transmission and encoding
35 * conversion is completely managed by SDL.
36 *
37 * ## Clipboard callbacks (data other than text)
38 *
39 * Things get more complicated when the clipboard contains something other
40 * than text. Not only can the system clipboard contain data of any type, in
41 * some cases it can contain the same data in different formats! For example,
42 * an image painting app might let the user copy a graphic to the clipboard,
43 * and offers it in .BMP, .JPG, or .PNG format for other apps to consume.
44 *
45 * Obtaining clipboard data ("pasting") like this is a matter of calling
46 * SDL_GetClipboardData() and telling it the mimetype of the data you want.
47 * But how does one know if that format is available? SDL_HasClipboardData()
48 * can report if a specific mimetype is offered, and
49 * SDL_GetClipboardMimeTypes() can provide the entire list of mimetypes
50 * available, so the app can decide what to do with the data and what formats
51 * it can support.
52 *
53 * Setting the clipboard ("copying") to arbitrary data is done with
54 * SDL_SetClipboardData. The app does not provide the data in this call, but
55 * rather the mimetypes it is willing to provide and a callback function.
56 * During the callback, the app will generate the data. This allows massive
57 * data sets to be provided to the clipboard, without any data being copied
58 * before it is explicitly requested. More specifically, it allows an app to
59 * offer data in multiple formats without providing a copy of all of them
60 * upfront. If the app has an image that it could provide in PNG or JPG
61 * format, it doesn't have to encode it to either of those unless and until
62 * something tries to paste it.
63 *
64 * ## Primary Selection
65 *
66 * The X11 and Wayland video targets have a concept of the "primary selection"
67 * in addition to the usual clipboard. This is generally highlighted (but not
68 * explicitly copied) text from various apps. SDL offers APIs for this through
69 * SDL_GetPrimarySelectionText() and SDL_SetPrimarySelectionText(). SDL offers
70 * these APIs on platforms without this concept, too, but only so far that it
71 * will keep a copy of a string that the app sets for later retrieval; the
72 * operating system will not ever attempt to change the string externally if
73 * it doesn't support a primary selection.
74 */
75
76#ifndef SDL_clipboard_h_
77#define SDL_clipboard_h_
78
79#include <SDL3/SDL_stdinc.h>
80#include <SDL3/SDL_error.h>
81
82#include <SDL3/SDL_begin_code.h>
83/* Set up for C function definitions, even when using C++ */
84#ifdef __cplusplus
85extern "C" {
86#endif
87
88/* Function prototypes */
89
90/**
91 * Put UTF-8 text into the clipboard.
92 *
93 * \param text the text to store in the clipboard.
94 * \returns true on success or false on failure; call SDL_GetError() for more
95 * information.
96 *
97 * \threadsafety This function should only be called on the main thread.
98 *
99 * \since This function is available since SDL 3.2.0.
100 *
101 * \sa SDL_GetClipboardText
102 * \sa SDL_HasClipboardText
103 */
104extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardText(const char *text);
105
106/**
107 * Get UTF-8 text from the clipboard.
108 *
109 * This function returns an empty string if there is not enough memory left
110 * for a copy of the clipboard's content.
111 *
112 * \returns the clipboard text on success or an empty string on failure; call
113 * SDL_GetError() for more information. This should be freed with
114 * SDL_free() when it is no longer needed.
115 *
116 * \threadsafety This function should only be called on the main thread.
117 *
118 * \since This function is available since SDL 3.2.0.
119 *
120 * \sa SDL_HasClipboardText
121 * \sa SDL_SetClipboardText
122 */
123extern SDL_DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
124
125/**
126 * Query whether the clipboard exists and contains a non-empty text string.
127 *
128 * \returns true if the clipboard has text, or false if it does not.
129 *
130 * \threadsafety This function should only be called on the main thread.
131 *
132 * \since This function is available since SDL 3.2.0.
133 *
134 * \sa SDL_GetClipboardText
135 * \sa SDL_SetClipboardText
136 */
137extern SDL_DECLSPEC bool SDLCALL SDL_HasClipboardText(void);
138
139/**
140 * Put UTF-8 text into the primary selection.
141 *
142 * \param text the text to store in the primary selection.
143 * \returns true on success or false on failure; call SDL_GetError() for more
144 * information.
145 *
146 * \threadsafety This function should only be called on the main thread.
147 *
148 * \since This function is available since SDL 3.2.0.
149 *
150 * \sa SDL_GetPrimarySelectionText
151 * \sa SDL_HasPrimarySelectionText
152 */
153extern SDL_DECLSPEC bool SDLCALL SDL_SetPrimarySelectionText(const char *text);
154
155/**
156 * Get UTF-8 text from the primary selection.
157 *
158 * This function returns an empty string if there is not enough memory left
159 * for a copy of the primary selection's content.
160 *
161 * \returns the primary selection text on success or an empty string on
162 * failure; call SDL_GetError() for more information. This should be
163 * freed with SDL_free() when it is no longer needed.
164 *
165 * \threadsafety This function should only be called on the main thread.
166 *
167 * \since This function is available since SDL 3.2.0.
168 *
169 * \sa SDL_HasPrimarySelectionText
170 * \sa SDL_SetPrimarySelectionText
171 */
172extern SDL_DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void);
173
174/**
175 * Query whether the primary selection exists and contains a non-empty text
176 * string.
177 *
178 * \returns true if the primary selection has text, or false if it does not.
179 *
180 * \threadsafety This function should only be called on the main thread.
181 *
182 * \since This function is available since SDL 3.2.0.
183 *
184 * \sa SDL_GetPrimarySelectionText
185 * \sa SDL_SetPrimarySelectionText
186 */
187extern SDL_DECLSPEC bool SDLCALL SDL_HasPrimarySelectionText(void);
188
189/**
190 * Callback function that will be called when data for the specified mime-type
191 * is requested by the OS.
192 *
193 * The callback function is called with NULL as the mime_type when the
194 * clipboard is cleared or new data is set. The clipboard is automatically
195 * cleared in SDL_Quit().
196 *
197 * \param userdata a pointer to the provided user data.
198 * \param mime_type the requested mime-type.
199 * \param size a pointer filled in with the length of the returned data.
200 * \returns a pointer to the data for the provided mime-type. Returning NULL
201 * or setting the length to 0 will cause no data to be sent to the
202 * "receiver". It is up to the receiver to handle this. Essentially
203 * returning no data is more or less undefined behavior and may cause
204 * breakage in receiving applications. The returned data will not be
205 * freed, so it needs to be retained and dealt with internally.
206 *
207 * \since This function is available since SDL 3.2.0.
208 *
209 * \sa SDL_SetClipboardData
210 */
211typedef const void *(SDLCALL *SDL_ClipboardDataCallback)(void *userdata, const char *mime_type, size_t *size);
212
213/**
214 * Callback function that will be called when the clipboard is cleared, or when new
215 * data is set.
216 *
217 * \param userdata a pointer to the provided user data.
218 *
219 * \since This function is available since SDL 3.2.0.
220 *
221 * \sa SDL_SetClipboardData
222 */
223typedef void (SDLCALL *SDL_ClipboardCleanupCallback)(void *userdata);
224
225/**
226 * Offer clipboard data to the OS.
227 *
228 * Tell the operating system that the application is offering clipboard data
229 * for each of the provided mime-types. Once another application requests the
230 * data the callback function will be called, allowing it to generate and
231 * respond with the data for the requested mime-type.
232 *
233 * The size of text data does not include any terminator, and the text does
234 * not need to be null-terminated (e.g., you can directly copy a portion of a
235 * document).
236 *
237 * \param callback a function pointer to the function that provides the
238 * clipboard data.
239 * \param cleanup a function pointer to the function that cleans up the
240 * clipboard data.
241 * \param userdata an opaque pointer that will be forwarded to the callbacks.
242 * \param mime_types a list of mime-types that are being offered. SDL copies the given list.
243 * \param num_mime_types the number of mime-types in the mime_types list.
244 * \returns true on success or false on failure; call SDL_GetError() for more
245 * information.
246 *
247 * \threadsafety This function should only be called on the main thread.
248 *
249 * \since This function is available since SDL 3.2.0.
250 *
251 * \sa SDL_ClearClipboardData
252 * \sa SDL_GetClipboardData
253 * \sa SDL_HasClipboardData
254 */
255extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, void *userdata, const char **mime_types, size_t num_mime_types);
256
257/**
258 * Clear the clipboard data.
259 *
260 * \returns true on success or false on failure; call SDL_GetError() for more
261 * information.
262 *
263 * \threadsafety This function should only be called on the main thread.
264 *
265 * \since This function is available since SDL 3.2.0.
266 *
267 * \sa SDL_SetClipboardData
268 */
269extern SDL_DECLSPEC bool SDLCALL SDL_ClearClipboardData(void);
270
271/**
272 * Get the data from the clipboard for a given mime type.
273 *
274 * The size of text data does not include the terminator, but the text is
275 * guaranteed to be null-terminated.
276 *
277 * \param mime_type the mime type to read from the clipboard.
278 * \param size a pointer filled in with the length of the returned data.
279 * \returns the retrieved data buffer or NULL on failure; call SDL_GetError()
280 * for more information. This should be freed with SDL_free() when it
281 * is no longer needed.
282 *
283 * \threadsafety This function should only be called on the main thread.
284 *
285 * \since This function is available since SDL 3.2.0.
286 *
287 * \sa SDL_HasClipboardData
288 * \sa SDL_SetClipboardData
289 */
290extern SDL_DECLSPEC void * SDLCALL SDL_GetClipboardData(const char *mime_type, size_t *size);
291
292/**
293 * Query whether there is data in the clipboard for the provided mime type.
294 *
295 * \param mime_type the mime type to check for data.
296 * \returns true if data exists in the clipboard for the provided mime type,
297 * false if it does not.
298 *
299 * \threadsafety This function should only be called on the main thread.
300 *
301 * \since This function is available since SDL 3.2.0.
302 *
303 * \sa SDL_SetClipboardData
304 * \sa SDL_GetClipboardData
305 */
306extern SDL_DECLSPEC bool SDLCALL SDL_HasClipboardData(const char *mime_type);
307
308/**
309 * Retrieve the list of mime types available in the clipboard.
310 *
311 * \param num_mime_types a pointer filled with the number of mime types, may
312 * be NULL.
313 * \returns a null-terminated array of strings with mime types, or NULL on
314 * failure; call SDL_GetError() for more information. This should be
315 * freed with SDL_free() when it is no longer needed.
316 *
317 * \threadsafety This function should only be called on the main thread.
318 *
319 * \since This function is available since SDL 3.2.0.
320 *
321 * \sa SDL_SetClipboardData
322 */
323extern SDL_DECLSPEC char ** SDLCALL SDL_GetClipboardMimeTypes(size_t *num_mime_types);
324
325/* Ends C function definitions when using C++ */
326#ifdef __cplusplus
327}
328#endif
329#include <SDL3/SDL_close_code.h>
330
331#endif /* SDL_clipboard_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_close_code.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_close_code.h
new file mode 100644
index 0000000..da1dea7
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_close_code.h
@@ -0,0 +1,41 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/*
23 * This file reverses the effects of SDL_begin_code.h and should be included
24 * after you finish any function and structure declarations in your headers.
25 *
26 * SDL's headers use this; applications generally should not include this
27 * header directly.
28 */
29
30#ifndef SDL_begin_code_h
31#error SDL_close_code.h included without matching SDL_begin_code.h
32#endif
33#undef SDL_begin_code_h
34
35/* Reset structure packing at previous byte alignment */
36#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
37#ifdef __BORLANDC__
38#pragma nopackwarning
39#endif
40#pragma pack(pop)
41#endif /* Compiler needs structure packing set */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_copying.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_copying.h
new file mode 100644
index 0000000..747bd35
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_copying.h
@@ -0,0 +1,22 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* Header file containing SDL's license. */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_cpuinfo.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_cpuinfo.h
new file mode 100644
index 0000000..1745bd9
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_cpuinfo.h
@@ -0,0 +1,353 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: CPUInfo */
23
24/**
25 * # CategoryCPUInfo
26 *
27 * CPU feature detection for SDL.
28 *
29 * These functions are largely concerned with reporting if the system has
30 * access to various SIMD instruction sets, but also has other important info
31 * to share, such as system RAM size and number of logical CPU cores.
32 *
33 * CPU instruction set checks, like SDL_HasSSE() and SDL_HasNEON(), are
34 * available on all platforms, even if they don't make sense (an ARM processor
35 * will never have SSE and an x86 processor will never have NEON, for example,
36 * but these functions still exist and will simply return false in these
37 * cases).
38 */
39
40#ifndef SDL_cpuinfo_h_
41#define SDL_cpuinfo_h_
42
43#include <SDL3/SDL_stdinc.h>
44
45#include <SDL3/SDL_begin_code.h>
46/* Set up for C function definitions, even when using C++ */
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51/**
52 * A guess for the cacheline size used for padding.
53 *
54 * Most x86 processors have a 64 byte cache line. The 64-bit PowerPC
55 * processors have a 128 byte cache line. We use the larger value to be
56 * generally safe.
57 *
58 * \since This macro is available since SDL 3.2.0.
59 */
60#define SDL_CACHELINE_SIZE 128
61
62/**
63 * Get the number of logical CPU cores available.
64 *
65 * \returns the total number of logical CPU cores. On CPUs that include
66 * technologies such as hyperthreading, the number of logical cores
67 * may be more than the number of physical cores.
68 *
69 * \threadsafety It is safe to call this function from any thread.
70 *
71 * \since This function is available since SDL 3.2.0.
72 */
73extern SDL_DECLSPEC int SDLCALL SDL_GetNumLogicalCPUCores(void);
74
75/**
76 * Determine the L1 cache line size of the CPU.
77 *
78 * This is useful for determining multi-threaded structure padding or SIMD
79 * prefetch sizes.
80 *
81 * \returns the L1 cache line size of the CPU, in bytes.
82 *
83 * \threadsafety It is safe to call this function from any thread.
84 *
85 * \since This function is available since SDL 3.2.0.
86 */
87extern SDL_DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
88
89/**
90 * Determine whether the CPU has AltiVec features.
91 *
92 * This always returns false on CPUs that aren't using PowerPC instruction
93 * sets.
94 *
95 * \returns true if the CPU has AltiVec features or false if not.
96 *
97 * \threadsafety It is safe to call this function from any thread.
98 *
99 * \since This function is available since SDL 3.2.0.
100 */
101extern SDL_DECLSPEC bool SDLCALL SDL_HasAltiVec(void);
102
103/**
104 * Determine whether the CPU has MMX features.
105 *
106 * This always returns false on CPUs that aren't using Intel instruction sets.
107 *
108 * \returns true if the CPU has MMX features or false if not.
109 *
110 * \threadsafety It is safe to call this function from any thread.
111 *
112 * \since This function is available since SDL 3.2.0.
113 */
114extern SDL_DECLSPEC bool SDLCALL SDL_HasMMX(void);
115
116/**
117 * Determine whether the CPU has SSE features.
118 *
119 * This always returns false on CPUs that aren't using Intel instruction sets.
120 *
121 * \returns true if the CPU has SSE features or false if not.
122 *
123 * \threadsafety It is safe to call this function from any thread.
124 *
125 * \since This function is available since SDL 3.2.0.
126 *
127 * \sa SDL_HasSSE2
128 * \sa SDL_HasSSE3
129 * \sa SDL_HasSSE41
130 * \sa SDL_HasSSE42
131 */
132extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE(void);
133
134/**
135 * Determine whether the CPU has SSE2 features.
136 *
137 * This always returns false on CPUs that aren't using Intel instruction sets.
138 *
139 * \returns true if the CPU has SSE2 features or false if not.
140 *
141 * \threadsafety It is safe to call this function from any thread.
142 *
143 * \since This function is available since SDL 3.2.0.
144 *
145 * \sa SDL_HasSSE
146 * \sa SDL_HasSSE3
147 * \sa SDL_HasSSE41
148 * \sa SDL_HasSSE42
149 */
150extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE2(void);
151
152/**
153 * Determine whether the CPU has SSE3 features.
154 *
155 * This always returns false on CPUs that aren't using Intel instruction sets.
156 *
157 * \returns true if the CPU has SSE3 features or false if not.
158 *
159 * \threadsafety It is safe to call this function from any thread.
160 *
161 * \since This function is available since SDL 3.2.0.
162 *
163 * \sa SDL_HasSSE
164 * \sa SDL_HasSSE2
165 * \sa SDL_HasSSE41
166 * \sa SDL_HasSSE42
167 */
168extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE3(void);
169
170/**
171 * Determine whether the CPU has SSE4.1 features.
172 *
173 * This always returns false on CPUs that aren't using Intel instruction sets.
174 *
175 * \returns true if the CPU has SSE4.1 features or false if not.
176 *
177 * \threadsafety It is safe to call this function from any thread.
178 *
179 * \since This function is available since SDL 3.2.0.
180 *
181 * \sa SDL_HasSSE
182 * \sa SDL_HasSSE2
183 * \sa SDL_HasSSE3
184 * \sa SDL_HasSSE42
185 */
186extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE41(void);
187
188/**
189 * Determine whether the CPU has SSE4.2 features.
190 *
191 * This always returns false on CPUs that aren't using Intel instruction sets.
192 *
193 * \returns true if the CPU has SSE4.2 features or false if not.
194 *
195 * \threadsafety It is safe to call this function from any thread.
196 *
197 * \since This function is available since SDL 3.2.0.
198 *
199 * \sa SDL_HasSSE
200 * \sa SDL_HasSSE2
201 * \sa SDL_HasSSE3
202 * \sa SDL_HasSSE41
203 */
204extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE42(void);
205
206/**
207 * Determine whether the CPU has AVX features.
208 *
209 * This always returns false on CPUs that aren't using Intel instruction sets.
210 *
211 * \returns true if the CPU has AVX features or false if not.
212 *
213 * \threadsafety It is safe to call this function from any thread.
214 *
215 * \since This function is available since SDL 3.2.0.
216 *
217 * \sa SDL_HasAVX2
218 * \sa SDL_HasAVX512F
219 */
220extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX(void);
221
222/**
223 * Determine whether the CPU has AVX2 features.
224 *
225 * This always returns false on CPUs that aren't using Intel instruction sets.
226 *
227 * \returns true if the CPU has AVX2 features or false if not.
228 *
229 * \threadsafety It is safe to call this function from any thread.
230 *
231 * \since This function is available since SDL 3.2.0.
232 *
233 * \sa SDL_HasAVX
234 * \sa SDL_HasAVX512F
235 */
236extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX2(void);
237
238/**
239 * Determine whether the CPU has AVX-512F (foundation) features.
240 *
241 * This always returns false on CPUs that aren't using Intel instruction sets.
242 *
243 * \returns true if the CPU has AVX-512F features or false if not.
244 *
245 * \threadsafety It is safe to call this function from any thread.
246 *
247 * \since This function is available since SDL 3.2.0.
248 *
249 * \sa SDL_HasAVX
250 * \sa SDL_HasAVX2
251 */
252extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX512F(void);
253
254/**
255 * Determine whether the CPU has ARM SIMD (ARMv6) features.
256 *
257 * This is different from ARM NEON, which is a different instruction set.
258 *
259 * This always returns false on CPUs that aren't using ARM instruction sets.
260 *
261 * \returns true if the CPU has ARM SIMD features or false if not.
262 *
263 * \threadsafety It is safe to call this function from any thread.
264 *
265 * \since This function is available since SDL 3.2.0.
266 *
267 * \sa SDL_HasNEON
268 */
269extern SDL_DECLSPEC bool SDLCALL SDL_HasARMSIMD(void);
270
271/**
272 * Determine whether the CPU has NEON (ARM SIMD) features.
273 *
274 * This always returns false on CPUs that aren't using ARM instruction sets.
275 *
276 * \returns true if the CPU has ARM NEON features or false if not.
277 *
278 * \threadsafety It is safe to call this function from any thread.
279 *
280 * \since This function is available since SDL 3.2.0.
281 */
282extern SDL_DECLSPEC bool SDLCALL SDL_HasNEON(void);
283
284/**
285 * Determine whether the CPU has LSX (LOONGARCH SIMD) features.
286 *
287 * This always returns false on CPUs that aren't using LOONGARCH instruction
288 * sets.
289 *
290 * \returns true if the CPU has LOONGARCH LSX features or false if not.
291 *
292 * \threadsafety It is safe to call this function from any thread.
293 *
294 * \since This function is available since SDL 3.2.0.
295 */
296extern SDL_DECLSPEC bool SDLCALL SDL_HasLSX(void);
297
298/**
299 * Determine whether the CPU has LASX (LOONGARCH SIMD) features.
300 *
301 * This always returns false on CPUs that aren't using LOONGARCH instruction
302 * sets.
303 *
304 * \returns true if the CPU has LOONGARCH LASX features or false if not.
305 *
306 * \threadsafety It is safe to call this function from any thread.
307 *
308 * \since This function is available since SDL 3.2.0.
309 */
310extern SDL_DECLSPEC bool SDLCALL SDL_HasLASX(void);
311
312/**
313 * Get the amount of RAM configured in the system.
314 *
315 * \returns the amount of RAM configured in the system in MiB.
316 *
317 * \threadsafety It is safe to call this function from any thread.
318 *
319 * \since This function is available since SDL 3.2.0.
320 */
321extern SDL_DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
322
323/**
324 * Report the alignment this system needs for SIMD allocations.
325 *
326 * This will return the minimum number of bytes to which a pointer must be
327 * aligned to be compatible with SIMD instructions on the current machine. For
328 * example, if the machine supports SSE only, it will return 16, but if it
329 * supports AVX-512F, it'll return 64 (etc). This only reports values for
330 * instruction sets SDL knows about, so if your SDL build doesn't have
331 * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
332 * not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
333 * Plan accordingly.
334 *
335 * \returns the alignment in bytes needed for available, known SIMD
336 * instructions.
337 *
338 * \threadsafety It is safe to call this function from any thread.
339 *
340 * \since This function is available since SDL 3.2.0.
341 *
342 * \sa SDL_aligned_alloc
343 * \sa SDL_aligned_free
344 */
345extern SDL_DECLSPEC size_t SDLCALL SDL_GetSIMDAlignment(void);
346
347/* Ends C function definitions when using C++ */
348#ifdef __cplusplus
349}
350#endif
351#include <SDL3/SDL_close_code.h>
352
353#endif /* SDL_cpuinfo_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_dialog.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_dialog.h
new file mode 100644
index 0000000..ddb9e24
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_dialog.h
@@ -0,0 +1,341 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryDialog
24 *
25 * File dialog support.
26 *
27 * SDL offers file dialogs, to let users select files with native GUI
28 * interfaces. There are "open" dialogs, "save" dialogs, and folder selection
29 * dialogs. The app can control some details, such as filtering to specific
30 * files, or whether multiple files can be selected by the user.
31 *
32 * Note that launching a file dialog is a non-blocking operation; control
33 * returns to the app immediately, and a callback is called later (possibly in
34 * another thread) when the user makes a choice.
35 */
36
37#ifndef SDL_dialog_h_
38#define SDL_dialog_h_
39
40#include <SDL3/SDL_stdinc.h>
41#include <SDL3/SDL_error.h>
42#include <SDL3/SDL_properties.h>
43#include <SDL3/SDL_video.h>
44
45#include <SDL3/SDL_begin_code.h>
46/* Set up for C function definitions, even when using C++ */
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51/**
52 * An entry for filters for file dialogs.
53 *
54 * `name` is a user-readable label for the filter (for example, "Office
55 * document").
56 *
57 * `pattern` is a semicolon-separated list of file extensions (for example,
58 * "doc;docx"). File extensions may only contain alphanumeric characters,
59 * hyphens, underscores and periods. Alternatively, the whole string can be a
60 * single asterisk ("*"), which serves as an "All files" filter.
61 *
62 * \since This struct is available since SDL 3.2.0.
63 *
64 * \sa SDL_DialogFileCallback
65 * \sa SDL_ShowOpenFileDialog
66 * \sa SDL_ShowSaveFileDialog
67 * \sa SDL_ShowOpenFolderDialog
68 * \sa SDL_ShowFileDialogWithProperties
69 */
70typedef struct SDL_DialogFileFilter
71{
72 const char *name;
73 const char *pattern;
74} SDL_DialogFileFilter;
75
76/**
77 * Callback used by file dialog functions.
78 *
79 * The specific usage is described in each function.
80 *
81 * If `filelist` is:
82 *
83 * - NULL, an error occurred. Details can be obtained with SDL_GetError().
84 * - A pointer to NULL, the user either didn't choose any file or canceled the
85 * dialog.
86 * - A pointer to non-`NULL`, the user chose one or more files. The argument
87 * is a null-terminated array of pointers to UTF-8 encoded strings, each
88 * containing a path.
89 *
90 * The filelist argument should not be freed; it will automatically be freed
91 * when the callback returns.
92 *
93 * The filter argument is the index of the filter that was selected, or -1 if
94 * no filter was selected or if the platform or method doesn't support
95 * fetching the selected filter.
96 *
97 * In Android, the `filelist` are `content://` URIs. They should be opened
98 * using SDL_IOFromFile() with appropriate modes. This applies both to open
99 * and save file dialog.
100 *
101 * \param userdata an app-provided pointer, for the callback's use.
102 * \param filelist the file(s) chosen by the user.
103 * \param filter index of the selected filter.
104 *
105 * \since This datatype is available since SDL 3.2.0.
106 *
107 * \sa SDL_DialogFileFilter
108 * \sa SDL_ShowOpenFileDialog
109 * \sa SDL_ShowSaveFileDialog
110 * \sa SDL_ShowOpenFolderDialog
111 * \sa SDL_ShowFileDialogWithProperties
112 */
113typedef void (SDLCALL *SDL_DialogFileCallback)(void *userdata, const char * const *filelist, int filter);
114
115/**
116 * Displays a dialog that lets the user select a file on their filesystem.
117 *
118 * This is an asynchronous function; it will return immediately, and the
119 * result will be passed to the callback.
120 *
121 * The callback will be invoked with a null-terminated list of files the user
122 * chose. The list will be empty if the user canceled the dialog, and it will
123 * be NULL if an error occurred.
124 *
125 * Note that the callback may be called from a different thread than the one
126 * the function was invoked on.
127 *
128 * Depending on the platform, the user may be allowed to input paths that
129 * don't yet exist.
130 *
131 * On Linux, dialogs may require XDG Portals, which requires DBus, which
132 * requires an event-handling loop. Apps that do not use SDL to handle events
133 * should add a call to SDL_PumpEvents in their main loop.
134 *
135 * \param callback a function pointer to be invoked when the user selects a
136 * file and accepts, or cancels the dialog, or an error
137 * occurs.
138 * \param userdata an optional pointer to pass extra data to the callback when
139 * it will be invoked.
140 * \param window the window that the dialog should be modal for, may be NULL.
141 * Not all platforms support this option.
142 * \param filters a list of filters, may be NULL. Not all platforms support
143 * this option, and platforms that do support it may allow the
144 * user to ignore the filters. If non-NULL, it must remain
145 * valid at least until the callback is invoked.
146 * \param nfilters the number of filters. Ignored if filters is NULL.
147 * \param default_location the default folder or file to start the dialog at,
148 * may be NULL. Not all platforms support this option.
149 * \param allow_many if non-zero, the user will be allowed to select multiple
150 * entries. Not all platforms support this option.
151 *
152 * \threadsafety This function should be called only from the main thread. The
153 * callback may be invoked from the same thread or from a
154 * different one, depending on the OS's constraints.
155 *
156 * \since This function is available since SDL 3.2.0.
157 *
158 * \sa SDL_DialogFileCallback
159 * \sa SDL_DialogFileFilter
160 * \sa SDL_ShowSaveFileDialog
161 * \sa SDL_ShowOpenFolderDialog
162 * \sa SDL_ShowFileDialogWithProperties
163 */
164extern SDL_DECLSPEC void SDLCALL SDL_ShowOpenFileDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, int nfilters, const char *default_location, bool allow_many);
165
166/**
167 * Displays a dialog that lets the user choose a new or existing file on their
168 * filesystem.
169 *
170 * This is an asynchronous function; it will return immediately, and the
171 * result will be passed to the callback.
172 *
173 * The callback will be invoked with a null-terminated list of files the user
174 * chose. The list will be empty if the user canceled the dialog, and it will
175 * be NULL if an error occurred.
176 *
177 * Note that the callback may be called from a different thread than the one
178 * the function was invoked on.
179 *
180 * The chosen file may or may not already exist.
181 *
182 * On Linux, dialogs may require XDG Portals, which requires DBus, which
183 * requires an event-handling loop. Apps that do not use SDL to handle events
184 * should add a call to SDL_PumpEvents in their main loop.
185 *
186 * \param callback a function pointer to be invoked when the user selects a
187 * file and accepts, or cancels the dialog, or an error
188 * occurs.
189 * \param userdata an optional pointer to pass extra data to the callback when
190 * it will be invoked.
191 * \param window the window that the dialog should be modal for, may be NULL.
192 * Not all platforms support this option.
193 * \param filters a list of filters, may be NULL. Not all platforms support
194 * this option, and platforms that do support it may allow the
195 * user to ignore the filters. If non-NULL, it must remain
196 * valid at least until the callback is invoked.
197 * \param nfilters the number of filters. Ignored if filters is NULL.
198 * \param default_location the default folder or file to start the dialog at,
199 * may be NULL. Not all platforms support this option.
200 *
201 * \threadsafety This function should be called only from the main thread. The
202 * callback may be invoked from the same thread or from a
203 * different one, depending on the OS's constraints.
204 *
205 * \since This function is available since SDL 3.2.0.
206 *
207 * \sa SDL_DialogFileCallback
208 * \sa SDL_DialogFileFilter
209 * \sa SDL_ShowOpenFileDialog
210 * \sa SDL_ShowOpenFolderDialog
211 * \sa SDL_ShowFileDialogWithProperties
212 */
213extern SDL_DECLSPEC void SDLCALL SDL_ShowSaveFileDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, int nfilters, const char *default_location);
214
215/**
216 * Displays a dialog that lets the user select a folder on their filesystem.
217 *
218 * This is an asynchronous function; it will return immediately, and the
219 * result will be passed to the callback.
220 *
221 * The callback will be invoked with a null-terminated list of files the user
222 * chose. The list will be empty if the user canceled the dialog, and it will
223 * be NULL if an error occurred.
224 *
225 * Note that the callback may be called from a different thread than the one
226 * the function was invoked on.
227 *
228 * Depending on the platform, the user may be allowed to input paths that
229 * don't yet exist.
230 *
231 * On Linux, dialogs may require XDG Portals, which requires DBus, which
232 * requires an event-handling loop. Apps that do not use SDL to handle events
233 * should add a call to SDL_PumpEvents in their main loop.
234 *
235 * \param callback a function pointer to be invoked when the user selects a
236 * file and accepts, or cancels the dialog, or an error
237 * occurs.
238 * \param userdata an optional pointer to pass extra data to the callback when
239 * it will be invoked.
240 * \param window the window that the dialog should be modal for, may be NULL.
241 * Not all platforms support this option.
242 * \param default_location the default folder or file to start the dialog at,
243 * may be NULL. Not all platforms support this option.
244 * \param allow_many if non-zero, the user will be allowed to select multiple
245 * entries. Not all platforms support this option.
246 *
247 * \threadsafety This function should be called only from the main thread. The
248 * callback may be invoked from the same thread or from a
249 * different one, depending on the OS's constraints.
250 *
251 * \since This function is available since SDL 3.2.0.
252 *
253 * \sa SDL_DialogFileCallback
254 * \sa SDL_ShowOpenFileDialog
255 * \sa SDL_ShowSaveFileDialog
256 * \sa SDL_ShowFileDialogWithProperties
257 */
258extern SDL_DECLSPEC void SDLCALL SDL_ShowOpenFolderDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const char *default_location, bool allow_many);
259
260/**
261 * Various types of file dialogs.
262 *
263 * This is used by SDL_ShowFileDialogWithProperties() to decide what kind of
264 * dialog to present to the user.
265 *
266 * \since This enum is available since SDL 3.2.0.
267 *
268 * \sa SDL_ShowFileDialogWithProperties
269 */
270typedef enum SDL_FileDialogType
271{
272 SDL_FILEDIALOG_OPENFILE,
273 SDL_FILEDIALOG_SAVEFILE,
274 SDL_FILEDIALOG_OPENFOLDER
275} SDL_FileDialogType;
276
277/**
278 * Create and launch a file dialog with the specified properties.
279 *
280 * These are the supported properties:
281 *
282 * - `SDL_PROP_FILE_DIALOG_FILTERS_POINTER`: a pointer to a list of
283 * SDL_DialogFileFilter structs, which will be used as filters for
284 * file-based selections. Ignored if the dialog is an "Open Folder" dialog.
285 * If non-NULL, the array of filters must remain valid at least until the
286 * callback is invoked.
287 * - `SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER`: the number of filters in the
288 * array of filters, if it exists.
289 * - `SDL_PROP_FILE_DIALOG_WINDOW_POINTER`: the window that the dialog should
290 * be modal for.
291 * - `SDL_PROP_FILE_DIALOG_LOCATION_STRING`: the default folder or file to
292 * start the dialog at.
293 * - `SDL_PROP_FILE_DIALOG_MANY_BOOLEAN`: true to allow the user to select
294 * more than one entry.
295 * - `SDL_PROP_FILE_DIALOG_TITLE_STRING`: the title for the dialog.
296 * - `SDL_PROP_FILE_DIALOG_ACCEPT_STRING`: the label that the accept button
297 * should have.
298 * - `SDL_PROP_FILE_DIALOG_CANCEL_STRING`: the label that the cancel button
299 * should have.
300 *
301 * Note that each platform may or may not support any of the properties.
302 *
303 * \param type the type of file dialog.
304 * \param callback a function pointer to be invoked when the user selects a
305 * file and accepts, or cancels the dialog, or an error
306 * occurs.
307 * \param userdata an optional pointer to pass extra data to the callback when
308 * it will be invoked.
309 * \param props the properties to use.
310 *
311 * \threadsafety This function should be called only from the main thread. The
312 * callback may be invoked from the same thread or from a
313 * different one, depending on the OS's constraints.
314 *
315 * \since This function is available since SDL 3.2.0.
316 *
317 * \sa SDL_FileDialogType
318 * \sa SDL_DialogFileCallback
319 * \sa SDL_DialogFileFilter
320 * \sa SDL_ShowOpenFileDialog
321 * \sa SDL_ShowSaveFileDialog
322 * \sa SDL_ShowOpenFolderDialog
323 */
324extern SDL_DECLSPEC void SDLCALL SDL_ShowFileDialogWithProperties(SDL_FileDialogType type, SDL_DialogFileCallback callback, void *userdata, SDL_PropertiesID props);
325
326#define SDL_PROP_FILE_DIALOG_FILTERS_POINTER "SDL.filedialog.filters"
327#define SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER "SDL.filedialog.nfilters"
328#define SDL_PROP_FILE_DIALOG_WINDOW_POINTER "SDL.filedialog.window"
329#define SDL_PROP_FILE_DIALOG_LOCATION_STRING "SDL.filedialog.location"
330#define SDL_PROP_FILE_DIALOG_MANY_BOOLEAN "SDL.filedialog.many"
331#define SDL_PROP_FILE_DIALOG_TITLE_STRING "SDL.filedialog.title"
332#define SDL_PROP_FILE_DIALOG_ACCEPT_STRING "SDL.filedialog.accept"
333#define SDL_PROP_FILE_DIALOG_CANCEL_STRING "SDL.filedialog.cancel"
334
335/* Ends C function definitions when using C++ */
336#ifdef __cplusplus
337}
338#endif
339#include <SDL3/SDL_close_code.h>
340
341#endif /* SDL_dialog_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_egl.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_egl.h
new file mode 100644
index 0000000..65d4e96
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_egl.h
@@ -0,0 +1,2355 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/*
23 * This is a simple file to encapsulate the EGL API headers.
24 */
25
26#include <SDL3/SDL_platform_defines.h>
27
28#if !defined(_MSC_VER) && !defined(SDL_PLATFORM_ANDROID) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
29
30#if defined(SDL_PLATFORM_VITA)
31#include <psp2/display.h>
32#include <psp2/gxm.h>
33#include <psp2/types.h>
34#endif
35
36#include <EGL/egl.h>
37#include <EGL/eglext.h>
38
39#else /* _MSC_VER */
40
41/* EGL headers for Visual Studio */
42
43#ifndef __khrplatform_h_
44#define __khrplatform_h_
45
46/*
47** Copyright (c) 2008-2018 The Khronos Group Inc.
48**
49** Permission is hereby granted, free of charge, to any person obtaining a
50** copy of this software and/or associated documentation files (the
51** "Materials"), to deal in the Materials without restriction, including
52** without limitation the rights to use, copy, modify, merge, publish,
53** distribute, sublicense, and/or sell copies of the Materials, and to
54** permit persons to whom the Materials are furnished to do so, subject to
55** the following conditions:
56**
57** The above copyright notice and this permission notice shall be included
58** in all copies or substantial portions of the Materials.
59**
60** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
61** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
62** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
63** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
64** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
65** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
66** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
67*/
68
69/* Khronos platform-specific types and definitions.
70 *
71 * The master copy of khrplatform.h is maintained in the Khronos EGL
72 * Registry repository at https://github.com/KhronosGroup/EGL-Registry
73 * The last semantic modification to khrplatform.h was at commit ID:
74 * 67a3e0864c2d75ea5287b9f3d2eb74a745936692
75 *
76 * Adopters may modify this file to suit their platform. Adopters are
77 * encouraged to submit platform specific modifications to the Khronos
78 * group so that they can be included in future versions of this file.
79 * Please submit changes by filing pull requests or issues on
80 * the EGL Registry repository linked above.
81 *
82 *
83 * See the Implementer's Guidelines for information about where this file
84 * should be located on your system and for more details of its use:
85 * http://www.khronos.org/registry/implementers_guide.pdf
86 *
87 * This file should be included as
88 * #include <KHR/khrplatform.h>
89 * by Khronos client API header files that use its types and defines.
90 *
91 * The types in khrplatform.h should only be used to define API-specific types.
92 *
93 * Types defined in khrplatform.h:
94 * khronos_int8_t signed 8 bit
95 * khronos_uint8_t unsigned 8 bit
96 * khronos_int16_t signed 16 bit
97 * khronos_uint16_t unsigned 16 bit
98 * khronos_int32_t signed 32 bit
99 * khronos_uint32_t unsigned 32 bit
100 * khronos_int64_t signed 64 bit
101 * khronos_uint64_t unsigned 64 bit
102 * khronos_intptr_t signed same number of bits as a pointer
103 * khronos_uintptr_t unsigned same number of bits as a pointer
104 * khronos_ssize_t signed size
105 * khronos_usize_t unsigned size
106 * khronos_float_t signed 32 bit floating point
107 * khronos_time_ns_t unsigned 64 bit time in nanoseconds
108 * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
109 * nanoseconds
110 * khronos_stime_nanoseconds_t signed time interval in nanoseconds
111 * khronos_boolean_enum_t enumerated boolean type. This should
112 * only be used as a base type when a client API's boolean type is
113 * an enum. Client APIs which use an integer or other type for
114 * booleans cannot use this as the base type for their boolean.
115 *
116 * Tokens defined in khrplatform.h:
117 *
118 * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
119 *
120 * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
121 * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
122 *
123 * Calling convention macros defined in this file:
124 * KHRONOS_APICALL
125 * KHRONOS_APIENTRY
126 * KHRONOS_APIATTRIBUTES
127 *
128 * These may be used in function prototypes as:
129 *
130 * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
131 * int arg1,
132 * int arg2) KHRONOS_APIATTRIBUTES;
133 */
134
135#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
136# define KHRONOS_STATIC 1
137#endif
138
139/*-------------------------------------------------------------------------
140 * Definition of KHRONOS_APICALL
141 *-------------------------------------------------------------------------
142 * This precedes the return type of the function in the function prototype.
143 */
144#if defined(KHRONOS_STATIC)
145 /* If the preprocessor constant KHRONOS_STATIC is defined, make the
146 * header compatible with static linking. */
147# define KHRONOS_APICALL
148#elif defined(_WIN32)
149# define KHRONOS_APICALL __declspec(dllimport)
150#elif defined (__SYMBIAN32__)
151# define KHRONOS_APICALL IMPORT_C
152#elif defined(__ANDROID__)
153# define KHRONOS_APICALL __attribute__((visibility("default")))
154#else
155# define KHRONOS_APICALL
156#endif
157
158/*-------------------------------------------------------------------------
159 * Definition of KHRONOS_APIENTRY
160 *-------------------------------------------------------------------------
161 * This follows the return type of the function and precedes the function
162 * name in the function prototype.
163 */
164#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
165 /* Win32 but not WinCE */
166# define KHRONOS_APIENTRY __stdcall
167#else
168# define KHRONOS_APIENTRY
169#endif
170
171/*-------------------------------------------------------------------------
172 * Definition of KHRONOS_APIATTRIBUTES
173 *-------------------------------------------------------------------------
174 * This follows the closing parenthesis of the function prototype arguments.
175 */
176#if defined (__ARMCC_2__)
177#define KHRONOS_APIATTRIBUTES __softfp
178#else
179#define KHRONOS_APIATTRIBUTES
180#endif
181
182/*-------------------------------------------------------------------------
183 * basic type definitions
184 *-----------------------------------------------------------------------*/
185#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
186
187
188/*
189 * Using <stdint.h>
190 */
191#include <stdint.h>
192typedef int32_t khronos_int32_t;
193typedef uint32_t khronos_uint32_t;
194typedef int64_t khronos_int64_t;
195typedef uint64_t khronos_uint64_t;
196#define KHRONOS_SUPPORT_INT64 1
197#define KHRONOS_SUPPORT_FLOAT 1
198/*
199 * To support platform where unsigned long cannot be used interchangeably with
200 * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
201 * Ideally, we could just use (u)intptr_t everywhere, but this could result in
202 * ABI breakage if khronos_uintptr_t is changed from unsigned long to
203 * unsigned long long or similar (this results in different C++ name mangling).
204 * To avoid changes for existing platforms, we restrict usage of intptr_t to
205 * platforms where the size of a pointer is larger than the size of long.
206 */
207#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
208#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
209#define KHRONOS_USE_INTPTR_T
210#endif
211#endif
212
213#elif defined(__VMS ) || defined(__sgi)
214
215/*
216 * Using <inttypes.h>
217 */
218#include <inttypes.h>
219typedef int32_t khronos_int32_t;
220typedef uint32_t khronos_uint32_t;
221typedef int64_t khronos_int64_t;
222typedef uint64_t khronos_uint64_t;
223#define KHRONOS_SUPPORT_INT64 1
224#define KHRONOS_SUPPORT_FLOAT 1
225
226#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
227
228/*
229 * Win32
230 */
231typedef __int32 khronos_int32_t;
232typedef unsigned __int32 khronos_uint32_t;
233typedef __int64 khronos_int64_t;
234typedef unsigned __int64 khronos_uint64_t;
235#define KHRONOS_SUPPORT_INT64 1
236#define KHRONOS_SUPPORT_FLOAT 1
237
238#elif defined(__sun__) || defined(__digital__)
239
240/*
241 * Sun or Digital
242 */
243typedef int khronos_int32_t;
244typedef unsigned int khronos_uint32_t;
245#if defined(__arch64__) || defined(_LP64)
246typedef long int khronos_int64_t;
247typedef unsigned long int khronos_uint64_t;
248#else
249typedef long long int khronos_int64_t;
250typedef unsigned long long int khronos_uint64_t;
251#endif /* __arch64__ */
252#define KHRONOS_SUPPORT_INT64 1
253#define KHRONOS_SUPPORT_FLOAT 1
254
255#elif 0
256
257/*
258 * Hypothetical platform with no float or int64 support
259 */
260typedef int khronos_int32_t;
261typedef unsigned int khronos_uint32_t;
262#define KHRONOS_SUPPORT_INT64 0
263#define KHRONOS_SUPPORT_FLOAT 0
264
265#else
266
267/*
268 * Generic fallback
269 */
270#include <stdint.h>
271typedef int32_t khronos_int32_t;
272typedef uint32_t khronos_uint32_t;
273typedef int64_t khronos_int64_t;
274typedef uint64_t khronos_uint64_t;
275#define KHRONOS_SUPPORT_INT64 1
276#define KHRONOS_SUPPORT_FLOAT 1
277
278#endif
279
280
281/*
282 * Types that are (so far) the same on all platforms
283 */
284typedef signed char khronos_int8_t;
285typedef unsigned char khronos_uint8_t;
286typedef signed short int khronos_int16_t;
287typedef unsigned short int khronos_uint16_t;
288
289/*
290 * Types that differ between LLP64 and LP64 architectures - in LLP64,
291 * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
292 * to be the only LLP64 architecture in current use.
293 */
294#ifdef KHRONOS_USE_INTPTR_T
295typedef intptr_t khronos_intptr_t;
296typedef uintptr_t khronos_uintptr_t;
297#elif defined(_WIN64)
298typedef signed long long int khronos_intptr_t;
299typedef unsigned long long int khronos_uintptr_t;
300#else
301typedef signed long int khronos_intptr_t;
302typedef unsigned long int khronos_uintptr_t;
303#endif
304
305#if defined(_WIN64)
306typedef signed long long int khronos_ssize_t;
307typedef unsigned long long int khronos_usize_t;
308#else
309typedef signed long int khronos_ssize_t;
310typedef unsigned long int khronos_usize_t;
311#endif
312
313#if KHRONOS_SUPPORT_FLOAT
314/*
315 * Float type
316 */
317typedef float khronos_float_t;
318#endif
319
320#if KHRONOS_SUPPORT_INT64
321/* Time types
322 *
323 * These types can be used to represent a time interval in nanoseconds or
324 * an absolute Unadjusted System Time. Unadjusted System Time is the number
325 * of nanoseconds since some arbitrary system event (e.g. since the last
326 * time the system booted). The Unadjusted System Time is an unsigned
327 * 64 bit value that wraps back to 0 every 584 years. Time intervals
328 * may be either signed or unsigned.
329 */
330typedef khronos_uint64_t khronos_utime_nanoseconds_t;
331typedef khronos_int64_t khronos_stime_nanoseconds_t;
332#endif
333
334/*
335 * Dummy value used to pad enum types to 32 bits.
336 */
337#ifndef KHRONOS_MAX_ENUM
338#define KHRONOS_MAX_ENUM 0x7FFFFFFF
339#endif
340
341/*
342 * Enumerated boolean type
343 *
344 * Values other than zero should be considered to be true. Therefore
345 * comparisons should not be made against KHRONOS_TRUE.
346 */
347typedef enum {
348 KHRONOS_FALSE = 0,
349 KHRONOS_TRUE = 1,
350 KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
351} khronos_boolean_enum_t;
352
353#endif /* __khrplatform_h_ */
354
355
356#ifndef __eglplatform_h_
357#define __eglplatform_h_
358
359/*
360** Copyright 2007-2020 The Khronos Group Inc.
361** SPDX-License-Identifier: Apache-2.0
362*/
363
364/* Platform-specific types and definitions for egl.h
365 *
366 * Adopters may modify khrplatform.h and this file to suit their platform.
367 * You are encouraged to submit all modifications to the Khronos group so that
368 * they can be included in future versions of this file. Please submit changes
369 * by filing an issue or pull request on the public Khronos EGL Registry, at
370 * https://www.github.com/KhronosGroup/EGL-Registry/
371 */
372
373/*#include <KHR/khrplatform.h>*/
374
375/* Macros used in EGL function prototype declarations.
376 *
377 * EGL functions should be prototyped as:
378 *
379 * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
380 * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
381 *
382 * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
383 */
384
385#ifndef EGLAPI
386#define EGLAPI KHRONOS_APICALL
387#endif
388
389#ifndef EGLAPIENTRY
390#define EGLAPIENTRY KHRONOS_APIENTRY
391#endif
392#define EGLAPIENTRYP EGLAPIENTRY*
393
394/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
395 * are aliases of window-system-dependent types, such as X Display * or
396 * Windows Device Context. They must be defined in platform-specific
397 * code below. The EGL-prefixed versions of Native*Type are the same
398 * types, renamed in EGL 1.3 so all types in the API start with "EGL".
399 *
400 * Khronos STRONGLY RECOMMENDS that you use the default definitions
401 * provided below, since these changes affect both binary and source
402 * portability of applications using EGL running on different EGL
403 * implementations.
404 */
405
406#if defined(EGL_NO_PLATFORM_SPECIFIC_TYPES)
407
408typedef void *EGLNativeDisplayType;
409typedef void *EGLNativePixmapType;
410typedef void *EGLNativeWindowType;
411
412#elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
413#ifndef WIN32_LEAN_AND_MEAN
414#define WIN32_LEAN_AND_MEAN 1
415#endif
416#include <windows.h>
417
418typedef HDC EGLNativeDisplayType;
419typedef HBITMAP EGLNativePixmapType;
420typedef HWND EGLNativeWindowType;
421
422#elif defined(SDL_PLATFORM_EMSCRIPTEN)
423
424typedef int EGLNativeDisplayType;
425typedef int EGLNativePixmapType;
426typedef int EGLNativeWindowType;
427
428#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
429
430typedef int EGLNativeDisplayType;
431typedef void *EGLNativePixmapType;
432typedef void *EGLNativeWindowType;
433
434#elif defined(WL_EGL_PLATFORM)
435
436typedef struct wl_display *EGLNativeDisplayType;
437typedef struct wl_egl_pixmap *EGLNativePixmapType;
438typedef struct wl_egl_window *EGLNativeWindowType;
439
440#elif defined(__GBM__)
441
442typedef struct gbm_device *EGLNativeDisplayType;
443typedef struct gbm_bo *EGLNativePixmapType;
444typedef void *EGLNativeWindowType;
445
446#elif defined(__ANDROID__) || defined(ANDROID)
447
448struct ANativeWindow;
449struct egl_native_pixmap_t;
450
451typedef void* EGLNativeDisplayType;
452typedef struct egl_native_pixmap_t* EGLNativePixmapType;
453typedef struct ANativeWindow* EGLNativeWindowType;
454
455#elif defined(USE_OZONE)
456
457typedef intptr_t EGLNativeDisplayType;
458typedef intptr_t EGLNativePixmapType;
459typedef intptr_t EGLNativeWindowType;
460
461#elif defined(USE_X11)
462
463/* X11 (tentative) */
464#include <X11/Xlib.h>
465#include <X11/Xutil.h>
466
467typedef Display *EGLNativeDisplayType;
468typedef Pixmap EGLNativePixmapType;
469typedef Window EGLNativeWindowType;
470
471#elif defined(__unix__)
472
473typedef void *EGLNativeDisplayType;
474typedef khronos_uintptr_t EGLNativePixmapType;
475typedef khronos_uintptr_t EGLNativeWindowType;
476
477#elif defined(__APPLE__)
478
479typedef int EGLNativeDisplayType;
480typedef void *EGLNativePixmapType;
481typedef void *EGLNativeWindowType;
482
483#elif defined(__HAIKU__)
484
485#include <kernel/image.h>
486
487typedef void *EGLNativeDisplayType;
488typedef khronos_uintptr_t EGLNativePixmapType;
489typedef khronos_uintptr_t EGLNativeWindowType;
490
491#elif defined(__Fuchsia__)
492
493typedef void *EGLNativeDisplayType;
494typedef khronos_uintptr_t EGLNativePixmapType;
495typedef khronos_uintptr_t EGLNativeWindowType;
496
497#else
498#error "Platform not recognized"
499#endif
500
501/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
502typedef EGLNativeDisplayType NativeDisplayType;
503typedef EGLNativePixmapType NativePixmapType;
504typedef EGLNativeWindowType NativeWindowType;
505
506
507/* Define EGLint. This must be a signed integral type large enough to contain
508 * all legal attribute names and values passed into and out of EGL, whether
509 * their type is boolean, bitmask, enumerant (symbolic constant), integer,
510 * handle, or other. While in general a 32-bit integer will suffice, if
511 * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
512 * integer type.
513 */
514typedef khronos_int32_t EGLint;
515
516
517/* C++ / C typecast macros for special EGL handle values */
518#if defined(__cplusplus)
519#define EGL_CAST(type, value) (static_cast<type>(value))
520#else
521#define EGL_CAST(type, value) ((type) (value))
522#endif
523
524#endif /* __eglplatform_h */
525
526
527#ifndef __egl_h_
528#define __egl_h_ 1
529
530#ifdef __cplusplus
531extern "C" {
532#endif
533
534/*
535** Copyright 2013-2020 The Khronos Group Inc.
536** SPDX-License-Identifier: Apache-2.0
537**
538** This header is generated from the Khronos EGL XML API Registry.
539** The current version of the Registry, generator scripts
540** used to make the header, and the header can be found at
541** http://www.khronos.org/registry/egl
542**
543** Khronos $Git commit SHA1: 6fb1daea15 $ on $Git commit date: 2022-05-25 09:41:13 -0600 $
544*/
545
546/*#include <EGL/eglplatform.h>*/
547
548#ifndef EGL_EGL_PROTOTYPES
549#define EGL_EGL_PROTOTYPES 1
550#endif
551
552/* Generated on date 20220525 */
553
554/* Generated C header for:
555 * API: egl
556 * Versions considered: .*
557 * Versions emitted: .*
558 * Default extensions included: None
559 * Additional extensions included: _nomatch_^
560 * Extensions removed: _nomatch_^
561 */
562
563#ifndef EGL_VERSION_1_0
564#define EGL_VERSION_1_0 1
565typedef unsigned int EGLBoolean;
566typedef void *EGLDisplay;
567/*#include <KHR/khrplatform.h>*/
568/*#include <EGL/eglplatform.h>*/
569typedef void *EGLConfig;
570typedef void *EGLSurface;
571typedef void *EGLContext;
572typedef void (*__eglMustCastToProperFunctionPointerType)(void);
573#define EGL_ALPHA_SIZE 0x3021
574#define EGL_BAD_ACCESS 0x3002
575#define EGL_BAD_ALLOC 0x3003
576#define EGL_BAD_ATTRIBUTE 0x3004
577#define EGL_BAD_CONFIG 0x3005
578#define EGL_BAD_CONTEXT 0x3006
579#define EGL_BAD_CURRENT_SURFACE 0x3007
580#define EGL_BAD_DISPLAY 0x3008
581#define EGL_BAD_MATCH 0x3009
582#define EGL_BAD_NATIVE_PIXMAP 0x300A
583#define EGL_BAD_NATIVE_WINDOW 0x300B
584#define EGL_BAD_PARAMETER 0x300C
585#define EGL_BAD_SURFACE 0x300D
586#define EGL_BLUE_SIZE 0x3022
587#define EGL_BUFFER_SIZE 0x3020
588#define EGL_CONFIG_CAVEAT 0x3027
589#define EGL_CONFIG_ID 0x3028
590#define EGL_CORE_NATIVE_ENGINE 0x305B
591#define EGL_DEPTH_SIZE 0x3025
592#define EGL_DONT_CARE EGL_CAST(EGLint,-1)
593#define EGL_DRAW 0x3059
594#define EGL_EXTENSIONS 0x3055
595#define EGL_FALSE 0
596#define EGL_GREEN_SIZE 0x3023
597#define EGL_HEIGHT 0x3056
598#define EGL_LARGEST_PBUFFER 0x3058
599#define EGL_LEVEL 0x3029
600#define EGL_MAX_PBUFFER_HEIGHT 0x302A
601#define EGL_MAX_PBUFFER_PIXELS 0x302B
602#define EGL_MAX_PBUFFER_WIDTH 0x302C
603#define EGL_NATIVE_RENDERABLE 0x302D
604#define EGL_NATIVE_VISUAL_ID 0x302E
605#define EGL_NATIVE_VISUAL_TYPE 0x302F
606#define EGL_NONE 0x3038
607#define EGL_NON_CONFORMANT_CONFIG 0x3051
608#define EGL_NOT_INITIALIZED 0x3001
609#define EGL_NO_CONTEXT EGL_CAST(EGLContext,0)
610#define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
611#define EGL_NO_SURFACE EGL_CAST(EGLSurface,0)
612#define EGL_PBUFFER_BIT 0x0001
613#define EGL_PIXMAP_BIT 0x0002
614#define EGL_READ 0x305A
615#define EGL_RED_SIZE 0x3024
616#define EGL_SAMPLES 0x3031
617#define EGL_SAMPLE_BUFFERS 0x3032
618#define EGL_SLOW_CONFIG 0x3050
619#define EGL_STENCIL_SIZE 0x3026
620#define EGL_SUCCESS 0x3000
621#define EGL_SURFACE_TYPE 0x3033
622#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
623#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
624#define EGL_TRANSPARENT_RED_VALUE 0x3037
625#define EGL_TRANSPARENT_RGB 0x3052
626#define EGL_TRANSPARENT_TYPE 0x3034
627#define EGL_TRUE 1
628#define EGL_VENDOR 0x3053
629#define EGL_VERSION 0x3054
630#define EGL_WIDTH 0x3057
631#define EGL_WINDOW_BIT 0x0004
632typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSECONFIGPROC) (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
633typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
634typedef EGLContext (EGLAPIENTRYP PFNEGLCREATECONTEXTPROC) (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
635typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPBUFFERSURFACEPROC) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
636typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
637typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
638typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYCONTEXTPROC) (EGLDisplay dpy, EGLContext ctx);
639typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSURFACEPROC) (EGLDisplay dpy, EGLSurface surface);
640typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCONFIGATTRIBPROC) (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
641typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCONFIGSPROC) (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
642typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETCURRENTDISPLAYPROC) (void);
643typedef EGLSurface (EGLAPIENTRYP PFNEGLGETCURRENTSURFACEPROC) (EGLint readdraw);
644typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDISPLAYPROC) (EGLNativeDisplayType display_id);
645typedef EGLint (EGLAPIENTRYP PFNEGLGETERRORPROC) (void);
646typedef __eglMustCastToProperFunctionPointerType (EGLAPIENTRYP PFNEGLGETPROCADDRESSPROC) (const char *procname);
647typedef EGLBoolean (EGLAPIENTRYP PFNEGLINITIALIZEPROC) (EGLDisplay dpy, EGLint *major, EGLint *minor);
648typedef EGLBoolean (EGLAPIENTRYP PFNEGLMAKECURRENTPROC) (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
649typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYCONTEXTPROC) (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
650typedef const char *(EGLAPIENTRYP PFNEGLQUERYSTRINGPROC) (EGLDisplay dpy, EGLint name);
651typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
652typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface);
653typedef EGLBoolean (EGLAPIENTRYP PFNEGLTERMINATEPROC) (EGLDisplay dpy);
654typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITGLPROC) (void);
655typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITNATIVEPROC) (EGLint engine);
656#if EGL_EGL_PROTOTYPES
657EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
658EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
659EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
660EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
661EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
662EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
663EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
664EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
665EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
666EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
667EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void);
668EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw);
669EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id);
670EGLAPI EGLint EGLAPIENTRY eglGetError (void);
671EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname);
672EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
673EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
674EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
675EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
676EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
677EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface);
678EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);
679EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);
680EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
681#endif
682#endif /* EGL_VERSION_1_0 */
683
684#ifndef EGL_VERSION_1_1
685#define EGL_VERSION_1_1 1
686#define EGL_BACK_BUFFER 0x3084
687#define EGL_BIND_TO_TEXTURE_RGB 0x3039
688#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
689#define EGL_CONTEXT_LOST 0x300E
690#define EGL_MIN_SWAP_INTERVAL 0x303B
691#define EGL_MAX_SWAP_INTERVAL 0x303C
692#define EGL_MIPMAP_TEXTURE 0x3082
693#define EGL_MIPMAP_LEVEL 0x3083
694#define EGL_NO_TEXTURE 0x305C
695#define EGL_TEXTURE_2D 0x305F
696#define EGL_TEXTURE_FORMAT 0x3080
697#define EGL_TEXTURE_RGB 0x305D
698#define EGL_TEXTURE_RGBA 0x305E
699#define EGL_TEXTURE_TARGET 0x3081
700typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDTEXIMAGEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
701typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASETEXIMAGEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
702typedef EGLBoolean (EGLAPIENTRYP PFNEGLSURFACEATTRIBPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
703typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPINTERVALPROC) (EGLDisplay dpy, EGLint interval);
704#if EGL_EGL_PROTOTYPES
705EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
706EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
707EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
708EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);
709#endif
710#endif /* EGL_VERSION_1_1 */
711
712#ifndef EGL_VERSION_1_2
713#define EGL_VERSION_1_2 1
714typedef unsigned int EGLenum;
715typedef void *EGLClientBuffer;
716#define EGL_ALPHA_FORMAT 0x3088
717#define EGL_ALPHA_FORMAT_NONPRE 0x308B
718#define EGL_ALPHA_FORMAT_PRE 0x308C
719#define EGL_ALPHA_MASK_SIZE 0x303E
720#define EGL_BUFFER_PRESERVED 0x3094
721#define EGL_BUFFER_DESTROYED 0x3095
722#define EGL_CLIENT_APIS 0x308D
723#define EGL_COLORSPACE 0x3087
724#define EGL_COLORSPACE_sRGB 0x3089
725#define EGL_COLORSPACE_LINEAR 0x308A
726#define EGL_COLOR_BUFFER_TYPE 0x303F
727#define EGL_CONTEXT_CLIENT_TYPE 0x3097
728#define EGL_DISPLAY_SCALING 10000
729#define EGL_HORIZONTAL_RESOLUTION 0x3090
730#define EGL_LUMINANCE_BUFFER 0x308F
731#define EGL_LUMINANCE_SIZE 0x303D
732#define EGL_OPENGL_ES_BIT 0x0001
733#define EGL_OPENVG_BIT 0x0002
734#define EGL_OPENGL_ES_API 0x30A0
735#define EGL_OPENVG_API 0x30A1
736#define EGL_OPENVG_IMAGE 0x3096
737#define EGL_PIXEL_ASPECT_RATIO 0x3092
738#define EGL_RENDERABLE_TYPE 0x3040
739#define EGL_RENDER_BUFFER 0x3086
740#define EGL_RGB_BUFFER 0x308E
741#define EGL_SINGLE_BUFFER 0x3085
742#define EGL_SWAP_BEHAVIOR 0x3093
743#define EGL_UNKNOWN EGL_CAST(EGLint,-1)
744#define EGL_VERTICAL_RESOLUTION 0x3091
745typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDAPIPROC) (EGLenum api);
746typedef EGLenum (EGLAPIENTRYP PFNEGLQUERYAPIPROC) (void);
747typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC) (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
748typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASETHREADPROC) (void);
749typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITCLIENTPROC) (void);
750#if EGL_EGL_PROTOTYPES
751EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);
752EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);
753EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
754EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);
755EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
756#endif
757#endif /* EGL_VERSION_1_2 */
758
759#ifndef EGL_VERSION_1_3
760#define EGL_VERSION_1_3 1
761#define EGL_CONFORMANT 0x3042
762#define EGL_CONTEXT_CLIENT_VERSION 0x3098
763#define EGL_MATCH_NATIVE_PIXMAP 0x3041
764#define EGL_OPENGL_ES2_BIT 0x0004
765#define EGL_VG_ALPHA_FORMAT 0x3088
766#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B
767#define EGL_VG_ALPHA_FORMAT_PRE 0x308C
768#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040
769#define EGL_VG_COLORSPACE 0x3087
770#define EGL_VG_COLORSPACE_sRGB 0x3089
771#define EGL_VG_COLORSPACE_LINEAR 0x308A
772#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020
773#endif /* EGL_VERSION_1_3 */
774
775#ifndef EGL_VERSION_1_4
776#define EGL_VERSION_1_4 1
777#define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType,0)
778#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200
779#define EGL_MULTISAMPLE_RESOLVE 0x3099
780#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A
781#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B
782#define EGL_OPENGL_API 0x30A2
783#define EGL_OPENGL_BIT 0x0008
784#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
785typedef EGLContext (EGLAPIENTRYP PFNEGLGETCURRENTCONTEXTPROC) (void);
786#if EGL_EGL_PROTOTYPES
787EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);
788#endif
789#endif /* EGL_VERSION_1_4 */
790
791#ifndef EGL_VERSION_1_5
792#define EGL_VERSION_1_5 1
793typedef void *EGLSync;
794typedef intptr_t EGLAttrib;
795typedef khronos_utime_nanoseconds_t EGLTime;
796typedef void *EGLImage;
797#define EGL_CONTEXT_MAJOR_VERSION 0x3098
798#define EGL_CONTEXT_MINOR_VERSION 0x30FB
799#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
800#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
801#define EGL_NO_RESET_NOTIFICATION 0x31BE
802#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF
803#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
804#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
805#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0
806#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
807#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
808#define EGL_OPENGL_ES3_BIT 0x00000040
809#define EGL_CL_EVENT_HANDLE 0x309C
810#define EGL_SYNC_CL_EVENT 0x30FE
811#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF
812#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0
813#define EGL_SYNC_TYPE 0x30F7
814#define EGL_SYNC_STATUS 0x30F1
815#define EGL_SYNC_CONDITION 0x30F8
816#define EGL_SIGNALED 0x30F2
817#define EGL_UNSIGNALED 0x30F3
818#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001
819#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull
820#define EGL_TIMEOUT_EXPIRED 0x30F5
821#define EGL_CONDITION_SATISFIED 0x30F6
822#define EGL_NO_SYNC EGL_CAST(EGLSync,0)
823#define EGL_SYNC_FENCE 0x30F9
824#define EGL_GL_COLORSPACE 0x309D
825#define EGL_GL_COLORSPACE_SRGB 0x3089
826#define EGL_GL_COLORSPACE_LINEAR 0x308A
827#define EGL_GL_RENDERBUFFER 0x30B9
828#define EGL_GL_TEXTURE_2D 0x30B1
829#define EGL_GL_TEXTURE_LEVEL 0x30BC
830#define EGL_GL_TEXTURE_3D 0x30B2
831#define EGL_GL_TEXTURE_ZOFFSET 0x30BD
832#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
833#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
834#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
835#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
836#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
837#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
838#define EGL_IMAGE_PRESERVED 0x30D2
839#define EGL_NO_IMAGE EGL_CAST(EGLImage,0)
840typedef EGLSync (EGLAPIENTRYP PFNEGLCREATESYNCPROC) (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
841typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCPROC) (EGLDisplay dpy, EGLSync sync);
842typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCPROC) (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
843typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBPROC) (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
844typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
845typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC) (EGLDisplay dpy, EGLImage image);
846typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYPROC) (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
847typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
848typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
849typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITSYNCPROC) (EGLDisplay dpy, EGLSync sync, EGLint flags);
850#if EGL_EGL_PROTOTYPES
851EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
852EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);
853EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
854EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
855EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
856EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image);
857EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
858EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
859EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
860EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);
861#endif
862#endif /* EGL_VERSION_1_5 */
863
864#ifdef __cplusplus
865}
866#endif
867
868#endif /* __egl_h_ */
869
870
871#ifndef __eglext_h_
872#define __eglext_h_ 1
873
874#ifdef __cplusplus
875extern "C" {
876#endif
877
878/*
879** Copyright 2013-2020 The Khronos Group Inc.
880** SPDX-License-Identifier: Apache-2.0
881**
882** This header is generated from the Khronos EGL XML API Registry.
883** The current version of the Registry, generator scripts
884** used to make the header, and the header can be found at
885** http://www.khronos.org/registry/egl
886**
887** Khronos $Git commit SHA1: 6fb1daea15 $ on $Git commit date: 2022-05-25 09:41:13 -0600 $
888*/
889
890/*#include <EGL/eglplatform.h>*/
891
892#define EGL_EGLEXT_VERSION 20220525
893
894/* Generated C header for:
895 * API: egl
896 * Versions considered: .*
897 * Versions emitted: _nomatch_^
898 * Default extensions included: egl
899 * Additional extensions included: _nomatch_^
900 * Extensions removed: _nomatch_^
901 */
902
903#ifndef EGL_KHR_cl_event
904#define EGL_KHR_cl_event 1
905#define EGL_CL_EVENT_HANDLE_KHR 0x309C
906#define EGL_SYNC_CL_EVENT_KHR 0x30FE
907#define EGL_SYNC_CL_EVENT_COMPLETE_KHR 0x30FF
908#endif /* EGL_KHR_cl_event */
909
910#ifndef EGL_KHR_cl_event2
911#define EGL_KHR_cl_event2 1
912typedef void *EGLSyncKHR;
913typedef intptr_t EGLAttribKHR;
914typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
915#ifdef EGL_EGLEXT_PROTOTYPES
916EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
917#endif
918#endif /* EGL_KHR_cl_event2 */
919
920#ifndef EGL_KHR_client_get_all_proc_addresses
921#define EGL_KHR_client_get_all_proc_addresses 1
922#endif /* EGL_KHR_client_get_all_proc_addresses */
923
924#ifndef EGL_KHR_config_attribs
925#define EGL_KHR_config_attribs 1
926#define EGL_CONFORMANT_KHR 0x3042
927#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020
928#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040
929#endif /* EGL_KHR_config_attribs */
930
931#ifndef EGL_KHR_context_flush_control
932#define EGL_KHR_context_flush_control 1
933#define EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR 0
934#define EGL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x2097
935#define EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x2098
936#endif /* EGL_KHR_context_flush_control */
937
938#ifndef EGL_KHR_create_context
939#define EGL_KHR_create_context 1
940#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098
941#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
942#define EGL_CONTEXT_FLAGS_KHR 0x30FC
943#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
944#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
945#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE
946#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF
947#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
948#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
949#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
950#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
951#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
952#define EGL_OPENGL_ES3_BIT_KHR 0x00000040
953#endif /* EGL_KHR_create_context */
954
955#ifndef EGL_KHR_create_context_no_error
956#define EGL_KHR_create_context_no_error 1
957#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31B3
958#endif /* EGL_KHR_create_context_no_error */
959
960#ifndef EGL_KHR_debug
961#define EGL_KHR_debug 1
962typedef void *EGLLabelKHR;
963typedef void *EGLObjectKHR;
964typedef void (EGLAPIENTRY *EGLDEBUGPROCKHR)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message);
965#define EGL_OBJECT_THREAD_KHR 0x33B0
966#define EGL_OBJECT_DISPLAY_KHR 0x33B1
967#define EGL_OBJECT_CONTEXT_KHR 0x33B2
968#define EGL_OBJECT_SURFACE_KHR 0x33B3
969#define EGL_OBJECT_IMAGE_KHR 0x33B4
970#define EGL_OBJECT_SYNC_KHR 0x33B5
971#define EGL_OBJECT_STREAM_KHR 0x33B6
972#define EGL_DEBUG_MSG_CRITICAL_KHR 0x33B9
973#define EGL_DEBUG_MSG_ERROR_KHR 0x33BA
974#define EGL_DEBUG_MSG_WARN_KHR 0x33BB
975#define EGL_DEBUG_MSG_INFO_KHR 0x33BC
976#define EGL_DEBUG_CALLBACK_KHR 0x33B8
977typedef EGLint (EGLAPIENTRYP PFNEGLDEBUGMESSAGECONTROLKHRPROC) (EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list);
978typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEBUGKHRPROC) (EGLint attribute, EGLAttrib *value);
979typedef EGLint (EGLAPIENTRYP PFNEGLLABELOBJECTKHRPROC) (EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label);
980#ifdef EGL_EGLEXT_PROTOTYPES
981EGLAPI EGLint EGLAPIENTRY eglDebugMessageControlKHR (EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list);
982EGLAPI EGLBoolean EGLAPIENTRY eglQueryDebugKHR (EGLint attribute, EGLAttrib *value);
983EGLAPI EGLint EGLAPIENTRY eglLabelObjectKHR (EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label);
984#endif
985#endif /* EGL_KHR_debug */
986
987#ifndef EGL_KHR_display_reference
988#define EGL_KHR_display_reference 1
989#define EGL_TRACK_REFERENCES_KHR 0x3352
990typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBKHRPROC) (EGLDisplay dpy, EGLint name, EGLAttrib *value);
991#ifdef EGL_EGLEXT_PROTOTYPES
992EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribKHR (EGLDisplay dpy, EGLint name, EGLAttrib *value);
993#endif
994#endif /* EGL_KHR_display_reference */
995
996#ifndef EGL_KHR_fence_sync
997#define EGL_KHR_fence_sync 1
998typedef khronos_utime_nanoseconds_t EGLTimeKHR;
999#ifdef KHRONOS_SUPPORT_INT64
1000#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
1001#define EGL_SYNC_CONDITION_KHR 0x30F8
1002#define EGL_SYNC_FENCE_KHR 0x30F9
1003typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
1004typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
1005typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
1006typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
1007#ifdef EGL_EGLEXT_PROTOTYPES
1008EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
1009EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync);
1010EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
1011EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
1012#endif
1013#endif /* KHRONOS_SUPPORT_INT64 */
1014#endif /* EGL_KHR_fence_sync */
1015
1016#ifndef EGL_KHR_get_all_proc_addresses
1017#define EGL_KHR_get_all_proc_addresses 1
1018#endif /* EGL_KHR_get_all_proc_addresses */
1019
1020#ifndef EGL_KHR_gl_colorspace
1021#define EGL_KHR_gl_colorspace 1
1022#define EGL_GL_COLORSPACE_KHR 0x309D
1023#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089
1024#define EGL_GL_COLORSPACE_LINEAR_KHR 0x308A
1025#endif /* EGL_KHR_gl_colorspace */
1026
1027#ifndef EGL_KHR_gl_renderbuffer_image
1028#define EGL_KHR_gl_renderbuffer_image 1
1029#define EGL_GL_RENDERBUFFER_KHR 0x30B9
1030#endif /* EGL_KHR_gl_renderbuffer_image */
1031
1032#ifndef EGL_KHR_gl_texture_2D_image
1033#define EGL_KHR_gl_texture_2D_image 1
1034#define EGL_GL_TEXTURE_2D_KHR 0x30B1
1035#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC
1036#endif /* EGL_KHR_gl_texture_2D_image */
1037
1038#ifndef EGL_KHR_gl_texture_3D_image
1039#define EGL_KHR_gl_texture_3D_image 1
1040#define EGL_GL_TEXTURE_3D_KHR 0x30B2
1041#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD
1042#endif /* EGL_KHR_gl_texture_3D_image */
1043
1044#ifndef EGL_KHR_gl_texture_cubemap_image
1045#define EGL_KHR_gl_texture_cubemap_image 1
1046#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3
1047#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4
1048#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5
1049#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6
1050#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7
1051#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8
1052#endif /* EGL_KHR_gl_texture_cubemap_image */
1053
1054#ifndef EGL_KHR_image
1055#define EGL_KHR_image 1
1056typedef void *EGLImageKHR;
1057#define EGL_NATIVE_PIXMAP_KHR 0x30B0
1058#define EGL_NO_IMAGE_KHR EGL_CAST(EGLImageKHR,0)
1059typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
1060typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
1061#ifdef EGL_EGLEXT_PROTOTYPES
1062EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
1063EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
1064#endif
1065#endif /* EGL_KHR_image */
1066
1067#ifndef EGL_KHR_image_base
1068#define EGL_KHR_image_base 1
1069#define EGL_IMAGE_PRESERVED_KHR 0x30D2
1070#endif /* EGL_KHR_image_base */
1071
1072#ifndef EGL_KHR_image_pixmap
1073#define EGL_KHR_image_pixmap 1
1074#endif /* EGL_KHR_image_pixmap */
1075
1076#ifndef EGL_KHR_lock_surface
1077#define EGL_KHR_lock_surface 1
1078#define EGL_READ_SURFACE_BIT_KHR 0x0001
1079#define EGL_WRITE_SURFACE_BIT_KHR 0x0002
1080#define EGL_LOCK_SURFACE_BIT_KHR 0x0080
1081#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100
1082#define EGL_MATCH_FORMAT_KHR 0x3043
1083#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0
1084#define EGL_FORMAT_RGB_565_KHR 0x30C1
1085#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2
1086#define EGL_FORMAT_RGBA_8888_KHR 0x30C3
1087#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4
1088#define EGL_LOCK_USAGE_HINT_KHR 0x30C5
1089#define EGL_BITMAP_POINTER_KHR 0x30C6
1090#define EGL_BITMAP_PITCH_KHR 0x30C7
1091#define EGL_BITMAP_ORIGIN_KHR 0x30C8
1092#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9
1093#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA
1094#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB
1095#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC
1096#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD
1097#define EGL_LOWER_LEFT_KHR 0x30CE
1098#define EGL_UPPER_LEFT_KHR 0x30CF
1099typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
1100typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface);
1101#ifdef EGL_EGLEXT_PROTOTYPES
1102EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
1103EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface);
1104#endif
1105#endif /* EGL_KHR_lock_surface */
1106
1107#ifndef EGL_KHR_lock_surface2
1108#define EGL_KHR_lock_surface2 1
1109#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110
1110#endif /* EGL_KHR_lock_surface2 */
1111
1112#ifndef EGL_KHR_lock_surface3
1113#define EGL_KHR_lock_surface3 1
1114typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);
1115#ifdef EGL_EGLEXT_PROTOTYPES
1116EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);
1117#endif
1118#endif /* EGL_KHR_lock_surface3 */
1119
1120#ifndef EGL_KHR_mutable_render_buffer
1121#define EGL_KHR_mutable_render_buffer 1
1122#define EGL_MUTABLE_RENDER_BUFFER_BIT_KHR 0x1000
1123#endif /* EGL_KHR_mutable_render_buffer */
1124
1125#ifndef EGL_KHR_no_config_context
1126#define EGL_KHR_no_config_context 1
1127#define EGL_NO_CONFIG_KHR EGL_CAST(EGLConfig,0)
1128#endif /* EGL_KHR_no_config_context */
1129
1130#ifndef EGL_KHR_partial_update
1131#define EGL_KHR_partial_update 1
1132#define EGL_BUFFER_AGE_KHR 0x313D
1133typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
1134#ifdef EGL_EGLEXT_PROTOTYPES
1135EGLAPI EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
1136#endif
1137#endif /* EGL_KHR_partial_update */
1138
1139#ifndef EGL_KHR_platform_android
1140#define EGL_KHR_platform_android 1
1141#define EGL_PLATFORM_ANDROID_KHR 0x3141
1142#endif /* EGL_KHR_platform_android */
1143
1144#ifndef EGL_KHR_platform_gbm
1145#define EGL_KHR_platform_gbm 1
1146#define EGL_PLATFORM_GBM_KHR 0x31D7
1147#endif /* EGL_KHR_platform_gbm */
1148
1149#ifndef EGL_KHR_platform_wayland
1150#define EGL_KHR_platform_wayland 1
1151#define EGL_PLATFORM_WAYLAND_KHR 0x31D8
1152#endif /* EGL_KHR_platform_wayland */
1153
1154#ifndef EGL_KHR_platform_x11
1155#define EGL_KHR_platform_x11 1
1156#define EGL_PLATFORM_X11_KHR 0x31D5
1157#define EGL_PLATFORM_X11_SCREEN_KHR 0x31D6
1158#endif /* EGL_KHR_platform_x11 */
1159
1160#ifndef EGL_KHR_reusable_sync
1161#define EGL_KHR_reusable_sync 1
1162#ifdef KHRONOS_SUPPORT_INT64
1163#define EGL_SYNC_STATUS_KHR 0x30F1
1164#define EGL_SIGNALED_KHR 0x30F2
1165#define EGL_UNSIGNALED_KHR 0x30F3
1166#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
1167#define EGL_CONDITION_SATISFIED_KHR 0x30F6
1168#define EGL_SYNC_TYPE_KHR 0x30F7
1169#define EGL_SYNC_REUSABLE_KHR 0x30FA
1170#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001
1171#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
1172#define EGL_NO_SYNC_KHR EGL_CAST(EGLSyncKHR,0)
1173typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
1174#ifdef EGL_EGLEXT_PROTOTYPES
1175EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
1176#endif
1177#endif /* KHRONOS_SUPPORT_INT64 */
1178#endif /* EGL_KHR_reusable_sync */
1179
1180#ifndef EGL_KHR_stream
1181#define EGL_KHR_stream 1
1182typedef void *EGLStreamKHR;
1183typedef khronos_uint64_t EGLuint64KHR;
1184#ifdef KHRONOS_SUPPORT_INT64
1185#define EGL_NO_STREAM_KHR EGL_CAST(EGLStreamKHR,0)
1186#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210
1187#define EGL_PRODUCER_FRAME_KHR 0x3212
1188#define EGL_CONSUMER_FRAME_KHR 0x3213
1189#define EGL_STREAM_STATE_KHR 0x3214
1190#define EGL_STREAM_STATE_CREATED_KHR 0x3215
1191#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216
1192#define EGL_STREAM_STATE_EMPTY_KHR 0x3217
1193#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
1194#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
1195#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
1196#define EGL_BAD_STREAM_KHR 0x321B
1197#define EGL_BAD_STATE_KHR 0x321C
1198typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list);
1199typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
1200typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
1201typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
1202typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
1203#ifdef EGL_EGLEXT_PROTOTYPES
1204EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list);
1205EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream);
1206EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
1207EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
1208EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
1209#endif
1210#endif /* KHRONOS_SUPPORT_INT64 */
1211#endif /* EGL_KHR_stream */
1212
1213#ifndef EGL_KHR_stream_attrib
1214#define EGL_KHR_stream_attrib 1
1215#ifdef KHRONOS_SUPPORT_INT64
1216typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMATTRIBKHRPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list);
1217typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value);
1218typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value);
1219typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
1220typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
1221#ifdef EGL_EGLEXT_PROTOTYPES
1222EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamAttribKHR (EGLDisplay dpy, const EGLAttrib *attrib_list);
1223EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value);
1224EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value);
1225EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
1226EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
1227#endif
1228#endif /* KHRONOS_SUPPORT_INT64 */
1229#endif /* EGL_KHR_stream_attrib */
1230
1231#ifndef EGL_KHR_stream_consumer_gltexture
1232#define EGL_KHR_stream_consumer_gltexture 1
1233#ifdef EGL_KHR_stream
1234#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E
1235typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
1236typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
1237typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
1238#ifdef EGL_EGLEXT_PROTOTYPES
1239EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream);
1240EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream);
1241EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream);
1242#endif
1243#endif /* EGL_KHR_stream */
1244#endif /* EGL_KHR_stream_consumer_gltexture */
1245
1246#ifndef EGL_KHR_stream_cross_process_fd
1247#define EGL_KHR_stream_cross_process_fd 1
1248typedef int EGLNativeFileDescriptorKHR;
1249#ifdef EGL_KHR_stream
1250#define EGL_NO_FILE_DESCRIPTOR_KHR EGL_CAST(EGLNativeFileDescriptorKHR,-1)
1251typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
1252typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
1253#ifdef EGL_EGLEXT_PROTOTYPES
1254EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream);
1255EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
1256#endif
1257#endif /* EGL_KHR_stream */
1258#endif /* EGL_KHR_stream_cross_process_fd */
1259
1260#ifndef EGL_KHR_stream_fifo
1261#define EGL_KHR_stream_fifo 1
1262#ifdef EGL_KHR_stream
1263#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC
1264#define EGL_STREAM_TIME_NOW_KHR 0x31FD
1265#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE
1266#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF
1267typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
1268#ifdef EGL_EGLEXT_PROTOTYPES
1269EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
1270#endif
1271#endif /* EGL_KHR_stream */
1272#endif /* EGL_KHR_stream_fifo */
1273
1274#ifndef EGL_KHR_stream_producer_aldatalocator
1275#define EGL_KHR_stream_producer_aldatalocator 1
1276#ifdef EGL_KHR_stream
1277#endif /* EGL_KHR_stream */
1278#endif /* EGL_KHR_stream_producer_aldatalocator */
1279
1280#ifndef EGL_KHR_stream_producer_eglsurface
1281#define EGL_KHR_stream_producer_eglsurface 1
1282#ifdef EGL_KHR_stream
1283#define EGL_STREAM_BIT_KHR 0x0800
1284typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
1285#ifdef EGL_EGLEXT_PROTOTYPES
1286EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
1287#endif
1288#endif /* EGL_KHR_stream */
1289#endif /* EGL_KHR_stream_producer_eglsurface */
1290
1291#ifndef EGL_KHR_surfaceless_context
1292#define EGL_KHR_surfaceless_context 1
1293#endif /* EGL_KHR_surfaceless_context */
1294
1295#ifndef EGL_KHR_swap_buffers_with_damage
1296#define EGL_KHR_swap_buffers_with_damage 1
1297typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
1298#ifdef EGL_EGLEXT_PROTOTYPES
1299EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
1300#endif
1301#endif /* EGL_KHR_swap_buffers_with_damage */
1302
1303#ifndef EGL_KHR_vg_parent_image
1304#define EGL_KHR_vg_parent_image 1
1305#define EGL_VG_PARENT_IMAGE_KHR 0x30BA
1306#endif /* EGL_KHR_vg_parent_image */
1307
1308#ifndef EGL_KHR_wait_sync
1309#define EGL_KHR_wait_sync 1
1310typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
1311#ifdef EGL_EGLEXT_PROTOTYPES
1312EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
1313#endif
1314#endif /* EGL_KHR_wait_sync */
1315
1316#ifndef EGL_ANDROID_GLES_layers
1317#define EGL_ANDROID_GLES_layers 1
1318#endif /* EGL_ANDROID_GLES_layers */
1319
1320#ifndef EGL_ANDROID_blob_cache
1321#define EGL_ANDROID_blob_cache 1
1322typedef khronos_ssize_t EGLsizeiANDROID;
1323typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);
1324typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);
1325typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
1326#ifdef EGL_EGLEXT_PROTOTYPES
1327EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
1328#endif
1329#endif /* EGL_ANDROID_blob_cache */
1330
1331#ifndef EGL_ANDROID_create_native_client_buffer
1332#define EGL_ANDROID_create_native_client_buffer 1
1333#define EGL_NATIVE_BUFFER_USAGE_ANDROID 0x3143
1334#define EGL_NATIVE_BUFFER_USAGE_PROTECTED_BIT_ANDROID 0x00000001
1335#define EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID 0x00000002
1336#define EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID 0x00000004
1337typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLCREATENATIVECLIENTBUFFERANDROIDPROC) (const EGLint *attrib_list);
1338#ifdef EGL_EGLEXT_PROTOTYPES
1339EGLAPI EGLClientBuffer EGLAPIENTRY eglCreateNativeClientBufferANDROID (const EGLint *attrib_list);
1340#endif
1341#endif /* EGL_ANDROID_create_native_client_buffer */
1342
1343#ifndef EGL_ANDROID_framebuffer_target
1344#define EGL_ANDROID_framebuffer_target 1
1345#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147
1346#endif /* EGL_ANDROID_framebuffer_target */
1347
1348#ifndef EGL_ANDROID_front_buffer_auto_refresh
1349#define EGL_ANDROID_front_buffer_auto_refresh 1
1350#define EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID 0x314C
1351#endif /* EGL_ANDROID_front_buffer_auto_refresh */
1352
1353#ifndef EGL_ANDROID_get_frame_timestamps
1354#define EGL_ANDROID_get_frame_timestamps 1
1355typedef khronos_stime_nanoseconds_t EGLnsecsANDROID;
1356#define EGL_TIMESTAMP_PENDING_ANDROID EGL_CAST(EGLnsecsANDROID,-2)
1357#define EGL_TIMESTAMP_INVALID_ANDROID EGL_CAST(EGLnsecsANDROID,-1)
1358#define EGL_TIMESTAMPS_ANDROID 0x3430
1359#define EGL_COMPOSITE_DEADLINE_ANDROID 0x3431
1360#define EGL_COMPOSITE_INTERVAL_ANDROID 0x3432
1361#define EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID 0x3433
1362#define EGL_REQUESTED_PRESENT_TIME_ANDROID 0x3434
1363#define EGL_RENDERING_COMPLETE_TIME_ANDROID 0x3435
1364#define EGL_COMPOSITION_LATCH_TIME_ANDROID 0x3436
1365#define EGL_FIRST_COMPOSITION_START_TIME_ANDROID 0x3437
1366#define EGL_LAST_COMPOSITION_START_TIME_ANDROID 0x3438
1367#define EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID 0x3439
1368#define EGL_DISPLAY_PRESENT_TIME_ANDROID 0x343A
1369#define EGL_DEQUEUE_READY_TIME_ANDROID 0x343B
1370#define EGL_READS_DONE_TIME_ANDROID 0x343C
1371typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCOMPOSITORTIMINGSUPPORTEDANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLint name);
1372typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCOMPOSITORTIMINGANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numTimestamps, const EGLint *names, EGLnsecsANDROID *values);
1373typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETNEXTFRAMEIDANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR *frameId);
1374typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETFRAMETIMESTAMPSUPPORTEDANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLint timestamp);
1375typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETFRAMETIMESTAMPSANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR frameId, EGLint numTimestamps, const EGLint *timestamps, EGLnsecsANDROID *values);
1376#ifdef EGL_EGLEXT_PROTOTYPES
1377EGLAPI EGLBoolean EGLAPIENTRY eglGetCompositorTimingSupportedANDROID (EGLDisplay dpy, EGLSurface surface, EGLint name);
1378EGLAPI EGLBoolean EGLAPIENTRY eglGetCompositorTimingANDROID (EGLDisplay dpy, EGLSurface surface, EGLint numTimestamps, const EGLint *names, EGLnsecsANDROID *values);
1379EGLAPI EGLBoolean EGLAPIENTRY eglGetNextFrameIdANDROID (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR *frameId);
1380EGLAPI EGLBoolean EGLAPIENTRY eglGetFrameTimestampSupportedANDROID (EGLDisplay dpy, EGLSurface surface, EGLint timestamp);
1381EGLAPI EGLBoolean EGLAPIENTRY eglGetFrameTimestampsANDROID (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR frameId, EGLint numTimestamps, const EGLint *timestamps, EGLnsecsANDROID *values);
1382#endif
1383#endif /* EGL_ANDROID_get_frame_timestamps */
1384
1385#ifndef EGL_ANDROID_get_native_client_buffer
1386#define EGL_ANDROID_get_native_client_buffer 1
1387struct AHardwareBuffer;
1388typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC) (const struct AHardwareBuffer *buffer);
1389#ifdef EGL_EGLEXT_PROTOTYPES
1390EGLAPI EGLClientBuffer EGLAPIENTRY eglGetNativeClientBufferANDROID (const struct AHardwareBuffer *buffer);
1391#endif
1392#endif /* EGL_ANDROID_get_native_client_buffer */
1393
1394#ifndef EGL_ANDROID_image_native_buffer
1395#define EGL_ANDROID_image_native_buffer 1
1396#define EGL_NATIVE_BUFFER_ANDROID 0x3140
1397#endif /* EGL_ANDROID_image_native_buffer */
1398
1399#ifndef EGL_ANDROID_native_fence_sync
1400#define EGL_ANDROID_native_fence_sync 1
1401#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144
1402#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145
1403#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
1404#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1
1405typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync);
1406#ifdef EGL_EGLEXT_PROTOTYPES
1407EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync);
1408#endif
1409#endif /* EGL_ANDROID_native_fence_sync */
1410
1411#ifndef EGL_ANDROID_presentation_time
1412#define EGL_ANDROID_presentation_time 1
1413typedef EGLBoolean (EGLAPIENTRYP PFNEGLPRESENTATIONTIMEANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time);
1414#ifdef EGL_EGLEXT_PROTOTYPES
1415EGLAPI EGLBoolean EGLAPIENTRY eglPresentationTimeANDROID (EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time);
1416#endif
1417#endif /* EGL_ANDROID_presentation_time */
1418
1419#ifndef EGL_ANDROID_recordable
1420#define EGL_ANDROID_recordable 1
1421#define EGL_RECORDABLE_ANDROID 0x3142
1422#endif /* EGL_ANDROID_recordable */
1423
1424#ifndef EGL_ANGLE_d3d_share_handle_client_buffer
1425#define EGL_ANGLE_d3d_share_handle_client_buffer 1
1426#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
1427#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */
1428
1429#ifndef EGL_ANGLE_device_d3d
1430#define EGL_ANGLE_device_d3d 1
1431#define EGL_D3D9_DEVICE_ANGLE 0x33A0
1432#define EGL_D3D11_DEVICE_ANGLE 0x33A1
1433#endif /* EGL_ANGLE_device_d3d */
1434
1435#ifndef EGL_ANGLE_query_surface_pointer
1436#define EGL_ANGLE_query_surface_pointer 1
1437typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
1438#ifdef EGL_EGLEXT_PROTOTYPES
1439EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
1440#endif
1441#endif /* EGL_ANGLE_query_surface_pointer */
1442
1443#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
1444#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
1445#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */
1446
1447#ifndef EGL_ANGLE_sync_control_rate
1448#define EGL_ANGLE_sync_control_rate 1
1449typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMSCRATEANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *numerator, EGLint *denominator);
1450#ifdef EGL_EGLEXT_PROTOTYPES
1451EGLAPI EGLBoolean EGLAPIENTRY eglGetMscRateANGLE (EGLDisplay dpy, EGLSurface surface, EGLint *numerator, EGLint *denominator);
1452#endif
1453#endif /* EGL_ANGLE_sync_control_rate */
1454
1455#ifndef EGL_ANGLE_window_fixed_size
1456#define EGL_ANGLE_window_fixed_size 1
1457#define EGL_FIXED_SIZE_ANGLE 0x3201
1458#endif /* EGL_ANGLE_window_fixed_size */
1459
1460#ifndef EGL_ARM_image_format
1461#define EGL_ARM_image_format 1
1462#define EGL_COLOR_COMPONENT_TYPE_UNSIGNED_INTEGER_ARM 0x3287
1463#define EGL_COLOR_COMPONENT_TYPE_INTEGER_ARM 0x3288
1464#endif /* EGL_ARM_image_format */
1465
1466#ifndef EGL_ARM_implicit_external_sync
1467#define EGL_ARM_implicit_external_sync 1
1468#define EGL_SYNC_PRIOR_COMMANDS_IMPLICIT_EXTERNAL_ARM 0x328A
1469#endif /* EGL_ARM_implicit_external_sync */
1470
1471#ifndef EGL_ARM_pixmap_multisample_discard
1472#define EGL_ARM_pixmap_multisample_discard 1
1473#define EGL_DISCARD_SAMPLES_ARM 0x3286
1474#endif /* EGL_ARM_pixmap_multisample_discard */
1475
1476#ifndef EGL_EXT_bind_to_front
1477#define EGL_EXT_bind_to_front 1
1478#define EGL_FRONT_BUFFER_EXT 0x3464
1479#endif /* EGL_EXT_bind_to_front */
1480
1481#ifndef EGL_EXT_buffer_age
1482#define EGL_EXT_buffer_age 1
1483#define EGL_BUFFER_AGE_EXT 0x313D
1484#endif /* EGL_EXT_buffer_age */
1485
1486#ifndef EGL_EXT_client_extensions
1487#define EGL_EXT_client_extensions 1
1488#endif /* EGL_EXT_client_extensions */
1489
1490#ifndef EGL_EXT_client_sync
1491#define EGL_EXT_client_sync 1
1492#define EGL_SYNC_CLIENT_EXT 0x3364
1493#define EGL_SYNC_CLIENT_SIGNAL_EXT 0x3365
1494typedef EGLBoolean (EGLAPIENTRYP PFNEGLCLIENTSIGNALSYNCEXTPROC) (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list);
1495#ifdef EGL_EGLEXT_PROTOTYPES
1496EGLAPI EGLBoolean EGLAPIENTRY eglClientSignalSyncEXT (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list);
1497#endif
1498#endif /* EGL_EXT_client_sync */
1499
1500#ifndef EGL_EXT_compositor
1501#define EGL_EXT_compositor 1
1502#define EGL_PRIMARY_COMPOSITOR_CONTEXT_EXT 0x3460
1503#define EGL_EXTERNAL_REF_ID_EXT 0x3461
1504#define EGL_COMPOSITOR_DROP_NEWEST_FRAME_EXT 0x3462
1505#define EGL_COMPOSITOR_KEEP_NEWEST_FRAME_EXT 0x3463
1506typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETCONTEXTLISTEXTPROC) (const EGLint *external_ref_ids, EGLint num_entries);
1507typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETCONTEXTATTRIBUTESEXTPROC) (EGLint external_ref_id, const EGLint *context_attributes, EGLint num_entries);
1508typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETWINDOWLISTEXTPROC) (EGLint external_ref_id, const EGLint *external_win_ids, EGLint num_entries);
1509typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETWINDOWATTRIBUTESEXTPROC) (EGLint external_win_id, const EGLint *window_attributes, EGLint num_entries);
1510typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORBINDTEXWINDOWEXTPROC) (EGLint external_win_id);
1511typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETSIZEEXTPROC) (EGLint external_win_id, EGLint width, EGLint height);
1512typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSWAPPOLICYEXTPROC) (EGLint external_win_id, EGLint policy);
1513#ifdef EGL_EGLEXT_PROTOTYPES
1514EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetContextListEXT (const EGLint *external_ref_ids, EGLint num_entries);
1515EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetContextAttributesEXT (EGLint external_ref_id, const EGLint *context_attributes, EGLint num_entries);
1516EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetWindowListEXT (EGLint external_ref_id, const EGLint *external_win_ids, EGLint num_entries);
1517EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetWindowAttributesEXT (EGLint external_win_id, const EGLint *window_attributes, EGLint num_entries);
1518EGLAPI EGLBoolean EGLAPIENTRY eglCompositorBindTexWindowEXT (EGLint external_win_id);
1519EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetSizeEXT (EGLint external_win_id, EGLint width, EGLint height);
1520EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSwapPolicyEXT (EGLint external_win_id, EGLint policy);
1521#endif
1522#endif /* EGL_EXT_compositor */
1523
1524#ifndef EGL_EXT_config_select_group
1525#define EGL_EXT_config_select_group 1
1526#define EGL_CONFIG_SELECT_GROUP_EXT 0x34C0
1527#endif /* EGL_EXT_config_select_group */
1528
1529#ifndef EGL_EXT_create_context_robustness
1530#define EGL_EXT_create_context_robustness 1
1531#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
1532#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
1533#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE
1534#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF
1535#endif /* EGL_EXT_create_context_robustness */
1536
1537#ifndef EGL_EXT_device_base
1538#define EGL_EXT_device_base 1
1539typedef void *EGLDeviceEXT;
1540#define EGL_NO_DEVICE_EXT EGL_CAST(EGLDeviceEXT,0)
1541#define EGL_BAD_DEVICE_EXT 0x322B
1542#define EGL_DEVICE_EXT 0x322C
1543typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
1544typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name);
1545typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
1546typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
1547#ifdef EGL_EGLEXT_PROTOTYPES
1548EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
1549EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name);
1550EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
1551EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
1552#endif
1553#endif /* EGL_EXT_device_base */
1554
1555#ifndef EGL_EXT_device_drm
1556#define EGL_EXT_device_drm 1
1557#define EGL_DRM_DEVICE_FILE_EXT 0x3233
1558#define EGL_DRM_MASTER_FD_EXT 0x333C
1559#endif /* EGL_EXT_device_drm */
1560
1561#ifndef EGL_EXT_device_drm_render_node
1562#define EGL_EXT_device_drm_render_node 1
1563#define EGL_DRM_RENDER_NODE_FILE_EXT 0x3377
1564#endif /* EGL_EXT_device_drm_render_node */
1565
1566#ifndef EGL_EXT_device_enumeration
1567#define EGL_EXT_device_enumeration 1
1568#endif /* EGL_EXT_device_enumeration */
1569
1570#ifndef EGL_EXT_device_openwf
1571#define EGL_EXT_device_openwf 1
1572#define EGL_OPENWF_DEVICE_ID_EXT 0x3237
1573#define EGL_OPENWF_DEVICE_EXT 0x333D
1574#endif /* EGL_EXT_device_openwf */
1575
1576#ifndef EGL_EXT_device_persistent_id
1577#define EGL_EXT_device_persistent_id 1
1578#define EGL_DEVICE_UUID_EXT 0x335C
1579#define EGL_DRIVER_UUID_EXT 0x335D
1580#define EGL_DRIVER_NAME_EXT 0x335E
1581typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEBINARYEXTPROC) (EGLDeviceEXT device, EGLint name, EGLint max_size, void *value, EGLint *size);
1582#ifdef EGL_EGLEXT_PROTOTYPES
1583EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceBinaryEXT (EGLDeviceEXT device, EGLint name, EGLint max_size, void *value, EGLint *size);
1584#endif
1585#endif /* EGL_EXT_device_persistent_id */
1586
1587#ifndef EGL_EXT_device_query
1588#define EGL_EXT_device_query 1
1589#endif /* EGL_EXT_device_query */
1590
1591#ifndef EGL_EXT_device_query_name
1592#define EGL_EXT_device_query_name 1
1593#define EGL_RENDERER_EXT 0x335F
1594#endif /* EGL_EXT_device_query_name */
1595
1596#ifndef EGL_EXT_explicit_device
1597#define EGL_EXT_explicit_device 1
1598#endif /* EGL_EXT_explicit_device */
1599
1600#ifndef EGL_EXT_gl_colorspace_bt2020_linear
1601#define EGL_EXT_gl_colorspace_bt2020_linear 1
1602#define EGL_GL_COLORSPACE_BT2020_LINEAR_EXT 0x333F
1603#endif /* EGL_EXT_gl_colorspace_bt2020_linear */
1604
1605#ifndef EGL_EXT_gl_colorspace_bt2020_pq
1606#define EGL_EXT_gl_colorspace_bt2020_pq 1
1607#define EGL_GL_COLORSPACE_BT2020_PQ_EXT 0x3340
1608#endif /* EGL_EXT_gl_colorspace_bt2020_pq */
1609
1610#ifndef EGL_EXT_gl_colorspace_display_p3
1611#define EGL_EXT_gl_colorspace_display_p3 1
1612#define EGL_GL_COLORSPACE_DISPLAY_P3_EXT 0x3363
1613#endif /* EGL_EXT_gl_colorspace_display_p3 */
1614
1615#ifndef EGL_EXT_gl_colorspace_display_p3_linear
1616#define EGL_EXT_gl_colorspace_display_p3_linear 1
1617#define EGL_GL_COLORSPACE_DISPLAY_P3_LINEAR_EXT 0x3362
1618#endif /* EGL_EXT_gl_colorspace_display_p3_linear */
1619
1620#ifndef EGL_EXT_gl_colorspace_display_p3_passthrough
1621#define EGL_EXT_gl_colorspace_display_p3_passthrough 1
1622#define EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT 0x3490
1623#endif /* EGL_EXT_gl_colorspace_display_p3_passthrough */
1624
1625#ifndef EGL_EXT_gl_colorspace_scrgb
1626#define EGL_EXT_gl_colorspace_scrgb 1
1627#define EGL_GL_COLORSPACE_SCRGB_EXT 0x3351
1628#endif /* EGL_EXT_gl_colorspace_scrgb */
1629
1630#ifndef EGL_EXT_gl_colorspace_scrgb_linear
1631#define EGL_EXT_gl_colorspace_scrgb_linear 1
1632#define EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT 0x3350
1633#endif /* EGL_EXT_gl_colorspace_scrgb_linear */
1634
1635#ifndef EGL_EXT_image_dma_buf_import
1636#define EGL_EXT_image_dma_buf_import 1
1637#define EGL_LINUX_DMA_BUF_EXT 0x3270
1638#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
1639#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
1640#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
1641#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
1642#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275
1643#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276
1644#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277
1645#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
1646#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
1647#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
1648#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B
1649#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C
1650#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
1651#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
1652#define EGL_ITU_REC601_EXT 0x327F
1653#define EGL_ITU_REC709_EXT 0x3280
1654#define EGL_ITU_REC2020_EXT 0x3281
1655#define EGL_YUV_FULL_RANGE_EXT 0x3282
1656#define EGL_YUV_NARROW_RANGE_EXT 0x3283
1657#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284
1658#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285
1659#endif /* EGL_EXT_image_dma_buf_import */
1660
1661#ifndef EGL_EXT_image_dma_buf_import_modifiers
1662#define EGL_EXT_image_dma_buf_import_modifiers 1
1663#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440
1664#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441
1665#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442
1666#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
1667#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
1668#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445
1669#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446
1670#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447
1671#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448
1672#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449
1673#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A
1674typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFFORMATSEXTPROC) (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats);
1675typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFMODIFIERSEXTPROC) (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers);
1676#ifdef EGL_EGLEXT_PROTOTYPES
1677EGLAPI EGLBoolean EGLAPIENTRY eglQueryDmaBufFormatsEXT (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats);
1678EGLAPI EGLBoolean EGLAPIENTRY eglQueryDmaBufModifiersEXT (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers);
1679#endif
1680#endif /* EGL_EXT_image_dma_buf_import_modifiers */
1681
1682#ifndef EGL_EXT_image_gl_colorspace
1683#define EGL_EXT_image_gl_colorspace 1
1684#define EGL_GL_COLORSPACE_DEFAULT_EXT 0x314D
1685#endif /* EGL_EXT_image_gl_colorspace */
1686
1687#ifndef EGL_EXT_image_implicit_sync_control
1688#define EGL_EXT_image_implicit_sync_control 1
1689#define EGL_IMPORT_SYNC_TYPE_EXT 0x3470
1690#define EGL_IMPORT_IMPLICIT_SYNC_EXT 0x3471
1691#define EGL_IMPORT_EXPLICIT_SYNC_EXT 0x3472
1692#endif /* EGL_EXT_image_implicit_sync_control */
1693
1694#ifndef EGL_EXT_multiview_window
1695#define EGL_EXT_multiview_window 1
1696#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134
1697#endif /* EGL_EXT_multiview_window */
1698
1699#ifndef EGL_EXT_output_base
1700#define EGL_EXT_output_base 1
1701typedef void *EGLOutputLayerEXT;
1702typedef void *EGLOutputPortEXT;
1703#define EGL_NO_OUTPUT_LAYER_EXT EGL_CAST(EGLOutputLayerEXT,0)
1704#define EGL_NO_OUTPUT_PORT_EXT EGL_CAST(EGLOutputPortEXT,0)
1705#define EGL_BAD_OUTPUT_LAYER_EXT 0x322D
1706#define EGL_BAD_OUTPUT_PORT_EXT 0x322E
1707#define EGL_SWAP_INTERVAL_EXT 0x322F
1708typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
1709typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
1710typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
1711typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
1712typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
1713typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);
1714typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
1715typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
1716#ifdef EGL_EGLEXT_PROTOTYPES
1717EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
1718EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
1719EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
1720EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
1721EGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
1722EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);
1723EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
1724EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
1725#endif
1726#endif /* EGL_EXT_output_base */
1727
1728#ifndef EGL_EXT_output_drm
1729#define EGL_EXT_output_drm 1
1730#define EGL_DRM_CRTC_EXT 0x3234
1731#define EGL_DRM_PLANE_EXT 0x3235
1732#define EGL_DRM_CONNECTOR_EXT 0x3236
1733#endif /* EGL_EXT_output_drm */
1734
1735#ifndef EGL_EXT_output_openwf
1736#define EGL_EXT_output_openwf 1
1737#define EGL_OPENWF_PIPELINE_ID_EXT 0x3238
1738#define EGL_OPENWF_PORT_ID_EXT 0x3239
1739#endif /* EGL_EXT_output_openwf */
1740
1741#ifndef EGL_EXT_pixel_format_float
1742#define EGL_EXT_pixel_format_float 1
1743#define EGL_COLOR_COMPONENT_TYPE_EXT 0x3339
1744#define EGL_COLOR_COMPONENT_TYPE_FIXED_EXT 0x333A
1745#define EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT 0x333B
1746#endif /* EGL_EXT_pixel_format_float */
1747
1748#ifndef EGL_EXT_platform_base
1749#define EGL_EXT_platform_base 1
1750typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);
1751typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
1752typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
1753#ifdef EGL_EGLEXT_PROTOTYPES
1754EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list);
1755EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
1756EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
1757#endif
1758#endif /* EGL_EXT_platform_base */
1759
1760#ifndef EGL_EXT_platform_device
1761#define EGL_EXT_platform_device 1
1762#define EGL_PLATFORM_DEVICE_EXT 0x313F
1763#endif /* EGL_EXT_platform_device */
1764
1765#ifndef EGL_EXT_platform_wayland
1766#define EGL_EXT_platform_wayland 1
1767#define EGL_PLATFORM_WAYLAND_EXT 0x31D8
1768#endif /* EGL_EXT_platform_wayland */
1769
1770#ifndef EGL_EXT_platform_x11
1771#define EGL_EXT_platform_x11 1
1772#define EGL_PLATFORM_X11_EXT 0x31D5
1773#define EGL_PLATFORM_X11_SCREEN_EXT 0x31D6
1774#endif /* EGL_EXT_platform_x11 */
1775
1776#ifndef EGL_EXT_platform_xcb
1777#define EGL_EXT_platform_xcb 1
1778#define EGL_PLATFORM_XCB_EXT 0x31DC
1779#define EGL_PLATFORM_XCB_SCREEN_EXT 0x31DE
1780#endif /* EGL_EXT_platform_xcb */
1781
1782#ifndef EGL_EXT_present_opaque
1783#define EGL_EXT_present_opaque 1
1784#define EGL_PRESENT_OPAQUE_EXT 0x31DF
1785#endif /* EGL_EXT_present_opaque */
1786
1787#ifndef EGL_EXT_protected_content
1788#define EGL_EXT_protected_content 1
1789#define EGL_PROTECTED_CONTENT_EXT 0x32C0
1790#endif /* EGL_EXT_protected_content */
1791
1792#ifndef EGL_EXT_protected_surface
1793#define EGL_EXT_protected_surface 1
1794#endif /* EGL_EXT_protected_surface */
1795
1796#ifndef EGL_EXT_stream_consumer_egloutput
1797#define EGL_EXT_stream_consumer_egloutput 1
1798typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
1799#ifdef EGL_EGLEXT_PROTOTYPES
1800EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
1801#endif
1802#endif /* EGL_EXT_stream_consumer_egloutput */
1803
1804#ifndef EGL_EXT_surface_CTA861_3_metadata
1805#define EGL_EXT_surface_CTA861_3_metadata 1
1806#define EGL_CTA861_3_MAX_CONTENT_LIGHT_LEVEL_EXT 0x3360
1807#define EGL_CTA861_3_MAX_FRAME_AVERAGE_LEVEL_EXT 0x3361
1808#endif /* EGL_EXT_surface_CTA861_3_metadata */
1809
1810#ifndef EGL_EXT_surface_SMPTE2086_metadata
1811#define EGL_EXT_surface_SMPTE2086_metadata 1
1812#define EGL_SMPTE2086_DISPLAY_PRIMARY_RX_EXT 0x3341
1813#define EGL_SMPTE2086_DISPLAY_PRIMARY_RY_EXT 0x3342
1814#define EGL_SMPTE2086_DISPLAY_PRIMARY_GX_EXT 0x3343
1815#define EGL_SMPTE2086_DISPLAY_PRIMARY_GY_EXT 0x3344
1816#define EGL_SMPTE2086_DISPLAY_PRIMARY_BX_EXT 0x3345
1817#define EGL_SMPTE2086_DISPLAY_PRIMARY_BY_EXT 0x3346
1818#define EGL_SMPTE2086_WHITE_POINT_X_EXT 0x3347
1819#define EGL_SMPTE2086_WHITE_POINT_Y_EXT 0x3348
1820#define EGL_SMPTE2086_MAX_LUMINANCE_EXT 0x3349
1821#define EGL_SMPTE2086_MIN_LUMINANCE_EXT 0x334A
1822#define EGL_METADATA_SCALING_EXT 50000
1823#endif /* EGL_EXT_surface_SMPTE2086_metadata */
1824
1825#ifndef EGL_EXT_surface_compression
1826#define EGL_EXT_surface_compression 1
1827#define EGL_SURFACE_COMPRESSION_EXT 0x34B0
1828#define EGL_SURFACE_COMPRESSION_PLANE1_EXT 0x328E
1829#define EGL_SURFACE_COMPRESSION_PLANE2_EXT 0x328F
1830#define EGL_SURFACE_COMPRESSION_FIXED_RATE_NONE_EXT 0x34B1
1831#define EGL_SURFACE_COMPRESSION_FIXED_RATE_DEFAULT_EXT 0x34B2
1832#define EGL_SURFACE_COMPRESSION_FIXED_RATE_1BPC_EXT 0x34B4
1833#define EGL_SURFACE_COMPRESSION_FIXED_RATE_2BPC_EXT 0x34B5
1834#define EGL_SURFACE_COMPRESSION_FIXED_RATE_3BPC_EXT 0x34B6
1835#define EGL_SURFACE_COMPRESSION_FIXED_RATE_4BPC_EXT 0x34B7
1836#define EGL_SURFACE_COMPRESSION_FIXED_RATE_5BPC_EXT 0x34B8
1837#define EGL_SURFACE_COMPRESSION_FIXED_RATE_6BPC_EXT 0x34B9
1838#define EGL_SURFACE_COMPRESSION_FIXED_RATE_7BPC_EXT 0x34BA
1839#define EGL_SURFACE_COMPRESSION_FIXED_RATE_8BPC_EXT 0x34BB
1840#define EGL_SURFACE_COMPRESSION_FIXED_RATE_9BPC_EXT 0x34BC
1841#define EGL_SURFACE_COMPRESSION_FIXED_RATE_10BPC_EXT 0x34BD
1842#define EGL_SURFACE_COMPRESSION_FIXED_RATE_11BPC_EXT 0x34BE
1843#define EGL_SURFACE_COMPRESSION_FIXED_RATE_12BPC_EXT 0x34BF
1844typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSUPPORTEDCOMPRESSIONRATESEXTPROC) (EGLDisplay dpy, EGLConfig config, const EGLAttrib *attrib_list, EGLint *rates, EGLint rate_size, EGLint *num_rates);
1845#ifdef EGL_EGLEXT_PROTOTYPES
1846EGLAPI EGLBoolean EGLAPIENTRY eglQuerySupportedCompressionRatesEXT (EGLDisplay dpy, EGLConfig config, const EGLAttrib *attrib_list, EGLint *rates, EGLint rate_size, EGLint *num_rates);
1847#endif
1848#endif /* EGL_EXT_surface_compression */
1849
1850#ifndef EGL_EXT_swap_buffers_with_damage
1851#define EGL_EXT_swap_buffers_with_damage 1
1852typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
1853#ifdef EGL_EGLEXT_PROTOTYPES
1854EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
1855#endif
1856#endif /* EGL_EXT_swap_buffers_with_damage */
1857
1858#ifndef EGL_EXT_sync_reuse
1859#define EGL_EXT_sync_reuse 1
1860typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNSIGNALSYNCEXTPROC) (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list);
1861#ifdef EGL_EGLEXT_PROTOTYPES
1862EGLAPI EGLBoolean EGLAPIENTRY eglUnsignalSyncEXT (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list);
1863#endif
1864#endif /* EGL_EXT_sync_reuse */
1865
1866#ifndef EGL_EXT_yuv_surface
1867#define EGL_EXT_yuv_surface 1
1868#define EGL_YUV_ORDER_EXT 0x3301
1869#define EGL_YUV_NUMBER_OF_PLANES_EXT 0x3311
1870#define EGL_YUV_SUBSAMPLE_EXT 0x3312
1871#define EGL_YUV_DEPTH_RANGE_EXT 0x3317
1872#define EGL_YUV_CSC_STANDARD_EXT 0x330A
1873#define EGL_YUV_PLANE_BPP_EXT 0x331A
1874#define EGL_YUV_BUFFER_EXT 0x3300
1875#define EGL_YUV_ORDER_YUV_EXT 0x3302
1876#define EGL_YUV_ORDER_YVU_EXT 0x3303
1877#define EGL_YUV_ORDER_YUYV_EXT 0x3304
1878#define EGL_YUV_ORDER_UYVY_EXT 0x3305
1879#define EGL_YUV_ORDER_YVYU_EXT 0x3306
1880#define EGL_YUV_ORDER_VYUY_EXT 0x3307
1881#define EGL_YUV_ORDER_AYUV_EXT 0x3308
1882#define EGL_YUV_SUBSAMPLE_4_2_0_EXT 0x3313
1883#define EGL_YUV_SUBSAMPLE_4_2_2_EXT 0x3314
1884#define EGL_YUV_SUBSAMPLE_4_4_4_EXT 0x3315
1885#define EGL_YUV_DEPTH_RANGE_LIMITED_EXT 0x3318
1886#define EGL_YUV_DEPTH_RANGE_FULL_EXT 0x3319
1887#define EGL_YUV_CSC_STANDARD_601_EXT 0x330B
1888#define EGL_YUV_CSC_STANDARD_709_EXT 0x330C
1889#define EGL_YUV_CSC_STANDARD_2020_EXT 0x330D
1890#define EGL_YUV_PLANE_BPP_0_EXT 0x331B
1891#define EGL_YUV_PLANE_BPP_8_EXT 0x331C
1892#define EGL_YUV_PLANE_BPP_10_EXT 0x331D
1893#endif /* EGL_EXT_yuv_surface */
1894
1895#ifndef EGL_HI_clientpixmap
1896#define EGL_HI_clientpixmap 1
1897struct EGLClientPixmapHI {
1898 void *pData;
1899 EGLint iWidth;
1900 EGLint iHeight;
1901 EGLint iStride;
1902};
1903#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74
1904typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);
1905#ifdef EGL_EGLEXT_PROTOTYPES
1906EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);
1907#endif
1908#endif /* EGL_HI_clientpixmap */
1909
1910#ifndef EGL_HI_colorformats
1911#define EGL_HI_colorformats 1
1912#define EGL_COLOR_FORMAT_HI 0x8F70
1913#define EGL_COLOR_RGB_HI 0x8F71
1914#define EGL_COLOR_RGBA_HI 0x8F72
1915#define EGL_COLOR_ARGB_HI 0x8F73
1916#endif /* EGL_HI_colorformats */
1917
1918#ifndef EGL_IMG_context_priority
1919#define EGL_IMG_context_priority 1
1920#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
1921#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
1922#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
1923#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
1924#endif /* EGL_IMG_context_priority */
1925
1926#ifndef EGL_IMG_image_plane_attribs
1927#define EGL_IMG_image_plane_attribs 1
1928#define EGL_NATIVE_BUFFER_MULTIPLANE_SEPARATE_IMG 0x3105
1929#define EGL_NATIVE_BUFFER_PLANE_OFFSET_IMG 0x3106
1930#endif /* EGL_IMG_image_plane_attribs */
1931
1932#ifndef EGL_MESA_drm_image
1933#define EGL_MESA_drm_image 1
1934#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0
1935#define EGL_DRM_BUFFER_USE_MESA 0x31D1
1936#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2
1937#define EGL_DRM_BUFFER_MESA 0x31D3
1938#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4
1939#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001
1940#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002
1941#define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x00000004
1942typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
1943typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
1944#ifdef EGL_EGLEXT_PROTOTYPES
1945EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);
1946EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
1947#endif
1948#endif /* EGL_MESA_drm_image */
1949
1950#ifndef EGL_MESA_image_dma_buf_export
1951#define EGL_MESA_image_dma_buf_export 1
1952typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);
1953typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
1954#ifdef EGL_EGLEXT_PROTOTYPES
1955EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);
1956EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
1957#endif
1958#endif /* EGL_MESA_image_dma_buf_export */
1959
1960#ifndef EGL_MESA_platform_gbm
1961#define EGL_MESA_platform_gbm 1
1962#define EGL_PLATFORM_GBM_MESA 0x31D7
1963#endif /* EGL_MESA_platform_gbm */
1964
1965#ifndef EGL_MESA_platform_surfaceless
1966#define EGL_MESA_platform_surfaceless 1
1967#define EGL_PLATFORM_SURFACELESS_MESA 0x31DD
1968#endif /* EGL_MESA_platform_surfaceless */
1969
1970#ifndef EGL_MESA_query_driver
1971#define EGL_MESA_query_driver 1
1972typedef char *(EGLAPIENTRYP PFNEGLGETDISPLAYDRIVERCONFIGPROC) (EGLDisplay dpy);
1973typedef const char *(EGLAPIENTRYP PFNEGLGETDISPLAYDRIVERNAMEPROC) (EGLDisplay dpy);
1974#ifdef EGL_EGLEXT_PROTOTYPES
1975EGLAPI char *EGLAPIENTRY eglGetDisplayDriverConfig (EGLDisplay dpy);
1976EGLAPI const char *EGLAPIENTRY eglGetDisplayDriverName (EGLDisplay dpy);
1977#endif
1978#endif /* EGL_MESA_query_driver */
1979
1980#ifndef EGL_NOK_swap_region
1981#define EGL_NOK_swap_region 1
1982typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
1983#ifdef EGL_EGLEXT_PROTOTYPES
1984EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
1985#endif
1986#endif /* EGL_NOK_swap_region */
1987
1988#ifndef EGL_NOK_swap_region2
1989#define EGL_NOK_swap_region2 1
1990typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
1991#ifdef EGL_EGLEXT_PROTOTYPES
1992EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
1993#endif
1994#endif /* EGL_NOK_swap_region2 */
1995
1996#ifndef EGL_NOK_texture_from_pixmap
1997#define EGL_NOK_texture_from_pixmap 1
1998#define EGL_Y_INVERTED_NOK 0x307F
1999#endif /* EGL_NOK_texture_from_pixmap */
2000
2001#ifndef EGL_NV_3dvision_surface
2002#define EGL_NV_3dvision_surface 1
2003#define EGL_AUTO_STEREO_NV 0x3136
2004#endif /* EGL_NV_3dvision_surface */
2005
2006#ifndef EGL_NV_context_priority_realtime
2007#define EGL_NV_context_priority_realtime 1
2008#define EGL_CONTEXT_PRIORITY_REALTIME_NV 0x3357
2009#endif /* EGL_NV_context_priority_realtime */
2010
2011#ifndef EGL_NV_coverage_sample
2012#define EGL_NV_coverage_sample 1
2013#define EGL_COVERAGE_BUFFERS_NV 0x30E0
2014#define EGL_COVERAGE_SAMPLES_NV 0x30E1
2015#endif /* EGL_NV_coverage_sample */
2016
2017#ifndef EGL_NV_coverage_sample_resolve
2018#define EGL_NV_coverage_sample_resolve 1
2019#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131
2020#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
2021#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
2022#endif /* EGL_NV_coverage_sample_resolve */
2023
2024#ifndef EGL_NV_cuda_event
2025#define EGL_NV_cuda_event 1
2026#define EGL_CUDA_EVENT_HANDLE_NV 0x323B
2027#define EGL_SYNC_CUDA_EVENT_NV 0x323C
2028#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV 0x323D
2029#endif /* EGL_NV_cuda_event */
2030
2031#ifndef EGL_NV_depth_nonlinear
2032#define EGL_NV_depth_nonlinear 1
2033#define EGL_DEPTH_ENCODING_NV 0x30E2
2034#define EGL_DEPTH_ENCODING_NONE_NV 0
2035#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
2036#endif /* EGL_NV_depth_nonlinear */
2037
2038#ifndef EGL_NV_device_cuda
2039#define EGL_NV_device_cuda 1
2040#define EGL_CUDA_DEVICE_NV 0x323A
2041#endif /* EGL_NV_device_cuda */
2042
2043#ifndef EGL_NV_native_query
2044#define EGL_NV_native_query 1
2045typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id);
2046typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
2047typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
2048#ifdef EGL_EGLEXT_PROTOTYPES
2049EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id);
2050EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
2051EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
2052#endif
2053#endif /* EGL_NV_native_query */
2054
2055#ifndef EGL_NV_post_convert_rounding
2056#define EGL_NV_post_convert_rounding 1
2057#endif /* EGL_NV_post_convert_rounding */
2058
2059#ifndef EGL_NV_post_sub_buffer
2060#define EGL_NV_post_sub_buffer 1
2061#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE
2062typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
2063#ifdef EGL_EGLEXT_PROTOTYPES
2064EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
2065#endif
2066#endif /* EGL_NV_post_sub_buffer */
2067
2068#ifndef EGL_NV_quadruple_buffer
2069#define EGL_NV_quadruple_buffer 1
2070#define EGL_QUADRUPLE_BUFFER_NV 0x3231
2071#endif /* EGL_NV_quadruple_buffer */
2072
2073#ifndef EGL_NV_robustness_video_memory_purge
2074#define EGL_NV_robustness_video_memory_purge 1
2075#define EGL_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x334C
2076#endif /* EGL_NV_robustness_video_memory_purge */
2077
2078#ifndef EGL_NV_stream_consumer_eglimage
2079#define EGL_NV_stream_consumer_eglimage 1
2080#define EGL_STREAM_CONSUMER_IMAGE_NV 0x3373
2081#define EGL_STREAM_IMAGE_ADD_NV 0x3374
2082#define EGL_STREAM_IMAGE_REMOVE_NV 0x3375
2083#define EGL_STREAM_IMAGE_AVAILABLE_NV 0x3376
2084typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, const EGLuint64KHR *modifiers, const EGLAttrib *attrib_list);
2085typedef EGLint (EGLAPIENTRYP PFNEGLQUERYSTREAMCONSUMEREVENTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLTime timeout, EGLenum *event, EGLAttrib *aux);
2086typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMACQUIREIMAGENVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLImage *pImage, EGLSync sync);
2087typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMRELEASEIMAGENVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLImage image, EGLSync sync);
2088#ifdef EGL_EGLEXT_PROTOTYPES
2089EGLAPI EGLBoolean EGLAPIENTRY eglStreamImageConsumerConnectNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, const EGLuint64KHR *modifiers, const EGLAttrib *attrib_list);
2090EGLAPI EGLint EGLAPIENTRY eglQueryStreamConsumerEventNV (EGLDisplay dpy, EGLStreamKHR stream, EGLTime timeout, EGLenum *event, EGLAttrib *aux);
2091EGLAPI EGLBoolean EGLAPIENTRY eglStreamAcquireImageNV (EGLDisplay dpy, EGLStreamKHR stream, EGLImage *pImage, EGLSync sync);
2092EGLAPI EGLBoolean EGLAPIENTRY eglStreamReleaseImageNV (EGLDisplay dpy, EGLStreamKHR stream, EGLImage image, EGLSync sync);
2093#endif
2094#endif /* EGL_NV_stream_consumer_eglimage */
2095
2096#ifndef EGL_NV_stream_consumer_gltexture_yuv
2097#define EGL_NV_stream_consumer_gltexture_yuv 1
2098#define EGL_YUV_PLANE0_TEXTURE_UNIT_NV 0x332C
2099#define EGL_YUV_PLANE1_TEXTURE_UNIT_NV 0x332D
2100#define EGL_YUV_PLANE2_TEXTURE_UNIT_NV 0x332E
2101typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
2102#ifdef EGL_EGLEXT_PROTOTYPES
2103EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
2104#endif
2105#endif /* EGL_NV_stream_consumer_gltexture_yuv */
2106
2107#ifndef EGL_NV_stream_cross_display
2108#define EGL_NV_stream_cross_display 1
2109#define EGL_STREAM_CROSS_DISPLAY_NV 0x334E
2110#endif /* EGL_NV_stream_cross_display */
2111
2112#ifndef EGL_NV_stream_cross_object
2113#define EGL_NV_stream_cross_object 1
2114#define EGL_STREAM_CROSS_OBJECT_NV 0x334D
2115#endif /* EGL_NV_stream_cross_object */
2116
2117#ifndef EGL_NV_stream_cross_partition
2118#define EGL_NV_stream_cross_partition 1
2119#define EGL_STREAM_CROSS_PARTITION_NV 0x323F
2120#endif /* EGL_NV_stream_cross_partition */
2121
2122#ifndef EGL_NV_stream_cross_process
2123#define EGL_NV_stream_cross_process 1
2124#define EGL_STREAM_CROSS_PROCESS_NV 0x3245
2125#endif /* EGL_NV_stream_cross_process */
2126
2127#ifndef EGL_NV_stream_cross_system
2128#define EGL_NV_stream_cross_system 1
2129#define EGL_STREAM_CROSS_SYSTEM_NV 0x334F
2130#endif /* EGL_NV_stream_cross_system */
2131
2132#ifndef EGL_NV_stream_dma
2133#define EGL_NV_stream_dma 1
2134#define EGL_STREAM_DMA_NV 0x3371
2135#define EGL_STREAM_DMA_SERVER_NV 0x3372
2136#endif /* EGL_NV_stream_dma */
2137
2138#ifndef EGL_NV_stream_fifo_next
2139#define EGL_NV_stream_fifo_next 1
2140#define EGL_PENDING_FRAME_NV 0x3329
2141#define EGL_STREAM_TIME_PENDING_NV 0x332A
2142#endif /* EGL_NV_stream_fifo_next */
2143
2144#ifndef EGL_NV_stream_fifo_synchronous
2145#define EGL_NV_stream_fifo_synchronous 1
2146#define EGL_STREAM_FIFO_SYNCHRONOUS_NV 0x3336
2147#endif /* EGL_NV_stream_fifo_synchronous */
2148
2149#ifndef EGL_NV_stream_flush
2150#define EGL_NV_stream_flush 1
2151typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMFLUSHNVPROC) (EGLDisplay dpy, EGLStreamKHR stream);
2152#ifdef EGL_EGLEXT_PROTOTYPES
2153EGLAPI EGLBoolean EGLAPIENTRY eglStreamFlushNV (EGLDisplay dpy, EGLStreamKHR stream);
2154#endif
2155#endif /* EGL_NV_stream_flush */
2156
2157#ifndef EGL_NV_stream_frame_limits
2158#define EGL_NV_stream_frame_limits 1
2159#define EGL_PRODUCER_MAX_FRAME_HINT_NV 0x3337
2160#define EGL_CONSUMER_MAX_FRAME_HINT_NV 0x3338
2161#endif /* EGL_NV_stream_frame_limits */
2162
2163#ifndef EGL_NV_stream_metadata
2164#define EGL_NV_stream_metadata 1
2165#define EGL_MAX_STREAM_METADATA_BLOCKS_NV 0x3250
2166#define EGL_MAX_STREAM_METADATA_BLOCK_SIZE_NV 0x3251
2167#define EGL_MAX_STREAM_METADATA_TOTAL_SIZE_NV 0x3252
2168#define EGL_PRODUCER_METADATA_NV 0x3253
2169#define EGL_CONSUMER_METADATA_NV 0x3254
2170#define EGL_PENDING_METADATA_NV 0x3328
2171#define EGL_METADATA0_SIZE_NV 0x3255
2172#define EGL_METADATA1_SIZE_NV 0x3256
2173#define EGL_METADATA2_SIZE_NV 0x3257
2174#define EGL_METADATA3_SIZE_NV 0x3258
2175#define EGL_METADATA0_TYPE_NV 0x3259
2176#define EGL_METADATA1_TYPE_NV 0x325A
2177#define EGL_METADATA2_TYPE_NV 0x325B
2178#define EGL_METADATA3_TYPE_NV 0x325C
2179typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBNVPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
2180typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMMETADATANVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void *data);
2181typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMMETADATANVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void *data);
2182#ifdef EGL_EGLEXT_PROTOTYPES
2183EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribNV (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
2184EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamMetadataNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void *data);
2185EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamMetadataNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void *data);
2186#endif
2187#endif /* EGL_NV_stream_metadata */
2188
2189#ifndef EGL_NV_stream_origin
2190#define EGL_NV_stream_origin 1
2191#define EGL_STREAM_FRAME_ORIGIN_X_NV 0x3366
2192#define EGL_STREAM_FRAME_ORIGIN_Y_NV 0x3367
2193#define EGL_STREAM_FRAME_MAJOR_AXIS_NV 0x3368
2194#define EGL_CONSUMER_AUTO_ORIENTATION_NV 0x3369
2195#define EGL_PRODUCER_AUTO_ORIENTATION_NV 0x336A
2196#define EGL_LEFT_NV 0x336B
2197#define EGL_RIGHT_NV 0x336C
2198#define EGL_TOP_NV 0x336D
2199#define EGL_BOTTOM_NV 0x336E
2200#define EGL_X_AXIS_NV 0x336F
2201#define EGL_Y_AXIS_NV 0x3370
2202#endif /* EGL_NV_stream_origin */
2203
2204#ifndef EGL_NV_stream_remote
2205#define EGL_NV_stream_remote 1
2206#define EGL_STREAM_STATE_INITIALIZING_NV 0x3240
2207#define EGL_STREAM_TYPE_NV 0x3241
2208#define EGL_STREAM_PROTOCOL_NV 0x3242
2209#define EGL_STREAM_ENDPOINT_NV 0x3243
2210#define EGL_STREAM_LOCAL_NV 0x3244
2211#define EGL_STREAM_PRODUCER_NV 0x3247
2212#define EGL_STREAM_CONSUMER_NV 0x3248
2213#define EGL_STREAM_PROTOCOL_FD_NV 0x3246
2214#endif /* EGL_NV_stream_remote */
2215
2216#ifndef EGL_NV_stream_reset
2217#define EGL_NV_stream_reset 1
2218#define EGL_SUPPORT_RESET_NV 0x3334
2219#define EGL_SUPPORT_REUSE_NV 0x3335
2220typedef EGLBoolean (EGLAPIENTRYP PFNEGLRESETSTREAMNVPROC) (EGLDisplay dpy, EGLStreamKHR stream);
2221#ifdef EGL_EGLEXT_PROTOTYPES
2222EGLAPI EGLBoolean EGLAPIENTRY eglResetStreamNV (EGLDisplay dpy, EGLStreamKHR stream);
2223#endif
2224#endif /* EGL_NV_stream_reset */
2225
2226#ifndef EGL_NV_stream_socket
2227#define EGL_NV_stream_socket 1
2228#define EGL_STREAM_PROTOCOL_SOCKET_NV 0x324B
2229#define EGL_SOCKET_HANDLE_NV 0x324C
2230#define EGL_SOCKET_TYPE_NV 0x324D
2231#endif /* EGL_NV_stream_socket */
2232
2233#ifndef EGL_NV_stream_socket_inet
2234#define EGL_NV_stream_socket_inet 1
2235#define EGL_SOCKET_TYPE_INET_NV 0x324F
2236#endif /* EGL_NV_stream_socket_inet */
2237
2238#ifndef EGL_NV_stream_socket_unix
2239#define EGL_NV_stream_socket_unix 1
2240#define EGL_SOCKET_TYPE_UNIX_NV 0x324E
2241#endif /* EGL_NV_stream_socket_unix */
2242
2243#ifndef EGL_NV_stream_sync
2244#define EGL_NV_stream_sync 1
2245#define EGL_SYNC_NEW_FRAME_NV 0x321F
2246typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);
2247#ifdef EGL_EGLEXT_PROTOTYPES
2248EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);
2249#endif
2250#endif /* EGL_NV_stream_sync */
2251
2252#ifndef EGL_NV_sync
2253#define EGL_NV_sync 1
2254typedef void *EGLSyncNV;
2255typedef khronos_utime_nanoseconds_t EGLTimeNV;
2256#ifdef KHRONOS_SUPPORT_INT64
2257#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
2258#define EGL_SYNC_STATUS_NV 0x30E7
2259#define EGL_SIGNALED_NV 0x30E8
2260#define EGL_UNSIGNALED_NV 0x30E9
2261#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001
2262#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull
2263#define EGL_ALREADY_SIGNALED_NV 0x30EA
2264#define EGL_TIMEOUT_EXPIRED_NV 0x30EB
2265#define EGL_CONDITION_SATISFIED_NV 0x30EC
2266#define EGL_SYNC_TYPE_NV 0x30ED
2267#define EGL_SYNC_CONDITION_NV 0x30EE
2268#define EGL_SYNC_FENCE_NV 0x30EF
2269#define EGL_NO_SYNC_NV EGL_CAST(EGLSyncNV,0)
2270typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
2271typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
2272typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
2273typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
2274typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
2275typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
2276#ifdef EGL_EGLEXT_PROTOTYPES
2277EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
2278EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync);
2279EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync);
2280EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
2281EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
2282EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
2283#endif
2284#endif /* KHRONOS_SUPPORT_INT64 */
2285#endif /* EGL_NV_sync */
2286
2287#ifndef EGL_NV_system_time
2288#define EGL_NV_system_time 1
2289typedef khronos_utime_nanoseconds_t EGLuint64NV;
2290#ifdef KHRONOS_SUPPORT_INT64
2291typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
2292typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
2293#ifdef EGL_EGLEXT_PROTOTYPES
2294EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void);
2295EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);
2296#endif
2297#endif /* KHRONOS_SUPPORT_INT64 */
2298#endif /* EGL_NV_system_time */
2299
2300#ifndef EGL_NV_triple_buffer
2301#define EGL_NV_triple_buffer 1
2302#define EGL_TRIPLE_BUFFER_NV 0x3230
2303#endif /* EGL_NV_triple_buffer */
2304
2305#ifndef EGL_TIZEN_image_native_buffer
2306#define EGL_TIZEN_image_native_buffer 1
2307#define EGL_NATIVE_BUFFER_TIZEN 0x32A0
2308#endif /* EGL_TIZEN_image_native_buffer */
2309
2310#ifndef EGL_TIZEN_image_native_surface
2311#define EGL_TIZEN_image_native_surface 1
2312#define EGL_NATIVE_SURFACE_TIZEN 0x32A1
2313#endif /* EGL_TIZEN_image_native_surface */
2314
2315#ifndef EGL_WL_bind_wayland_display
2316#define EGL_WL_bind_wayland_display 1
2317#define PFNEGLBINDWAYLANDDISPLAYWL PFNEGLBINDWAYLANDDISPLAYWLPROC
2318#define PFNEGLUNBINDWAYLANDDISPLAYWL PFNEGLUNBINDWAYLANDDISPLAYWLPROC
2319#define PFNEGLQUERYWAYLANDBUFFERWL PFNEGLQUERYWAYLANDBUFFERWLPROC
2320struct wl_display;
2321struct wl_resource;
2322#define EGL_WAYLAND_BUFFER_WL 0x31D5
2323#define EGL_WAYLAND_PLANE_WL 0x31D6
2324#define EGL_TEXTURE_Y_U_V_WL 0x31D7
2325#define EGL_TEXTURE_Y_UV_WL 0x31D8
2326#define EGL_TEXTURE_Y_XUXV_WL 0x31D9
2327#define EGL_TEXTURE_EXTERNAL_WL 0x31DA
2328#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB
2329typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWLPROC) (EGLDisplay dpy, struct wl_display *display);
2330typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWLPROC) (EGLDisplay dpy, struct wl_display *display);
2331typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWLPROC) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
2332#ifdef EGL_EGLEXT_PROTOTYPES
2333EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL (EGLDisplay dpy, struct wl_display *display);
2334EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL (EGLDisplay dpy, struct wl_display *display);
2335EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
2336#endif
2337#endif /* EGL_WL_bind_wayland_display */
2338
2339#ifndef EGL_WL_create_wayland_buffer_from_image
2340#define EGL_WL_create_wayland_buffer_from_image 1
2341#define PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC
2342struct wl_buffer;
2343typedef struct wl_buffer *(EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC) (EGLDisplay dpy, EGLImageKHR image);
2344#ifdef EGL_EGLEXT_PROTOTYPES
2345EGLAPI struct wl_buffer *EGLAPIENTRY eglCreateWaylandBufferFromImageWL (EGLDisplay dpy, EGLImageKHR image);
2346#endif
2347#endif /* EGL_WL_create_wayland_buffer_from_image */
2348
2349#ifdef __cplusplus
2350}
2351#endif
2352
2353#endif /* __eglext_h_ */
2354
2355#endif /* _MSC_VER */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_endian.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_endian.h
new file mode 100644
index 0000000..2a9b8a3
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_endian.h
@@ -0,0 +1,645 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryEndian
24 *
25 * Functions converting endian-specific values to different byte orders.
26 *
27 * These functions either unconditionally swap byte order (SDL_Swap16,
28 * SDL_Swap32, SDL_Swap64, SDL_SwapFloat), or they swap to/from the system's
29 * native byte order (SDL_Swap16LE, SDL_Swap16BE, SDL_Swap32LE, SDL_Swap32BE,
30 * SDL_Swap32LE, SDL_Swap32BE, SDL_SwapFloatLE, SDL_SwapFloatBE). In the
31 * latter case, the functionality is provided by macros that become no-ops if
32 * a swap isn't necessary: on an x86 (littleendian) processor, SDL_Swap32LE
33 * does nothing, but SDL_Swap32BE reverses the bytes of the data. On a PowerPC
34 * processor (bigendian), the macros behavior is reversed.
35 *
36 * The swap routines are inline functions, and attempt to use compiler
37 * intrinsics, inline assembly, and other magic to make byteswapping
38 * efficient.
39 */
40
41#ifndef SDL_endian_h_
42#define SDL_endian_h_
43
44#include <SDL3/SDL_stdinc.h>
45
46#if defined(_MSC_VER) && (_MSC_VER >= 1400)
47/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
48 so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
49#ifdef __clang__
50#ifndef __PRFCHWINTRIN_H
51#define __PRFCHWINTRIN_H
52static __inline__ void __attribute__((__always_inline__, __nodebug__))
53_m_prefetch(void *__P)
54{
55 __builtin_prefetch(__P, 0, 3 /* _MM_HINT_T0 */);
56}
57#endif /* __PRFCHWINTRIN_H */
58#endif /* __clang__ */
59
60#include <intrin.h>
61#endif
62
63/**
64 * \name The two types of endianness
65 */
66/* @{ */
67
68
69/**
70 * A value to represent littleendian byteorder.
71 *
72 * This is used with the preprocessor macro SDL_BYTEORDER, to determine a
73 * platform's byte ordering:
74 *
75 * ```c
76 * #if SDL_BYTEORDER == SDL_LIL_ENDIAN
77 * SDL_Log("This system is littleendian.");
78 * #endif
79 * ```
80 *
81 * \since This macro is available since SDL 3.2.0.
82 *
83 * \sa SDL_BYTEORDER
84 * \sa SDL_BIG_ENDIAN
85 */
86#define SDL_LIL_ENDIAN 1234
87
88/**
89 * A value to represent bigendian byteorder.
90 *
91 * This is used with the preprocessor macro SDL_BYTEORDER, to determine a
92 * platform's byte ordering:
93 *
94 * ```c
95 * #if SDL_BYTEORDER == SDL_BIG_ENDIAN
96 * SDL_Log("This system is bigendian.");
97 * #endif
98 * ```
99 *
100 * \since This macro is available since SDL 3.2.0.
101 *
102 * \sa SDL_BYTEORDER
103 * \sa SDL_LIL_ENDIAN
104 */
105#define SDL_BIG_ENDIAN 4321
106
107/* @} */
108
109#ifndef SDL_BYTEORDER
110#ifdef SDL_WIKI_DOCUMENTATION_SECTION
111
112/**
113 * A macro that reports the target system's byte order.
114 *
115 * This is set to either SDL_LIL_ENDIAN or SDL_BIG_ENDIAN (and maybe other
116 * values in the future, if something else becomes popular). This can be
117 * tested with the preprocessor, so decisions can be made at compile time.
118 *
119 * ```c
120 * #if SDL_BYTEORDER == SDL_BIG_ENDIAN
121 * SDL_Log("This system is bigendian.");
122 * #endif
123 * ```
124 *
125 * \since This macro is available since SDL 3.2.0.
126 *
127 * \sa SDL_LIL_ENDIAN
128 * \sa SDL_BIG_ENDIAN
129 */
130#define SDL_BYTEORDER SDL_LIL_ENDIAN___or_maybe___SDL_BIG_ENDIAN
131#elif defined(SDL_PLATFORM_LINUX)
132#include <endian.h>
133#define SDL_BYTEORDER __BYTE_ORDER
134#elif defined(SDL_PLATFORM_SOLARIS)
135#include <sys/byteorder.h>
136#if defined(_LITTLE_ENDIAN)
137#define SDL_BYTEORDER SDL_LIL_ENDIAN
138#elif defined(_BIG_ENDIAN)
139#define SDL_BYTEORDER SDL_BIG_ENDIAN
140#else
141#error Unsupported endianness
142#endif
143#elif defined(SDL_PLATFORM_OPENBSD) || defined(__DragonFly__)
144#include <endian.h>
145#define SDL_BYTEORDER BYTE_ORDER
146#elif defined(SDL_PLATFORM_FREEBSD) || defined(SDL_PLATFORM_NETBSD)
147#include <sys/endian.h>
148#define SDL_BYTEORDER BYTE_ORDER
149/* predefs from newer gcc and clang versions: */
150#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
151#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
152#define SDL_BYTEORDER SDL_LIL_ENDIAN
153#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
154#define SDL_BYTEORDER SDL_BIG_ENDIAN
155#else
156#error Unsupported endianness
157#endif /**/
158#else
159#if defined(__hppa__) || \
160 defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
161 (defined(__MIPS__) && defined(__MIPSEB__)) || \
162 defined(__ppc__) || defined(__POWERPC__) || defined(__powerpc__) || defined(__PPC__) || \
163 defined(__sparc__) || defined(__sparc)
164#define SDL_BYTEORDER SDL_BIG_ENDIAN
165#else
166#define SDL_BYTEORDER SDL_LIL_ENDIAN
167#endif
168#endif /* SDL_PLATFORM_LINUX */
169#endif /* !SDL_BYTEORDER */
170
171#ifndef SDL_FLOATWORDORDER
172#ifdef SDL_WIKI_DOCUMENTATION_SECTION
173
174/**
175 * A macro that reports the target system's floating point word order.
176 *
177 * This is set to either SDL_LIL_ENDIAN or SDL_BIG_ENDIAN (and maybe other
178 * values in the future, if something else becomes popular). This can be
179 * tested with the preprocessor, so decisions can be made at compile time.
180 *
181 * ```c
182 * #if SDL_FLOATWORDORDER == SDL_BIG_ENDIAN
183 * SDL_Log("This system's floats are bigendian.");
184 * #endif
185 * ```
186 *
187 * \since This macro is available since SDL 3.2.0.
188 *
189 * \sa SDL_LIL_ENDIAN
190 * \sa SDL_BIG_ENDIAN
191 */
192#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN___or_maybe___SDL_BIG_ENDIAN
193/* predefs from newer gcc versions: */
194#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__FLOAT_WORD_ORDER__)
195#if (__FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__)
196#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
197#elif (__FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__)
198#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
199#else
200#error Unsupported endianness
201#endif /**/
202#elif defined(__MAVERICK__)
203/* For Maverick, float words are always little-endian. */
204#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
205#elif (defined(__arm__) || defined(__thumb__)) && !defined(__VFP_FP__) && !defined(__ARM_EABI__)
206/* For FPA, float words are always big-endian. */
207#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
208#else
209/* By default, assume that floats words follow the memory system mode. */
210#define SDL_FLOATWORDORDER SDL_BYTEORDER
211#endif /* __FLOAT_WORD_ORDER__ */
212#endif /* !SDL_FLOATWORDORDER */
213
214
215#include <SDL3/SDL_begin_code.h>
216/* Set up for C function definitions, even when using C++ */
217#ifdef __cplusplus
218extern "C" {
219#endif
220
221/* various modern compilers may have builtin swap */
222#if defined(__GNUC__) || defined(__clang__)
223# define HAS_BUILTIN_BSWAP16 (SDL_HAS_BUILTIN(__builtin_bswap16)) || \
224 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
225# define HAS_BUILTIN_BSWAP32 (SDL_HAS_BUILTIN(__builtin_bswap32)) || \
226 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
227# define HAS_BUILTIN_BSWAP64 (SDL_HAS_BUILTIN(__builtin_bswap64)) || \
228 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
229
230 /* this one is broken */
231# define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
232#else
233# define HAS_BUILTIN_BSWAP16 0
234# define HAS_BUILTIN_BSWAP32 0
235# define HAS_BUILTIN_BSWAP64 0
236# define HAS_BROKEN_BSWAP 0
237#endif
238
239/* Byte swap 16-bit integer. */
240#ifndef SDL_WIKI_DOCUMENTATION_SECTION
241#if HAS_BUILTIN_BSWAP16
242#define SDL_Swap16(x) __builtin_bswap16(x)
243#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
244#pragma intrinsic(_byteswap_ushort)
245#define SDL_Swap16(x) _byteswap_ushort(x)
246#elif defined(__i386__) && !HAS_BROKEN_BSWAP
247SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x)
248{
249 __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
250 return x;
251}
252#elif defined(__x86_64__)
253SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x)
254{
255 __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
256 return x;
257}
258#elif (defined(__powerpc__) || defined(__ppc__))
259SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x)
260{
261 int result;
262
263 __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
264 return (Uint16)result;
265}
266#elif (defined(__m68k__) && !defined(__mcoldfire__))
267SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x)
268{
269 __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
270 return x;
271}
272#elif defined(__WATCOMC__) && defined(__386__)
273extern __inline Uint16 SDL_Swap16(Uint16);
274#pragma aux SDL_Swap16 = \
275 "xchg al, ah" \
276 parm [ax] \
277 modify [ax];
278#else
279SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x)
280{
281 return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
282}
283#endif
284#endif
285
286/* Byte swap 32-bit integer. */
287#ifndef SDL_WIKI_DOCUMENTATION_SECTION
288#if HAS_BUILTIN_BSWAP32
289#define SDL_Swap32(x) __builtin_bswap32(x)
290#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
291#pragma intrinsic(_byteswap_ulong)
292#define SDL_Swap32(x) _byteswap_ulong(x)
293#elif defined(__i386__) && !HAS_BROKEN_BSWAP
294SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x)
295{
296 __asm__("bswap %0": "=r"(x):"0"(x));
297 return x;
298}
299#elif defined(__x86_64__)
300SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x)
301{
302 __asm__("bswapl %0": "=r"(x):"0"(x));
303 return x;
304}
305#elif (defined(__powerpc__) || defined(__ppc__))
306SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x)
307{
308 Uint32 result;
309
310 __asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
311 __asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
312 __asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
313 return result;
314}
315#elif (defined(__m68k__) && !defined(__mcoldfire__))
316SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x)
317{
318 __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
319 return x;
320}
321#elif defined(__WATCOMC__) && defined(__386__)
322extern __inline Uint32 SDL_Swap32(Uint32);
323#pragma aux SDL_Swap32 = \
324 "bswap eax" \
325 parm [eax] \
326 modify [eax];
327#else
328SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x)
329{
330 return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
331 ((x >> 8) & 0x0000FF00) | (x >> 24)));
332}
333#endif
334#endif
335
336/* Byte swap 64-bit integer. */
337#ifndef SDL_WIKI_DOCUMENTATION_SECTION
338#if HAS_BUILTIN_BSWAP64
339#define SDL_Swap64(x) __builtin_bswap64(x)
340#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
341#pragma intrinsic(_byteswap_uint64)
342#define SDL_Swap64(x) _byteswap_uint64(x)
343#elif defined(__i386__) && !HAS_BROKEN_BSWAP
344SDL_FORCE_INLINE Uint64 SDL_Swap64(Uint64 x)
345{
346 union {
347 struct {
348 Uint32 a, b;
349 } s;
350 Uint64 u;
351 } v;
352 v.u = x;
353 __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
354 : "=r"(v.s.a), "=r"(v.s.b)
355 : "0" (v.s.a), "1"(v.s.b));
356 return v.u;
357}
358#elif defined(__x86_64__)
359SDL_FORCE_INLINE Uint64 SDL_Swap64(Uint64 x)
360{
361 __asm__("bswapq %0": "=r"(x):"0"(x));
362 return x;
363}
364#elif defined(__WATCOMC__) && defined(__386__)
365extern __inline Uint64 SDL_Swap64(Uint64);
366#pragma aux SDL_Swap64 = \
367 "bswap eax" \
368 "bswap edx" \
369 "xchg eax,edx" \
370 parm [eax edx] \
371 modify [eax edx];
372#else
373SDL_FORCE_INLINE Uint64 SDL_Swap64(Uint64 x)
374{
375 Uint32 hi, lo;
376
377 /* Separate into high and low 32-bit values and swap them */
378 lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
379 x >>= 32;
380 hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
381 x = SDL_Swap32(lo);
382 x <<= 32;
383 x |= SDL_Swap32(hi);
384 return (x);
385}
386#endif
387#endif
388
389/**
390 * Byte-swap a floating point number.
391 *
392 * This will always byte-swap the value, whether it's currently in the native
393 * byteorder of the system or not. You should use SDL_SwapFloatLE or
394 * SDL_SwapFloatBE instead, in most cases.
395 *
396 * Note that this is a forced-inline function in a header, and not a public
397 * API function available in the SDL library (which is to say, the code is
398 * embedded in the calling program and the linker and dynamic loader will not
399 * be able to find this function inside SDL itself).
400 *
401 * \param x the value to byte-swap.
402 * \returns x, with its bytes in the opposite endian order.
403 *
404 * \threadsafety It is safe to call this function from any thread.
405 *
406 * \since This function is available since SDL 3.2.0.
407 */
408SDL_FORCE_INLINE float SDL_SwapFloat(float x)
409{
410 union {
411 float f;
412 Uint32 ui32;
413 } swapper;
414 swapper.f = x;
415 swapper.ui32 = SDL_Swap32(swapper.ui32);
416 return swapper.f;
417}
418
419/* remove extra macros */
420#undef HAS_BROKEN_BSWAP
421#undef HAS_BUILTIN_BSWAP16
422#undef HAS_BUILTIN_BSWAP32
423#undef HAS_BUILTIN_BSWAP64
424
425
426#ifdef SDL_WIKI_DOCUMENTATION_SECTION
427
428/**
429 * Byte-swap an unsigned 16-bit number.
430 *
431 * This will always byte-swap the value, whether it's currently in the native
432 * byteorder of the system or not. You should use SDL_Swap16LE or SDL_Swap16BE
433 * instead, in most cases.
434 *
435 * Note that this is a forced-inline function in a header, and not a public
436 * API function available in the SDL library (which is to say, the code is
437 * embedded in the calling program and the linker and dynamic loader will not
438 * be able to find this function inside SDL itself).
439 *
440 * \param x the value to byte-swap.
441 * \returns `x`, with its bytes in the opposite endian order.
442 *
443 * \threadsafety It is safe to call this function from any thread.
444 *
445 * \since This function is available since SDL 3.2.0.
446 */
447SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x) { return x_but_byteswapped; }
448
449/**
450 * Byte-swap an unsigned 32-bit number.
451 *
452 * This will always byte-swap the value, whether it's currently in the native
453 * byteorder of the system or not. You should use SDL_Swap32LE or SDL_Swap32BE
454 * instead, in most cases.
455 *
456 * Note that this is a forced-inline function in a header, and not a public
457 * API function available in the SDL library (which is to say, the code is
458 * embedded in the calling program and the linker and dynamic loader will not
459 * be able to find this function inside SDL itself).
460 *
461 * \param x the value to byte-swap.
462 * \returns `x`, with its bytes in the opposite endian order.
463 *
464 * \threadsafety It is safe to call this function from any thread.
465 *
466 * \since This function is available since SDL 3.2.0.
467 */
468SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x) { return x_but_byteswapped; }
469
470/**
471 * Byte-swap an unsigned 64-bit number.
472 *
473 * This will always byte-swap the value, whether it's currently in the native
474 * byteorder of the system or not. You should use SDL_Swap64LE or SDL_Swap64BE
475 * instead, in most cases.
476 *
477 * Note that this is a forced-inline function in a header, and not a public
478 * API function available in the SDL library (which is to say, the code is
479 * embedded in the calling program and the linker and dynamic loader will not
480 * be able to find this function inside SDL itself).
481 *
482 * \param x the value to byte-swap.
483 * \returns `x`, with its bytes in the opposite endian order.
484 *
485 * \threadsafety It is safe to call this function from any thread.
486 *
487 * \since This function is available since SDL 3.2.0.
488 */
489SDL_FORCE_INLINE Uint64 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
490
491/**
492 * Swap a 16-bit value from littleendian to native byte order.
493 *
494 * If this is running on a littleendian system, `x` is returned unchanged.
495 *
496 * This macro never references `x` more than once, avoiding side effects.
497 *
498 * \param x the value to swap, in littleendian byte order.
499 * \returns `x` in native byte order.
500 *
501 * \threadsafety It is safe to call this macro from any thread.
502 *
503 * \since This macro is available since SDL 3.2.0.
504 */
505#define SDL_Swap16LE(x) SwapOnlyIfNecessary(x)
506
507/**
508 * Swap a 32-bit value from littleendian to native byte order.
509 *
510 * If this is running on a littleendian system, `x` is returned unchanged.
511 *
512 * This macro never references `x` more than once, avoiding side effects.
513 *
514 * \param x the value to swap, in littleendian byte order.
515 * \returns `x` in native byte order.
516 *
517 * \threadsafety It is safe to call this macro from any thread.
518 *
519 * \since This macro is available since SDL 3.2.0.
520 */
521#define SDL_Swap32LE(x) SwapOnlyIfNecessary(x)
522
523/**
524 * Swap a 64-bit value from littleendian to native byte order.
525 *
526 * If this is running on a littleendian system, `x` is returned unchanged.
527 *
528 * This macro never references `x` more than once, avoiding side effects.
529 *
530 * \param x the value to swap, in littleendian byte order.
531 * \returns `x` in native byte order.
532 *
533 * \threadsafety It is safe to call this macro from any thread.
534 *
535 * \since This macro is available since SDL 3.2.0.
536 */
537#define SDL_Swap64LE(x) SwapOnlyIfNecessary(x)
538
539/**
540 * Swap a floating point value from littleendian to native byte order.
541 *
542 * If this is running on a littleendian system, `x` is returned unchanged.
543 *
544 * This macro never references `x` more than once, avoiding side effects.
545 *
546 * \param x the value to swap, in littleendian byte order.
547 * \returns `x` in native byte order.
548 *
549 * \threadsafety It is safe to call this macro from any thread.
550 *
551 * \since This macro is available since SDL 3.2.0.
552 */
553#define SDL_SwapFloatLE(x) SwapOnlyIfNecessary(x)
554
555/**
556 * Swap a 16-bit value from bigendian to native byte order.
557 *
558 * If this is running on a bigendian system, `x` is returned unchanged.
559 *
560 * This macro never references `x` more than once, avoiding side effects.
561 *
562 * \param x the value to swap, in bigendian byte order.
563 * \returns `x` in native byte order.
564 *
565 * \threadsafety It is safe to call this macro from any thread.
566 *
567 * \since This macro is available since SDL 3.2.0.
568 */
569#define SDL_Swap16BE(x) SwapOnlyIfNecessary(x)
570
571/**
572 * Swap a 32-bit value from bigendian to native byte order.
573 *
574 * If this is running on a bigendian system, `x` is returned unchanged.
575 *
576 * This macro never references `x` more than once, avoiding side effects.
577 *
578 * \param x the value to swap, in bigendian byte order.
579 * \returns `x` in native byte order.
580 *
581 * \threadsafety It is safe to call this macro from any thread.
582 *
583 * \since This macro is available since SDL 3.2.0.
584 */
585#define SDL_Swap32BE(x) SwapOnlyIfNecessary(x)
586
587/**
588 * Swap a 64-bit value from bigendian to native byte order.
589 *
590 * If this is running on a bigendian system, `x` is returned unchanged.
591 *
592 * This macro never references `x` more than once, avoiding side effects.
593 *
594 * \param x the value to swap, in bigendian byte order.
595 * \returns `x` in native byte order.
596 *
597 * \threadsafety It is safe to call this macro from any thread.
598 *
599 * \since This macro is available since SDL 3.2.0.
600 */
601#define SDL_Swap64BE(x) SwapOnlyIfNecessary(x)
602
603/**
604 * Swap a floating point value from bigendian to native byte order.
605 *
606 * If this is running on a bigendian system, `x` is returned unchanged.
607 *
608 * This macro never references `x` more than once, avoiding side effects.
609 *
610 * \param x the value to swap, in bigendian byte order.
611 * \returns `x` in native byte order.
612 *
613 * \threadsafety It is safe to call this macro from any thread.
614 *
615 * \since This macro is available since SDL 3.2.0.
616 */
617#define SDL_SwapFloatBE(x) SwapOnlyIfNecessary(x)
618
619#elif SDL_BYTEORDER == SDL_LIL_ENDIAN
620#define SDL_Swap16LE(x) (x)
621#define SDL_Swap32LE(x) (x)
622#define SDL_Swap64LE(x) (x)
623#define SDL_SwapFloatLE(x) (x)
624#define SDL_Swap16BE(x) SDL_Swap16(x)
625#define SDL_Swap32BE(x) SDL_Swap32(x)
626#define SDL_Swap64BE(x) SDL_Swap64(x)
627#define SDL_SwapFloatBE(x) SDL_SwapFloat(x)
628#else
629#define SDL_Swap16LE(x) SDL_Swap16(x)
630#define SDL_Swap32LE(x) SDL_Swap32(x)
631#define SDL_Swap64LE(x) SDL_Swap64(x)
632#define SDL_SwapFloatLE(x) SDL_SwapFloat(x)
633#define SDL_Swap16BE(x) (x)
634#define SDL_Swap32BE(x) (x)
635#define SDL_Swap64BE(x) (x)
636#define SDL_SwapFloatBE(x) (x)
637#endif
638
639/* Ends C function definitions when using C++ */
640#ifdef __cplusplus
641}
642#endif
643#include <SDL3/SDL_close_code.h>
644
645#endif /* SDL_endian_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_error.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_error.h
new file mode 100644
index 0000000..934967c
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_error.h
@@ -0,0 +1,226 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryError
24 *
25 * Simple error message routines for SDL.
26 *
27 * Most apps will interface with these APIs in exactly one function: when
28 * almost any SDL function call reports failure, you can get a human-readable
29 * string of the problem from SDL_GetError().
30 *
31 * These strings are maintained per-thread, and apps are welcome to set their
32 * own errors, which is popular when building libraries on top of SDL for
33 * other apps to consume. These strings are set by calling SDL_SetError().
34 *
35 * A common usage pattern is to have a function that returns true for success
36 * and false for failure, and do this when something fails:
37 *
38 * ```c
39 * if (something_went_wrong) {
40 * return SDL_SetError("The thing broke in this specific way: %d", errcode);
41 * }
42 * ```
43 *
44 * It's also common to just return `false` in this case if the failing thing
45 * is known to call SDL_SetError(), so errors simply propagate through.
46 */
47
48#ifndef SDL_error_h_
49#define SDL_error_h_
50
51#include <SDL3/SDL_stdinc.h>
52
53#include <SDL3/SDL_begin_code.h>
54/* Set up for C function definitions, even when using C++ */
55#ifdef __cplusplus
56extern "C" {
57#endif
58
59/* Public functions */
60
61
62/**
63 * Set the SDL error message for the current thread.
64 *
65 * Calling this function will replace any previous error message that was set.
66 *
67 * This function always returns false, since SDL frequently uses false to
68 * signify a failing result, leading to this idiom:
69 *
70 * ```c
71 * if (error_code) {
72 * return SDL_SetError("This operation has failed: %d", error_code);
73 * }
74 * ```
75 *
76 * \param fmt a printf()-style message format string.
77 * \param ... additional parameters matching % tokens in the `fmt` string, if
78 * any.
79 * \returns false.
80 *
81 * \threadsafety It is safe to call this function from any thread.
82 *
83 * \since This function is available since SDL 3.2.0.
84 *
85 * \sa SDL_ClearError
86 * \sa SDL_GetError
87 * \sa SDL_SetErrorV
88 */
89extern SDL_DECLSPEC bool SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
90
91/**
92 * Set the SDL error message for the current thread.
93 *
94 * Calling this function will replace any previous error message that was set.
95 *
96 * \param fmt a printf()-style message format string.
97 * \param ap a variable argument list.
98 * \returns false.
99 *
100 * \threadsafety It is safe to call this function from any thread.
101 *
102 * \since This function is available since SDL 3.2.0.
103 *
104 * \sa SDL_ClearError
105 * \sa SDL_GetError
106 * \sa SDL_SetError
107 */
108extern SDL_DECLSPEC bool SDLCALL SDL_SetErrorV(SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(1);
109
110/**
111 * Set an error indicating that memory allocation failed.
112 *
113 * This function does not do any memory allocation.
114 *
115 * \returns false.
116 *
117 * \threadsafety It is safe to call this function from any thread.
118 *
119 * \since This function is available since SDL 3.2.0.
120 */
121extern SDL_DECLSPEC bool SDLCALL SDL_OutOfMemory(void);
122
123/**
124 * Retrieve a message about the last error that occurred on the current
125 * thread.
126 *
127 * It is possible for multiple errors to occur before calling SDL_GetError().
128 * Only the last error is returned.
129 *
130 * The message is only applicable when an SDL function has signaled an error.
131 * You must check the return values of SDL function calls to determine when to
132 * appropriately call SDL_GetError(). You should *not* use the results of
133 * SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
134 * an error string even when reporting success.
135 *
136 * SDL will *not* clear the error string for successful API calls. You *must*
137 * check return values for failure cases before you can assume the error
138 * string applies.
139 *
140 * Error strings are set per-thread, so an error set in a different thread
141 * will not interfere with the current thread's operation.
142 *
143 * The returned value is a thread-local string which will remain valid until
144 * the current thread's error string is changed. The caller should make a copy
145 * if the value is needed after the next SDL API call.
146 *
147 * \returns a message with information about the specific error that occurred,
148 * or an empty string if there hasn't been an error message set since
149 * the last call to SDL_ClearError().
150 *
151 * \threadsafety It is safe to call this function from any thread.
152 *
153 * \since This function is available since SDL 3.2.0.
154 *
155 * \sa SDL_ClearError
156 * \sa SDL_SetError
157 */
158extern SDL_DECLSPEC const char * SDLCALL SDL_GetError(void);
159
160/**
161 * Clear any previous error message for this thread.
162 *
163 * \returns true.
164 *
165 * \threadsafety It is safe to call this function from any thread.
166 *
167 * \since This function is available since SDL 3.2.0.
168 *
169 * \sa SDL_GetError
170 * \sa SDL_SetError
171 */
172extern SDL_DECLSPEC bool SDLCALL SDL_ClearError(void);
173
174/**
175 * \name Internal error functions
176 *
177 * \internal
178 * Private error reporting function - used internally.
179 */
180/* @{ */
181
182/**
183 * A macro to standardize error reporting on unsupported operations.
184 *
185 * This simply calls SDL_SetError() with a standardized error string, for
186 * convenience, consistency, and clarity.
187 *
188 * \threadsafety It is safe to call this macro from any thread.
189 *
190 * \since This macro is available since SDL 3.2.0.
191 */
192#define SDL_Unsupported() SDL_SetError("That operation is not supported")
193
194/**
195 * A macro to standardize error reporting on unsupported operations.
196 *
197 * This simply calls SDL_SetError() with a standardized error string, for
198 * convenience, consistency, and clarity.
199 *
200 * A common usage pattern inside SDL is this:
201 *
202 * ```c
203 * bool MyFunction(const char *str) {
204 * if (!str) {
205 * return SDL_InvalidParamError("str"); // returns false.
206 * }
207 * DoSomething(str);
208 * return true;
209 * }
210 * ```
211 *
212 * \threadsafety It is safe to call this macro from any thread.
213 *
214 * \since This macro is available since SDL 3.2.0.
215 */
216#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
217
218/* @} *//* Internal error functions */
219
220/* Ends C function definitions when using C++ */
221#ifdef __cplusplus
222}
223#endif
224#include <SDL3/SDL_close_code.h>
225
226#endif /* SDL_error_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_events.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_events.h
new file mode 100644
index 0000000..d267f05
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_events.h
@@ -0,0 +1,1576 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryEvents
24 *
25 * Event queue management.
26 *
27 * It's extremely common--often required--that an app deal with SDL's event
28 * queue. Almost all useful information about interactions with the real world
29 * flow through here: the user interacting with the computer and app, hardware
30 * coming and going, the system changing in some way, etc.
31 *
32 * An app generally takes a moment, perhaps at the start of a new frame, to
33 * examine any events that have occured since the last time and process or
34 * ignore them. This is generally done by calling SDL_PollEvent() in a loop
35 * until it returns false (or, if using the main callbacks, events are
36 * provided one at a time in calls to SDL_AppEvent() before the next call to
37 * SDL_AppIterate(); in this scenario, the app does not call SDL_PollEvent()
38 * at all).
39 *
40 * There is other forms of control, too: SDL_PeepEvents() has more
41 * functionality at the cost of more complexity, and SDL_WaitEvent() can block
42 * the process until something interesting happens, which might be beneficial
43 * for certain types of programs on low-power hardware. One may also call
44 * SDL_AddEventWatch() to set a callback when new events arrive.
45 *
46 * The app is free to generate their own events, too: SDL_PushEvent allows the
47 * app to put events onto the queue for later retrieval; SDL_RegisterEvents
48 * can guarantee that these events have a type that isn't in use by other
49 * parts of the system.
50 */
51
52#ifndef SDL_events_h_
53#define SDL_events_h_
54
55#include <SDL3/SDL_stdinc.h>
56#include <SDL3/SDL_audio.h>
57#include <SDL3/SDL_camera.h>
58#include <SDL3/SDL_error.h>
59#include <SDL3/SDL_gamepad.h>
60#include <SDL3/SDL_joystick.h>
61#include <SDL3/SDL_keyboard.h>
62#include <SDL3/SDL_keycode.h>
63#include <SDL3/SDL_mouse.h>
64#include <SDL3/SDL_pen.h>
65#include <SDL3/SDL_power.h>
66#include <SDL3/SDL_sensor.h>
67#include <SDL3/SDL_scancode.h>
68#include <SDL3/SDL_touch.h>
69#include <SDL3/SDL_video.h>
70
71#include <SDL3/SDL_begin_code.h>
72/* Set up for C function definitions, even when using C++ */
73#ifdef __cplusplus
74extern "C" {
75#endif
76
77/* General keyboard/mouse/pen state definitions */
78
79/**
80 * The types of events that can be delivered.
81 *
82 * \since This enum is available since SDL 3.2.0.
83 */
84typedef enum SDL_EventType
85{
86 SDL_EVENT_FIRST = 0, /**< Unused (do not remove) */
87
88 /* Application events */
89 SDL_EVENT_QUIT = 0x100, /**< User-requested quit */
90
91 /* These application events have special meaning on iOS and Android, see README-ios.md and README-android.md for details */
92 SDL_EVENT_TERMINATING, /**< The application is being terminated by the OS. This event must be handled in a callback set with SDL_AddEventWatch().
93 Called on iOS in applicationWillTerminate()
94 Called on Android in onDestroy()
95 */
96 SDL_EVENT_LOW_MEMORY, /**< The application is low on memory, free memory if possible. This event must be handled in a callback set with SDL_AddEventWatch().
97 Called on iOS in applicationDidReceiveMemoryWarning()
98 Called on Android in onTrimMemory()
99 */
100 SDL_EVENT_WILL_ENTER_BACKGROUND, /**< The application is about to enter the background. This event must be handled in a callback set with SDL_AddEventWatch().
101 Called on iOS in applicationWillResignActive()
102 Called on Android in onPause()
103 */
104 SDL_EVENT_DID_ENTER_BACKGROUND, /**< The application did enter the background and may not get CPU for some time. This event must be handled in a callback set with SDL_AddEventWatch().
105 Called on iOS in applicationDidEnterBackground()
106 Called on Android in onPause()
107 */
108 SDL_EVENT_WILL_ENTER_FOREGROUND, /**< The application is about to enter the foreground. This event must be handled in a callback set with SDL_AddEventWatch().
109 Called on iOS in applicationWillEnterForeground()
110 Called on Android in onResume()
111 */
112 SDL_EVENT_DID_ENTER_FOREGROUND, /**< The application is now interactive. This event must be handled in a callback set with SDL_AddEventWatch().
113 Called on iOS in applicationDidBecomeActive()
114 Called on Android in onResume()
115 */
116
117 SDL_EVENT_LOCALE_CHANGED, /**< The user's locale preferences have changed. */
118
119 SDL_EVENT_SYSTEM_THEME_CHANGED, /**< The system theme changed */
120
121 /* Display events */
122 /* 0x150 was SDL_DISPLAYEVENT, reserve the number for sdl2-compat */
123 SDL_EVENT_DISPLAY_ORIENTATION = 0x151, /**< Display orientation has changed to data1 */
124 SDL_EVENT_DISPLAY_ADDED, /**< Display has been added to the system */
125 SDL_EVENT_DISPLAY_REMOVED, /**< Display has been removed from the system */
126 SDL_EVENT_DISPLAY_MOVED, /**< Display has changed position */
127 SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED, /**< Display has changed desktop mode */
128 SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED, /**< Display has changed current mode */
129 SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED, /**< Display has changed content scale */
130 SDL_EVENT_DISPLAY_FIRST = SDL_EVENT_DISPLAY_ORIENTATION,
131 SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED,
132
133 /* Window events */
134 /* 0x200 was SDL_WINDOWEVENT, reserve the number for sdl2-compat */
135 /* 0x201 was SDL_SYSWMEVENT, reserve the number for sdl2-compat */
136 SDL_EVENT_WINDOW_SHOWN = 0x202, /**< Window has been shown */
137 SDL_EVENT_WINDOW_HIDDEN, /**< Window has been hidden */
138 SDL_EVENT_WINDOW_EXPOSED, /**< Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event */
139 SDL_EVENT_WINDOW_MOVED, /**< Window has been moved to data1, data2 */
140 SDL_EVENT_WINDOW_RESIZED, /**< Window has been resized to data1xdata2 */
141 SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED,/**< The pixel size of the window has changed to data1xdata2 */
142 SDL_EVENT_WINDOW_METAL_VIEW_RESIZED,/**< The pixel size of a Metal view associated with the window has changed */
143 SDL_EVENT_WINDOW_MINIMIZED, /**< Window has been minimized */
144 SDL_EVENT_WINDOW_MAXIMIZED, /**< Window has been maximized */
145 SDL_EVENT_WINDOW_RESTORED, /**< Window has been restored to normal size and position */
146 SDL_EVENT_WINDOW_MOUSE_ENTER, /**< Window has gained mouse focus */
147 SDL_EVENT_WINDOW_MOUSE_LEAVE, /**< Window has lost mouse focus */
148 SDL_EVENT_WINDOW_FOCUS_GAINED, /**< Window has gained keyboard focus */
149 SDL_EVENT_WINDOW_FOCUS_LOST, /**< Window has lost keyboard focus */
150 SDL_EVENT_WINDOW_CLOSE_REQUESTED, /**< The window manager requests that the window be closed */
151 SDL_EVENT_WINDOW_HIT_TEST, /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL */
152 SDL_EVENT_WINDOW_ICCPROF_CHANGED, /**< The ICC profile of the window's display has changed */
153 SDL_EVENT_WINDOW_DISPLAY_CHANGED, /**< Window has been moved to display data1 */
154 SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED, /**< Window display scale has been changed */
155 SDL_EVENT_WINDOW_SAFE_AREA_CHANGED, /**< The window safe area has been changed */
156 SDL_EVENT_WINDOW_OCCLUDED, /**< The window has been occluded */
157 SDL_EVENT_WINDOW_ENTER_FULLSCREEN, /**< The window has entered fullscreen mode */
158 SDL_EVENT_WINDOW_LEAVE_FULLSCREEN, /**< The window has left fullscreen mode */
159 SDL_EVENT_WINDOW_DESTROYED, /**< The window with the associated ID is being or has been destroyed. If this message is being handled
160 in an event watcher, the window handle is still valid and can still be used to retrieve any properties
161 associated with the window. Otherwise, the handle has already been destroyed and all resources
162 associated with it are invalid */
163 SDL_EVENT_WINDOW_HDR_STATE_CHANGED, /**< Window HDR properties have changed */
164 SDL_EVENT_WINDOW_FIRST = SDL_EVENT_WINDOW_SHOWN,
165 SDL_EVENT_WINDOW_LAST = SDL_EVENT_WINDOW_HDR_STATE_CHANGED,
166
167 /* Keyboard events */
168 SDL_EVENT_KEY_DOWN = 0x300, /**< Key pressed */
169 SDL_EVENT_KEY_UP, /**< Key released */
170 SDL_EVENT_TEXT_EDITING, /**< Keyboard text editing (composition) */
171 SDL_EVENT_TEXT_INPUT, /**< Keyboard text input */
172 SDL_EVENT_KEYMAP_CHANGED, /**< Keymap changed due to a system event such as an
173 input language or keyboard layout change. */
174 SDL_EVENT_KEYBOARD_ADDED, /**< A new keyboard has been inserted into the system */
175 SDL_EVENT_KEYBOARD_REMOVED, /**< A keyboard has been removed */
176 SDL_EVENT_TEXT_EDITING_CANDIDATES, /**< Keyboard text editing candidates */
177
178 /* Mouse events */
179 SDL_EVENT_MOUSE_MOTION = 0x400, /**< Mouse moved */
180 SDL_EVENT_MOUSE_BUTTON_DOWN, /**< Mouse button pressed */
181 SDL_EVENT_MOUSE_BUTTON_UP, /**< Mouse button released */
182 SDL_EVENT_MOUSE_WHEEL, /**< Mouse wheel motion */
183 SDL_EVENT_MOUSE_ADDED, /**< A new mouse has been inserted into the system */
184 SDL_EVENT_MOUSE_REMOVED, /**< A mouse has been removed */
185
186 /* Joystick events */
187 SDL_EVENT_JOYSTICK_AXIS_MOTION = 0x600, /**< Joystick axis motion */
188 SDL_EVENT_JOYSTICK_BALL_MOTION, /**< Joystick trackball motion */
189 SDL_EVENT_JOYSTICK_HAT_MOTION, /**< Joystick hat position change */
190 SDL_EVENT_JOYSTICK_BUTTON_DOWN, /**< Joystick button pressed */
191 SDL_EVENT_JOYSTICK_BUTTON_UP, /**< Joystick button released */
192 SDL_EVENT_JOYSTICK_ADDED, /**< A new joystick has been inserted into the system */
193 SDL_EVENT_JOYSTICK_REMOVED, /**< An opened joystick has been removed */
194 SDL_EVENT_JOYSTICK_BATTERY_UPDATED, /**< Joystick battery level change */
195 SDL_EVENT_JOYSTICK_UPDATE_COMPLETE, /**< Joystick update is complete */
196
197 /* Gamepad events */
198 SDL_EVENT_GAMEPAD_AXIS_MOTION = 0x650, /**< Gamepad axis motion */
199 SDL_EVENT_GAMEPAD_BUTTON_DOWN, /**< Gamepad button pressed */
200 SDL_EVENT_GAMEPAD_BUTTON_UP, /**< Gamepad button released */
201 SDL_EVENT_GAMEPAD_ADDED, /**< A new gamepad has been inserted into the system */
202 SDL_EVENT_GAMEPAD_REMOVED, /**< A gamepad has been removed */
203 SDL_EVENT_GAMEPAD_REMAPPED, /**< The gamepad mapping was updated */
204 SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN, /**< Gamepad touchpad was touched */
205 SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION, /**< Gamepad touchpad finger was moved */
206 SDL_EVENT_GAMEPAD_TOUCHPAD_UP, /**< Gamepad touchpad finger was lifted */
207 SDL_EVENT_GAMEPAD_SENSOR_UPDATE, /**< Gamepad sensor was updated */
208 SDL_EVENT_GAMEPAD_UPDATE_COMPLETE, /**< Gamepad update is complete */
209 SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED, /**< Gamepad Steam handle has changed */
210
211 /* Touch events */
212 SDL_EVENT_FINGER_DOWN = 0x700,
213 SDL_EVENT_FINGER_UP,
214 SDL_EVENT_FINGER_MOTION,
215 SDL_EVENT_FINGER_CANCELED,
216
217 /* 0x800, 0x801, and 0x802 were the Gesture events from SDL2. Do not reuse these values! sdl2-compat needs them! */
218
219 /* Clipboard events */
220 SDL_EVENT_CLIPBOARD_UPDATE = 0x900, /**< The clipboard or primary selection changed */
221
222 /* Drag and drop events */
223 SDL_EVENT_DROP_FILE = 0x1000, /**< The system requests a file open */
224 SDL_EVENT_DROP_TEXT, /**< text/plain drag-and-drop event */
225 SDL_EVENT_DROP_BEGIN, /**< A new set of drops is beginning (NULL filename) */
226 SDL_EVENT_DROP_COMPLETE, /**< Current set of drops is now complete (NULL filename) */
227 SDL_EVENT_DROP_POSITION, /**< Position while moving over the window */
228
229 /* Audio hotplug events */
230 SDL_EVENT_AUDIO_DEVICE_ADDED = 0x1100, /**< A new audio device is available */
231 SDL_EVENT_AUDIO_DEVICE_REMOVED, /**< An audio device has been removed. */
232 SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED, /**< An audio device's format has been changed by the system. */
233
234 /* Sensor events */
235 SDL_EVENT_SENSOR_UPDATE = 0x1200, /**< A sensor was updated */
236
237 /* Pressure-sensitive pen events */
238 SDL_EVENT_PEN_PROXIMITY_IN = 0x1300, /**< Pressure-sensitive pen has become available */
239 SDL_EVENT_PEN_PROXIMITY_OUT, /**< Pressure-sensitive pen has become unavailable */
240 SDL_EVENT_PEN_DOWN, /**< Pressure-sensitive pen touched drawing surface */
241 SDL_EVENT_PEN_UP, /**< Pressure-sensitive pen stopped touching drawing surface */
242 SDL_EVENT_PEN_BUTTON_DOWN, /**< Pressure-sensitive pen button pressed */
243 SDL_EVENT_PEN_BUTTON_UP, /**< Pressure-sensitive pen button released */
244 SDL_EVENT_PEN_MOTION, /**< Pressure-sensitive pen is moving on the tablet */
245 SDL_EVENT_PEN_AXIS, /**< Pressure-sensitive pen angle/pressure/etc changed */
246
247 /* Camera hotplug events */
248 SDL_EVENT_CAMERA_DEVICE_ADDED = 0x1400, /**< A new camera device is available */
249 SDL_EVENT_CAMERA_DEVICE_REMOVED, /**< A camera device has been removed. */
250 SDL_EVENT_CAMERA_DEVICE_APPROVED, /**< A camera device has been approved for use by the user. */
251 SDL_EVENT_CAMERA_DEVICE_DENIED, /**< A camera device has been denied for use by the user. */
252
253 /* Render events */
254 SDL_EVENT_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
255 SDL_EVENT_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
256 SDL_EVENT_RENDER_DEVICE_LOST, /**< The device has been lost and can't be recovered. */
257
258 /* Reserved events for private platforms */
259 SDL_EVENT_PRIVATE0 = 0x4000,
260 SDL_EVENT_PRIVATE1,
261 SDL_EVENT_PRIVATE2,
262 SDL_EVENT_PRIVATE3,
263
264 /* Internal events */
265 SDL_EVENT_POLL_SENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
266
267 /** Events SDL_EVENT_USER through SDL_EVENT_LAST are for your use,
268 * and should be allocated with SDL_RegisterEvents()
269 */
270 SDL_EVENT_USER = 0x8000,
271
272 /**
273 * This last event is only for bounding internal arrays
274 */
275 SDL_EVENT_LAST = 0xFFFF,
276
277 /* This just makes sure the enum is the size of Uint32 */
278 SDL_EVENT_ENUM_PADDING = 0x7FFFFFFF
279
280} SDL_EventType;
281
282/**
283 * Fields shared by every event
284 *
285 * \since This struct is available since SDL 3.2.0.
286 */
287typedef struct SDL_CommonEvent
288{
289 Uint32 type; /**< Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration */
290 Uint32 reserved;
291 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
292} SDL_CommonEvent;
293
294/**
295 * Display state change event data (event.display.*)
296 *
297 * \since This struct is available since SDL 3.2.0.
298 */
299typedef struct SDL_DisplayEvent
300{
301 SDL_EventType type; /**< SDL_DISPLAYEVENT_* */
302 Uint32 reserved;
303 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
304 SDL_DisplayID displayID;/**< The associated display */
305 Sint32 data1; /**< event dependent data */
306 Sint32 data2; /**< event dependent data */
307} SDL_DisplayEvent;
308
309/**
310 * Window state change event data (event.window.*)
311 *
312 * \since This struct is available since SDL 3.2.0.
313 */
314typedef struct SDL_WindowEvent
315{
316 SDL_EventType type; /**< SDL_EVENT_WINDOW_* */
317 Uint32 reserved;
318 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
319 SDL_WindowID windowID; /**< The associated window */
320 Sint32 data1; /**< event dependent data */
321 Sint32 data2; /**< event dependent data */
322} SDL_WindowEvent;
323
324/**
325 * Keyboard device event structure (event.kdevice.*)
326 *
327 * \since This struct is available since SDL 3.2.0.
328 */
329typedef struct SDL_KeyboardDeviceEvent
330{
331 SDL_EventType type; /**< SDL_EVENT_KEYBOARD_ADDED or SDL_EVENT_KEYBOARD_REMOVED */
332 Uint32 reserved;
333 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
334 SDL_KeyboardID which; /**< The keyboard instance id */
335} SDL_KeyboardDeviceEvent;
336
337/**
338 * Keyboard button event structure (event.key.*)
339 *
340 * The `key` is the base SDL_Keycode generated by pressing the `scancode`
341 * using the current keyboard layout, applying any options specified in
342 * SDL_HINT_KEYCODE_OPTIONS. You can get the SDL_Keycode corresponding to the
343 * event scancode and modifiers directly from the keyboard layout, bypassing
344 * SDL_HINT_KEYCODE_OPTIONS, by calling SDL_GetKeyFromScancode().
345 *
346 * \since This struct is available since SDL 3.2.0.
347 *
348 * \sa SDL_GetKeyFromScancode
349 * \sa SDL_HINT_KEYCODE_OPTIONS
350 */
351typedef struct SDL_KeyboardEvent
352{
353 SDL_EventType type; /**< SDL_EVENT_KEY_DOWN or SDL_EVENT_KEY_UP */
354 Uint32 reserved;
355 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
356 SDL_WindowID windowID; /**< The window with keyboard focus, if any */
357 SDL_KeyboardID which; /**< The keyboard instance id, or 0 if unknown or virtual */
358 SDL_Scancode scancode; /**< SDL physical key code */
359 SDL_Keycode key; /**< SDL virtual key code */
360 SDL_Keymod mod; /**< current key modifiers */
361 Uint16 raw; /**< The platform dependent scancode for this event */
362 bool down; /**< true if the key is pressed */
363 bool repeat; /**< true if this is a key repeat */
364} SDL_KeyboardEvent;
365
366/**
367 * Keyboard text editing event structure (event.edit.*)
368 *
369 * The start cursor is the position, in UTF-8 characters, where new typing
370 * will be inserted into the editing text. The length is the number of UTF-8
371 * characters that will be replaced by new typing.
372 *
373 * \since This struct is available since SDL 3.2.0.
374 */
375typedef struct SDL_TextEditingEvent
376{
377 SDL_EventType type; /**< SDL_EVENT_TEXT_EDITING */
378 Uint32 reserved;
379 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
380 SDL_WindowID windowID; /**< The window with keyboard focus, if any */
381 const char *text; /**< The editing text */
382 Sint32 start; /**< The start cursor of selected editing text, or -1 if not set */
383 Sint32 length; /**< The length of selected editing text, or -1 if not set */
384} SDL_TextEditingEvent;
385
386/**
387 * Keyboard IME candidates event structure (event.edit_candidates.*)
388 *
389 * \since This struct is available since SDL 3.2.0.
390 */
391typedef struct SDL_TextEditingCandidatesEvent
392{
393 SDL_EventType type; /**< SDL_EVENT_TEXT_EDITING_CANDIDATES */
394 Uint32 reserved;
395 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
396 SDL_WindowID windowID; /**< The window with keyboard focus, if any */
397 const char * const *candidates; /**< The list of candidates, or NULL if there are no candidates available */
398 Sint32 num_candidates; /**< The number of strings in `candidates` */
399 Sint32 selected_candidate; /**< The index of the selected candidate, or -1 if no candidate is selected */
400 bool horizontal; /**< true if the list is horizontal, false if it's vertical */
401 Uint8 padding1;
402 Uint8 padding2;
403 Uint8 padding3;
404} SDL_TextEditingCandidatesEvent;
405
406/**
407 * Keyboard text input event structure (event.text.*)
408 *
409 * This event will never be delivered unless text input is enabled by calling
410 * SDL_StartTextInput(). Text input is disabled by default!
411 *
412 * \since This struct is available since SDL 3.2.0.
413 *
414 * \sa SDL_StartTextInput
415 * \sa SDL_StopTextInput
416 */
417typedef struct SDL_TextInputEvent
418{
419 SDL_EventType type; /**< SDL_EVENT_TEXT_INPUT */
420 Uint32 reserved;
421 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
422 SDL_WindowID windowID; /**< The window with keyboard focus, if any */
423 const char *text; /**< The input text, UTF-8 encoded */
424} SDL_TextInputEvent;
425
426/**
427 * Mouse device event structure (event.mdevice.*)
428 *
429 * \since This struct is available since SDL 3.2.0.
430 */
431typedef struct SDL_MouseDeviceEvent
432{
433 SDL_EventType type; /**< SDL_EVENT_MOUSE_ADDED or SDL_EVENT_MOUSE_REMOVED */
434 Uint32 reserved;
435 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
436 SDL_MouseID which; /**< The mouse instance id */
437} SDL_MouseDeviceEvent;
438
439/**
440 * Mouse motion event structure (event.motion.*)
441 *
442 * \since This struct is available since SDL 3.2.0.
443 */
444typedef struct SDL_MouseMotionEvent
445{
446 SDL_EventType type; /**< SDL_EVENT_MOUSE_MOTION */
447 Uint32 reserved;
448 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
449 SDL_WindowID windowID; /**< The window with mouse focus, if any */
450 SDL_MouseID which; /**< The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0 */
451 SDL_MouseButtonFlags state; /**< The current button state */
452 float x; /**< X coordinate, relative to window */
453 float y; /**< Y coordinate, relative to window */
454 float xrel; /**< The relative motion in the X direction */
455 float yrel; /**< The relative motion in the Y direction */
456} SDL_MouseMotionEvent;
457
458/**
459 * Mouse button event structure (event.button.*)
460 *
461 * \since This struct is available since SDL 3.2.0.
462 */
463typedef struct SDL_MouseButtonEvent
464{
465 SDL_EventType type; /**< SDL_EVENT_MOUSE_BUTTON_DOWN or SDL_EVENT_MOUSE_BUTTON_UP */
466 Uint32 reserved;
467 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
468 SDL_WindowID windowID; /**< The window with mouse focus, if any */
469 SDL_MouseID which; /**< The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0 */
470 Uint8 button; /**< The mouse button index */
471 bool down; /**< true if the button is pressed */
472 Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */
473 Uint8 padding;
474 float x; /**< X coordinate, relative to window */
475 float y; /**< Y coordinate, relative to window */
476} SDL_MouseButtonEvent;
477
478/**
479 * Mouse wheel event structure (event.wheel.*)
480 *
481 * \since This struct is available since SDL 3.2.0.
482 */
483typedef struct SDL_MouseWheelEvent
484{
485 SDL_EventType type; /**< SDL_EVENT_MOUSE_WHEEL */
486 Uint32 reserved;
487 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
488 SDL_WindowID windowID; /**< The window with mouse focus, if any */
489 SDL_MouseID which; /**< The mouse instance id in relative mode or 0 */
490 float x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
491 float y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
492 SDL_MouseWheelDirection direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
493 float mouse_x; /**< X coordinate, relative to window */
494 float mouse_y; /**< Y coordinate, relative to window */
495 Sint32 integer_x; /**< The amount scrolled horizontally, accumulated to whole scroll "ticks" (added in 3.2.12) */
496 Sint32 integer_y; /**< The amount scrolled vertically, accumulated to whole scroll "ticks" (added in 3.2.12) */
497} SDL_MouseWheelEvent;
498
499/**
500 * Joystick axis motion event structure (event.jaxis.*)
501 *
502 * \since This struct is available since SDL 3.2.0.
503 */
504typedef struct SDL_JoyAxisEvent
505{
506 SDL_EventType type; /**< SDL_EVENT_JOYSTICK_AXIS_MOTION */
507 Uint32 reserved;
508 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
509 SDL_JoystickID which; /**< The joystick instance id */
510 Uint8 axis; /**< The joystick axis index */
511 Uint8 padding1;
512 Uint8 padding2;
513 Uint8 padding3;
514 Sint16 value; /**< The axis value (range: -32768 to 32767) */
515 Uint16 padding4;
516} SDL_JoyAxisEvent;
517
518/**
519 * Joystick trackball motion event structure (event.jball.*)
520 *
521 * \since This struct is available since SDL 3.2.0.
522 */
523typedef struct SDL_JoyBallEvent
524{
525 SDL_EventType type; /**< SDL_EVENT_JOYSTICK_BALL_MOTION */
526 Uint32 reserved;
527 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
528 SDL_JoystickID which; /**< The joystick instance id */
529 Uint8 ball; /**< The joystick trackball index */
530 Uint8 padding1;
531 Uint8 padding2;
532 Uint8 padding3;
533 Sint16 xrel; /**< The relative motion in the X direction */
534 Sint16 yrel; /**< The relative motion in the Y direction */
535} SDL_JoyBallEvent;
536
537/**
538 * Joystick hat position change event structure (event.jhat.*)
539 *
540 * \since This struct is available since SDL 3.2.0.
541 */
542typedef struct SDL_JoyHatEvent
543{
544 SDL_EventType type; /**< SDL_EVENT_JOYSTICK_HAT_MOTION */
545 Uint32 reserved;
546 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
547 SDL_JoystickID which; /**< The joystick instance id */
548 Uint8 hat; /**< The joystick hat index */
549 Uint8 value; /**< The hat position value.
550 * \sa SDL_HAT_LEFTUP SDL_HAT_UP SDL_HAT_RIGHTUP
551 * \sa SDL_HAT_LEFT SDL_HAT_CENTERED SDL_HAT_RIGHT
552 * \sa SDL_HAT_LEFTDOWN SDL_HAT_DOWN SDL_HAT_RIGHTDOWN
553 *
554 * Note that zero means the POV is centered.
555 */
556 Uint8 padding1;
557 Uint8 padding2;
558} SDL_JoyHatEvent;
559
560/**
561 * Joystick button event structure (event.jbutton.*)
562 *
563 * \since This struct is available since SDL 3.2.0.
564 */
565typedef struct SDL_JoyButtonEvent
566{
567 SDL_EventType type; /**< SDL_EVENT_JOYSTICK_BUTTON_DOWN or SDL_EVENT_JOYSTICK_BUTTON_UP */
568 Uint32 reserved;
569 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
570 SDL_JoystickID which; /**< The joystick instance id */
571 Uint8 button; /**< The joystick button index */
572 bool down; /**< true if the button is pressed */
573 Uint8 padding1;
574 Uint8 padding2;
575} SDL_JoyButtonEvent;
576
577/**
578 * Joystick device event structure (event.jdevice.*)
579 *
580 * SDL will send JOYSTICK_ADDED events for devices that are already plugged in
581 * during SDL_Init.
582 *
583 * \since This struct is available since SDL 3.2.0.
584 *
585 * \sa SDL_GamepadDeviceEvent
586 */
587typedef struct SDL_JoyDeviceEvent
588{
589 SDL_EventType type; /**< SDL_EVENT_JOYSTICK_ADDED or SDL_EVENT_JOYSTICK_REMOVED or SDL_EVENT_JOYSTICK_UPDATE_COMPLETE */
590 Uint32 reserved;
591 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
592 SDL_JoystickID which; /**< The joystick instance id */
593} SDL_JoyDeviceEvent;
594
595/**
596 * Joystick battery level change event structure (event.jbattery.*)
597 *
598 * \since This struct is available since SDL 3.2.0.
599 */
600typedef struct SDL_JoyBatteryEvent
601{
602 SDL_EventType type; /**< SDL_EVENT_JOYSTICK_BATTERY_UPDATED */
603 Uint32 reserved;
604 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
605 SDL_JoystickID which; /**< The joystick instance id */
606 SDL_PowerState state; /**< The joystick battery state */
607 int percent; /**< The joystick battery percent charge remaining */
608} SDL_JoyBatteryEvent;
609
610/**
611 * Gamepad axis motion event structure (event.gaxis.*)
612 *
613 * \since This struct is available since SDL 3.2.0.
614 */
615typedef struct SDL_GamepadAxisEvent
616{
617 SDL_EventType type; /**< SDL_EVENT_GAMEPAD_AXIS_MOTION */
618 Uint32 reserved;
619 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
620 SDL_JoystickID which; /**< The joystick instance id */
621 Uint8 axis; /**< The gamepad axis (SDL_GamepadAxis) */
622 Uint8 padding1;
623 Uint8 padding2;
624 Uint8 padding3;
625 Sint16 value; /**< The axis value (range: -32768 to 32767) */
626 Uint16 padding4;
627} SDL_GamepadAxisEvent;
628
629
630/**
631 * Gamepad button event structure (event.gbutton.*)
632 *
633 * \since This struct is available since SDL 3.2.0.
634 */
635typedef struct SDL_GamepadButtonEvent
636{
637 SDL_EventType type; /**< SDL_EVENT_GAMEPAD_BUTTON_DOWN or SDL_EVENT_GAMEPAD_BUTTON_UP */
638 Uint32 reserved;
639 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
640 SDL_JoystickID which; /**< The joystick instance id */
641 Uint8 button; /**< The gamepad button (SDL_GamepadButton) */
642 bool down; /**< true if the button is pressed */
643 Uint8 padding1;
644 Uint8 padding2;
645} SDL_GamepadButtonEvent;
646
647
648/**
649 * Gamepad device event structure (event.gdevice.*)
650 *
651 * Joysticks that are supported gamepads receive both an SDL_JoyDeviceEvent
652 * and an SDL_GamepadDeviceEvent.
653 *
654 * SDL will send GAMEPAD_ADDED events for joysticks that are already plugged
655 * in during SDL_Init() and are recognized as gamepads. It will also send
656 * events for joysticks that get gamepad mappings at runtime.
657 *
658 * \since This struct is available since SDL 3.2.0.
659 *
660 * \sa SDL_JoyDeviceEvent
661 */
662typedef struct SDL_GamepadDeviceEvent
663{
664 SDL_EventType type; /**< SDL_EVENT_GAMEPAD_ADDED, SDL_EVENT_GAMEPAD_REMOVED, or SDL_EVENT_GAMEPAD_REMAPPED, SDL_EVENT_GAMEPAD_UPDATE_COMPLETE or SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED */
665 Uint32 reserved;
666 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
667 SDL_JoystickID which; /**< The joystick instance id */
668} SDL_GamepadDeviceEvent;
669
670/**
671 * Gamepad touchpad event structure (event.gtouchpad.*)
672 *
673 * \since This struct is available since SDL 3.2.0.
674 */
675typedef struct SDL_GamepadTouchpadEvent
676{
677 SDL_EventType type; /**< SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN or SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION or SDL_EVENT_GAMEPAD_TOUCHPAD_UP */
678 Uint32 reserved;
679 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
680 SDL_JoystickID which; /**< The joystick instance id */
681 Sint32 touchpad; /**< The index of the touchpad */
682 Sint32 finger; /**< The index of the finger on the touchpad */
683 float x; /**< Normalized in the range 0...1 with 0 being on the left */
684 float y; /**< Normalized in the range 0...1 with 0 being at the top */
685 float pressure; /**< Normalized in the range 0...1 */
686} SDL_GamepadTouchpadEvent;
687
688/**
689 * Gamepad sensor event structure (event.gsensor.*)
690 *
691 * \since This struct is available since SDL 3.2.0.
692 */
693typedef struct SDL_GamepadSensorEvent
694{
695 SDL_EventType type; /**< SDL_EVENT_GAMEPAD_SENSOR_UPDATE */
696 Uint32 reserved;
697 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
698 SDL_JoystickID which; /**< The joystick instance id */
699 Sint32 sensor; /**< The type of the sensor, one of the values of SDL_SensorType */
700 float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */
701 Uint64 sensor_timestamp; /**< The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock */
702} SDL_GamepadSensorEvent;
703
704/**
705 * Audio device event structure (event.adevice.*)
706 *
707 * \since This struct is available since SDL 3.2.0.
708 */
709typedef struct SDL_AudioDeviceEvent
710{
711 SDL_EventType type; /**< SDL_EVENT_AUDIO_DEVICE_ADDED, or SDL_EVENT_AUDIO_DEVICE_REMOVED, or SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED */
712 Uint32 reserved;
713 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
714 SDL_AudioDeviceID which; /**< SDL_AudioDeviceID for the device being added or removed or changing */
715 bool recording; /**< false if a playback device, true if a recording device. */
716 Uint8 padding1;
717 Uint8 padding2;
718 Uint8 padding3;
719} SDL_AudioDeviceEvent;
720
721/**
722 * Camera device event structure (event.cdevice.*)
723 *
724 * \since This struct is available since SDL 3.2.0.
725 */
726typedef struct SDL_CameraDeviceEvent
727{
728 SDL_EventType type; /**< SDL_EVENT_CAMERA_DEVICE_ADDED, SDL_EVENT_CAMERA_DEVICE_REMOVED, SDL_EVENT_CAMERA_DEVICE_APPROVED, SDL_EVENT_CAMERA_DEVICE_DENIED */
729 Uint32 reserved;
730 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
731 SDL_CameraID which; /**< SDL_CameraID for the device being added or removed or changing */
732} SDL_CameraDeviceEvent;
733
734
735/**
736 * Renderer event structure (event.render.*)
737 *
738 * \since This struct is available since SDL 3.2.0.
739 */
740typedef struct SDL_RenderEvent
741{
742 SDL_EventType type; /**< SDL_EVENT_RENDER_TARGETS_RESET, SDL_EVENT_RENDER_DEVICE_RESET, SDL_EVENT_RENDER_DEVICE_LOST */
743 Uint32 reserved;
744 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
745 SDL_WindowID windowID; /**< The window containing the renderer in question. */
746} SDL_RenderEvent;
747
748
749/**
750 * Touch finger event structure (event.tfinger.*)
751 *
752 * Coordinates in this event are normalized. `x` and `y` are normalized to a
753 * range between 0.0f and 1.0f, relative to the window, so (0,0) is the top
754 * left and (1,1) is the bottom right. Delta coordinates `dx` and `dy` are
755 * normalized in the ranges of -1.0f (traversed all the way from the bottom or
756 * right to all the way up or left) to 1.0f (traversed all the way from the
757 * top or left to all the way down or right).
758 *
759 * Note that while the coordinates are _normalized_, they are not _clamped_,
760 * which means in some circumstances you can get a value outside of this
761 * range. For example, a renderer using logical presentation might give a
762 * negative value when the touch is in the letterboxing. Some platforms might
763 * report a touch outside of the window, which will also be outside of the
764 * range.
765 *
766 * \since This struct is available since SDL 3.2.0.
767 */
768typedef struct SDL_TouchFingerEvent
769{
770 SDL_EventType type; /**< SDL_EVENT_FINGER_DOWN, SDL_EVENT_FINGER_UP, SDL_EVENT_FINGER_MOTION, or SDL_EVENT_FINGER_CANCELED */
771 Uint32 reserved;
772 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
773 SDL_TouchID touchID; /**< The touch device id */
774 SDL_FingerID fingerID;
775 float x; /**< Normalized in the range 0...1 */
776 float y; /**< Normalized in the range 0...1 */
777 float dx; /**< Normalized in the range -1...1 */
778 float dy; /**< Normalized in the range -1...1 */
779 float pressure; /**< Normalized in the range 0...1 */
780 SDL_WindowID windowID; /**< The window underneath the finger, if any */
781} SDL_TouchFingerEvent;
782
783/**
784 * Pressure-sensitive pen proximity event structure (event.pmotion.*)
785 *
786 * When a pen becomes visible to the system (it is close enough to a tablet,
787 * etc), SDL will send an SDL_EVENT_PEN_PROXIMITY_IN event with the new pen's
788 * ID. This ID is valid until the pen leaves proximity again (has been removed
789 * from the tablet's area, the tablet has been unplugged, etc). If the same
790 * pen reenters proximity again, it will be given a new ID.
791 *
792 * Note that "proximity" means "close enough for the tablet to know the tool
793 * is there." The pen touching and lifting off from the tablet while not
794 * leaving the area are handled by SDL_EVENT_PEN_DOWN and SDL_EVENT_PEN_UP.
795 *
796 * \since This struct is available since SDL 3.2.0.
797 */
798typedef struct SDL_PenProximityEvent
799{
800 SDL_EventType type; /**< SDL_EVENT_PEN_PROXIMITY_IN or SDL_EVENT_PEN_PROXIMITY_OUT */
801 Uint32 reserved;
802 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
803 SDL_WindowID windowID; /**< The window with pen focus, if any */
804 SDL_PenID which; /**< The pen instance id */
805} SDL_PenProximityEvent;
806
807/**
808 * Pressure-sensitive pen motion event structure (event.pmotion.*)
809 *
810 * Depending on the hardware, you may get motion events when the pen is not
811 * touching a tablet, for tracking a pen even when it isn't drawing. You
812 * should listen for SDL_EVENT_PEN_DOWN and SDL_EVENT_PEN_UP events, or check
813 * `pen_state & SDL_PEN_INPUT_DOWN` to decide if a pen is "drawing" when
814 * dealing with pen motion.
815 *
816 * \since This struct is available since SDL 3.2.0.
817 */
818typedef struct SDL_PenMotionEvent
819{
820 SDL_EventType type; /**< SDL_EVENT_PEN_MOTION */
821 Uint32 reserved;
822 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
823 SDL_WindowID windowID; /**< The window with pen focus, if any */
824 SDL_PenID which; /**< The pen instance id */
825 SDL_PenInputFlags pen_state; /**< Complete pen input state at time of event */
826 float x; /**< X coordinate, relative to window */
827 float y; /**< Y coordinate, relative to window */
828} SDL_PenMotionEvent;
829
830/**
831 * Pressure-sensitive pen touched event structure (event.ptouch.*)
832 *
833 * These events come when a pen touches a surface (a tablet, etc), or lifts
834 * off from one.
835 *
836 * \since This struct is available since SDL 3.2.0.
837 */
838typedef struct SDL_PenTouchEvent
839{
840 SDL_EventType type; /**< SDL_EVENT_PEN_DOWN or SDL_EVENT_PEN_UP */
841 Uint32 reserved;
842 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
843 SDL_WindowID windowID; /**< The window with pen focus, if any */
844 SDL_PenID which; /**< The pen instance id */
845 SDL_PenInputFlags pen_state; /**< Complete pen input state at time of event */
846 float x; /**< X coordinate, relative to window */
847 float y; /**< Y coordinate, relative to window */
848 bool eraser; /**< true if eraser end is used (not all pens support this). */
849 bool down; /**< true if the pen is touching or false if the pen is lifted off */
850} SDL_PenTouchEvent;
851
852/**
853 * Pressure-sensitive pen button event structure (event.pbutton.*)
854 *
855 * This is for buttons on the pen itself that the user might click. The pen
856 * itself pressing down to draw triggers a SDL_EVENT_PEN_DOWN event instead.
857 *
858 * \since This struct is available since SDL 3.2.0.
859 */
860typedef struct SDL_PenButtonEvent
861{
862 SDL_EventType type; /**< SDL_EVENT_PEN_BUTTON_DOWN or SDL_EVENT_PEN_BUTTON_UP */
863 Uint32 reserved;
864 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
865 SDL_WindowID windowID; /**< The window with mouse focus, if any */
866 SDL_PenID which; /**< The pen instance id */
867 SDL_PenInputFlags pen_state; /**< Complete pen input state at time of event */
868 float x; /**< X coordinate, relative to window */
869 float y; /**< Y coordinate, relative to window */
870 Uint8 button; /**< The pen button index (first button is 1). */
871 bool down; /**< true if the button is pressed */
872} SDL_PenButtonEvent;
873
874/**
875 * Pressure-sensitive pen pressure / angle event structure (event.paxis.*)
876 *
877 * You might get some of these events even if the pen isn't touching the
878 * tablet.
879 *
880 * \since This struct is available since SDL 3.2.0.
881 */
882typedef struct SDL_PenAxisEvent
883{
884 SDL_EventType type; /**< SDL_EVENT_PEN_AXIS */
885 Uint32 reserved;
886 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
887 SDL_WindowID windowID; /**< The window with pen focus, if any */
888 SDL_PenID which; /**< The pen instance id */
889 SDL_PenInputFlags pen_state; /**< Complete pen input state at time of event */
890 float x; /**< X coordinate, relative to window */
891 float y; /**< Y coordinate, relative to window */
892 SDL_PenAxis axis; /**< Axis that has changed */
893 float value; /**< New value of axis */
894} SDL_PenAxisEvent;
895
896/**
897 * An event used to drop text or request a file open by the system
898 * (event.drop.*)
899 *
900 * \since This struct is available since SDL 3.2.0.
901 */
902typedef struct SDL_DropEvent
903{
904 SDL_EventType type; /**< SDL_EVENT_DROP_BEGIN or SDL_EVENT_DROP_FILE or SDL_EVENT_DROP_TEXT or SDL_EVENT_DROP_COMPLETE or SDL_EVENT_DROP_POSITION */
905 Uint32 reserved;
906 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
907 SDL_WindowID windowID; /**< The window that was dropped on, if any */
908 float x; /**< X coordinate, relative to window (not on begin) */
909 float y; /**< Y coordinate, relative to window (not on begin) */
910 const char *source; /**< The source app that sent this drop event, or NULL if that isn't available */
911 const char *data; /**< The text for SDL_EVENT_DROP_TEXT and the file name for SDL_EVENT_DROP_FILE, NULL for other events */
912} SDL_DropEvent;
913
914/**
915 * An event triggered when the clipboard contents have changed
916 * (event.clipboard.*)
917 *
918 * \since This struct is available since SDL 3.2.0.
919 */
920typedef struct SDL_ClipboardEvent
921{
922 SDL_EventType type; /**< SDL_EVENT_CLIPBOARD_UPDATE */
923 Uint32 reserved;
924 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
925 bool owner; /**< are we owning the clipboard (internal update) */
926 Sint32 num_mime_types; /**< number of mime types */
927 const char **mime_types; /**< current mime types */
928} SDL_ClipboardEvent;
929
930/**
931 * Sensor event structure (event.sensor.*)
932 *
933 * \since This struct is available since SDL 3.2.0.
934 */
935typedef struct SDL_SensorEvent
936{
937 SDL_EventType type; /**< SDL_EVENT_SENSOR_UPDATE */
938 Uint32 reserved;
939 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
940 SDL_SensorID which; /**< The instance ID of the sensor */
941 float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_GetSensorData() */
942 Uint64 sensor_timestamp; /**< The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock */
943} SDL_SensorEvent;
944
945/**
946 * The "quit requested" event
947 *
948 * \since This struct is available since SDL 3.2.0.
949 */
950typedef struct SDL_QuitEvent
951{
952 SDL_EventType type; /**< SDL_EVENT_QUIT */
953 Uint32 reserved;
954 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
955} SDL_QuitEvent;
956
957/**
958 * A user-defined event type (event.user.*)
959 *
960 * This event is unique; it is never created by SDL, but only by the
961 * application. The event can be pushed onto the event queue using
962 * SDL_PushEvent(). The contents of the structure members are completely up to
963 * the programmer; the only requirement is that '''type''' is a value obtained
964 * from SDL_RegisterEvents().
965 *
966 * \since This struct is available since SDL 3.2.0.
967 */
968typedef struct SDL_UserEvent
969{
970 Uint32 type; /**< SDL_EVENT_USER through SDL_EVENT_LAST-1, Uint32 because these are not in the SDL_EventType enumeration */
971 Uint32 reserved;
972 Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
973 SDL_WindowID windowID; /**< The associated window if any */
974 Sint32 code; /**< User defined event code */
975 void *data1; /**< User defined data pointer */
976 void *data2; /**< User defined data pointer */
977} SDL_UserEvent;
978
979
980/**
981 * The structure for all events in SDL.
982 *
983 * The SDL_Event structure is the core of all event handling in SDL. SDL_Event
984 * is a union of all event structures used in SDL.
985 *
986 * \since This struct is available since SDL 3.2.0.
987 */
988typedef union SDL_Event
989{
990 Uint32 type; /**< Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration */
991 SDL_CommonEvent common; /**< Common event data */
992 SDL_DisplayEvent display; /**< Display event data */
993 SDL_WindowEvent window; /**< Window event data */
994 SDL_KeyboardDeviceEvent kdevice; /**< Keyboard device change event data */
995 SDL_KeyboardEvent key; /**< Keyboard event data */
996 SDL_TextEditingEvent edit; /**< Text editing event data */
997 SDL_TextEditingCandidatesEvent edit_candidates; /**< Text editing candidates event data */
998 SDL_TextInputEvent text; /**< Text input event data */
999 SDL_MouseDeviceEvent mdevice; /**< Mouse device change event data */
1000 SDL_MouseMotionEvent motion; /**< Mouse motion event data */
1001 SDL_MouseButtonEvent button; /**< Mouse button event data */
1002 SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
1003 SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
1004 SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
1005 SDL_JoyBallEvent jball; /**< Joystick ball event data */
1006 SDL_JoyHatEvent jhat; /**< Joystick hat event data */
1007 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
1008 SDL_JoyBatteryEvent jbattery; /**< Joystick battery event data */
1009 SDL_GamepadDeviceEvent gdevice; /**< Gamepad device event data */
1010 SDL_GamepadAxisEvent gaxis; /**< Gamepad axis event data */
1011 SDL_GamepadButtonEvent gbutton; /**< Gamepad button event data */
1012 SDL_GamepadTouchpadEvent gtouchpad; /**< Gamepad touchpad event data */
1013 SDL_GamepadSensorEvent gsensor; /**< Gamepad sensor event data */
1014 SDL_AudioDeviceEvent adevice; /**< Audio device event data */
1015 SDL_CameraDeviceEvent cdevice; /**< Camera device event data */
1016 SDL_SensorEvent sensor; /**< Sensor event data */
1017 SDL_QuitEvent quit; /**< Quit request event data */
1018 SDL_UserEvent user; /**< Custom event data */
1019 SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
1020 SDL_PenProximityEvent pproximity; /**< Pen proximity event data */
1021 SDL_PenTouchEvent ptouch; /**< Pen tip touching event data */
1022 SDL_PenMotionEvent pmotion; /**< Pen motion event data */
1023 SDL_PenButtonEvent pbutton; /**< Pen button event data */
1024 SDL_PenAxisEvent paxis; /**< Pen axis event data */
1025 SDL_RenderEvent render; /**< Render event data */
1026 SDL_DropEvent drop; /**< Drag and drop event data */
1027 SDL_ClipboardEvent clipboard; /**< Clipboard event data */
1028
1029 /* This is necessary for ABI compatibility between Visual C++ and GCC.
1030 Visual C++ will respect the push pack pragma and use 52 bytes (size of
1031 SDL_TextEditingEvent, the largest structure for 32-bit and 64-bit
1032 architectures) for this union, and GCC will use the alignment of the
1033 largest datatype within the union, which is 8 bytes on 64-bit
1034 architectures.
1035
1036 So... we'll add padding to force the size to be the same for both.
1037
1038 On architectures where pointers are 16 bytes, this needs rounding up to
1039 the next multiple of 16, 64, and on architectures where pointers are
1040 even larger the size of SDL_UserEvent will dominate as being 3 pointers.
1041 */
1042 Uint8 padding[128];
1043} SDL_Event;
1044
1045/* Make sure we haven't broken binary compatibility */
1046SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
1047
1048
1049/* Function prototypes */
1050
1051/**
1052 * Pump the event loop, gathering events from the input devices.
1053 *
1054 * This function updates the event queue and internal input device state.
1055 *
1056 * SDL_PumpEvents() gathers all the pending input information from devices and
1057 * places it in the event queue. Without calls to SDL_PumpEvents() no events
1058 * would ever be placed on the queue. Often the need for calls to
1059 * SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and
1060 * SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not
1061 * polling or waiting for events (e.g. you are filtering them), then you must
1062 * call SDL_PumpEvents() to force an event queue update.
1063 *
1064 * \threadsafety This function should only be called on the main thread.
1065 *
1066 * \since This function is available since SDL 3.2.0.
1067 *
1068 * \sa SDL_PollEvent
1069 * \sa SDL_WaitEvent
1070 */
1071extern SDL_DECLSPEC void SDLCALL SDL_PumpEvents(void);
1072
1073/* @{ */
1074
1075/**
1076 * The type of action to request from SDL_PeepEvents().
1077 *
1078 * \since This enum is available since SDL 3.2.0.
1079 */
1080typedef enum SDL_EventAction
1081{
1082 SDL_ADDEVENT, /**< Add events to the back of the queue. */
1083 SDL_PEEKEVENT, /**< Check but don't remove events from the queue front. */
1084 SDL_GETEVENT /**< Retrieve/remove events from the front of the queue. */
1085} SDL_EventAction;
1086
1087/**
1088 * Check the event queue for messages and optionally return them.
1089 *
1090 * `action` may be any of the following:
1091 *
1092 * - `SDL_ADDEVENT`: up to `numevents` events will be added to the back of the
1093 * event queue.
1094 * - `SDL_PEEKEVENT`: `numevents` events at the front of the event queue,
1095 * within the specified minimum and maximum type, will be returned to the
1096 * caller and will _not_ be removed from the queue. If you pass NULL for
1097 * `events`, then `numevents` is ignored and the total number of matching
1098 * events will be returned.
1099 * - `SDL_GETEVENT`: up to `numevents` events at the front of the event queue,
1100 * within the specified minimum and maximum type, will be returned to the
1101 * caller and will be removed from the queue.
1102 *
1103 * You may have to call SDL_PumpEvents() before calling this function.
1104 * Otherwise, the events may not be ready to be filtered when you call
1105 * SDL_PeepEvents().
1106 *
1107 * \param events destination buffer for the retrieved events, may be NULL to
1108 * leave the events in the queue and return the number of events
1109 * that would have been stored.
1110 * \param numevents if action is SDL_ADDEVENT, the number of events to add
1111 * back to the event queue; if action is SDL_PEEKEVENT or
1112 * SDL_GETEVENT, the maximum number of events to retrieve.
1113 * \param action action to take; see [Remarks](#remarks) for details.
1114 * \param minType minimum value of the event type to be considered;
1115 * SDL_EVENT_FIRST is a safe choice.
1116 * \param maxType maximum value of the event type to be considered;
1117 * SDL_EVENT_LAST is a safe choice.
1118 * \returns the number of events actually stored or -1 on failure; call
1119 * SDL_GetError() for more information.
1120 *
1121 * \threadsafety It is safe to call this function from any thread.
1122 *
1123 * \since This function is available since SDL 3.2.0.
1124 *
1125 * \sa SDL_PollEvent
1126 * \sa SDL_PumpEvents
1127 * \sa SDL_PushEvent
1128 */
1129extern SDL_DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event *events, int numevents, SDL_EventAction action, Uint32 minType, Uint32 maxType);
1130/* @} */
1131
1132/**
1133 * Check for the existence of a certain event type in the event queue.
1134 *
1135 * If you need to check for a range of event types, use SDL_HasEvents()
1136 * instead.
1137 *
1138 * \param type the type of event to be queried; see SDL_EventType for details.
1139 * \returns true if events matching `type` are present, or false if events
1140 * matching `type` are not present.
1141 *
1142 * \threadsafety It is safe to call this function from any thread.
1143 *
1144 * \since This function is available since SDL 3.2.0.
1145 *
1146 * \sa SDL_HasEvents
1147 */
1148extern SDL_DECLSPEC bool SDLCALL SDL_HasEvent(Uint32 type);
1149
1150
1151/**
1152 * Check for the existence of certain event types in the event queue.
1153 *
1154 * If you need to check for a single event type, use SDL_HasEvent() instead.
1155 *
1156 * \param minType the low end of event type to be queried, inclusive; see
1157 * SDL_EventType for details.
1158 * \param maxType the high end of event type to be queried, inclusive; see
1159 * SDL_EventType for details.
1160 * \returns true if events with type >= `minType` and <= `maxType` are
1161 * present, or false if not.
1162 *
1163 * \threadsafety It is safe to call this function from any thread.
1164 *
1165 * \since This function is available since SDL 3.2.0.
1166 *
1167 * \sa SDL_HasEvents
1168 */
1169extern SDL_DECLSPEC bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
1170
1171/**
1172 * Clear events of a specific type from the event queue.
1173 *
1174 * This will unconditionally remove any events from the queue that match
1175 * `type`. If you need to remove a range of event types, use SDL_FlushEvents()
1176 * instead.
1177 *
1178 * It's also normal to just ignore events you don't care about in your event
1179 * loop without calling this function.
1180 *
1181 * This function only affects currently queued events. If you want to make
1182 * sure that all pending OS events are flushed, you can call SDL_PumpEvents()
1183 * on the main thread immediately before the flush call.
1184 *
1185 * If you have user events with custom data that needs to be freed, you should
1186 * use SDL_PeepEvents() to remove and clean up those events before calling
1187 * this function.
1188 *
1189 * \param type the type of event to be cleared; see SDL_EventType for details.
1190 *
1191 * \threadsafety It is safe to call this function from any thread.
1192 *
1193 * \since This function is available since SDL 3.2.0.
1194 *
1195 * \sa SDL_FlushEvents
1196 */
1197extern SDL_DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
1198
1199/**
1200 * Clear events of a range of types from the event queue.
1201 *
1202 * This will unconditionally remove any events from the queue that are in the
1203 * range of `minType` to `maxType`, inclusive. If you need to remove a single
1204 * event type, use SDL_FlushEvent() instead.
1205 *
1206 * It's also normal to just ignore events you don't care about in your event
1207 * loop without calling this function.
1208 *
1209 * This function only affects currently queued events. If you want to make
1210 * sure that all pending OS events are flushed, you can call SDL_PumpEvents()
1211 * on the main thread immediately before the flush call.
1212 *
1213 * \param minType the low end of event type to be cleared, inclusive; see
1214 * SDL_EventType for details.
1215 * \param maxType the high end of event type to be cleared, inclusive; see
1216 * SDL_EventType for details.
1217 *
1218 * \threadsafety It is safe to call this function from any thread.
1219 *
1220 * \since This function is available since SDL 3.2.0.
1221 *
1222 * \sa SDL_FlushEvent
1223 */
1224extern SDL_DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
1225
1226/**
1227 * Poll for currently pending events.
1228 *
1229 * If `event` is not NULL, the next event is removed from the queue and stored
1230 * in the SDL_Event structure pointed to by `event`. The 1 returned refers to
1231 * this event, immediately stored in the SDL Event structure -- not an event
1232 * to follow.
1233 *
1234 * If `event` is NULL, it simply returns 1 if there is an event in the queue,
1235 * but will not remove it from the queue.
1236 *
1237 * As this function may implicitly call SDL_PumpEvents(), you can only call
1238 * this function in the thread that set the video mode.
1239 *
1240 * SDL_PollEvent() is the favored way of receiving system events since it can
1241 * be done from the main loop and does not suspend the main loop while waiting
1242 * on an event to be posted.
1243 *
1244 * The common practice is to fully process the event queue once every frame,
1245 * usually as a first step before updating the game's state:
1246 *
1247 * ```c
1248 * while (game_is_still_running) {
1249 * SDL_Event event;
1250 * while (SDL_PollEvent(&event)) { // poll until all events are handled!
1251 * // decide what to do with this event.
1252 * }
1253 *
1254 * // update game state, draw the current frame
1255 * }
1256 * ```
1257 *
1258 * \param event the SDL_Event structure to be filled with the next event from
1259 * the queue, or NULL.
1260 * \returns true if this got an event or false if there are none available.
1261 *
1262 * \threadsafety This function should only be called on the main thread.
1263 *
1264 * \since This function is available since SDL 3.2.0.
1265 *
1266 * \sa SDL_PushEvent
1267 * \sa SDL_WaitEvent
1268 * \sa SDL_WaitEventTimeout
1269 */
1270extern SDL_DECLSPEC bool SDLCALL SDL_PollEvent(SDL_Event *event);
1271
1272/**
1273 * Wait indefinitely for the next available event.
1274 *
1275 * If `event` is not NULL, the next event is removed from the queue and stored
1276 * in the SDL_Event structure pointed to by `event`.
1277 *
1278 * As this function may implicitly call SDL_PumpEvents(), you can only call
1279 * this function in the thread that initialized the video subsystem.
1280 *
1281 * \param event the SDL_Event structure to be filled in with the next event
1282 * from the queue, or NULL.
1283 * \returns true on success or false if there was an error while waiting for
1284 * events; call SDL_GetError() for more information.
1285 *
1286 * \threadsafety This function should only be called on the main thread.
1287 *
1288 * \since This function is available since SDL 3.2.0.
1289 *
1290 * \sa SDL_PollEvent
1291 * \sa SDL_PushEvent
1292 * \sa SDL_WaitEventTimeout
1293 */
1294extern SDL_DECLSPEC bool SDLCALL SDL_WaitEvent(SDL_Event *event);
1295
1296/**
1297 * Wait until the specified timeout (in milliseconds) for the next available
1298 * event.
1299 *
1300 * If `event` is not NULL, the next event is removed from the queue and stored
1301 * in the SDL_Event structure pointed to by `event`.
1302 *
1303 * As this function may implicitly call SDL_PumpEvents(), you can only call
1304 * this function in the thread that initialized the video subsystem.
1305 *
1306 * The timeout is not guaranteed, the actual wait time could be longer due to
1307 * system scheduling.
1308 *
1309 * \param event the SDL_Event structure to be filled in with the next event
1310 * from the queue, or NULL.
1311 * \param timeoutMS the maximum number of milliseconds to wait for the next
1312 * available event.
1313 * \returns true if this got an event or false if the timeout elapsed without
1314 * any events available.
1315 *
1316 * \threadsafety This function should only be called on the main thread.
1317 *
1318 * \since This function is available since SDL 3.2.0.
1319 *
1320 * \sa SDL_PollEvent
1321 * \sa SDL_PushEvent
1322 * \sa SDL_WaitEvent
1323 */
1324extern SDL_DECLSPEC bool SDLCALL SDL_WaitEventTimeout(SDL_Event *event, Sint32 timeoutMS);
1325
1326/**
1327 * Add an event to the event queue.
1328 *
1329 * The event queue can actually be used as a two way communication channel.
1330 * Not only can events be read from the queue, but the user can also push
1331 * their own events onto it. `event` is a pointer to the event structure you
1332 * wish to push onto the queue. The event is copied into the queue, and the
1333 * caller may dispose of the memory pointed to after SDL_PushEvent() returns.
1334 *
1335 * Note: Pushing device input events onto the queue doesn't modify the state
1336 * of the device within SDL.
1337 *
1338 * Note: Events pushed onto the queue with SDL_PushEvent() get passed through
1339 * the event filter but events added with SDL_PeepEvents() do not.
1340 *
1341 * For pushing application-specific events, please use SDL_RegisterEvents() to
1342 * get an event type that does not conflict with other code that also wants
1343 * its own custom event types.
1344 *
1345 * \param event the SDL_Event to be added to the queue.
1346 * \returns true on success, false if the event was filtered or on failure;
1347 * call SDL_GetError() for more information. A common reason for
1348 * error is the event queue being full.
1349 *
1350 * \threadsafety It is safe to call this function from any thread.
1351 *
1352 * \since This function is available since SDL 3.2.0.
1353 *
1354 * \sa SDL_PeepEvents
1355 * \sa SDL_PollEvent
1356 * \sa SDL_RegisterEvents
1357 */
1358extern SDL_DECLSPEC bool SDLCALL SDL_PushEvent(SDL_Event *event);
1359
1360/**
1361 * A function pointer used for callbacks that watch the event queue.
1362 *
1363 * \param userdata what was passed as `userdata` to SDL_SetEventFilter() or
1364 * SDL_AddEventWatch, etc.
1365 * \param event the event that triggered the callback.
1366 * \returns true to permit event to be added to the queue, and false to
1367 * disallow it. When used with SDL_AddEventWatch, the return value is
1368 * ignored.
1369 *
1370 * \threadsafety SDL may call this callback at any time from any thread; the
1371 * application is responsible for locking resources the callback
1372 * touches that need to be protected.
1373 *
1374 * \since This datatype is available since SDL 3.2.0.
1375 *
1376 * \sa SDL_SetEventFilter
1377 * \sa SDL_AddEventWatch
1378 */
1379typedef bool (SDLCALL *SDL_EventFilter)(void *userdata, SDL_Event *event);
1380
1381/**
1382 * Set up a filter to process all events before they are added to the internal
1383 * event queue.
1384 *
1385 * If you just want to see events without modifying them or preventing them
1386 * from being queued, you should use SDL_AddEventWatch() instead.
1387 *
1388 * If the filter function returns true when called, then the event will be
1389 * added to the internal queue. If it returns false, then the event will be
1390 * dropped from the queue, but the internal state will still be updated. This
1391 * allows selective filtering of dynamically arriving events.
1392 *
1393 * **WARNING**: Be very careful of what you do in the event filter function,
1394 * as it may run in a different thread!
1395 *
1396 * On platforms that support it, if the quit event is generated by an
1397 * interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the
1398 * application at the next event poll.
1399 *
1400 * Note: Disabled events never make it to the event filter function; see
1401 * SDL_SetEventEnabled().
1402 *
1403 * Note: Events pushed onto the queue with SDL_PushEvent() get passed through
1404 * the event filter, but events pushed onto the queue with SDL_PeepEvents() do
1405 * not.
1406 *
1407 * \param filter an SDL_EventFilter function to call when an event happens.
1408 * \param userdata a pointer that is passed to `filter`.
1409 *
1410 * \threadsafety It is safe to call this function from any thread.
1411 *
1412 * \since This function is available since SDL 3.2.0.
1413 *
1414 * \sa SDL_AddEventWatch
1415 * \sa SDL_SetEventEnabled
1416 * \sa SDL_GetEventFilter
1417 * \sa SDL_PeepEvents
1418 * \sa SDL_PushEvent
1419 */
1420extern SDL_DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter, void *userdata);
1421
1422/**
1423 * Query the current event filter.
1424 *
1425 * This function can be used to "chain" filters, by saving the existing filter
1426 * before replacing it with a function that will call that saved filter.
1427 *
1428 * \param filter the current callback function will be stored here.
1429 * \param userdata the pointer that is passed to the current event filter will
1430 * be stored here.
1431 * \returns true on success or false if there is no event filter set.
1432 *
1433 * \threadsafety It is safe to call this function from any thread.
1434 *
1435 * \since This function is available since SDL 3.2.0.
1436 *
1437 * \sa SDL_SetEventFilter
1438 */
1439extern SDL_DECLSPEC bool SDLCALL SDL_GetEventFilter(SDL_EventFilter *filter, void **userdata);
1440
1441/**
1442 * Add a callback to be triggered when an event is added to the event queue.
1443 *
1444 * `filter` will be called when an event happens, and its return value is
1445 * ignored.
1446 *
1447 * **WARNING**: Be very careful of what you do in the event filter function,
1448 * as it may run in a different thread!
1449 *
1450 * If the quit event is generated by a signal (e.g. SIGINT), it will bypass
1451 * the internal queue and be delivered to the watch callback immediately, and
1452 * arrive at the next event poll.
1453 *
1454 * Note: the callback is called for events posted by the user through
1455 * SDL_PushEvent(), but not for disabled events, nor for events by a filter
1456 * callback set with SDL_SetEventFilter(), nor for events posted by the user
1457 * through SDL_PeepEvents().
1458 *
1459 * \param filter an SDL_EventFilter function to call when an event happens.
1460 * \param userdata a pointer that is passed to `filter`.
1461 * \returns true on success or false on failure; call SDL_GetError() for more
1462 * information.
1463 *
1464 * \threadsafety It is safe to call this function from any thread.
1465 *
1466 * \since This function is available since SDL 3.2.0.
1467 *
1468 * \sa SDL_RemoveEventWatch
1469 * \sa SDL_SetEventFilter
1470 */
1471extern SDL_DECLSPEC bool SDLCALL SDL_AddEventWatch(SDL_EventFilter filter, void *userdata);
1472
1473/**
1474 * Remove an event watch callback added with SDL_AddEventWatch().
1475 *
1476 * This function takes the same input as SDL_AddEventWatch() to identify and
1477 * delete the corresponding callback.
1478 *
1479 * \param filter the function originally passed to SDL_AddEventWatch().
1480 * \param userdata the pointer originally passed to SDL_AddEventWatch().
1481 *
1482 * \threadsafety It is safe to call this function from any thread.
1483 *
1484 * \since This function is available since SDL 3.2.0.
1485 *
1486 * \sa SDL_AddEventWatch
1487 */
1488extern SDL_DECLSPEC void SDLCALL SDL_RemoveEventWatch(SDL_EventFilter filter, void *userdata);
1489
1490/**
1491 * Run a specific filter function on the current event queue, removing any
1492 * events for which the filter returns false.
1493 *
1494 * See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(),
1495 * this function does not change the filter permanently, it only uses the
1496 * supplied filter until this function returns.
1497 *
1498 * \param filter the SDL_EventFilter function to call when an event happens.
1499 * \param userdata a pointer that is passed to `filter`.
1500 *
1501 * \threadsafety It is safe to call this function from any thread.
1502 *
1503 * \since This function is available since SDL 3.2.0.
1504 *
1505 * \sa SDL_GetEventFilter
1506 * \sa SDL_SetEventFilter
1507 */
1508extern SDL_DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter, void *userdata);
1509
1510/**
1511 * Set the state of processing events by type.
1512 *
1513 * \param type the type of event; see SDL_EventType for details.
1514 * \param enabled whether to process the event or not.
1515 *
1516 * \threadsafety It is safe to call this function from any thread.
1517 *
1518 * \since This function is available since SDL 3.2.0.
1519 *
1520 * \sa SDL_EventEnabled
1521 */
1522extern SDL_DECLSPEC void SDLCALL SDL_SetEventEnabled(Uint32 type, bool enabled);
1523
1524/**
1525 * Query the state of processing events by type.
1526 *
1527 * \param type the type of event; see SDL_EventType for details.
1528 * \returns true if the event is being processed, false otherwise.
1529 *
1530 * \threadsafety It is safe to call this function from any thread.
1531 *
1532 * \since This function is available since SDL 3.2.0.
1533 *
1534 * \sa SDL_SetEventEnabled
1535 */
1536extern SDL_DECLSPEC bool SDLCALL SDL_EventEnabled(Uint32 type);
1537
1538/**
1539 * Allocate a set of user-defined events, and return the beginning event
1540 * number for that set of events.
1541 *
1542 * \param numevents the number of events to be allocated.
1543 * \returns the beginning event number, or 0 if numevents is invalid or if
1544 * there are not enough user-defined events left.
1545 *
1546 * \threadsafety It is safe to call this function from any thread.
1547 *
1548 * \since This function is available since SDL 3.2.0.
1549 *
1550 * \sa SDL_PushEvent
1551 */
1552extern SDL_DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
1553
1554/**
1555 * Get window associated with an event.
1556 *
1557 * \param event an event containing a `windowID`.
1558 * \returns the associated window on success or NULL if there is none.
1559 *
1560 * \threadsafety It is safe to call this function from any thread.
1561 *
1562 * \since This function is available since SDL 3.2.0.
1563 *
1564 * \sa SDL_PollEvent
1565 * \sa SDL_WaitEvent
1566 * \sa SDL_WaitEventTimeout
1567 */
1568extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromEvent(const SDL_Event *event);
1569
1570/* Ends C function definitions when using C++ */
1571#ifdef __cplusplus
1572}
1573#endif
1574#include <SDL3/SDL_close_code.h>
1575
1576#endif /* SDL_events_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_filesystem.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_filesystem.h
new file mode 100644
index 0000000..af3ca27
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_filesystem.h
@@ -0,0 +1,503 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryFilesystem
24 *
25 * SDL offers an API for examining and manipulating the system's filesystem.
26 * This covers most things one would need to do with directories, except for
27 * actual file I/O (which is covered by [CategoryIOStream](CategoryIOStream)
28 * and [CategoryAsyncIO](CategoryAsyncIO) instead).
29 *
30 * There are functions to answer necessary path questions:
31 *
32 * - Where is my app's data? SDL_GetBasePath().
33 * - Where can I safely write files? SDL_GetPrefPath().
34 * - Where are paths like Downloads, Desktop, Music? SDL_GetUserFolder().
35 * - What is this thing at this location? SDL_GetPathInfo().
36 * - What items live in this folder? SDL_EnumerateDirectory().
37 * - What items live in this folder by wildcard? SDL_GlobDirectory().
38 * - What is my current working directory? SDL_GetCurrentDirectory().
39 *
40 * SDL also offers functions to manipulate the directory tree: renaming,
41 * removing, copying files.
42 */
43
44#ifndef SDL_filesystem_h_
45#define SDL_filesystem_h_
46
47#include <SDL3/SDL_stdinc.h>
48#include <SDL3/SDL_error.h>
49
50#include <SDL3/SDL_begin_code.h>
51
52/* Set up for C function definitions, even when using C++ */
53#ifdef __cplusplus
54extern "C" {
55#endif
56
57/**
58 * Get the directory where the application was run from.
59 *
60 * SDL caches the result of this call internally, but the first call to this
61 * function is not necessarily fast, so plan accordingly.
62 *
63 * **macOS and iOS Specific Functionality**: If the application is in a ".app"
64 * bundle, this function returns the Resource directory (e.g.
65 * MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
66 * a property to the Info.plist file. Adding a string key with the name
67 * SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the
68 * behaviour.
69 *
70 * Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an
71 * application in /Applications/SDLApp/MyApp.app):
72 *
73 * - `resource`: bundle resource directory (the default). For example:
74 * `/Applications/SDLApp/MyApp.app/Contents/Resources`
75 * - `bundle`: the Bundle directory. For example:
76 * `/Applications/SDLApp/MyApp.app/`
77 * - `parent`: the containing directory of the bundle. For example:
78 * `/Applications/SDLApp/`
79 *
80 * **Nintendo 3DS Specific Functionality**: This function returns "romfs"
81 * directory of the application as it is uncommon to store resources outside
82 * the executable. As such it is not a writable directory.
83 *
84 * The returned path is guaranteed to end with a path separator ('\\' on
85 * Windows, '/' on most other platforms).
86 *
87 * \returns an absolute path in UTF-8 encoding to the application data
88 * directory. NULL will be returned on error or when the platform
89 * doesn't implement this functionality, call SDL_GetError() for more
90 * information.
91 *
92 * \since This function is available since SDL 3.2.0.
93 *
94 * \sa SDL_GetPrefPath
95 */
96extern SDL_DECLSPEC const char * SDLCALL SDL_GetBasePath(void);
97
98/**
99 * Get the user-and-app-specific path where files can be written.
100 *
101 * Get the "pref dir". This is meant to be where users can write personal
102 * files (preferences and save games, etc) that are specific to your
103 * application. This directory is unique per user, per application.
104 *
105 * This function will decide the appropriate location in the native
106 * filesystem, create the directory if necessary, and return a string of the
107 * absolute path to the directory in UTF-8 encoding.
108 *
109 * On Windows, the string might look like:
110 *
111 * `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
112 *
113 * On Linux, the string might look like:
114 *
115 * `/home/bob/.local/share/My Program Name/`
116 *
117 * On macOS, the string might look like:
118 *
119 * `/Users/bob/Library/Application Support/My Program Name/`
120 *
121 * You should assume the path returned by this function is the only safe place
122 * to write files (and that SDL_GetBasePath(), while it might be writable, or
123 * even the parent of the returned path, isn't where you should be writing
124 * things).
125 *
126 * Both the org and app strings may become part of a directory name, so please
127 * follow these rules:
128 *
129 * - Try to use the same org string (_including case-sensitivity_) for all
130 * your applications that use this function.
131 * - Always use a unique app string for each one, and make sure it never
132 * changes for an app once you've decided on it.
133 * - Unicode characters are legal, as long as they are UTF-8 encoded, but...
134 * - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
135 * Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
136 *
137 * The returned path is guaranteed to end with a path separator ('\\' on
138 * Windows, '/' on most other platforms).
139 *
140 * \param org the name of your organization.
141 * \param app the name of your application.
142 * \returns a UTF-8 string of the user directory in platform-dependent
143 * notation. NULL if there's a problem (creating directory failed,
144 * etc.). This should be freed with SDL_free() when it is no longer
145 * needed.
146 *
147 * \since This function is available since SDL 3.2.0.
148 *
149 * \sa SDL_GetBasePath
150 */
151extern SDL_DECLSPEC char * SDLCALL SDL_GetPrefPath(const char *org, const char *app);
152
153/**
154 * The type of the OS-provided default folder for a specific purpose.
155 *
156 * Note that the Trash folder isn't included here, because trashing files
157 * usually involves extra OS-specific functionality to remember the file's
158 * original location.
159 *
160 * The folders supported per platform are:
161 *
162 * | | Windows | macOS/iOS | tvOS | Unix (XDG) | Haiku | Emscripten |
163 * | ----------- | ------- | --------- | ---- | ---------- | ----- | ---------- |
164 * | HOME | X | X | | X | X | X |
165 * | DESKTOP | X | X | | X | X | |
166 * | DOCUMENTS | X | X | | X | | |
167 * | DOWNLOADS | Vista+ | X | | X | | |
168 * | MUSIC | X | X | | X | | |
169 * | PICTURES | X | X | | X | | |
170 * | PUBLICSHARE | | X | | X | | |
171 * | SAVEDGAMES | Vista+ | | | | | |
172 * | SCREENSHOTS | Vista+ | | | | | |
173 * | TEMPLATES | X | X | | X | | |
174 * | VIDEOS | X | X* | | X | | |
175 *
176 * Note that on macOS/iOS, the Videos folder is called "Movies".
177 *
178 * \since This enum is available since SDL 3.2.0.
179 *
180 * \sa SDL_GetUserFolder
181 */
182typedef enum SDL_Folder
183{
184 SDL_FOLDER_HOME, /**< The folder which contains all of the current user's data, preferences, and documents. It usually contains most of the other folders. If a requested folder does not exist, the home folder can be considered a safe fallback to store a user's documents. */
185 SDL_FOLDER_DESKTOP, /**< The folder of files that are displayed on the desktop. Note that the existence of a desktop folder does not guarantee that the system does show icons on its desktop; certain GNU/Linux distros with a graphical environment may not have desktop icons. */
186 SDL_FOLDER_DOCUMENTS, /**< User document files, possibly application-specific. This is a good place to save a user's projects. */
187 SDL_FOLDER_DOWNLOADS, /**< Standard folder for user files downloaded from the internet. */
188 SDL_FOLDER_MUSIC, /**< Music files that can be played using a standard music player (mp3, ogg...). */
189 SDL_FOLDER_PICTURES, /**< Image files that can be displayed using a standard viewer (png, jpg...). */
190 SDL_FOLDER_PUBLICSHARE, /**< Files that are meant to be shared with other users on the same computer. */
191 SDL_FOLDER_SAVEDGAMES, /**< Save files for games. */
192 SDL_FOLDER_SCREENSHOTS, /**< Application screenshots. */
193 SDL_FOLDER_TEMPLATES, /**< Template files to be used when the user requests the desktop environment to create a new file in a certain folder, such as "New Text File.txt". Any file in the Templates folder can be used as a starting point for a new file. */
194 SDL_FOLDER_VIDEOS, /**< Video files that can be played using a standard video player (mp4, webm...). */
195 SDL_FOLDER_COUNT /**< Total number of types in this enum, not a folder type by itself. */
196} SDL_Folder;
197
198/**
199 * Finds the most suitable user folder for a specific purpose.
200 *
201 * Many OSes provide certain standard folders for certain purposes, such as
202 * storing pictures, music or videos for a certain user. This function gives
203 * the path for many of those special locations.
204 *
205 * This function is specifically for _user_ folders, which are meant for the
206 * user to access and manage. For application-specific folders, meant to hold
207 * data for the application to manage, see SDL_GetBasePath() and
208 * SDL_GetPrefPath().
209 *
210 * The returned path is guaranteed to end with a path separator ('\\' on
211 * Windows, '/' on most other platforms).
212 *
213 * If NULL is returned, the error may be obtained with SDL_GetError().
214 *
215 * \param folder the type of folder to find.
216 * \returns either a null-terminated C string containing the full path to the
217 * folder, or NULL if an error happened.
218 *
219 * \since This function is available since SDL 3.2.0.
220 */
221extern SDL_DECLSPEC const char * SDLCALL SDL_GetUserFolder(SDL_Folder folder);
222
223
224/* Abstract filesystem interface */
225
226/**
227 * Types of filesystem entries.
228 *
229 * Note that there may be other sorts of items on a filesystem: devices,
230 * symlinks, named pipes, etc. They are currently reported as
231 * SDL_PATHTYPE_OTHER.
232 *
233 * \since This enum is available since SDL 3.2.0.
234 *
235 * \sa SDL_PathInfo
236 */
237typedef enum SDL_PathType
238{
239 SDL_PATHTYPE_NONE, /**< path does not exist */
240 SDL_PATHTYPE_FILE, /**< a normal file */
241 SDL_PATHTYPE_DIRECTORY, /**< a directory */
242 SDL_PATHTYPE_OTHER /**< something completely different like a device node (not a symlink, those are always followed) */
243} SDL_PathType;
244
245/**
246 * Information about a path on the filesystem.
247 *
248 * \since This datatype is available since SDL 3.2.0.
249 *
250 * \sa SDL_GetPathInfo
251 * \sa SDL_GetStoragePathInfo
252 */
253typedef struct SDL_PathInfo
254{
255 SDL_PathType type; /**< the path type */
256 Uint64 size; /**< the file size in bytes */
257 SDL_Time create_time; /**< the time when the path was created */
258 SDL_Time modify_time; /**< the last time the path was modified */
259 SDL_Time access_time; /**< the last time the path was read */
260} SDL_PathInfo;
261
262/**
263 * Flags for path matching.
264 *
265 * \since This datatype is available since SDL 3.2.0.
266 *
267 * \sa SDL_GlobDirectory
268 * \sa SDL_GlobStorageDirectory
269 */
270typedef Uint32 SDL_GlobFlags;
271
272#define SDL_GLOB_CASEINSENSITIVE (1u << 0)
273
274/**
275 * Create a directory, and any missing parent directories.
276 *
277 * This reports success if `path` already exists as a directory.
278 *
279 * If parent directories are missing, it will also create them. Note that if
280 * this fails, it will not remove any parent directories it already made.
281 *
282 * \param path the path of the directory to create.
283 * \returns true on success or false on failure; call SDL_GetError() for more
284 * information.
285 *
286 * \since This function is available since SDL 3.2.0.
287 */
288extern SDL_DECLSPEC bool SDLCALL SDL_CreateDirectory(const char *path);
289
290/**
291 * Possible results from an enumeration callback.
292 *
293 * \since This enum is available since SDL 3.2.0.
294 *
295 * \sa SDL_EnumerateDirectoryCallback
296 */
297typedef enum SDL_EnumerationResult
298{
299 SDL_ENUM_CONTINUE, /**< Value that requests that enumeration continue. */
300 SDL_ENUM_SUCCESS, /**< Value that requests that enumeration stop, successfully. */
301 SDL_ENUM_FAILURE /**< Value that requests that enumeration stop, as a failure. */
302} SDL_EnumerationResult;
303
304/**
305 * Callback for directory enumeration.
306 *
307 * Enumeration of directory entries will continue until either all entries
308 * have been provided to the callback, or the callback has requested a stop
309 * through its return value.
310 *
311 * Returning SDL_ENUM_CONTINUE will let enumeration proceed, calling the
312 * callback with further entries. SDL_ENUM_SUCCESS and SDL_ENUM_FAILURE will
313 * terminate the enumeration early, and dictate the return value of the
314 * enumeration function itself.
315 *
316 * `dirname` is guaranteed to end with a path separator ('\\' on Windows, '/'
317 * on most other platforms).
318 *
319 * \param userdata an app-controlled pointer that is passed to the callback.
320 * \param dirname the directory that is being enumerated.
321 * \param fname the next entry in the enumeration.
322 * \returns how the enumeration should proceed.
323 *
324 * \since This datatype is available since SDL 3.2.0.
325 *
326 * \sa SDL_EnumerateDirectory
327 */
328typedef SDL_EnumerationResult (SDLCALL *SDL_EnumerateDirectoryCallback)(void *userdata, const char *dirname, const char *fname);
329
330/**
331 * Enumerate a directory through a callback function.
332 *
333 * This function provides every directory entry through an app-provided
334 * callback, called once for each directory entry, until all results have been
335 * provided or the callback returns either SDL_ENUM_SUCCESS or
336 * SDL_ENUM_FAILURE.
337 *
338 * This will return false if there was a system problem in general, or if a
339 * callback returns SDL_ENUM_FAILURE. A successful return means a callback
340 * returned SDL_ENUM_SUCCESS to halt enumeration, or all directory entries
341 * were enumerated.
342 *
343 * \param path the path of the directory to enumerate.
344 * \param callback a function that is called for each entry in the directory.
345 * \param userdata a pointer that is passed to `callback`.
346 * \returns true on success or false on failure; call SDL_GetError() for more
347 * information.
348 *
349 * \since This function is available since SDL 3.2.0.
350 */
351extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateDirectory(const char *path, SDL_EnumerateDirectoryCallback callback, void *userdata);
352
353/**
354 * Remove a file or an empty directory.
355 *
356 * Directories that are not empty will fail; this function will not recursely
357 * delete directory trees.
358 *
359 * \param path the path to remove from the filesystem.
360 * \returns true on success or false on failure; call SDL_GetError() for more
361 * information.
362 *
363 * \since This function is available since SDL 3.2.0.
364 */
365extern SDL_DECLSPEC bool SDLCALL SDL_RemovePath(const char *path);
366
367/**
368 * Rename a file or directory.
369 *
370 * If the file at `newpath` already exists, it will replaced.
371 *
372 * Note that this will not copy files across filesystems/drives/volumes, as
373 * that is a much more complicated (and possibly time-consuming) operation.
374 *
375 * Which is to say, if this function fails, SDL_CopyFile() to a temporary file
376 * in the same directory as `newpath`, then SDL_RenamePath() from the
377 * temporary file to `newpath` and SDL_RemovePath() on `oldpath` might work
378 * for files. Renaming a non-empty directory across filesystems is
379 * dramatically more complex, however.
380 *
381 * \param oldpath the old path.
382 * \param newpath the new path.
383 * \returns true on success or false on failure; call SDL_GetError() for more
384 * information.
385 *
386 * \since This function is available since SDL 3.2.0.
387 */
388extern SDL_DECLSPEC bool SDLCALL SDL_RenamePath(const char *oldpath, const char *newpath);
389
390/**
391 * Copy a file.
392 *
393 * If the file at `newpath` already exists, it will be overwritten with the
394 * contents of the file at `oldpath`.
395 *
396 * This function will block until the copy is complete, which might be a
397 * significant time for large files on slow disks. On some platforms, the copy
398 * can be handed off to the OS itself, but on others SDL might just open both
399 * paths, and read from one and write to the other.
400 *
401 * Note that this is not an atomic operation! If something tries to read from
402 * `newpath` while the copy is in progress, it will see an incomplete copy of
403 * the data, and if the calling thread terminates (or the power goes out)
404 * during the copy, `newpath`'s previous contents will be gone, replaced with
405 * an incomplete copy of the data. To avoid this risk, it is recommended that
406 * the app copy to a temporary file in the same directory as `newpath`, and if
407 * the copy is successful, use SDL_RenamePath() to replace `newpath` with the
408 * temporary file. This will ensure that reads of `newpath` will either see a
409 * complete copy of the data, or it will see the pre-copy state of `newpath`.
410 *
411 * This function attempts to synchronize the newly-copied data to disk before
412 * returning, if the platform allows it, so that the renaming trick will not
413 * have a problem in a system crash or power failure, where the file could be
414 * renamed but the contents never made it from the system file cache to the
415 * physical disk.
416 *
417 * If the copy fails for any reason, the state of `newpath` is undefined. It
418 * might be half a copy, it might be the untouched data of what was already
419 * there, or it might be a zero-byte file, etc.
420 *
421 * \param oldpath the old path.
422 * \param newpath the new path.
423 * \returns true on success or false on failure; call SDL_GetError() for more
424 * information.
425 *
426 * \since This function is available since SDL 3.2.0.
427 */
428extern SDL_DECLSPEC bool SDLCALL SDL_CopyFile(const char *oldpath, const char *newpath);
429
430/**
431 * Get information about a filesystem path.
432 *
433 * \param path the path to query.
434 * \param info a pointer filled in with information about the path, or NULL to
435 * check for the existence of a file.
436 * \returns true on success or false if the file doesn't exist, or another
437 * failure; call SDL_GetError() for more information.
438 *
439 * \since This function is available since SDL 3.2.0.
440 */
441extern SDL_DECLSPEC bool SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo *info);
442
443/**
444 * Enumerate a directory tree, filtered by pattern, and return a list.
445 *
446 * Files are filtered out if they don't match the string in `pattern`, which
447 * may contain wildcard characters '\*' (match everything) and '?' (match one
448 * character). If pattern is NULL, no filtering is done and all results are
449 * returned. Subdirectories are permitted, and are specified with a path
450 * separator of '/'. Wildcard characters '\*' and '?' never match a path
451 * separator.
452 *
453 * `flags` may be set to SDL_GLOB_CASEINSENSITIVE to make the pattern matching
454 * case-insensitive.
455 *
456 * The returned array is always NULL-terminated, for your iterating
457 * convenience, but if `count` is non-NULL, on return it will contain the
458 * number of items in the array, not counting the NULL terminator.
459 *
460 * \param path the path of the directory to enumerate.
461 * \param pattern the pattern that files in the directory must match. Can be
462 * NULL.
463 * \param flags `SDL_GLOB_*` bitflags that affect this search.
464 * \param count on return, will be set to the number of items in the returned
465 * array. Can be NULL.
466 * \returns an array of strings on success or NULL on failure; call
467 * SDL_GetError() for more information. This is a single allocation
468 * that should be freed with SDL_free() when it is no longer needed.
469 *
470 * \threadsafety It is safe to call this function from any thread.
471 *
472 * \since This function is available since SDL 3.2.0.
473 */
474extern SDL_DECLSPEC char ** SDLCALL SDL_GlobDirectory(const char *path, const char *pattern, SDL_GlobFlags flags, int *count);
475
476/**
477 * Get what the system believes is the "current working directory."
478 *
479 * For systems without a concept of a current working directory, this will
480 * still attempt to provide something reasonable.
481 *
482 * SDL does not provide a means to _change_ the current working directory; for
483 * platforms without this concept, this would cause surprises with file access
484 * outside of SDL.
485 *
486 * The returned path is guaranteed to end with a path separator ('\\' on
487 * Windows, '/' on most other platforms).
488 *
489 * \returns a UTF-8 string of the current working directory in
490 * platform-dependent notation. NULL if there's a problem. This
491 * should be freed with SDL_free() when it is no longer needed.
492 *
493 * \since This function is available since SDL 3.2.0.
494 */
495extern SDL_DECLSPEC char * SDLCALL SDL_GetCurrentDirectory(void);
496
497/* Ends C function definitions when using C++ */
498#ifdef __cplusplus
499}
500#endif
501#include <SDL3/SDL_close_code.h>
502
503#endif /* SDL_filesystem_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_gamepad.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_gamepad.h
new file mode 100644
index 0000000..99f8b65
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_gamepad.h
@@ -0,0 +1,1509 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryGamepad
24 *
25 * SDL provides a low-level joystick API, which just treats joysticks as an
26 * arbitrary pile of buttons, axes, and hat switches. If you're planning to
27 * write your own control configuration screen, this can give you a lot of
28 * flexibility, but that's a lot of work, and most things that we consider
29 * "joysticks" now are actually console-style gamepads. So SDL provides the
30 * gamepad API on top of the lower-level joystick functionality.
31 *
32 * The difference between a joystick and a gamepad is that a gamepad tells you
33 * _where_ a button or axis is on the device. You don't speak to gamepads in
34 * terms of arbitrary numbers like "button 3" or "axis 2" but in standard
35 * locations: the d-pad, the shoulder buttons, triggers, A/B/X/Y (or
36 * X/O/Square/Triangle, if you will).
37 *
38 * One turns a joystick into a gamepad by providing a magic configuration
39 * string, which tells SDL the details of a specific device: when you see this
40 * specific hardware, if button 2 gets pressed, this is actually D-Pad Up,
41 * etc.
42 *
43 * SDL has many popular controllers configured out of the box, and users can
44 * add their own controller details through an environment variable if it's
45 * otherwise unknown to SDL.
46 *
47 * In order to use these functions, SDL_Init() must have been called with the
48 * SDL_INIT_GAMEPAD flag. This causes SDL to scan the system for gamepads, and
49 * load appropriate drivers.
50 *
51 * If you would like to receive gamepad updates while the application is in
52 * the background, you should set the following hint before calling
53 * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
54 *
55 * Gamepads support various optional features such as rumble, color LEDs,
56 * touchpad, gyro, etc. The support for these features varies depending on the
57 * controller and OS support available. You can check for LED and rumble
58 * capabilities at runtime by calling SDL_GetGamepadProperties() and checking
59 * the various capability properties. You can check for touchpad by calling
60 * SDL_GetNumGamepadTouchpads() and check for gyro and accelerometer by
61 * calling SDL_GamepadHasSensor().
62 *
63 * By default SDL will try to use the most capable driver available, but you
64 * can tune which OS drivers to use with the various joystick hints in
65 * SDL_hints.h.
66 *
67 * Your application should always support gamepad hotplugging. On some
68 * platforms like Xbox, Steam Deck, etc., this is a requirement for
69 * certification. On other platforms, like macOS and Windows when using
70 * Windows.Gaming.Input, controllers may not be available at startup and will
71 * come in at some point after you've started processing events.
72 */
73
74#ifndef SDL_gamepad_h_
75#define SDL_gamepad_h_
76
77#include <SDL3/SDL_stdinc.h>
78#include <SDL3/SDL_error.h>
79#include <SDL3/SDL_guid.h>
80#include <SDL3/SDL_iostream.h>
81#include <SDL3/SDL_joystick.h>
82#include <SDL3/SDL_power.h>
83#include <SDL3/SDL_properties.h>
84#include <SDL3/SDL_sensor.h>
85
86#include <SDL3/SDL_begin_code.h>
87/* Set up for C function definitions, even when using C++ */
88#ifdef __cplusplus
89extern "C" {
90#endif
91
92/**
93 * The structure used to identify an SDL gamepad
94 *
95 * \since This struct is available since SDL 3.2.0.
96 */
97typedef struct SDL_Gamepad SDL_Gamepad;
98
99/**
100 * Standard gamepad types.
101 *
102 * This type does not necessarily map to first-party controllers from
103 * Microsoft/Sony/Nintendo; in many cases, third-party controllers can report
104 * as these, either because they were designed for a specific console, or they
105 * simply most closely match that console's controllers (does it have A/B/X/Y
106 * buttons or X/O/Square/Triangle? Does it have a touchpad? etc).
107 */
108typedef enum SDL_GamepadType
109{
110 SDL_GAMEPAD_TYPE_UNKNOWN = 0,
111 SDL_GAMEPAD_TYPE_STANDARD,
112 SDL_GAMEPAD_TYPE_XBOX360,
113 SDL_GAMEPAD_TYPE_XBOXONE,
114 SDL_GAMEPAD_TYPE_PS3,
115 SDL_GAMEPAD_TYPE_PS4,
116 SDL_GAMEPAD_TYPE_PS5,
117 SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO,
118 SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT,
119 SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT,
120 SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR,
121 SDL_GAMEPAD_TYPE_COUNT
122} SDL_GamepadType;
123
124/**
125 * The list of buttons available on a gamepad
126 *
127 * For controllers that use a diamond pattern for the face buttons, the
128 * south/east/west/north buttons below correspond to the locations in the
129 * diamond pattern. For Xbox controllers, this would be A/B/X/Y, for Nintendo
130 * Switch controllers, this would be B/A/Y/X, for PlayStation controllers this
131 * would be Cross/Circle/Square/Triangle.
132 *
133 * For controllers that don't use a diamond pattern for the face buttons, the
134 * south/east/west/north buttons indicate the buttons labeled A, B, C, D, or
135 * 1, 2, 3, 4, or for controllers that aren't labeled, they are the primary,
136 * secondary, etc. buttons.
137 *
138 * The activate action is often the south button and the cancel action is
139 * often the east button, but in some regions this is reversed, so your game
140 * should allow remapping actions based on user preferences.
141 *
142 * You can query the labels for the face buttons using
143 * SDL_GetGamepadButtonLabel()
144 *
145 * \since This enum is available since SDL 3.2.0.
146 */
147typedef enum SDL_GamepadButton
148{
149 SDL_GAMEPAD_BUTTON_INVALID = -1,
150 SDL_GAMEPAD_BUTTON_SOUTH, /**< Bottom face button (e.g. Xbox A button) */
151 SDL_GAMEPAD_BUTTON_EAST, /**< Right face button (e.g. Xbox B button) */
152 SDL_GAMEPAD_BUTTON_WEST, /**< Left face button (e.g. Xbox X button) */
153 SDL_GAMEPAD_BUTTON_NORTH, /**< Top face button (e.g. Xbox Y button) */
154 SDL_GAMEPAD_BUTTON_BACK,
155 SDL_GAMEPAD_BUTTON_GUIDE,
156 SDL_GAMEPAD_BUTTON_START,
157 SDL_GAMEPAD_BUTTON_LEFT_STICK,
158 SDL_GAMEPAD_BUTTON_RIGHT_STICK,
159 SDL_GAMEPAD_BUTTON_LEFT_SHOULDER,
160 SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER,
161 SDL_GAMEPAD_BUTTON_DPAD_UP,
162 SDL_GAMEPAD_BUTTON_DPAD_DOWN,
163 SDL_GAMEPAD_BUTTON_DPAD_LEFT,
164 SDL_GAMEPAD_BUTTON_DPAD_RIGHT,
165 SDL_GAMEPAD_BUTTON_MISC1, /**< Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button, Google Stadia capture button) */
166 SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1, /**< Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1) */
167 SDL_GAMEPAD_BUTTON_LEFT_PADDLE1, /**< Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3) */
168 SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2, /**< Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2) */
169 SDL_GAMEPAD_BUTTON_LEFT_PADDLE2, /**< Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4) */
170 SDL_GAMEPAD_BUTTON_TOUCHPAD, /**< PS4/PS5 touchpad button */
171 SDL_GAMEPAD_BUTTON_MISC2, /**< Additional button */
172 SDL_GAMEPAD_BUTTON_MISC3, /**< Additional button */
173 SDL_GAMEPAD_BUTTON_MISC4, /**< Additional button */
174 SDL_GAMEPAD_BUTTON_MISC5, /**< Additional button */
175 SDL_GAMEPAD_BUTTON_MISC6, /**< Additional button */
176 SDL_GAMEPAD_BUTTON_COUNT
177} SDL_GamepadButton;
178
179/**
180 * The set of gamepad button labels
181 *
182 * This isn't a complete set, just the face buttons to make it easy to show
183 * button prompts.
184 *
185 * For a complete set, you should look at the button and gamepad type and have
186 * a set of symbols that work well with your art style.
187 *
188 * \since This enum is available since SDL 3.2.0.
189 */
190typedef enum SDL_GamepadButtonLabel
191{
192 SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN,
193 SDL_GAMEPAD_BUTTON_LABEL_A,
194 SDL_GAMEPAD_BUTTON_LABEL_B,
195 SDL_GAMEPAD_BUTTON_LABEL_X,
196 SDL_GAMEPAD_BUTTON_LABEL_Y,
197 SDL_GAMEPAD_BUTTON_LABEL_CROSS,
198 SDL_GAMEPAD_BUTTON_LABEL_CIRCLE,
199 SDL_GAMEPAD_BUTTON_LABEL_SQUARE,
200 SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE
201} SDL_GamepadButtonLabel;
202
203/**
204 * The list of axes available on a gamepad
205 *
206 * Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to
207 * SDL_JOYSTICK_AXIS_MAX, and are centered within ~8000 of zero, though
208 * advanced UI will allow users to set or autodetect the dead zone, which
209 * varies between gamepads.
210 *
211 * Trigger axis values range from 0 (released) to SDL_JOYSTICK_AXIS_MAX (fully
212 * pressed) when reported by SDL_GetGamepadAxis(). Note that this is not the
213 * same range that will be reported by the lower-level SDL_GetJoystickAxis().
214 *
215 * \since This enum is available since SDL 3.2.0.
216 */
217typedef enum SDL_GamepadAxis
218{
219 SDL_GAMEPAD_AXIS_INVALID = -1,
220 SDL_GAMEPAD_AXIS_LEFTX,
221 SDL_GAMEPAD_AXIS_LEFTY,
222 SDL_GAMEPAD_AXIS_RIGHTX,
223 SDL_GAMEPAD_AXIS_RIGHTY,
224 SDL_GAMEPAD_AXIS_LEFT_TRIGGER,
225 SDL_GAMEPAD_AXIS_RIGHT_TRIGGER,
226 SDL_GAMEPAD_AXIS_COUNT
227} SDL_GamepadAxis;
228
229/**
230 * Types of gamepad control bindings.
231 *
232 * A gamepad is a collection of bindings that map arbitrary joystick buttons,
233 * axes and hat switches to specific positions on a generic console-style
234 * gamepad. This enum is used as part of SDL_GamepadBinding to specify those
235 * mappings.
236 *
237 * \since This enum is available since SDL 3.2.0.
238 */
239typedef enum SDL_GamepadBindingType
240{
241 SDL_GAMEPAD_BINDTYPE_NONE = 0,
242 SDL_GAMEPAD_BINDTYPE_BUTTON,
243 SDL_GAMEPAD_BINDTYPE_AXIS,
244 SDL_GAMEPAD_BINDTYPE_HAT
245} SDL_GamepadBindingType;
246
247/**
248 * A mapping between one joystick input to a gamepad control.
249 *
250 * A gamepad has a collection of several bindings, to say, for example, when
251 * joystick button number 5 is pressed, that should be treated like the
252 * gamepad's "start" button.
253 *
254 * SDL has these bindings built-in for many popular controllers, and can add
255 * more with a simple text string. Those strings are parsed into a collection
256 * of these structs to make it easier to operate on the data.
257 *
258 * \since This struct is available since SDL 3.2.0.
259 *
260 * \sa SDL_GetGamepadBindings
261 */
262typedef struct SDL_GamepadBinding
263{
264 SDL_GamepadBindingType input_type;
265 union
266 {
267 int button;
268
269 struct
270 {
271 int axis;
272 int axis_min;
273 int axis_max;
274 } axis;
275
276 struct
277 {
278 int hat;
279 int hat_mask;
280 } hat;
281
282 } input;
283
284 SDL_GamepadBindingType output_type;
285 union
286 {
287 SDL_GamepadButton button;
288
289 struct
290 {
291 SDL_GamepadAxis axis;
292 int axis_min;
293 int axis_max;
294 } axis;
295
296 } output;
297} SDL_GamepadBinding;
298
299
300/**
301 * Add support for gamepads that SDL is unaware of or change the binding of an
302 * existing gamepad.
303 *
304 * The mapping string has the format "GUID,name,mapping", where GUID is the
305 * string value from SDL_GUIDToString(), name is the human readable string for
306 * the device and mappings are gamepad mappings to joystick ones. Under
307 * Windows there is a reserved GUID of "xinput" that covers all XInput
308 * devices. The mapping format for joystick is:
309 *
310 * - `bX`: a joystick button, index X
311 * - `hX.Y`: hat X with value Y
312 * - `aX`: axis X of the joystick
313 *
314 * Buttons can be used as a gamepad axes and vice versa.
315 *
316 * If a device with this GUID is already plugged in, SDL will generate an
317 * SDL_EVENT_GAMEPAD_ADDED event.
318 *
319 * This string shows an example of a valid mapping for a gamepad:
320 *
321 * ```c
322 * "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
323 * ```
324 *
325 * \param mapping the mapping string.
326 * \returns 1 if a new mapping is added, 0 if an existing mapping is updated,
327 * -1 on failure; call SDL_GetError() for more information.
328 *
329 * \threadsafety It is safe to call this function from any thread.
330 *
331 * \since This function is available since SDL 3.2.0.
332 *
333 * \sa SDL_AddGamepadMappingsFromFile
334 * \sa SDL_AddGamepadMappingsFromIO
335 * \sa SDL_GetGamepadMapping
336 * \sa SDL_GetGamepadMappingForGUID
337 * \sa SDL_HINT_GAMECONTROLLERCONFIG
338 * \sa SDL_HINT_GAMECONTROLLERCONFIG_FILE
339 * \sa SDL_EVENT_GAMEPAD_ADDED
340 */
341extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMapping(const char *mapping);
342
343/**
344 * Load a set of gamepad mappings from an SDL_IOStream.
345 *
346 * You can call this function several times, if needed, to load different
347 * database files.
348 *
349 * If a new mapping is loaded for an already known gamepad GUID, the later
350 * version will overwrite the one currently loaded.
351 *
352 * Any new mappings for already plugged in controllers will generate
353 * SDL_EVENT_GAMEPAD_ADDED events.
354 *
355 * Mappings not belonging to the current platform or with no platform field
356 * specified will be ignored (i.e. mappings for Linux will be ignored in
357 * Windows, etc).
358 *
359 * This function will load the text database entirely in memory before
360 * processing it, so take this into consideration if you are in a memory
361 * constrained environment.
362 *
363 * \param src the data stream for the mappings to be added.
364 * \param closeio if true, calls SDL_CloseIO() on `src` before returning, even
365 * in the case of an error.
366 * \returns the number of mappings added or -1 on failure; call SDL_GetError()
367 * for more information.
368 *
369 * \threadsafety It is safe to call this function from any thread.
370 *
371 * \since This function is available since SDL 3.2.0.
372 *
373 * \sa SDL_AddGamepadMapping
374 * \sa SDL_AddGamepadMappingsFromFile
375 * \sa SDL_GetGamepadMapping
376 * \sa SDL_GetGamepadMappingForGUID
377 * \sa SDL_HINT_GAMECONTROLLERCONFIG
378 * \sa SDL_HINT_GAMECONTROLLERCONFIG_FILE
379 * \sa SDL_EVENT_GAMEPAD_ADDED
380 */
381extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromIO(SDL_IOStream *src, bool closeio);
382
383/**
384 * Load a set of gamepad mappings from a file.
385 *
386 * You can call this function several times, if needed, to load different
387 * database files.
388 *
389 * If a new mapping is loaded for an already known gamepad GUID, the later
390 * version will overwrite the one currently loaded.
391 *
392 * Any new mappings for already plugged in controllers will generate
393 * SDL_EVENT_GAMEPAD_ADDED events.
394 *
395 * Mappings not belonging to the current platform or with no platform field
396 * specified will be ignored (i.e. mappings for Linux will be ignored in
397 * Windows, etc).
398 *
399 * \param file the mappings file to load.
400 * \returns the number of mappings added or -1 on failure; call SDL_GetError()
401 * for more information.
402 *
403 * \threadsafety It is safe to call this function from any thread.
404 *
405 * \since This function is available since SDL 3.2.0.
406 *
407 * \sa SDL_AddGamepadMapping
408 * \sa SDL_AddGamepadMappingsFromIO
409 * \sa SDL_GetGamepadMapping
410 * \sa SDL_GetGamepadMappingForGUID
411 * \sa SDL_HINT_GAMECONTROLLERCONFIG
412 * \sa SDL_HINT_GAMECONTROLLERCONFIG_FILE
413 * \sa SDL_EVENT_GAMEPAD_ADDED
414 */
415extern SDL_DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromFile(const char *file);
416
417/**
418 * Reinitialize the SDL mapping database to its initial state.
419 *
420 * This will generate gamepad events as needed if device mappings change.
421 *
422 * \returns true on success or false on failure; call SDL_GetError() for more
423 * information.
424 *
425 * \since This function is available since SDL 3.2.0.
426 */
427extern SDL_DECLSPEC bool SDLCALL SDL_ReloadGamepadMappings(void);
428
429/**
430 * Get the current gamepad mappings.
431 *
432 * \param count a pointer filled in with the number of mappings returned, can
433 * be NULL.
434 * \returns an array of the mapping strings, NULL-terminated, or NULL on
435 * failure; call SDL_GetError() for more information. This is a
436 * single allocation that should be freed with SDL_free() when it is
437 * no longer needed.
438 *
439 * \since This function is available since SDL 3.2.0.
440 */
441extern SDL_DECLSPEC char ** SDLCALL SDL_GetGamepadMappings(int *count);
442
443/**
444 * Get the gamepad mapping string for a given GUID.
445 *
446 * \param guid a structure containing the GUID for which a mapping is desired.
447 * \returns a mapping string or NULL on failure; call SDL_GetError() for more
448 * information. This should be freed with SDL_free() when it is no
449 * longer needed.
450 *
451 * \since This function is available since SDL 3.2.0.
452 *
453 * \sa SDL_GetJoystickGUIDForID
454 * \sa SDL_GetJoystickGUID
455 */
456extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_GUID guid);
457
458/**
459 * Get the current mapping of a gamepad.
460 *
461 * Details about mappings are discussed with SDL_AddGamepadMapping().
462 *
463 * \param gamepad the gamepad you want to get the current mapping for.
464 * \returns a string that has the gamepad's mapping or NULL if no mapping is
465 * available; call SDL_GetError() for more information. This should
466 * be freed with SDL_free() when it is no longer needed.
467 *
468 * \since This function is available since SDL 3.2.0.
469 *
470 * \sa SDL_AddGamepadMapping
471 * \sa SDL_GetGamepadMappingForID
472 * \sa SDL_GetGamepadMappingForGUID
473 * \sa SDL_SetGamepadMapping
474 */
475extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMapping(SDL_Gamepad *gamepad);
476
477/**
478 * Set the current mapping of a joystick or gamepad.
479 *
480 * Details about mappings are discussed with SDL_AddGamepadMapping().
481 *
482 * \param instance_id the joystick instance ID.
483 * \param mapping the mapping to use for this device, or NULL to clear the
484 * mapping.
485 * \returns true on success or false on failure; call SDL_GetError() for more
486 * information.
487 *
488 * \since This function is available since SDL 3.2.0.
489 *
490 * \sa SDL_AddGamepadMapping
491 * \sa SDL_GetGamepadMapping
492 */
493extern SDL_DECLSPEC bool SDLCALL SDL_SetGamepadMapping(SDL_JoystickID instance_id, const char *mapping);
494
495/**
496 * Return whether a gamepad is currently connected.
497 *
498 * \returns true if a gamepad is connected, false otherwise.
499 *
500 * \since This function is available since SDL 3.2.0.
501 *
502 * \sa SDL_GetGamepads
503 */
504extern SDL_DECLSPEC bool SDLCALL SDL_HasGamepad(void);
505
506/**
507 * Get a list of currently connected gamepads.
508 *
509 * \param count a pointer filled in with the number of gamepads returned, may
510 * be NULL.
511 * \returns a 0 terminated array of joystick instance IDs or NULL on failure;
512 * call SDL_GetError() for more information. This should be freed
513 * with SDL_free() when it is no longer needed.
514 *
515 * \since This function is available since SDL 3.2.0.
516 *
517 * \sa SDL_HasGamepad
518 * \sa SDL_OpenGamepad
519 */
520extern SDL_DECLSPEC SDL_JoystickID * SDLCALL SDL_GetGamepads(int *count);
521
522/**
523 * Check if the given joystick is supported by the gamepad interface.
524 *
525 * \param instance_id the joystick instance ID.
526 * \returns true if the given joystick is supported by the gamepad interface,
527 * false if it isn't or it's an invalid index.
528 *
529 * \since This function is available since SDL 3.2.0.
530 *
531 * \sa SDL_GetJoysticks
532 * \sa SDL_OpenGamepad
533 */
534extern SDL_DECLSPEC bool SDLCALL SDL_IsGamepad(SDL_JoystickID instance_id);
535
536/**
537 * Get the implementation dependent name of a gamepad.
538 *
539 * This can be called before any gamepads are opened.
540 *
541 * \param instance_id the joystick instance ID.
542 * \returns the name of the selected gamepad. If no name can be found, this
543 * function returns NULL; call SDL_GetError() for more information.
544 *
545 * \since This function is available since SDL 3.2.0.
546 *
547 * \sa SDL_GetGamepadName
548 * \sa SDL_GetGamepads
549 */
550extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadNameForID(SDL_JoystickID instance_id);
551
552/**
553 * Get the implementation dependent path of a gamepad.
554 *
555 * This can be called before any gamepads are opened.
556 *
557 * \param instance_id the joystick instance ID.
558 * \returns the path of the selected gamepad. If no path can be found, this
559 * function returns NULL; call SDL_GetError() for more information.
560 *
561 * \since This function is available since SDL 3.2.0.
562 *
563 * \sa SDL_GetGamepadPath
564 * \sa SDL_GetGamepads
565 */
566extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadPathForID(SDL_JoystickID instance_id);
567
568/**
569 * Get the player index of a gamepad.
570 *
571 * This can be called before any gamepads are opened.
572 *
573 * \param instance_id the joystick instance ID.
574 * \returns the player index of a gamepad, or -1 if it's not available.
575 *
576 * \since This function is available since SDL 3.2.0.
577 *
578 * \sa SDL_GetGamepadPlayerIndex
579 * \sa SDL_GetGamepads
580 */
581extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndexForID(SDL_JoystickID instance_id);
582
583/**
584 * Get the implementation-dependent GUID of a gamepad.
585 *
586 * This can be called before any gamepads are opened.
587 *
588 * \param instance_id the joystick instance ID.
589 * \returns the GUID of the selected gamepad. If called on an invalid index,
590 * this function returns a zero GUID.
591 *
592 * \since This function is available since SDL 3.2.0.
593 *
594 * \sa SDL_GUIDToString
595 * \sa SDL_GetGamepads
596 */
597extern SDL_DECLSPEC SDL_GUID SDLCALL SDL_GetGamepadGUIDForID(SDL_JoystickID instance_id);
598
599/**
600 * Get the USB vendor ID of a gamepad, if available.
601 *
602 * This can be called before any gamepads are opened. If the vendor ID isn't
603 * available this function returns 0.
604 *
605 * \param instance_id the joystick instance ID.
606 * \returns the USB vendor ID of the selected gamepad. If called on an invalid
607 * index, this function returns zero.
608 *
609 * \since This function is available since SDL 3.2.0.
610 *
611 * \sa SDL_GetGamepadVendor
612 * \sa SDL_GetGamepads
613 */
614extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendorForID(SDL_JoystickID instance_id);
615
616/**
617 * Get the USB product ID of a gamepad, if available.
618 *
619 * This can be called before any gamepads are opened. If the product ID isn't
620 * available this function returns 0.
621 *
622 * \param instance_id the joystick instance ID.
623 * \returns the USB product ID of the selected gamepad. If called on an
624 * invalid index, this function returns zero.
625 *
626 * \since This function is available since SDL 3.2.0.
627 *
628 * \sa SDL_GetGamepadProduct
629 * \sa SDL_GetGamepads
630 */
631extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductForID(SDL_JoystickID instance_id);
632
633/**
634 * Get the product version of a gamepad, if available.
635 *
636 * This can be called before any gamepads are opened. If the product version
637 * isn't available this function returns 0.
638 *
639 * \param instance_id the joystick instance ID.
640 * \returns the product version of the selected gamepad. If called on an
641 * invalid index, this function returns zero.
642 *
643 * \since This function is available since SDL 3.2.0.
644 *
645 * \sa SDL_GetGamepadProductVersion
646 * \sa SDL_GetGamepads
647 */
648extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersionForID(SDL_JoystickID instance_id);
649
650/**
651 * Get the type of a gamepad.
652 *
653 * This can be called before any gamepads are opened.
654 *
655 * \param instance_id the joystick instance ID.
656 * \returns the gamepad type.
657 *
658 * \since This function is available since SDL 3.2.0.
659 *
660 * \sa SDL_GetGamepadType
661 * \sa SDL_GetGamepads
662 * \sa SDL_GetRealGamepadTypeForID
663 */
664extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeForID(SDL_JoystickID instance_id);
665
666/**
667 * Get the type of a gamepad, ignoring any mapping override.
668 *
669 * This can be called before any gamepads are opened.
670 *
671 * \param instance_id the joystick instance ID.
672 * \returns the gamepad type.
673 *
674 * \since This function is available since SDL 3.2.0.
675 *
676 * \sa SDL_GetGamepadTypeForID
677 * \sa SDL_GetGamepads
678 * \sa SDL_GetRealGamepadType
679 */
680extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeForID(SDL_JoystickID instance_id);
681
682/**
683 * Get the mapping of a gamepad.
684 *
685 * This can be called before any gamepads are opened.
686 *
687 * \param instance_id the joystick instance ID.
688 * \returns the mapping string. Returns NULL if no mapping is available. This
689 * should be freed with SDL_free() when it is no longer needed.
690 *
691 * \since This function is available since SDL 3.2.0.
692 *
693 * \sa SDL_GetGamepads
694 * \sa SDL_GetGamepadMapping
695 */
696extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForID(SDL_JoystickID instance_id);
697
698/**
699 * Open a gamepad for use.
700 *
701 * \param instance_id the joystick instance ID.
702 * \returns a gamepad identifier or NULL if an error occurred; call
703 * SDL_GetError() for more information.
704 *
705 * \since This function is available since SDL 3.2.0.
706 *
707 * \sa SDL_CloseGamepad
708 * \sa SDL_IsGamepad
709 */
710extern SDL_DECLSPEC SDL_Gamepad * SDLCALL SDL_OpenGamepad(SDL_JoystickID instance_id);
711
712/**
713 * Get the SDL_Gamepad associated with a joystick instance ID, if it has been
714 * opened.
715 *
716 * \param instance_id the joystick instance ID of the gamepad.
717 * \returns an SDL_Gamepad on success or NULL on failure or if it hasn't been
718 * opened yet; call SDL_GetError() for more information.
719 *
720 * \since This function is available since SDL 3.2.0.
721 */
722extern SDL_DECLSPEC SDL_Gamepad * SDLCALL SDL_GetGamepadFromID(SDL_JoystickID instance_id);
723
724/**
725 * Get the SDL_Gamepad associated with a player index.
726 *
727 * \param player_index the player index, which different from the instance ID.
728 * \returns the SDL_Gamepad associated with a player index.
729 *
730 * \since This function is available since SDL 3.2.0.
731 *
732 * \sa SDL_GetGamepadPlayerIndex
733 * \sa SDL_SetGamepadPlayerIndex
734 */
735extern SDL_DECLSPEC SDL_Gamepad * SDLCALL SDL_GetGamepadFromPlayerIndex(int player_index);
736
737/**
738 * Get the properties associated with an opened gamepad.
739 *
740 * These properties are shared with the underlying joystick object.
741 *
742 * The following read-only properties are provided by SDL:
743 *
744 * - `SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN`: true if this gamepad has an LED
745 * that has adjustable brightness
746 * - `SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN`: true if this gamepad has an LED
747 * that has adjustable color
748 * - `SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN`: true if this gamepad has a
749 * player LED
750 * - `SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN`: true if this gamepad has
751 * left/right rumble
752 * - `SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN`: true if this gamepad has
753 * simple trigger rumble
754 *
755 * \param gamepad a gamepad identifier previously returned by
756 * SDL_OpenGamepad().
757 * \returns a valid property ID on success or 0 on failure; call
758 * SDL_GetError() for more information.
759 *
760 * \since This function is available since SDL 3.2.0.
761 */
762extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGamepadProperties(SDL_Gamepad *gamepad);
763
764#define SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN
765#define SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN
766#define SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN
767#define SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN
768#define SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN
769
770/**
771 * Get the instance ID of an opened gamepad.
772 *
773 * \param gamepad a gamepad identifier previously returned by
774 * SDL_OpenGamepad().
775 * \returns the instance ID of the specified gamepad on success or 0 on
776 * failure; call SDL_GetError() for more information.
777 *
778 * \since This function is available since SDL 3.2.0.
779 */
780extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetGamepadID(SDL_Gamepad *gamepad);
781
782/**
783 * Get the implementation-dependent name for an opened gamepad.
784 *
785 * \param gamepad a gamepad identifier previously returned by
786 * SDL_OpenGamepad().
787 * \returns the implementation dependent name for the gamepad, or NULL if
788 * there is no name or the identifier passed is invalid.
789 *
790 * \since This function is available since SDL 3.2.0.
791 *
792 * \sa SDL_GetGamepadNameForID
793 */
794extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadName(SDL_Gamepad *gamepad);
795
796/**
797 * Get the implementation-dependent path for an opened gamepad.
798 *
799 * \param gamepad a gamepad identifier previously returned by
800 * SDL_OpenGamepad().
801 * \returns the implementation dependent path for the gamepad, or NULL if
802 * there is no path or the identifier passed is invalid.
803 *
804 * \since This function is available since SDL 3.2.0.
805 *
806 * \sa SDL_GetGamepadPathForID
807 */
808extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadPath(SDL_Gamepad *gamepad);
809
810/**
811 * Get the type of an opened gamepad.
812 *
813 * \param gamepad the gamepad object to query.
814 * \returns the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not
815 * available.
816 *
817 * \since This function is available since SDL 3.2.0.
818 *
819 * \sa SDL_GetGamepadTypeForID
820 */
821extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadType(SDL_Gamepad *gamepad);
822
823/**
824 * Get the type of an opened gamepad, ignoring any mapping override.
825 *
826 * \param gamepad the gamepad object to query.
827 * \returns the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not
828 * available.
829 *
830 * \since This function is available since SDL 3.2.0.
831 *
832 * \sa SDL_GetRealGamepadTypeForID
833 */
834extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadType(SDL_Gamepad *gamepad);
835
836/**
837 * Get the player index of an opened gamepad.
838 *
839 * For XInput gamepads this returns the XInput user index.
840 *
841 * \param gamepad the gamepad object to query.
842 * \returns the player index for gamepad, or -1 if it's not available.
843 *
844 * \since This function is available since SDL 3.2.0.
845 *
846 * \sa SDL_SetGamepadPlayerIndex
847 */
848extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndex(SDL_Gamepad *gamepad);
849
850/**
851 * Set the player index of an opened gamepad.
852 *
853 * \param gamepad the gamepad object to adjust.
854 * \param player_index player index to assign to this gamepad, or -1 to clear
855 * the player index and turn off player LEDs.
856 * \returns true on success or false on failure; call SDL_GetError() for more
857 * information.
858 *
859 * \since This function is available since SDL 3.2.0.
860 *
861 * \sa SDL_GetGamepadPlayerIndex
862 */
863extern SDL_DECLSPEC bool SDLCALL SDL_SetGamepadPlayerIndex(SDL_Gamepad *gamepad, int player_index);
864
865/**
866 * Get the USB vendor ID of an opened gamepad, if available.
867 *
868 * If the vendor ID isn't available this function returns 0.
869 *
870 * \param gamepad the gamepad object to query.
871 * \returns the USB vendor ID, or zero if unavailable.
872 *
873 * \since This function is available since SDL 3.2.0.
874 *
875 * \sa SDL_GetGamepadVendorForID
876 */
877extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendor(SDL_Gamepad *gamepad);
878
879/**
880 * Get the USB product ID of an opened gamepad, if available.
881 *
882 * If the product ID isn't available this function returns 0.
883 *
884 * \param gamepad the gamepad object to query.
885 * \returns the USB product ID, or zero if unavailable.
886 *
887 * \since This function is available since SDL 3.2.0.
888 *
889 * \sa SDL_GetGamepadProductForID
890 */
891extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProduct(SDL_Gamepad *gamepad);
892
893/**
894 * Get the product version of an opened gamepad, if available.
895 *
896 * If the product version isn't available this function returns 0.
897 *
898 * \param gamepad the gamepad object to query.
899 * \returns the USB product version, or zero if unavailable.
900 *
901 * \since This function is available since SDL 3.2.0.
902 *
903 * \sa SDL_GetGamepadProductVersionForID
904 */
905extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersion(SDL_Gamepad *gamepad);
906
907/**
908 * Get the firmware version of an opened gamepad, if available.
909 *
910 * If the firmware version isn't available this function returns 0.
911 *
912 * \param gamepad the gamepad object to query.
913 * \returns the gamepad firmware version, or zero if unavailable.
914 *
915 * \since This function is available since SDL 3.2.0.
916 */
917extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadFirmwareVersion(SDL_Gamepad *gamepad);
918
919/**
920 * Get the serial number of an opened gamepad, if available.
921 *
922 * Returns the serial number of the gamepad, or NULL if it is not available.
923 *
924 * \param gamepad the gamepad object to query.
925 * \returns the serial number, or NULL if unavailable.
926 *
927 * \since This function is available since SDL 3.2.0.
928 */
929extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadSerial(SDL_Gamepad *gamepad);
930
931/**
932 * Get the Steam Input handle of an opened gamepad, if available.
933 *
934 * Returns an InputHandle_t for the gamepad that can be used with Steam Input
935 * API: https://partner.steamgames.com/doc/api/ISteamInput
936 *
937 * \param gamepad the gamepad object to query.
938 * \returns the gamepad handle, or 0 if unavailable.
939 *
940 * \since This function is available since SDL 3.2.0.
941 */
942extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetGamepadSteamHandle(SDL_Gamepad *gamepad);
943
944/**
945 * Get the connection state of a gamepad.
946 *
947 * \param gamepad the gamepad object to query.
948 * \returns the connection state on success or
949 * `SDL_JOYSTICK_CONNECTION_INVALID` on failure; call SDL_GetError()
950 * for more information.
951 *
952 * \since This function is available since SDL 3.2.0.
953 */
954extern SDL_DECLSPEC SDL_JoystickConnectionState SDLCALL SDL_GetGamepadConnectionState(SDL_Gamepad *gamepad);
955
956/**
957 * Get the battery state of a gamepad.
958 *
959 * You should never take a battery status as absolute truth. Batteries
960 * (especially failing batteries) are delicate hardware, and the values
961 * reported here are best estimates based on what that hardware reports. It's
962 * not uncommon for older batteries to lose stored power much faster than it
963 * reports, or completely drain when reporting it has 20 percent left, etc.
964 *
965 * \param gamepad the gamepad object to query.
966 * \param percent a pointer filled in with the percentage of battery life
967 * left, between 0 and 100, or NULL to ignore. This will be
968 * filled in with -1 we can't determine a value or there is no
969 * battery.
970 * \returns the current battery state.
971 *
972 * \since This function is available since SDL 3.2.0.
973 */
974extern SDL_DECLSPEC SDL_PowerState SDLCALL SDL_GetGamepadPowerInfo(SDL_Gamepad *gamepad, int *percent);
975
976/**
977 * Check if a gamepad has been opened and is currently connected.
978 *
979 * \param gamepad a gamepad identifier previously returned by
980 * SDL_OpenGamepad().
981 * \returns true if the gamepad has been opened and is currently connected, or
982 * false if not.
983 *
984 * \since This function is available since SDL 3.2.0.
985 */
986extern SDL_DECLSPEC bool SDLCALL SDL_GamepadConnected(SDL_Gamepad *gamepad);
987
988/**
989 * Get the underlying joystick from a gamepad.
990 *
991 * This function will give you a SDL_Joystick object, which allows you to use
992 * the SDL_Joystick functions with a SDL_Gamepad object. This would be useful
993 * for getting a joystick's position at any given time, even if it hasn't
994 * moved (moving it would produce an event, which would have the axis' value).
995 *
996 * The pointer returned is owned by the SDL_Gamepad. You should not call
997 * SDL_CloseJoystick() on it, for example, since doing so will likely cause
998 * SDL to crash.
999 *
1000 * \param gamepad the gamepad object that you want to get a joystick from.
1001 * \returns an SDL_Joystick object, or NULL on failure; call SDL_GetError()
1002 * for more information.
1003 *
1004 * \since This function is available since SDL 3.2.0.
1005 */
1006extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_GetGamepadJoystick(SDL_Gamepad *gamepad);
1007
1008/**
1009 * Set the state of gamepad event processing.
1010 *
1011 * If gamepad events are disabled, you must call SDL_UpdateGamepads() yourself
1012 * and check the state of the gamepad when you want gamepad information.
1013 *
1014 * \param enabled whether to process gamepad events or not.
1015 *
1016 * \since This function is available since SDL 3.2.0.
1017 *
1018 * \sa SDL_GamepadEventsEnabled
1019 * \sa SDL_UpdateGamepads
1020 */
1021extern SDL_DECLSPEC void SDLCALL SDL_SetGamepadEventsEnabled(bool enabled);
1022
1023/**
1024 * Query the state of gamepad event processing.
1025 *
1026 * If gamepad events are disabled, you must call SDL_UpdateGamepads() yourself
1027 * and check the state of the gamepad when you want gamepad information.
1028 *
1029 * \returns true if gamepad events are being processed, false otherwise.
1030 *
1031 * \since This function is available since SDL 3.2.0.
1032 *
1033 * \sa SDL_SetGamepadEventsEnabled
1034 */
1035extern SDL_DECLSPEC bool SDLCALL SDL_GamepadEventsEnabled(void);
1036
1037/**
1038 * Get the SDL joystick layer bindings for a gamepad.
1039 *
1040 * \param gamepad a gamepad.
1041 * \param count a pointer filled in with the number of bindings returned.
1042 * \returns a NULL terminated array of pointers to bindings or NULL on
1043 * failure; call SDL_GetError() for more information. This is a
1044 * single allocation that should be freed with SDL_free() when it is
1045 * no longer needed.
1046 *
1047 * \since This function is available since SDL 3.2.0.
1048 */
1049extern SDL_DECLSPEC SDL_GamepadBinding ** SDLCALL SDL_GetGamepadBindings(SDL_Gamepad *gamepad, int *count);
1050
1051/**
1052 * Manually pump gamepad updates if not using the loop.
1053 *
1054 * This function is called automatically by the event loop if events are
1055 * enabled. Under such circumstances, it will not be necessary to call this
1056 * function.
1057 *
1058 * \since This function is available since SDL 3.2.0.
1059 */
1060extern SDL_DECLSPEC void SDLCALL SDL_UpdateGamepads(void);
1061
1062/**
1063 * Convert a string into SDL_GamepadType enum.
1064 *
1065 * This function is called internally to translate SDL_Gamepad mapping strings
1066 * for the underlying joystick device into the consistent SDL_Gamepad mapping.
1067 * You do not normally need to call this function unless you are parsing
1068 * SDL_Gamepad mappings in your own code.
1069 *
1070 * \param str string representing a SDL_GamepadType type.
1071 * \returns the SDL_GamepadType enum corresponding to the input string, or
1072 * `SDL_GAMEPAD_TYPE_UNKNOWN` if no match was found.
1073 *
1074 * \since This function is available since SDL 3.2.0.
1075 *
1076 * \sa SDL_GetGamepadStringForType
1077 */
1078extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeFromString(const char *str);
1079
1080/**
1081 * Convert from an SDL_GamepadType enum to a string.
1082 *
1083 * \param type an enum value for a given SDL_GamepadType.
1084 * \returns a string for the given type, or NULL if an invalid type is
1085 * specified. The string returned is of the format used by
1086 * SDL_Gamepad mapping strings.
1087 *
1088 * \since This function is available since SDL 3.2.0.
1089 *
1090 * \sa SDL_GetGamepadTypeFromString
1091 */
1092extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadStringForType(SDL_GamepadType type);
1093
1094/**
1095 * Convert a string into SDL_GamepadAxis enum.
1096 *
1097 * This function is called internally to translate SDL_Gamepad mapping strings
1098 * for the underlying joystick device into the consistent SDL_Gamepad mapping.
1099 * You do not normally need to call this function unless you are parsing
1100 * SDL_Gamepad mappings in your own code.
1101 *
1102 * Note specially that "righttrigger" and "lefttrigger" map to
1103 * `SDL_GAMEPAD_AXIS_RIGHT_TRIGGER` and `SDL_GAMEPAD_AXIS_LEFT_TRIGGER`,
1104 * respectively.
1105 *
1106 * \param str string representing a SDL_Gamepad axis.
1107 * \returns the SDL_GamepadAxis enum corresponding to the input string, or
1108 * `SDL_GAMEPAD_AXIS_INVALID` if no match was found.
1109 *
1110 * \since This function is available since SDL 3.2.0.
1111 *
1112 * \sa SDL_GetGamepadStringForAxis
1113 */
1114extern SDL_DECLSPEC SDL_GamepadAxis SDLCALL SDL_GetGamepadAxisFromString(const char *str);
1115
1116/**
1117 * Convert from an SDL_GamepadAxis enum to a string.
1118 *
1119 * \param axis an enum value for a given SDL_GamepadAxis.
1120 * \returns a string for the given axis, or NULL if an invalid axis is
1121 * specified. The string returned is of the format used by
1122 * SDL_Gamepad mapping strings.
1123 *
1124 * \since This function is available since SDL 3.2.0.
1125 *
1126 * \sa SDL_GetGamepadAxisFromString
1127 */
1128extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadStringForAxis(SDL_GamepadAxis axis);
1129
1130/**
1131 * Query whether a gamepad has a given axis.
1132 *
1133 * This merely reports whether the gamepad's mapping defined this axis, as
1134 * that is all the information SDL has about the physical device.
1135 *
1136 * \param gamepad a gamepad.
1137 * \param axis an axis enum value (an SDL_GamepadAxis value).
1138 * \returns true if the gamepad has this axis, false otherwise.
1139 *
1140 * \since This function is available since SDL 3.2.0.
1141 *
1142 * \sa SDL_GamepadHasButton
1143 * \sa SDL_GetGamepadAxis
1144 */
1145extern SDL_DECLSPEC bool SDLCALL SDL_GamepadHasAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis);
1146
1147/**
1148 * Get the current state of an axis control on a gamepad.
1149 *
1150 * The axis indices start at index 0.
1151 *
1152 * For thumbsticks, the state is a value ranging from -32768 (up/left) to
1153 * 32767 (down/right).
1154 *
1155 * Triggers range from 0 when released to 32767 when fully pressed, and never
1156 * return a negative value. Note that this differs from the value reported by
1157 * the lower-level SDL_GetJoystickAxis(), which normally uses the full range.
1158 *
1159 * \param gamepad a gamepad.
1160 * \param axis an axis index (one of the SDL_GamepadAxis values).
1161 * \returns axis state (including 0) on success or 0 (also) on failure; call
1162 * SDL_GetError() for more information.
1163 *
1164 * \since This function is available since SDL 3.2.0.
1165 *
1166 * \sa SDL_GamepadHasAxis
1167 * \sa SDL_GetGamepadButton
1168 */
1169extern SDL_DECLSPEC Sint16 SDLCALL SDL_GetGamepadAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis);
1170
1171/**
1172 * Convert a string into an SDL_GamepadButton enum.
1173 *
1174 * This function is called internally to translate SDL_Gamepad mapping strings
1175 * for the underlying joystick device into the consistent SDL_Gamepad mapping.
1176 * You do not normally need to call this function unless you are parsing
1177 * SDL_Gamepad mappings in your own code.
1178 *
1179 * \param str string representing a SDL_Gamepad axis.
1180 * \returns the SDL_GamepadButton enum corresponding to the input string, or
1181 * `SDL_GAMEPAD_BUTTON_INVALID` if no match was found.
1182 *
1183 * \since This function is available since SDL 3.2.0.
1184 *
1185 * \sa SDL_GetGamepadStringForButton
1186 */
1187extern SDL_DECLSPEC SDL_GamepadButton SDLCALL SDL_GetGamepadButtonFromString(const char *str);
1188
1189/**
1190 * Convert from an SDL_GamepadButton enum to a string.
1191 *
1192 * \param button an enum value for a given SDL_GamepadButton.
1193 * \returns a string for the given button, or NULL if an invalid button is
1194 * specified. The string returned is of the format used by
1195 * SDL_Gamepad mapping strings.
1196 *
1197 * \since This function is available since SDL 3.2.0.
1198 *
1199 * \sa SDL_GetGamepadButtonFromString
1200 */
1201extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadStringForButton(SDL_GamepadButton button);
1202
1203/**
1204 * Query whether a gamepad has a given button.
1205 *
1206 * This merely reports whether the gamepad's mapping defined this button, as
1207 * that is all the information SDL has about the physical device.
1208 *
1209 * \param gamepad a gamepad.
1210 * \param button a button enum value (an SDL_GamepadButton value).
1211 * \returns true if the gamepad has this button, false otherwise.
1212 *
1213 * \since This function is available since SDL 3.2.0.
1214 *
1215 * \sa SDL_GamepadHasAxis
1216 */
1217extern SDL_DECLSPEC bool SDLCALL SDL_GamepadHasButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);
1218
1219/**
1220 * Get the current state of a button on a gamepad.
1221 *
1222 * \param gamepad a gamepad.
1223 * \param button a button index (one of the SDL_GamepadButton values).
1224 * \returns true if the button is pressed, false otherwise.
1225 *
1226 * \since This function is available since SDL 3.2.0.
1227 *
1228 * \sa SDL_GamepadHasButton
1229 * \sa SDL_GetGamepadAxis
1230 */
1231extern SDL_DECLSPEC bool SDLCALL SDL_GetGamepadButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);
1232
1233/**
1234 * Get the label of a button on a gamepad.
1235 *
1236 * \param type the type of gamepad to check.
1237 * \param button a button index (one of the SDL_GamepadButton values).
1238 * \returns the SDL_GamepadButtonLabel enum corresponding to the button label.
1239 *
1240 * \since This function is available since SDL 3.2.0.
1241 *
1242 * \sa SDL_GetGamepadButtonLabel
1243 */
1244extern SDL_DECLSPEC SDL_GamepadButtonLabel SDLCALL SDL_GetGamepadButtonLabelForType(SDL_GamepadType type, SDL_GamepadButton button);
1245
1246/**
1247 * Get the label of a button on a gamepad.
1248 *
1249 * \param gamepad a gamepad.
1250 * \param button a button index (one of the SDL_GamepadButton values).
1251 * \returns the SDL_GamepadButtonLabel enum corresponding to the button label.
1252 *
1253 * \since This function is available since SDL 3.2.0.
1254 *
1255 * \sa SDL_GetGamepadButtonLabelForType
1256 */
1257extern SDL_DECLSPEC SDL_GamepadButtonLabel SDLCALL SDL_GetGamepadButtonLabel(SDL_Gamepad *gamepad, SDL_GamepadButton button);
1258
1259/**
1260 * Get the number of touchpads on a gamepad.
1261 *
1262 * \param gamepad a gamepad.
1263 * \returns number of touchpads.
1264 *
1265 * \since This function is available since SDL 3.2.0.
1266 *
1267 * \sa SDL_GetNumGamepadTouchpadFingers
1268 */
1269extern SDL_DECLSPEC int SDLCALL SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad);
1270
1271/**
1272 * Get the number of supported simultaneous fingers on a touchpad on a game
1273 * gamepad.
1274 *
1275 * \param gamepad a gamepad.
1276 * \param touchpad a touchpad.
1277 * \returns number of supported simultaneous fingers.
1278 *
1279 * \since This function is available since SDL 3.2.0.
1280 *
1281 * \sa SDL_GetGamepadTouchpadFinger
1282 * \sa SDL_GetNumGamepadTouchpads
1283 */
1284extern SDL_DECLSPEC int SDLCALL SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *gamepad, int touchpad);
1285
1286/**
1287 * Get the current state of a finger on a touchpad on a gamepad.
1288 *
1289 * \param gamepad a gamepad.
1290 * \param touchpad a touchpad.
1291 * \param finger a finger.
1292 * \param down a pointer filled with true if the finger is down, false
1293 * otherwise, may be NULL.
1294 * \param x a pointer filled with the x position, normalized 0 to 1, with the
1295 * origin in the upper left, may be NULL.
1296 * \param y a pointer filled with the y position, normalized 0 to 1, with the
1297 * origin in the upper left, may be NULL.
1298 * \param pressure a pointer filled with pressure value, may be NULL.
1299 * \returns true on success or false on failure; call SDL_GetError() for more
1300 * information.
1301 *
1302 * \since This function is available since SDL 3.2.0.
1303 *
1304 * \sa SDL_GetNumGamepadTouchpadFingers
1305 */
1306extern SDL_DECLSPEC bool SDLCALL SDL_GetGamepadTouchpadFinger(SDL_Gamepad *gamepad, int touchpad, int finger, bool *down, float *x, float *y, float *pressure);
1307
1308/**
1309 * Return whether a gamepad has a particular sensor.
1310 *
1311 * \param gamepad the gamepad to query.
1312 * \param type the type of sensor to query.
1313 * \returns true if the sensor exists, false otherwise.
1314 *
1315 * \since This function is available since SDL 3.2.0.
1316 *
1317 * \sa SDL_GetGamepadSensorData
1318 * \sa SDL_GetGamepadSensorDataRate
1319 * \sa SDL_SetGamepadSensorEnabled
1320 */
1321extern SDL_DECLSPEC bool SDLCALL SDL_GamepadHasSensor(SDL_Gamepad *gamepad, SDL_SensorType type);
1322
1323/**
1324 * Set whether data reporting for a gamepad sensor is enabled.
1325 *
1326 * \param gamepad the gamepad to update.
1327 * \param type the type of sensor to enable/disable.
1328 * \param enabled whether data reporting should be enabled.
1329 * \returns true on success or false on failure; call SDL_GetError() for more
1330 * information.
1331 *
1332 * \since This function is available since SDL 3.2.0.
1333 *
1334 * \sa SDL_GamepadHasSensor
1335 * \sa SDL_GamepadSensorEnabled
1336 */
1337extern SDL_DECLSPEC bool SDLCALL SDL_SetGamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type, bool enabled);
1338
1339/**
1340 * Query whether sensor data reporting is enabled for a gamepad.
1341 *
1342 * \param gamepad the gamepad to query.
1343 * \param type the type of sensor to query.
1344 * \returns true if the sensor is enabled, false otherwise.
1345 *
1346 * \since This function is available since SDL 3.2.0.
1347 *
1348 * \sa SDL_SetGamepadSensorEnabled
1349 */
1350extern SDL_DECLSPEC bool SDLCALL SDL_GamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type);
1351
1352/**
1353 * Get the data rate (number of events per second) of a gamepad sensor.
1354 *
1355 * \param gamepad the gamepad to query.
1356 * \param type the type of sensor to query.
1357 * \returns the data rate, or 0.0f if the data rate is not available.
1358 *
1359 * \since This function is available since SDL 3.2.0.
1360 */
1361extern SDL_DECLSPEC float SDLCALL SDL_GetGamepadSensorDataRate(SDL_Gamepad *gamepad, SDL_SensorType type);
1362
1363/**
1364 * Get the current state of a gamepad sensor.
1365 *
1366 * The number of values and interpretation of the data is sensor dependent.
1367 * See SDL_sensor.h for the details for each type of sensor.
1368 *
1369 * \param gamepad the gamepad to query.
1370 * \param type the type of sensor to query.
1371 * \param data a pointer filled with the current sensor state.
1372 * \param num_values the number of values to write to data.
1373 * \returns true on success or false on failure; call SDL_GetError() for more
1374 * information.
1375 *
1376 * \since This function is available since SDL 3.2.0.
1377 */
1378extern SDL_DECLSPEC bool SDLCALL SDL_GetGamepadSensorData(SDL_Gamepad *gamepad, SDL_SensorType type, float *data, int num_values);
1379
1380/**
1381 * Start a rumble effect on a gamepad.
1382 *
1383 * Each call to this function cancels any previous rumble effect, and calling
1384 * it with 0 intensity stops any rumbling.
1385 *
1386 * This function requires you to process SDL events or call
1387 * SDL_UpdateJoysticks() to update rumble state.
1388 *
1389 * \param gamepad the gamepad to vibrate.
1390 * \param low_frequency_rumble the intensity of the low frequency (left)
1391 * rumble motor, from 0 to 0xFFFF.
1392 * \param high_frequency_rumble the intensity of the high frequency (right)
1393 * rumble motor, from 0 to 0xFFFF.
1394 * \param duration_ms the duration of the rumble effect, in milliseconds.
1395 * \returns true on success or false on failure; call SDL_GetError() for more
1396 * information.
1397 *
1398 * \since This function is available since SDL 3.2.0.
1399 */
1400extern SDL_DECLSPEC bool SDLCALL SDL_RumbleGamepad(SDL_Gamepad *gamepad, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
1401
1402/**
1403 * Start a rumble effect in the gamepad's triggers.
1404 *
1405 * Each call to this function cancels any previous trigger rumble effect, and
1406 * calling it with 0 intensity stops any rumbling.
1407 *
1408 * Note that this is rumbling of the _triggers_ and not the gamepad as a
1409 * whole. This is currently only supported on Xbox One gamepads. If you want
1410 * the (more common) whole-gamepad rumble, use SDL_RumbleGamepad() instead.
1411 *
1412 * This function requires you to process SDL events or call
1413 * SDL_UpdateJoysticks() to update rumble state.
1414 *
1415 * \param gamepad the gamepad to vibrate.
1416 * \param left_rumble the intensity of the left trigger rumble motor, from 0
1417 * to 0xFFFF.
1418 * \param right_rumble the intensity of the right trigger rumble motor, from 0
1419 * to 0xFFFF.
1420 * \param duration_ms the duration of the rumble effect, in milliseconds.
1421 * \returns true on success or false on failure; call SDL_GetError() for more
1422 * information.
1423 *
1424 * \since This function is available since SDL 3.2.0.
1425 *
1426 * \sa SDL_RumbleGamepad
1427 */
1428extern SDL_DECLSPEC bool SDLCALL SDL_RumbleGamepadTriggers(SDL_Gamepad *gamepad, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
1429
1430/**
1431 * Update a gamepad's LED color.
1432 *
1433 * An example of a joystick LED is the light on the back of a PlayStation 4's
1434 * DualShock 4 controller.
1435 *
1436 * For gamepads with a single color LED, the maximum of the RGB values will be
1437 * used as the LED brightness.
1438 *
1439 * \param gamepad the gamepad to update.
1440 * \param red the intensity of the red LED.
1441 * \param green the intensity of the green LED.
1442 * \param blue the intensity of the blue LED.
1443 * \returns true on success or false on failure; call SDL_GetError() for more
1444 * information.
1445 *
1446 * \since This function is available since SDL 3.2.0.
1447 */
1448extern SDL_DECLSPEC bool SDLCALL SDL_SetGamepadLED(SDL_Gamepad *gamepad, Uint8 red, Uint8 green, Uint8 blue);
1449
1450/**
1451 * Send a gamepad specific effect packet.
1452 *
1453 * \param gamepad the gamepad to affect.
1454 * \param data the data to send to the gamepad.
1455 * \param size the size of the data to send to the gamepad.
1456 * \returns true on success or false on failure; call SDL_GetError() for more
1457 * information.
1458 *
1459 * \since This function is available since SDL 3.2.0.
1460 */
1461extern SDL_DECLSPEC bool SDLCALL SDL_SendGamepadEffect(SDL_Gamepad *gamepad, const void *data, int size);
1462
1463/**
1464 * Close a gamepad previously opened with SDL_OpenGamepad().
1465 *
1466 * \param gamepad a gamepad identifier previously returned by
1467 * SDL_OpenGamepad().
1468 *
1469 * \since This function is available since SDL 3.2.0.
1470 *
1471 * \sa SDL_OpenGamepad
1472 */
1473extern SDL_DECLSPEC void SDLCALL SDL_CloseGamepad(SDL_Gamepad *gamepad);
1474
1475/**
1476 * Return the sfSymbolsName for a given button on a gamepad on Apple
1477 * platforms.
1478 *
1479 * \param gamepad the gamepad to query.
1480 * \param button a button on the gamepad.
1481 * \returns the sfSymbolsName or NULL if the name can't be found.
1482 *
1483 * \since This function is available since SDL 3.2.0.
1484 *
1485 * \sa SDL_GetGamepadAppleSFSymbolsNameForAxis
1486 */
1487extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadAppleSFSymbolsNameForButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);
1488
1489/**
1490 * Return the sfSymbolsName for a given axis on a gamepad on Apple platforms.
1491 *
1492 * \param gamepad the gamepad to query.
1493 * \param axis an axis on the gamepad.
1494 * \returns the sfSymbolsName or NULL if the name can't be found.
1495 *
1496 * \since This function is available since SDL 3.2.0.
1497 *
1498 * \sa SDL_GetGamepadAppleSFSymbolsNameForButton
1499 */
1500extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadAppleSFSymbolsNameForAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis);
1501
1502
1503/* Ends C function definitions when using C++ */
1504#ifdef __cplusplus
1505}
1506#endif
1507#include <SDL3/SDL_close_code.h>
1508
1509#endif /* SDL_gamepad_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_gpu.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_gpu.h
new file mode 100644
index 0000000..4a5e32f
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_gpu.h
@@ -0,0 +1,4213 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: GPU */
23
24/**
25 * # CategoryGPU
26 *
27 * The GPU API offers a cross-platform way for apps to talk to modern graphics
28 * hardware. It offers both 3D graphics and compute support, in the style of
29 * Metal, Vulkan, and Direct3D 12.
30 *
31 * A basic workflow might be something like this:
32 *
33 * The app creates a GPU device with SDL_CreateGPUDevice(), and assigns it to
34 * a window with SDL_ClaimWindowForGPUDevice()--although strictly speaking you
35 * can render offscreen entirely, perhaps for image processing, and not use a
36 * window at all.
37 *
38 * Next, the app prepares static data (things that are created once and used
39 * over and over). For example:
40 *
41 * - Shaders (programs that run on the GPU): use SDL_CreateGPUShader().
42 * - Vertex buffers (arrays of geometry data) and other rendering data: use
43 * SDL_CreateGPUBuffer() and SDL_UploadToGPUBuffer().
44 * - Textures (images): use SDL_CreateGPUTexture() and
45 * SDL_UploadToGPUTexture().
46 * - Samplers (how textures should be read from): use SDL_CreateGPUSampler().
47 * - Render pipelines (precalculated rendering state): use
48 * SDL_CreateGPUGraphicsPipeline()
49 *
50 * To render, the app creates one or more command buffers, with
51 * SDL_AcquireGPUCommandBuffer(). Command buffers collect rendering
52 * instructions that will be submitted to the GPU in batch. Complex scenes can
53 * use multiple command buffers, maybe configured across multiple threads in
54 * parallel, as long as they are submitted in the correct order, but many apps
55 * will just need one command buffer per frame.
56 *
57 * Rendering can happen to a texture (what other APIs call a "render target")
58 * or it can happen to the swapchain texture (which is just a special texture
59 * that represents a window's contents). The app can use
60 * SDL_WaitAndAcquireGPUSwapchainTexture() to render to the window.
61 *
62 * Rendering actually happens in a Render Pass, which is encoded into a
63 * command buffer. One can encode multiple render passes (or alternate between
64 * render and compute passes) in a single command buffer, but many apps might
65 * simply need a single render pass in a single command buffer. Render Passes
66 * can render to up to four color textures and one depth texture
67 * simultaneously. If the set of textures being rendered to needs to change,
68 * the Render Pass must be ended and a new one must be begun.
69 *
70 * The app calls SDL_BeginGPURenderPass(). Then it sets states it needs for
71 * each draw:
72 *
73 * - SDL_BindGPUGraphicsPipeline()
74 * - SDL_SetGPUViewport()
75 * - SDL_BindGPUVertexBuffers()
76 * - SDL_BindGPUVertexSamplers()
77 * - etc
78 *
79 * Then, make the actual draw commands with these states:
80 *
81 * - SDL_DrawGPUPrimitives()
82 * - SDL_DrawGPUPrimitivesIndirect()
83 * - SDL_DrawGPUIndexedPrimitivesIndirect()
84 * - etc
85 *
86 * After all the drawing commands for a pass are complete, the app should call
87 * SDL_EndGPURenderPass(). Once a render pass ends all render-related state is
88 * reset.
89 *
90 * The app can begin new Render Passes and make new draws in the same command
91 * buffer until the entire scene is rendered.
92 *
93 * Once all of the render commands for the scene are complete, the app calls
94 * SDL_SubmitGPUCommandBuffer() to send it to the GPU for processing.
95 *
96 * If the app needs to read back data from texture or buffers, the API has an
97 * efficient way of doing this, provided that the app is willing to tolerate
98 * some latency. When the app uses SDL_DownloadFromGPUTexture() or
99 * SDL_DownloadFromGPUBuffer(), submitting the command buffer with
100 * SDL_SubmitGPUCommandBufferAndAcquireFence() will return a fence handle that
101 * the app can poll or wait on in a thread. Once the fence indicates that the
102 * command buffer is done processing, it is safe to read the downloaded data.
103 * Make sure to call SDL_ReleaseGPUFence() when done with the fence.
104 *
105 * The API also has "compute" support. The app calls SDL_BeginGPUComputePass()
106 * with compute-writeable textures and/or buffers, which can be written to in
107 * a compute shader. Then it sets states it needs for the compute dispatches:
108 *
109 * - SDL_BindGPUComputePipeline()
110 * - SDL_BindGPUComputeStorageBuffers()
111 * - SDL_BindGPUComputeStorageTextures()
112 *
113 * Then, dispatch compute work:
114 *
115 * - SDL_DispatchGPUCompute()
116 *
117 * For advanced users, this opens up powerful GPU-driven workflows.
118 *
119 * Graphics and compute pipelines require the use of shaders, which as
120 * mentioned above are small programs executed on the GPU. Each backend
121 * (Vulkan, Metal, D3D12) requires a different shader format. When the app
122 * creates the GPU device, the app lets the device know which shader formats
123 * the app can provide. It will then select the appropriate backend depending
124 * on the available shader formats and the backends available on the platform.
125 * When creating shaders, the app must provide the correct shader format for
126 * the selected backend. If you would like to learn more about why the API
127 * works this way, there is a detailed
128 * [blog post](https://moonside.games/posts/layers-all-the-way-down/)
129 * explaining this situation.
130 *
131 * It is optimal for apps to pre-compile the shader formats they might use,
132 * but for ease of use SDL provides a separate project,
133 * [SDL_shadercross](https://github.com/libsdl-org/SDL_shadercross)
134 * , for performing runtime shader cross-compilation. It also has a CLI
135 * interface for offline precompilation as well.
136 *
137 * This is an extremely quick overview that leaves out several important
138 * details. Already, though, one can see that GPU programming can be quite
139 * complex! If you just need simple 2D graphics, the
140 * [Render API](https://wiki.libsdl.org/SDL3/CategoryRender)
141 * is much easier to use but still hardware-accelerated. That said, even for
142 * 2D applications the performance benefits and expressiveness of the GPU API
143 * are significant.
144 *
145 * The GPU API targets a feature set with a wide range of hardware support and
146 * ease of portability. It is designed so that the app won't have to branch
147 * itself by querying feature support. If you need cutting-edge features with
148 * limited hardware support, this API is probably not for you.
149 *
150 * Examples demonstrating proper usage of this API can be found
151 * [here](https://github.com/TheSpydog/SDL_gpu_examples)
152 * .
153 *
154 * ## Performance considerations
155 *
156 * Here are some basic tips for maximizing your rendering performance.
157 *
158 * - Beginning a new render pass is relatively expensive. Use as few render
159 * passes as you can.
160 * - Minimize the amount of state changes. For example, binding a pipeline is
161 * relatively cheap, but doing it hundreds of times when you don't need to
162 * will slow the performance significantly.
163 * - Perform your data uploads as early as possible in the frame.
164 * - Don't churn resources. Creating and releasing resources is expensive.
165 * It's better to create what you need up front and cache it.
166 * - Don't use uniform buffers for large amounts of data (more than a matrix
167 * or so). Use a storage buffer instead.
168 * - Use cycling correctly. There is a detailed explanation of cycling further
169 * below.
170 * - Use culling techniques to minimize pixel writes. The less writing the GPU
171 * has to do the better. Culling can be a very advanced topic but even
172 * simple culling techniques can boost performance significantly.
173 *
174 * In general try to remember the golden rule of performance: doing things is
175 * more expensive than not doing things. Don't Touch The Driver!
176 *
177 * ## FAQ
178 *
179 * **Question: When are you adding more advanced features, like ray tracing or
180 * mesh shaders?**
181 *
182 * Answer: We don't have immediate plans to add more bleeding-edge features,
183 * but we certainly might in the future, when these features prove worthwhile,
184 * and reasonable to implement across several platforms and underlying APIs.
185 * So while these things are not in the "never" category, they are definitely
186 * not "near future" items either.
187 *
188 * **Question: Why is my shader not working?**
189 *
190 * Answer: A common oversight when using shaders is not properly laying out
191 * the shader resources/registers correctly. The GPU API is very strict with
192 * how it wants resources to be laid out and it's difficult for the API to
193 * automatically validate shaders to see if they have a compatible layout. See
194 * the documentation for SDL_CreateGPUShader() and
195 * SDL_CreateGPUComputePipeline() for information on the expected layout.
196 *
197 * Another common issue is not setting the correct number of samplers,
198 * textures, and buffers in SDL_GPUShaderCreateInfo. If possible use shader
199 * reflection to extract the required information from the shader
200 * automatically instead of manually filling in the struct's values.
201 *
202 * **Question: My application isn't performing very well. Is this the GPU
203 * API's fault?**
204 *
205 * Answer: No. Long answer: The GPU API is a relatively thin layer over the
206 * underlying graphics API. While it's possible that we have done something
207 * inefficiently, it's very unlikely especially if you are relatively
208 * inexperienced with GPU rendering. Please see the performance tips above and
209 * make sure you are following them. Additionally, tools like RenderDoc can be
210 * very helpful for diagnosing incorrect behavior and performance issues.
211 *
212 * ## System Requirements
213 *
214 * **Vulkan:** Supported on Windows, Linux, Nintendo Switch, and certain
215 * Android devices. Requires Vulkan 1.0 with the following extensions and
216 * device features:
217 *
218 * - `VK_KHR_swapchain`
219 * - `VK_KHR_maintenance1`
220 * - `independentBlend`
221 * - `imageCubeArray`
222 * - `depthClamp`
223 * - `shaderClipDistance`
224 * - `drawIndirectFirstInstance`
225 *
226 * **D3D12:** Supported on Windows 10 or newer, Xbox One (GDK), and Xbox
227 * Series X|S (GDK). Requires a GPU that supports DirectX 12 Feature Level
228 * 11_1.
229 *
230 * **Metal:** Supported on macOS 10.14+ and iOS/tvOS 13.0+. Hardware
231 * requirements vary by operating system:
232 *
233 * - macOS requires an Apple Silicon or
234 * [Intel Mac2 family](https://developer.apple.com/documentation/metal/mtlfeatureset/mtlfeatureset_macos_gpufamily2_v1?language=objc)
235 * GPU
236 * - iOS/tvOS requires an A9 GPU or newer
237 * - iOS Simulator and tvOS Simulator are unsupported
238 *
239 * ## Uniform Data
240 *
241 * Uniforms are for passing data to shaders. The uniform data will be constant
242 * across all executions of the shader.
243 *
244 * There are 4 available uniform slots per shader stage (where the stages are
245 * vertex, fragment, and compute). Uniform data pushed to a slot on a stage
246 * keeps its value throughout the command buffer until you call the relevant
247 * Push function on that slot again.
248 *
249 * For example, you could write your vertex shaders to read a camera matrix
250 * from uniform binding slot 0, push the camera matrix at the start of the
251 * command buffer, and that data will be used for every subsequent draw call.
252 *
253 * It is valid to push uniform data during a render or compute pass.
254 *
255 * Uniforms are best for pushing small amounts of data. If you are pushing
256 * more than a matrix or two per call you should consider using a storage
257 * buffer instead.
258 *
259 * ## A Note On Cycling
260 *
261 * When using a command buffer, operations do not occur immediately - they
262 * occur some time after the command buffer is submitted.
263 *
264 * When a resource is used in a pending or active command buffer, it is
265 * considered to be "bound". When a resource is no longer used in any pending
266 * or active command buffers, it is considered to be "unbound".
267 *
268 * If data resources are bound, it is unspecified when that data will be
269 * unbound unless you acquire a fence when submitting the command buffer and
270 * wait on it. However, this doesn't mean you need to track resource usage
271 * manually.
272 *
273 * All of the functions and structs that involve writing to a resource have a
274 * "cycle" bool. SDL_GPUTransferBuffer, SDL_GPUBuffer, and SDL_GPUTexture all
275 * effectively function as ring buffers on internal resources. When cycle is
276 * true, if the resource is bound, the cycle rotates to the next unbound
277 * internal resource, or if none are available, a new one is created. This
278 * means you don't have to worry about complex state tracking and
279 * synchronization as long as cycling is correctly employed.
280 *
281 * For example: you can call SDL_MapGPUTransferBuffer(), write texture data,
282 * SDL_UnmapGPUTransferBuffer(), and then SDL_UploadToGPUTexture(). The next
283 * time you write texture data to the transfer buffer, if you set the cycle
284 * param to true, you don't have to worry about overwriting any data that is
285 * not yet uploaded.
286 *
287 * Another example: If you are using a texture in a render pass every frame,
288 * this can cause a data dependency between frames. If you set cycle to true
289 * in the SDL_GPUColorTargetInfo struct, you can prevent this data dependency.
290 *
291 * Cycling will never undefine already bound data. When cycling, all data in
292 * the resource is considered to be undefined for subsequent commands until
293 * that data is written again. You must take care not to read undefined data.
294 *
295 * Note that when cycling a texture, the entire texture will be cycled, even
296 * if only part of the texture is used in the call, so you must consider the
297 * entire texture to contain undefined data after cycling.
298 *
299 * You must also take care not to overwrite a section of data that has been
300 * referenced in a command without cycling first. It is OK to overwrite
301 * unreferenced data in a bound resource without cycling, but overwriting a
302 * section of data that has already been referenced will produce unexpected
303 * results.
304 */
305
306#ifndef SDL_gpu_h_
307#define SDL_gpu_h_
308
309#include <SDL3/SDL_stdinc.h>
310#include <SDL3/SDL_pixels.h>
311#include <SDL3/SDL_properties.h>
312#include <SDL3/SDL_rect.h>
313#include <SDL3/SDL_surface.h>
314#include <SDL3/SDL_video.h>
315
316#include <SDL3/SDL_begin_code.h>
317#ifdef __cplusplus
318extern "C" {
319#endif /* __cplusplus */
320
321/* Type Declarations */
322
323/**
324 * An opaque handle representing the SDL_GPU context.
325 *
326 * \since This struct is available since SDL 3.2.0.
327 */
328typedef struct SDL_GPUDevice SDL_GPUDevice;
329
330/**
331 * An opaque handle representing a buffer.
332 *
333 * Used for vertices, indices, indirect draw commands, and general compute
334 * data.
335 *
336 * \since This struct is available since SDL 3.2.0.
337 *
338 * \sa SDL_CreateGPUBuffer
339 * \sa SDL_UploadToGPUBuffer
340 * \sa SDL_DownloadFromGPUBuffer
341 * \sa SDL_CopyGPUBufferToBuffer
342 * \sa SDL_BindGPUVertexBuffers
343 * \sa SDL_BindGPUIndexBuffer
344 * \sa SDL_BindGPUVertexStorageBuffers
345 * \sa SDL_BindGPUFragmentStorageBuffers
346 * \sa SDL_DrawGPUPrimitivesIndirect
347 * \sa SDL_DrawGPUIndexedPrimitivesIndirect
348 * \sa SDL_BindGPUComputeStorageBuffers
349 * \sa SDL_DispatchGPUComputeIndirect
350 * \sa SDL_ReleaseGPUBuffer
351 */
352typedef struct SDL_GPUBuffer SDL_GPUBuffer;
353
354/**
355 * An opaque handle representing a transfer buffer.
356 *
357 * Used for transferring data to and from the device.
358 *
359 * \since This struct is available since SDL 3.2.0.
360 *
361 * \sa SDL_CreateGPUTransferBuffer
362 * \sa SDL_MapGPUTransferBuffer
363 * \sa SDL_UnmapGPUTransferBuffer
364 * \sa SDL_UploadToGPUBuffer
365 * \sa SDL_UploadToGPUTexture
366 * \sa SDL_DownloadFromGPUBuffer
367 * \sa SDL_DownloadFromGPUTexture
368 * \sa SDL_ReleaseGPUTransferBuffer
369 */
370typedef struct SDL_GPUTransferBuffer SDL_GPUTransferBuffer;
371
372/**
373 * An opaque handle representing a texture.
374 *
375 * \since This struct is available since SDL 3.2.0.
376 *
377 * \sa SDL_CreateGPUTexture
378 * \sa SDL_UploadToGPUTexture
379 * \sa SDL_DownloadFromGPUTexture
380 * \sa SDL_CopyGPUTextureToTexture
381 * \sa SDL_BindGPUVertexSamplers
382 * \sa SDL_BindGPUVertexStorageTextures
383 * \sa SDL_BindGPUFragmentSamplers
384 * \sa SDL_BindGPUFragmentStorageTextures
385 * \sa SDL_BindGPUComputeStorageTextures
386 * \sa SDL_GenerateMipmapsForGPUTexture
387 * \sa SDL_BlitGPUTexture
388 * \sa SDL_ReleaseGPUTexture
389 */
390typedef struct SDL_GPUTexture SDL_GPUTexture;
391
392/**
393 * An opaque handle representing a sampler.
394 *
395 * \since This struct is available since SDL 3.2.0.
396 *
397 * \sa SDL_CreateGPUSampler
398 * \sa SDL_BindGPUVertexSamplers
399 * \sa SDL_BindGPUFragmentSamplers
400 * \sa SDL_ReleaseGPUSampler
401 */
402typedef struct SDL_GPUSampler SDL_GPUSampler;
403
404/**
405 * An opaque handle representing a compiled shader object.
406 *
407 * \since This struct is available since SDL 3.2.0.
408 *
409 * \sa SDL_CreateGPUShader
410 * \sa SDL_CreateGPUGraphicsPipeline
411 * \sa SDL_ReleaseGPUShader
412 */
413typedef struct SDL_GPUShader SDL_GPUShader;
414
415/**
416 * An opaque handle representing a compute pipeline.
417 *
418 * Used during compute passes.
419 *
420 * \since This struct is available since SDL 3.2.0.
421 *
422 * \sa SDL_CreateGPUComputePipeline
423 * \sa SDL_BindGPUComputePipeline
424 * \sa SDL_ReleaseGPUComputePipeline
425 */
426typedef struct SDL_GPUComputePipeline SDL_GPUComputePipeline;
427
428/**
429 * An opaque handle representing a graphics pipeline.
430 *
431 * Used during render passes.
432 *
433 * \since This struct is available since SDL 3.2.0.
434 *
435 * \sa SDL_CreateGPUGraphicsPipeline
436 * \sa SDL_BindGPUGraphicsPipeline
437 * \sa SDL_ReleaseGPUGraphicsPipeline
438 */
439typedef struct SDL_GPUGraphicsPipeline SDL_GPUGraphicsPipeline;
440
441/**
442 * An opaque handle representing a command buffer.
443 *
444 * Most state is managed via command buffers. When setting state using a
445 * command buffer, that state is local to the command buffer.
446 *
447 * Commands only begin execution on the GPU once SDL_SubmitGPUCommandBuffer is
448 * called. Once the command buffer is submitted, it is no longer valid to use
449 * it.
450 *
451 * Command buffers are executed in submission order. If you submit command
452 * buffer A and then command buffer B all commands in A will begin executing
453 * before any command in B begins executing.
454 *
455 * In multi-threading scenarios, you should only access a command buffer on
456 * the thread you acquired it from.
457 *
458 * \since This struct is available since SDL 3.2.0.
459 *
460 * \sa SDL_AcquireGPUCommandBuffer
461 * \sa SDL_SubmitGPUCommandBuffer
462 * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
463 */
464typedef struct SDL_GPUCommandBuffer SDL_GPUCommandBuffer;
465
466/**
467 * An opaque handle representing a render pass.
468 *
469 * This handle is transient and should not be held or referenced after
470 * SDL_EndGPURenderPass is called.
471 *
472 * \since This struct is available since SDL 3.2.0.
473 *
474 * \sa SDL_BeginGPURenderPass
475 * \sa SDL_EndGPURenderPass
476 */
477typedef struct SDL_GPURenderPass SDL_GPURenderPass;
478
479/**
480 * An opaque handle representing a compute pass.
481 *
482 * This handle is transient and should not be held or referenced after
483 * SDL_EndGPUComputePass is called.
484 *
485 * \since This struct is available since SDL 3.2.0.
486 *
487 * \sa SDL_BeginGPUComputePass
488 * \sa SDL_EndGPUComputePass
489 */
490typedef struct SDL_GPUComputePass SDL_GPUComputePass;
491
492/**
493 * An opaque handle representing a copy pass.
494 *
495 * This handle is transient and should not be held or referenced after
496 * SDL_EndGPUCopyPass is called.
497 *
498 * \since This struct is available since SDL 3.2.0.
499 *
500 * \sa SDL_BeginGPUCopyPass
501 * \sa SDL_EndGPUCopyPass
502 */
503typedef struct SDL_GPUCopyPass SDL_GPUCopyPass;
504
505/**
506 * An opaque handle representing a fence.
507 *
508 * \since This struct is available since SDL 3.2.0.
509 *
510 * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
511 * \sa SDL_QueryGPUFence
512 * \sa SDL_WaitForGPUFences
513 * \sa SDL_ReleaseGPUFence
514 */
515typedef struct SDL_GPUFence SDL_GPUFence;
516
517/**
518 * Specifies the primitive topology of a graphics pipeline.
519 *
520 * If you are using POINTLIST you must include a point size output in the
521 * vertex shader.
522 *
523 * - For HLSL compiling to SPIRV you must decorate a float output with
524 * [[vk::builtin("PointSize")]].
525 * - For GLSL you must set the gl_PointSize builtin.
526 * - For MSL you must include a float output with the [[point_size]]
527 * decorator.
528 *
529 * Note that sized point topology is totally unsupported on D3D12. Any size
530 * other than 1 will be ignored. In general, you should avoid using point
531 * topology for both compatibility and performance reasons. You WILL regret
532 * using it.
533 *
534 * \since This enum is available since SDL 3.2.0.
535 *
536 * \sa SDL_CreateGPUGraphicsPipeline
537 */
538typedef enum SDL_GPUPrimitiveType
539{
540 SDL_GPU_PRIMITIVETYPE_TRIANGLELIST, /**< A series of separate triangles. */
541 SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP, /**< A series of connected triangles. */
542 SDL_GPU_PRIMITIVETYPE_LINELIST, /**< A series of separate lines. */
543 SDL_GPU_PRIMITIVETYPE_LINESTRIP, /**< A series of connected lines. */
544 SDL_GPU_PRIMITIVETYPE_POINTLIST /**< A series of separate points. */
545} SDL_GPUPrimitiveType;
546
547/**
548 * Specifies how the contents of a texture attached to a render pass are
549 * treated at the beginning of the render pass.
550 *
551 * \since This enum is available since SDL 3.2.0.
552 *
553 * \sa SDL_BeginGPURenderPass
554 */
555typedef enum SDL_GPULoadOp
556{
557 SDL_GPU_LOADOP_LOAD, /**< The previous contents of the texture will be preserved. */
558 SDL_GPU_LOADOP_CLEAR, /**< The contents of the texture will be cleared to a color. */
559 SDL_GPU_LOADOP_DONT_CARE /**< The previous contents of the texture need not be preserved. The contents will be undefined. */
560} SDL_GPULoadOp;
561
562/**
563 * Specifies how the contents of a texture attached to a render pass are
564 * treated at the end of the render pass.
565 *
566 * \since This enum is available since SDL 3.2.0.
567 *
568 * \sa SDL_BeginGPURenderPass
569 */
570typedef enum SDL_GPUStoreOp
571{
572 SDL_GPU_STOREOP_STORE, /**< The contents generated during the render pass will be written to memory. */
573 SDL_GPU_STOREOP_DONT_CARE, /**< The contents generated during the render pass are not needed and may be discarded. The contents will be undefined. */
574 SDL_GPU_STOREOP_RESOLVE, /**< The multisample contents generated during the render pass will be resolved to a non-multisample texture. The contents in the multisample texture may then be discarded and will be undefined. */
575 SDL_GPU_STOREOP_RESOLVE_AND_STORE /**< The multisample contents generated during the render pass will be resolved to a non-multisample texture. The contents in the multisample texture will be written to memory. */
576} SDL_GPUStoreOp;
577
578/**
579 * Specifies the size of elements in an index buffer.
580 *
581 * \since This enum is available since SDL 3.2.0.
582 *
583 * \sa SDL_CreateGPUGraphicsPipeline
584 */
585typedef enum SDL_GPUIndexElementSize
586{
587 SDL_GPU_INDEXELEMENTSIZE_16BIT, /**< The index elements are 16-bit. */
588 SDL_GPU_INDEXELEMENTSIZE_32BIT /**< The index elements are 32-bit. */
589} SDL_GPUIndexElementSize;
590
591/**
592 * Specifies the pixel format of a texture.
593 *
594 * Texture format support varies depending on driver, hardware, and usage
595 * flags. In general, you should use SDL_GPUTextureSupportsFormat to query if
596 * a format is supported before using it. However, there are a few guaranteed
597 * formats.
598 *
599 * FIXME: Check universal support for 32-bit component formats FIXME: Check
600 * universal support for SIMULTANEOUS_READ_WRITE
601 *
602 * For SAMPLER usage, the following formats are universally supported:
603 *
604 * - R8G8B8A8_UNORM
605 * - B8G8R8A8_UNORM
606 * - R8_UNORM
607 * - R8_SNORM
608 * - R8G8_UNORM
609 * - R8G8_SNORM
610 * - R8G8B8A8_SNORM
611 * - R16_FLOAT
612 * - R16G16_FLOAT
613 * - R16G16B16A16_FLOAT
614 * - R32_FLOAT
615 * - R32G32_FLOAT
616 * - R32G32B32A32_FLOAT
617 * - R11G11B10_UFLOAT
618 * - R8G8B8A8_UNORM_SRGB
619 * - B8G8R8A8_UNORM_SRGB
620 * - D16_UNORM
621 *
622 * For COLOR_TARGET usage, the following formats are universally supported:
623 *
624 * - R8G8B8A8_UNORM
625 * - B8G8R8A8_UNORM
626 * - R8_UNORM
627 * - R16_FLOAT
628 * - R16G16_FLOAT
629 * - R16G16B16A16_FLOAT
630 * - R32_FLOAT
631 * - R32G32_FLOAT
632 * - R32G32B32A32_FLOAT
633 * - R8_UINT
634 * - R8G8_UINT
635 * - R8G8B8A8_UINT
636 * - R16_UINT
637 * - R16G16_UINT
638 * - R16G16B16A16_UINT
639 * - R8_INT
640 * - R8G8_INT
641 * - R8G8B8A8_INT
642 * - R16_INT
643 * - R16G16_INT
644 * - R16G16B16A16_INT
645 * - R8G8B8A8_UNORM_SRGB
646 * - B8G8R8A8_UNORM_SRGB
647 *
648 * For STORAGE usages, the following formats are universally supported:
649 *
650 * - R8G8B8A8_UNORM
651 * - R8G8B8A8_SNORM
652 * - R16G16B16A16_FLOAT
653 * - R32_FLOAT
654 * - R32G32_FLOAT
655 * - R32G32B32A32_FLOAT
656 * - R8G8B8A8_UINT
657 * - R16G16B16A16_UINT
658 * - R8G8B8A8_INT
659 * - R16G16B16A16_INT
660 *
661 * For DEPTH_STENCIL_TARGET usage, the following formats are universally
662 * supported:
663 *
664 * - D16_UNORM
665 * - Either (but not necessarily both!) D24_UNORM or D32_FLOAT
666 * - Either (but not necessarily both!) D24_UNORM_S8_UINT or D32_FLOAT_S8_UINT
667 *
668 * Unless D16_UNORM is sufficient for your purposes, always check which of
669 * D24/D32 is supported before creating a depth-stencil texture!
670 *
671 * \since This enum is available since SDL 3.2.0.
672 *
673 * \sa SDL_CreateGPUTexture
674 * \sa SDL_GPUTextureSupportsFormat
675 */
676typedef enum SDL_GPUTextureFormat
677{
678 SDL_GPU_TEXTUREFORMAT_INVALID,
679
680 /* Unsigned Normalized Float Color Formats */
681 SDL_GPU_TEXTUREFORMAT_A8_UNORM,
682 SDL_GPU_TEXTUREFORMAT_R8_UNORM,
683 SDL_GPU_TEXTUREFORMAT_R8G8_UNORM,
684 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM,
685 SDL_GPU_TEXTUREFORMAT_R16_UNORM,
686 SDL_GPU_TEXTUREFORMAT_R16G16_UNORM,
687 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM,
688 SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM,
689 SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM,
690 SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM,
691 SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM,
692 SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM,
693 /* Compressed Unsigned Normalized Float Color Formats */
694 SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM,
695 SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM,
696 SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM,
697 SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM,
698 SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM,
699 SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM,
700 /* Compressed Signed Float Color Formats */
701 SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT,
702 /* Compressed Unsigned Float Color Formats */
703 SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT,
704 /* Signed Normalized Float Color Formats */
705 SDL_GPU_TEXTUREFORMAT_R8_SNORM,
706 SDL_GPU_TEXTUREFORMAT_R8G8_SNORM,
707 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM,
708 SDL_GPU_TEXTUREFORMAT_R16_SNORM,
709 SDL_GPU_TEXTUREFORMAT_R16G16_SNORM,
710 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM,
711 /* Signed Float Color Formats */
712 SDL_GPU_TEXTUREFORMAT_R16_FLOAT,
713 SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT,
714 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT,
715 SDL_GPU_TEXTUREFORMAT_R32_FLOAT,
716 SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT,
717 SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT,
718 /* Unsigned Float Color Formats */
719 SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT,
720 /* Unsigned Integer Color Formats */
721 SDL_GPU_TEXTUREFORMAT_R8_UINT,
722 SDL_GPU_TEXTUREFORMAT_R8G8_UINT,
723 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT,
724 SDL_GPU_TEXTUREFORMAT_R16_UINT,
725 SDL_GPU_TEXTUREFORMAT_R16G16_UINT,
726 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT,
727 SDL_GPU_TEXTUREFORMAT_R32_UINT,
728 SDL_GPU_TEXTUREFORMAT_R32G32_UINT,
729 SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT,
730 /* Signed Integer Color Formats */
731 SDL_GPU_TEXTUREFORMAT_R8_INT,
732 SDL_GPU_TEXTUREFORMAT_R8G8_INT,
733 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT,
734 SDL_GPU_TEXTUREFORMAT_R16_INT,
735 SDL_GPU_TEXTUREFORMAT_R16G16_INT,
736 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT,
737 SDL_GPU_TEXTUREFORMAT_R32_INT,
738 SDL_GPU_TEXTUREFORMAT_R32G32_INT,
739 SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT,
740 /* SRGB Unsigned Normalized Color Formats */
741 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB,
742 SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB,
743 /* Compressed SRGB Unsigned Normalized Color Formats */
744 SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB,
745 SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB,
746 SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB,
747 SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB,
748 /* Depth Formats */
749 SDL_GPU_TEXTUREFORMAT_D16_UNORM,
750 SDL_GPU_TEXTUREFORMAT_D24_UNORM,
751 SDL_GPU_TEXTUREFORMAT_D32_FLOAT,
752 SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT,
753 SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT,
754 /* Compressed ASTC Normalized Float Color Formats*/
755 SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM,
756 SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM,
757 SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM,
758 SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM,
759 SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM,
760 SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM,
761 SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM,
762 SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM,
763 SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM,
764 SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM,
765 SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM,
766 SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM,
767 SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM,
768 SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM,
769 /* Compressed SRGB ASTC Normalized Float Color Formats*/
770 SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB,
771 SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB,
772 SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB,
773 SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB,
774 SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB,
775 SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB,
776 SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB,
777 SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB,
778 SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB,
779 SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB,
780 SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB,
781 SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB,
782 SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB,
783 SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB,
784 /* Compressed ASTC Signed Float Color Formats*/
785 SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT,
786 SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT,
787 SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT,
788 SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT,
789 SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT,
790 SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT,
791 SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT,
792 SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT,
793 SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT,
794 SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT,
795 SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT,
796 SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT,
797 SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT,
798 SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT
799} SDL_GPUTextureFormat;
800
801/**
802 * Specifies how a texture is intended to be used by the client.
803 *
804 * A texture must have at least one usage flag. Note that some usage flag
805 * combinations are invalid.
806 *
807 * With regards to compute storage usage, READ | WRITE means that you can have
808 * shader A that only writes into the texture and shader B that only reads
809 * from the texture and bind the same texture to either shader respectively.
810 * SIMULTANEOUS means that you can do reads and writes within the same shader
811 * or compute pass. It also implies that atomic ops can be used, since those
812 * are read-modify-write operations. If you use SIMULTANEOUS, you are
813 * responsible for avoiding data races, as there is no data synchronization
814 * within a compute pass. Note that SIMULTANEOUS usage is only supported by a
815 * limited number of texture formats.
816 *
817 * \since This datatype is available since SDL 3.2.0.
818 *
819 * \sa SDL_CreateGPUTexture
820 */
821typedef Uint32 SDL_GPUTextureUsageFlags;
822
823#define SDL_GPU_TEXTUREUSAGE_SAMPLER (1u << 0) /**< Texture supports sampling. */
824#define SDL_GPU_TEXTUREUSAGE_COLOR_TARGET (1u << 1) /**< Texture is a color render target. */
825#define SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET (1u << 2) /**< Texture is a depth stencil target. */
826#define SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ (1u << 3) /**< Texture supports storage reads in graphics stages. */
827#define SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ (1u << 4) /**< Texture supports storage reads in the compute stage. */
828#define SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE (1u << 5) /**< Texture supports storage writes in the compute stage. */
829#define SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE (1u << 6) /**< Texture supports reads and writes in the same compute shader. This is NOT equivalent to READ | WRITE. */
830
831/**
832 * Specifies the type of a texture.
833 *
834 * \since This enum is available since SDL 3.2.0.
835 *
836 * \sa SDL_CreateGPUTexture
837 */
838typedef enum SDL_GPUTextureType
839{
840 SDL_GPU_TEXTURETYPE_2D, /**< The texture is a 2-dimensional image. */
841 SDL_GPU_TEXTURETYPE_2D_ARRAY, /**< The texture is a 2-dimensional array image. */
842 SDL_GPU_TEXTURETYPE_3D, /**< The texture is a 3-dimensional image. */
843 SDL_GPU_TEXTURETYPE_CUBE, /**< The texture is a cube image. */
844 SDL_GPU_TEXTURETYPE_CUBE_ARRAY /**< The texture is a cube array image. */
845} SDL_GPUTextureType;
846
847/**
848 * Specifies the sample count of a texture.
849 *
850 * Used in multisampling. Note that this value only applies when the texture
851 * is used as a render target.
852 *
853 * \since This enum is available since SDL 3.2.0.
854 *
855 * \sa SDL_CreateGPUTexture
856 * \sa SDL_GPUTextureSupportsSampleCount
857 */
858typedef enum SDL_GPUSampleCount
859{
860 SDL_GPU_SAMPLECOUNT_1, /**< No multisampling. */
861 SDL_GPU_SAMPLECOUNT_2, /**< MSAA 2x */
862 SDL_GPU_SAMPLECOUNT_4, /**< MSAA 4x */
863 SDL_GPU_SAMPLECOUNT_8 /**< MSAA 8x */
864} SDL_GPUSampleCount;
865
866
867/**
868 * Specifies the face of a cube map.
869 *
870 * Can be passed in as the layer field in texture-related structs.
871 *
872 * \since This enum is available since SDL 3.2.0.
873 */
874typedef enum SDL_GPUCubeMapFace
875{
876 SDL_GPU_CUBEMAPFACE_POSITIVEX,
877 SDL_GPU_CUBEMAPFACE_NEGATIVEX,
878 SDL_GPU_CUBEMAPFACE_POSITIVEY,
879 SDL_GPU_CUBEMAPFACE_NEGATIVEY,
880 SDL_GPU_CUBEMAPFACE_POSITIVEZ,
881 SDL_GPU_CUBEMAPFACE_NEGATIVEZ
882} SDL_GPUCubeMapFace;
883
884/**
885 * Specifies how a buffer is intended to be used by the client.
886 *
887 * A buffer must have at least one usage flag. Note that some usage flag
888 * combinations are invalid.
889 *
890 * Unlike textures, READ | WRITE can be used for simultaneous read-write
891 * usage. The same data synchronization concerns as textures apply.
892 *
893 * If you use a STORAGE flag, the data in the buffer must respect std140
894 * layout conventions. In practical terms this means you must ensure that vec3
895 * and vec4 fields are 16-byte aligned.
896 *
897 * \since This datatype is available since SDL 3.2.0.
898 *
899 * \sa SDL_CreateGPUBuffer
900 */
901typedef Uint32 SDL_GPUBufferUsageFlags;
902
903#define SDL_GPU_BUFFERUSAGE_VERTEX (1u << 0) /**< Buffer is a vertex buffer. */
904#define SDL_GPU_BUFFERUSAGE_INDEX (1u << 1) /**< Buffer is an index buffer. */
905#define SDL_GPU_BUFFERUSAGE_INDIRECT (1u << 2) /**< Buffer is an indirect buffer. */
906#define SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ (1u << 3) /**< Buffer supports storage reads in graphics stages. */
907#define SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ (1u << 4) /**< Buffer supports storage reads in the compute stage. */
908#define SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE (1u << 5) /**< Buffer supports storage writes in the compute stage. */
909
910/**
911 * Specifies how a transfer buffer is intended to be used by the client.
912 *
913 * Note that mapping and copying FROM an upload transfer buffer or TO a
914 * download transfer buffer is undefined behavior.
915 *
916 * \since This enum is available since SDL 3.2.0.
917 *
918 * \sa SDL_CreateGPUTransferBuffer
919 */
920typedef enum SDL_GPUTransferBufferUsage
921{
922 SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD,
923 SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD
924} SDL_GPUTransferBufferUsage;
925
926/**
927 * Specifies which stage a shader program corresponds to.
928 *
929 * \since This enum is available since SDL 3.2.0.
930 *
931 * \sa SDL_CreateGPUShader
932 */
933typedef enum SDL_GPUShaderStage
934{
935 SDL_GPU_SHADERSTAGE_VERTEX,
936 SDL_GPU_SHADERSTAGE_FRAGMENT
937} SDL_GPUShaderStage;
938
939/**
940 * Specifies the format of shader code.
941 *
942 * Each format corresponds to a specific backend that accepts it.
943 *
944 * \since This datatype is available since SDL 3.2.0.
945 *
946 * \sa SDL_CreateGPUShader
947 */
948typedef Uint32 SDL_GPUShaderFormat;
949
950#define SDL_GPU_SHADERFORMAT_INVALID 0
951#define SDL_GPU_SHADERFORMAT_PRIVATE (1u << 0) /**< Shaders for NDA'd platforms. */
952#define SDL_GPU_SHADERFORMAT_SPIRV (1u << 1) /**< SPIR-V shaders for Vulkan. */
953#define SDL_GPU_SHADERFORMAT_DXBC (1u << 2) /**< DXBC SM5_1 shaders for D3D12. */
954#define SDL_GPU_SHADERFORMAT_DXIL (1u << 3) /**< DXIL SM6_0 shaders for D3D12. */
955#define SDL_GPU_SHADERFORMAT_MSL (1u << 4) /**< MSL shaders for Metal. */
956#define SDL_GPU_SHADERFORMAT_METALLIB (1u << 5) /**< Precompiled metallib shaders for Metal. */
957
958/**
959 * Specifies the format of a vertex attribute.
960 *
961 * \since This enum is available since SDL 3.2.0.
962 *
963 * \sa SDL_CreateGPUGraphicsPipeline
964 */
965typedef enum SDL_GPUVertexElementFormat
966{
967 SDL_GPU_VERTEXELEMENTFORMAT_INVALID,
968
969 /* 32-bit Signed Integers */
970 SDL_GPU_VERTEXELEMENTFORMAT_INT,
971 SDL_GPU_VERTEXELEMENTFORMAT_INT2,
972 SDL_GPU_VERTEXELEMENTFORMAT_INT3,
973 SDL_GPU_VERTEXELEMENTFORMAT_INT4,
974
975 /* 32-bit Unsigned Integers */
976 SDL_GPU_VERTEXELEMENTFORMAT_UINT,
977 SDL_GPU_VERTEXELEMENTFORMAT_UINT2,
978 SDL_GPU_VERTEXELEMENTFORMAT_UINT3,
979 SDL_GPU_VERTEXELEMENTFORMAT_UINT4,
980
981 /* 32-bit Floats */
982 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT,
983 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2,
984 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3,
985 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4,
986
987 /* 8-bit Signed Integers */
988 SDL_GPU_VERTEXELEMENTFORMAT_BYTE2,
989 SDL_GPU_VERTEXELEMENTFORMAT_BYTE4,
990
991 /* 8-bit Unsigned Integers */
992 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2,
993 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4,
994
995 /* 8-bit Signed Normalized */
996 SDL_GPU_VERTEXELEMENTFORMAT_BYTE2_NORM,
997 SDL_GPU_VERTEXELEMENTFORMAT_BYTE4_NORM,
998
999 /* 8-bit Unsigned Normalized */
1000 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM,
1001 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM,
1002
1003 /* 16-bit Signed Integers */
1004 SDL_GPU_VERTEXELEMENTFORMAT_SHORT2,
1005 SDL_GPU_VERTEXELEMENTFORMAT_SHORT4,
1006
1007 /* 16-bit Unsigned Integers */
1008 SDL_GPU_VERTEXELEMENTFORMAT_USHORT2,
1009 SDL_GPU_VERTEXELEMENTFORMAT_USHORT4,
1010
1011 /* 16-bit Signed Normalized */
1012 SDL_GPU_VERTEXELEMENTFORMAT_SHORT2_NORM,
1013 SDL_GPU_VERTEXELEMENTFORMAT_SHORT4_NORM,
1014
1015 /* 16-bit Unsigned Normalized */
1016 SDL_GPU_VERTEXELEMENTFORMAT_USHORT2_NORM,
1017 SDL_GPU_VERTEXELEMENTFORMAT_USHORT4_NORM,
1018
1019 /* 16-bit Floats */
1020 SDL_GPU_VERTEXELEMENTFORMAT_HALF2,
1021 SDL_GPU_VERTEXELEMENTFORMAT_HALF4
1022} SDL_GPUVertexElementFormat;
1023
1024/**
1025 * Specifies the rate at which vertex attributes are pulled from buffers.
1026 *
1027 * \since This enum is available since SDL 3.2.0.
1028 *
1029 * \sa SDL_CreateGPUGraphicsPipeline
1030 */
1031typedef enum SDL_GPUVertexInputRate
1032{
1033 SDL_GPU_VERTEXINPUTRATE_VERTEX, /**< Attribute addressing is a function of the vertex index. */
1034 SDL_GPU_VERTEXINPUTRATE_INSTANCE /**< Attribute addressing is a function of the instance index. */
1035} SDL_GPUVertexInputRate;
1036
1037/**
1038 * Specifies the fill mode of the graphics pipeline.
1039 *
1040 * \since This enum is available since SDL 3.2.0.
1041 *
1042 * \sa SDL_CreateGPUGraphicsPipeline
1043 */
1044typedef enum SDL_GPUFillMode
1045{
1046 SDL_GPU_FILLMODE_FILL, /**< Polygons will be rendered via rasterization. */
1047 SDL_GPU_FILLMODE_LINE /**< Polygon edges will be drawn as line segments. */
1048} SDL_GPUFillMode;
1049
1050/**
1051 * Specifies the facing direction in which triangle faces will be culled.
1052 *
1053 * \since This enum is available since SDL 3.2.0.
1054 *
1055 * \sa SDL_CreateGPUGraphicsPipeline
1056 */
1057typedef enum SDL_GPUCullMode
1058{
1059 SDL_GPU_CULLMODE_NONE, /**< No triangles are culled. */
1060 SDL_GPU_CULLMODE_FRONT, /**< Front-facing triangles are culled. */
1061 SDL_GPU_CULLMODE_BACK /**< Back-facing triangles are culled. */
1062} SDL_GPUCullMode;
1063
1064/**
1065 * Specifies the vertex winding that will cause a triangle to be determined to
1066 * be front-facing.
1067 *
1068 * \since This enum is available since SDL 3.2.0.
1069 *
1070 * \sa SDL_CreateGPUGraphicsPipeline
1071 */
1072typedef enum SDL_GPUFrontFace
1073{
1074 SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE, /**< A triangle with counter-clockwise vertex winding will be considered front-facing. */
1075 SDL_GPU_FRONTFACE_CLOCKWISE /**< A triangle with clockwise vertex winding will be considered front-facing. */
1076} SDL_GPUFrontFace;
1077
1078/**
1079 * Specifies a comparison operator for depth, stencil and sampler operations.
1080 *
1081 * \since This enum is available since SDL 3.2.0.
1082 *
1083 * \sa SDL_CreateGPUGraphicsPipeline
1084 */
1085typedef enum SDL_GPUCompareOp
1086{
1087 SDL_GPU_COMPAREOP_INVALID,
1088 SDL_GPU_COMPAREOP_NEVER, /**< The comparison always evaluates false. */
1089 SDL_GPU_COMPAREOP_LESS, /**< The comparison evaluates reference < test. */
1090 SDL_GPU_COMPAREOP_EQUAL, /**< The comparison evaluates reference == test. */
1091 SDL_GPU_COMPAREOP_LESS_OR_EQUAL, /**< The comparison evaluates reference <= test. */
1092 SDL_GPU_COMPAREOP_GREATER, /**< The comparison evaluates reference > test. */
1093 SDL_GPU_COMPAREOP_NOT_EQUAL, /**< The comparison evaluates reference != test. */
1094 SDL_GPU_COMPAREOP_GREATER_OR_EQUAL, /**< The comparison evalutes reference >= test. */
1095 SDL_GPU_COMPAREOP_ALWAYS /**< The comparison always evaluates true. */
1096} SDL_GPUCompareOp;
1097
1098/**
1099 * Specifies what happens to a stored stencil value if stencil tests fail or
1100 * pass.
1101 *
1102 * \since This enum is available since SDL 3.2.0.
1103 *
1104 * \sa SDL_CreateGPUGraphicsPipeline
1105 */
1106typedef enum SDL_GPUStencilOp
1107{
1108 SDL_GPU_STENCILOP_INVALID,
1109 SDL_GPU_STENCILOP_KEEP, /**< Keeps the current value. */
1110 SDL_GPU_STENCILOP_ZERO, /**< Sets the value to 0. */
1111 SDL_GPU_STENCILOP_REPLACE, /**< Sets the value to reference. */
1112 SDL_GPU_STENCILOP_INCREMENT_AND_CLAMP, /**< Increments the current value and clamps to the maximum value. */
1113 SDL_GPU_STENCILOP_DECREMENT_AND_CLAMP, /**< Decrements the current value and clamps to 0. */
1114 SDL_GPU_STENCILOP_INVERT, /**< Bitwise-inverts the current value. */
1115 SDL_GPU_STENCILOP_INCREMENT_AND_WRAP, /**< Increments the current value and wraps back to 0. */
1116 SDL_GPU_STENCILOP_DECREMENT_AND_WRAP /**< Decrements the current value and wraps to the maximum value. */
1117} SDL_GPUStencilOp;
1118
1119/**
1120 * Specifies the operator to be used when pixels in a render target are
1121 * blended with existing pixels in the texture.
1122 *
1123 * The source color is the value written by the fragment shader. The
1124 * destination color is the value currently existing in the texture.
1125 *
1126 * \since This enum is available since SDL 3.2.0.
1127 *
1128 * \sa SDL_CreateGPUGraphicsPipeline
1129 */
1130typedef enum SDL_GPUBlendOp
1131{
1132 SDL_GPU_BLENDOP_INVALID,
1133 SDL_GPU_BLENDOP_ADD, /**< (source * source_factor) + (destination * destination_factor) */
1134 SDL_GPU_BLENDOP_SUBTRACT, /**< (source * source_factor) - (destination * destination_factor) */
1135 SDL_GPU_BLENDOP_REVERSE_SUBTRACT, /**< (destination * destination_factor) - (source * source_factor) */
1136 SDL_GPU_BLENDOP_MIN, /**< min(source, destination) */
1137 SDL_GPU_BLENDOP_MAX /**< max(source, destination) */
1138} SDL_GPUBlendOp;
1139
1140/**
1141 * Specifies a blending factor to be used when pixels in a render target are
1142 * blended with existing pixels in the texture.
1143 *
1144 * The source color is the value written by the fragment shader. The
1145 * destination color is the value currently existing in the texture.
1146 *
1147 * \since This enum is available since SDL 3.2.0.
1148 *
1149 * \sa SDL_CreateGPUGraphicsPipeline
1150 */
1151typedef enum SDL_GPUBlendFactor
1152{
1153 SDL_GPU_BLENDFACTOR_INVALID,
1154 SDL_GPU_BLENDFACTOR_ZERO, /**< 0 */
1155 SDL_GPU_BLENDFACTOR_ONE, /**< 1 */
1156 SDL_GPU_BLENDFACTOR_SRC_COLOR, /**< source color */
1157 SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR, /**< 1 - source color */
1158 SDL_GPU_BLENDFACTOR_DST_COLOR, /**< destination color */
1159 SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR, /**< 1 - destination color */
1160 SDL_GPU_BLENDFACTOR_SRC_ALPHA, /**< source alpha */
1161 SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, /**< 1 - source alpha */
1162 SDL_GPU_BLENDFACTOR_DST_ALPHA, /**< destination alpha */
1163 SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA, /**< 1 - destination alpha */
1164 SDL_GPU_BLENDFACTOR_CONSTANT_COLOR, /**< blend constant */
1165 SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR, /**< 1 - blend constant */
1166 SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE /**< min(source alpha, 1 - destination alpha) */
1167} SDL_GPUBlendFactor;
1168
1169/**
1170 * Specifies which color components are written in a graphics pipeline.
1171 *
1172 * \since This datatype is available since SDL 3.2.0.
1173 *
1174 * \sa SDL_CreateGPUGraphicsPipeline
1175 */
1176typedef Uint8 SDL_GPUColorComponentFlags;
1177
1178#define SDL_GPU_COLORCOMPONENT_R (1u << 0) /**< the red component */
1179#define SDL_GPU_COLORCOMPONENT_G (1u << 1) /**< the green component */
1180#define SDL_GPU_COLORCOMPONENT_B (1u << 2) /**< the blue component */
1181#define SDL_GPU_COLORCOMPONENT_A (1u << 3) /**< the alpha component */
1182
1183/**
1184 * Specifies a filter operation used by a sampler.
1185 *
1186 * \since This enum is available since SDL 3.2.0.
1187 *
1188 * \sa SDL_CreateGPUSampler
1189 */
1190typedef enum SDL_GPUFilter
1191{
1192 SDL_GPU_FILTER_NEAREST, /**< Point filtering. */
1193 SDL_GPU_FILTER_LINEAR /**< Linear filtering. */
1194} SDL_GPUFilter;
1195
1196/**
1197 * Specifies a mipmap mode used by a sampler.
1198 *
1199 * \since This enum is available since SDL 3.2.0.
1200 *
1201 * \sa SDL_CreateGPUSampler
1202 */
1203typedef enum SDL_GPUSamplerMipmapMode
1204{
1205 SDL_GPU_SAMPLERMIPMAPMODE_NEAREST, /**< Point filtering. */
1206 SDL_GPU_SAMPLERMIPMAPMODE_LINEAR /**< Linear filtering. */
1207} SDL_GPUSamplerMipmapMode;
1208
1209/**
1210 * Specifies behavior of texture sampling when the coordinates exceed the 0-1
1211 * range.
1212 *
1213 * \since This enum is available since SDL 3.2.0.
1214 *
1215 * \sa SDL_CreateGPUSampler
1216 */
1217typedef enum SDL_GPUSamplerAddressMode
1218{
1219 SDL_GPU_SAMPLERADDRESSMODE_REPEAT, /**< Specifies that the coordinates will wrap around. */
1220 SDL_GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT, /**< Specifies that the coordinates will wrap around mirrored. */
1221 SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE /**< Specifies that the coordinates will clamp to the 0-1 range. */
1222} SDL_GPUSamplerAddressMode;
1223
1224/**
1225 * Specifies the timing that will be used to present swapchain textures to the
1226 * OS.
1227 *
1228 * VSYNC mode will always be supported. IMMEDIATE and MAILBOX modes may not be
1229 * supported on certain systems.
1230 *
1231 * It is recommended to query SDL_WindowSupportsGPUPresentMode after claiming
1232 * the window if you wish to change the present mode to IMMEDIATE or MAILBOX.
1233 *
1234 * - VSYNC: Waits for vblank before presenting. No tearing is possible. If
1235 * there is a pending image to present, the new image is enqueued for
1236 * presentation. Disallows tearing at the cost of visual latency.
1237 * - IMMEDIATE: Immediately presents. Lowest latency option, but tearing may
1238 * occur.
1239 * - MAILBOX: Waits for vblank before presenting. No tearing is possible. If
1240 * there is a pending image to present, the pending image is replaced by the
1241 * new image. Similar to VSYNC, but with reduced visual latency.
1242 *
1243 * \since This enum is available since SDL 3.2.0.
1244 *
1245 * \sa SDL_SetGPUSwapchainParameters
1246 * \sa SDL_WindowSupportsGPUPresentMode
1247 * \sa SDL_WaitAndAcquireGPUSwapchainTexture
1248 */
1249typedef enum SDL_GPUPresentMode
1250{
1251 SDL_GPU_PRESENTMODE_VSYNC,
1252 SDL_GPU_PRESENTMODE_IMMEDIATE,
1253 SDL_GPU_PRESENTMODE_MAILBOX
1254} SDL_GPUPresentMode;
1255
1256/**
1257 * Specifies the texture format and colorspace of the swapchain textures.
1258 *
1259 * SDR will always be supported. Other compositions may not be supported on
1260 * certain systems.
1261 *
1262 * It is recommended to query SDL_WindowSupportsGPUSwapchainComposition after
1263 * claiming the window if you wish to change the swapchain composition from
1264 * SDR.
1265 *
1266 * - SDR: B8G8R8A8 or R8G8B8A8 swapchain. Pixel values are in sRGB encoding.
1267 * - SDR_LINEAR: B8G8R8A8_SRGB or R8G8B8A8_SRGB swapchain. Pixel values are
1268 * stored in memory in sRGB encoding but accessed in shaders in "linear
1269 * sRGB" encoding which is sRGB but with a linear transfer function.
1270 * - HDR_EXTENDED_LINEAR: R16G16B16A16_FLOAT swapchain. Pixel values are in
1271 * extended linear sRGB encoding and permits values outside of the [0, 1]
1272 * range.
1273 * - HDR10_ST2084: A2R10G10B10 or A2B10G10R10 swapchain. Pixel values are in
1274 * BT.2020 ST2084 (PQ) encoding.
1275 *
1276 * \since This enum is available since SDL 3.2.0.
1277 *
1278 * \sa SDL_SetGPUSwapchainParameters
1279 * \sa SDL_WindowSupportsGPUSwapchainComposition
1280 * \sa SDL_WaitAndAcquireGPUSwapchainTexture
1281 */
1282typedef enum SDL_GPUSwapchainComposition
1283{
1284 SDL_GPU_SWAPCHAINCOMPOSITION_SDR,
1285 SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR,
1286 SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR,
1287 SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084
1288} SDL_GPUSwapchainComposition;
1289
1290/* Structures */
1291
1292/**
1293 * A structure specifying a viewport.
1294 *
1295 * \since This struct is available since SDL 3.2.0.
1296 *
1297 * \sa SDL_SetGPUViewport
1298 */
1299typedef struct SDL_GPUViewport
1300{
1301 float x; /**< The left offset of the viewport. */
1302 float y; /**< The top offset of the viewport. */
1303 float w; /**< The width of the viewport. */
1304 float h; /**< The height of the viewport. */
1305 float min_depth; /**< The minimum depth of the viewport. */
1306 float max_depth; /**< The maximum depth of the viewport. */
1307} SDL_GPUViewport;
1308
1309/**
1310 * A structure specifying parameters related to transferring data to or from a
1311 * texture.
1312 *
1313 * \since This struct is available since SDL 3.2.0.
1314 *
1315 * \sa SDL_UploadToGPUTexture
1316 * \sa SDL_DownloadFromGPUTexture
1317 */
1318typedef struct SDL_GPUTextureTransferInfo
1319{
1320 SDL_GPUTransferBuffer *transfer_buffer; /**< The transfer buffer used in the transfer operation. */
1321 Uint32 offset; /**< The starting byte of the image data in the transfer buffer. */
1322 Uint32 pixels_per_row; /**< The number of pixels from one row to the next. */
1323 Uint32 rows_per_layer; /**< The number of rows from one layer/depth-slice to the next. */
1324} SDL_GPUTextureTransferInfo;
1325
1326/**
1327 * A structure specifying a location in a transfer buffer.
1328 *
1329 * Used when transferring buffer data to or from a transfer buffer.
1330 *
1331 * \since This struct is available since SDL 3.2.0.
1332 *
1333 * \sa SDL_UploadToGPUBuffer
1334 * \sa SDL_DownloadFromGPUBuffer
1335 */
1336typedef struct SDL_GPUTransferBufferLocation
1337{
1338 SDL_GPUTransferBuffer *transfer_buffer; /**< The transfer buffer used in the transfer operation. */
1339 Uint32 offset; /**< The starting byte of the buffer data in the transfer buffer. */
1340} SDL_GPUTransferBufferLocation;
1341
1342/**
1343 * A structure specifying a location in a texture.
1344 *
1345 * Used when copying data from one texture to another.
1346 *
1347 * \since This struct is available since SDL 3.2.0.
1348 *
1349 * \sa SDL_CopyGPUTextureToTexture
1350 */
1351typedef struct SDL_GPUTextureLocation
1352{
1353 SDL_GPUTexture *texture; /**< The texture used in the copy operation. */
1354 Uint32 mip_level; /**< The mip level index of the location. */
1355 Uint32 layer; /**< The layer index of the location. */
1356 Uint32 x; /**< The left offset of the location. */
1357 Uint32 y; /**< The top offset of the location. */
1358 Uint32 z; /**< The front offset of the location. */
1359} SDL_GPUTextureLocation;
1360
1361/**
1362 * A structure specifying a region of a texture.
1363 *
1364 * Used when transferring data to or from a texture.
1365 *
1366 * \since This struct is available since SDL 3.2.0.
1367 *
1368 * \sa SDL_UploadToGPUTexture
1369 * \sa SDL_DownloadFromGPUTexture
1370 * \sa SDL_CreateGPUTexture
1371 */
1372typedef struct SDL_GPUTextureRegion
1373{
1374 SDL_GPUTexture *texture; /**< The texture used in the copy operation. */
1375 Uint32 mip_level; /**< The mip level index to transfer. */
1376 Uint32 layer; /**< The layer index to transfer. */
1377 Uint32 x; /**< The left offset of the region. */
1378 Uint32 y; /**< The top offset of the region. */
1379 Uint32 z; /**< The front offset of the region. */
1380 Uint32 w; /**< The width of the region. */
1381 Uint32 h; /**< The height of the region. */
1382 Uint32 d; /**< The depth of the region. */
1383} SDL_GPUTextureRegion;
1384
1385/**
1386 * A structure specifying a region of a texture used in the blit operation.
1387 *
1388 * \since This struct is available since SDL 3.2.0.
1389 *
1390 * \sa SDL_BlitGPUTexture
1391 */
1392typedef struct SDL_GPUBlitRegion
1393{
1394 SDL_GPUTexture *texture; /**< The texture. */
1395 Uint32 mip_level; /**< The mip level index of the region. */
1396 Uint32 layer_or_depth_plane; /**< The layer index or depth plane of the region. This value is treated as a layer index on 2D array and cube textures, and as a depth plane on 3D textures. */
1397 Uint32 x; /**< The left offset of the region. */
1398 Uint32 y; /**< The top offset of the region. */
1399 Uint32 w; /**< The width of the region. */
1400 Uint32 h; /**< The height of the region. */
1401} SDL_GPUBlitRegion;
1402
1403/**
1404 * A structure specifying a location in a buffer.
1405 *
1406 * Used when copying data between buffers.
1407 *
1408 * \since This struct is available since SDL 3.2.0.
1409 *
1410 * \sa SDL_CopyGPUBufferToBuffer
1411 */
1412typedef struct SDL_GPUBufferLocation
1413{
1414 SDL_GPUBuffer *buffer; /**< The buffer. */
1415 Uint32 offset; /**< The starting byte within the buffer. */
1416} SDL_GPUBufferLocation;
1417
1418/**
1419 * A structure specifying a region of a buffer.
1420 *
1421 * Used when transferring data to or from buffers.
1422 *
1423 * \since This struct is available since SDL 3.2.0.
1424 *
1425 * \sa SDL_UploadToGPUBuffer
1426 * \sa SDL_DownloadFromGPUBuffer
1427 */
1428typedef struct SDL_GPUBufferRegion
1429{
1430 SDL_GPUBuffer *buffer; /**< The buffer. */
1431 Uint32 offset; /**< The starting byte within the buffer. */
1432 Uint32 size; /**< The size in bytes of the region. */
1433} SDL_GPUBufferRegion;
1434
1435/**
1436 * A structure specifying the parameters of an indirect draw command.
1437 *
1438 * Note that the `first_vertex` and `first_instance` parameters are NOT
1439 * compatible with built-in vertex/instance ID variables in shaders (for
1440 * example, SV_VertexID); GPU APIs and shader languages do not define these
1441 * built-in variables consistently, so if your shader depends on them, the
1442 * only way to keep behavior consistent and portable is to always pass 0 for
1443 * the correlating parameter in the draw calls.
1444 *
1445 * \since This struct is available since SDL 3.2.0.
1446 *
1447 * \sa SDL_DrawGPUPrimitivesIndirect
1448 */
1449typedef struct SDL_GPUIndirectDrawCommand
1450{
1451 Uint32 num_vertices; /**< The number of vertices to draw. */
1452 Uint32 num_instances; /**< The number of instances to draw. */
1453 Uint32 first_vertex; /**< The index of the first vertex to draw. */
1454 Uint32 first_instance; /**< The ID of the first instance to draw. */
1455} SDL_GPUIndirectDrawCommand;
1456
1457/**
1458 * A structure specifying the parameters of an indexed indirect draw command.
1459 *
1460 * Note that the `first_vertex` and `first_instance` parameters are NOT
1461 * compatible with built-in vertex/instance ID variables in shaders (for
1462 * example, SV_VertexID); GPU APIs and shader languages do not define these
1463 * built-in variables consistently, so if your shader depends on them, the
1464 * only way to keep behavior consistent and portable is to always pass 0 for
1465 * the correlating parameter in the draw calls.
1466 *
1467 * \since This struct is available since SDL 3.2.0.
1468 *
1469 * \sa SDL_DrawGPUIndexedPrimitivesIndirect
1470 */
1471typedef struct SDL_GPUIndexedIndirectDrawCommand
1472{
1473 Uint32 num_indices; /**< The number of indices to draw per instance. */
1474 Uint32 num_instances; /**< The number of instances to draw. */
1475 Uint32 first_index; /**< The base index within the index buffer. */
1476 Sint32 vertex_offset; /**< The value added to the vertex index before indexing into the vertex buffer. */
1477 Uint32 first_instance; /**< The ID of the first instance to draw. */
1478} SDL_GPUIndexedIndirectDrawCommand;
1479
1480/**
1481 * A structure specifying the parameters of an indexed dispatch command.
1482 *
1483 * \since This struct is available since SDL 3.2.0.
1484 *
1485 * \sa SDL_DispatchGPUComputeIndirect
1486 */
1487typedef struct SDL_GPUIndirectDispatchCommand
1488{
1489 Uint32 groupcount_x; /**< The number of local workgroups to dispatch in the X dimension. */
1490 Uint32 groupcount_y; /**< The number of local workgroups to dispatch in the Y dimension. */
1491 Uint32 groupcount_z; /**< The number of local workgroups to dispatch in the Z dimension. */
1492} SDL_GPUIndirectDispatchCommand;
1493
1494/* State structures */
1495
1496/**
1497 * A structure specifying the parameters of a sampler.
1498 *
1499 * Note that mip_lod_bias is a no-op for the Metal driver. For Metal, LOD bias
1500 * must be applied via shader instead.
1501 *
1502 * \since This function is available since SDL 3.2.0.
1503 *
1504 * \sa SDL_CreateGPUSampler
1505 * \sa SDL_GPUFilter
1506 * \sa SDL_GPUSamplerMipmapMode
1507 * \sa SDL_GPUSamplerAddressMode
1508 * \sa SDL_GPUCompareOp
1509 */
1510typedef struct SDL_GPUSamplerCreateInfo
1511{
1512 SDL_GPUFilter min_filter; /**< The minification filter to apply to lookups. */
1513 SDL_GPUFilter mag_filter; /**< The magnification filter to apply to lookups. */
1514 SDL_GPUSamplerMipmapMode mipmap_mode; /**< The mipmap filter to apply to lookups. */
1515 SDL_GPUSamplerAddressMode address_mode_u; /**< The addressing mode for U coordinates outside [0, 1). */
1516 SDL_GPUSamplerAddressMode address_mode_v; /**< The addressing mode for V coordinates outside [0, 1). */
1517 SDL_GPUSamplerAddressMode address_mode_w; /**< The addressing mode for W coordinates outside [0, 1). */
1518 float mip_lod_bias; /**< The bias to be added to mipmap LOD calculation. */
1519 float max_anisotropy; /**< The anisotropy value clamp used by the sampler. If enable_anisotropy is false, this is ignored. */
1520 SDL_GPUCompareOp compare_op; /**< The comparison operator to apply to fetched data before filtering. */
1521 float min_lod; /**< Clamps the minimum of the computed LOD value. */
1522 float max_lod; /**< Clamps the maximum of the computed LOD value. */
1523 bool enable_anisotropy; /**< true to enable anisotropic filtering. */
1524 bool enable_compare; /**< true to enable comparison against a reference value during lookups. */
1525 Uint8 padding1;
1526 Uint8 padding2;
1527
1528 SDL_PropertiesID props; /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
1529} SDL_GPUSamplerCreateInfo;
1530
1531/**
1532 * A structure specifying the parameters of vertex buffers used in a graphics
1533 * pipeline.
1534 *
1535 * When you call SDL_BindGPUVertexBuffers, you specify the binding slots of
1536 * the vertex buffers. For example if you called SDL_BindGPUVertexBuffers with
1537 * a first_slot of 2 and num_bindings of 3, the binding slots 2, 3, 4 would be
1538 * used by the vertex buffers you pass in.
1539 *
1540 * Vertex attributes are linked to buffers via the buffer_slot field of
1541 * SDL_GPUVertexAttribute. For example, if an attribute has a buffer_slot of
1542 * 0, then that attribute belongs to the vertex buffer bound at slot 0.
1543 *
1544 * \since This struct is available since SDL 3.2.0.
1545 *
1546 * \sa SDL_GPUVertexAttribute
1547 * \sa SDL_GPUVertexInputRate
1548 */
1549typedef struct SDL_GPUVertexBufferDescription
1550{
1551 Uint32 slot; /**< The binding slot of the vertex buffer. */
1552 Uint32 pitch; /**< The size of a single element + the offset between elements. */
1553 SDL_GPUVertexInputRate input_rate; /**< Whether attribute addressing is a function of the vertex index or instance index. */
1554 Uint32 instance_step_rate; /**< Reserved for future use. Must be set to 0. */
1555} SDL_GPUVertexBufferDescription;
1556
1557/**
1558 * A structure specifying a vertex attribute.
1559 *
1560 * All vertex attribute locations provided to an SDL_GPUVertexInputState must
1561 * be unique.
1562 *
1563 * \since This struct is available since SDL 3.2.0.
1564 *
1565 * \sa SDL_GPUVertexBufferDescription
1566 * \sa SDL_GPUVertexInputState
1567 * \sa SDL_GPUVertexElementFormat
1568 */
1569typedef struct SDL_GPUVertexAttribute
1570{
1571 Uint32 location; /**< The shader input location index. */
1572 Uint32 buffer_slot; /**< The binding slot of the associated vertex buffer. */
1573 SDL_GPUVertexElementFormat format; /**< The size and type of the attribute data. */
1574 Uint32 offset; /**< The byte offset of this attribute relative to the start of the vertex element. */
1575} SDL_GPUVertexAttribute;
1576
1577/**
1578 * A structure specifying the parameters of a graphics pipeline vertex input
1579 * state.
1580 *
1581 * \since This struct is available since SDL 3.2.0.
1582 *
1583 * \sa SDL_GPUGraphicsPipelineCreateInfo
1584 * \sa SDL_GPUVertexBufferDescription
1585 * \sa SDL_GPUVertexAttribute
1586 */
1587typedef struct SDL_GPUVertexInputState
1588{
1589 const SDL_GPUVertexBufferDescription *vertex_buffer_descriptions; /**< A pointer to an array of vertex buffer descriptions. */
1590 Uint32 num_vertex_buffers; /**< The number of vertex buffer descriptions in the above array. */
1591 const SDL_GPUVertexAttribute *vertex_attributes; /**< A pointer to an array of vertex attribute descriptions. */
1592 Uint32 num_vertex_attributes; /**< The number of vertex attribute descriptions in the above array. */
1593} SDL_GPUVertexInputState;
1594
1595/**
1596 * A structure specifying the stencil operation state of a graphics pipeline.
1597 *
1598 * \since This struct is available since SDL 3.2.0.
1599 *
1600 * \sa SDL_GPUDepthStencilState
1601 */
1602typedef struct SDL_GPUStencilOpState
1603{
1604 SDL_GPUStencilOp fail_op; /**< The action performed on samples that fail the stencil test. */
1605 SDL_GPUStencilOp pass_op; /**< The action performed on samples that pass the depth and stencil tests. */
1606 SDL_GPUStencilOp depth_fail_op; /**< The action performed on samples that pass the stencil test and fail the depth test. */
1607 SDL_GPUCompareOp compare_op; /**< The comparison operator used in the stencil test. */
1608} SDL_GPUStencilOpState;
1609
1610/**
1611 * A structure specifying the blend state of a color target.
1612 *
1613 * \since This struct is available since SDL 3.2.0.
1614 *
1615 * \sa SDL_GPUColorTargetDescription
1616 */
1617typedef struct SDL_GPUColorTargetBlendState
1618{
1619 SDL_GPUBlendFactor src_color_blendfactor; /**< The value to be multiplied by the source RGB value. */
1620 SDL_GPUBlendFactor dst_color_blendfactor; /**< The value to be multiplied by the destination RGB value. */
1621 SDL_GPUBlendOp color_blend_op; /**< The blend operation for the RGB components. */
1622 SDL_GPUBlendFactor src_alpha_blendfactor; /**< The value to be multiplied by the source alpha. */
1623 SDL_GPUBlendFactor dst_alpha_blendfactor; /**< The value to be multiplied by the destination alpha. */
1624 SDL_GPUBlendOp alpha_blend_op; /**< The blend operation for the alpha component. */
1625 SDL_GPUColorComponentFlags color_write_mask; /**< A bitmask specifying which of the RGBA components are enabled for writing. Writes to all channels if enable_color_write_mask is false. */
1626 bool enable_blend; /**< Whether blending is enabled for the color target. */
1627 bool enable_color_write_mask; /**< Whether the color write mask is enabled. */
1628 Uint8 padding1;
1629 Uint8 padding2;
1630} SDL_GPUColorTargetBlendState;
1631
1632
1633/**
1634 * A structure specifying code and metadata for creating a shader object.
1635 *
1636 * \since This struct is available since SDL 3.2.0.
1637 *
1638 * \sa SDL_CreateGPUShader
1639 */
1640typedef struct SDL_GPUShaderCreateInfo
1641{
1642 size_t code_size; /**< The size in bytes of the code pointed to. */
1643 const Uint8 *code; /**< A pointer to shader code. */
1644 const char *entrypoint; /**< A pointer to a null-terminated UTF-8 string specifying the entry point function name for the shader. */
1645 SDL_GPUShaderFormat format; /**< The format of the shader code. */
1646 SDL_GPUShaderStage stage; /**< The stage the shader program corresponds to. */
1647 Uint32 num_samplers; /**< The number of samplers defined in the shader. */
1648 Uint32 num_storage_textures; /**< The number of storage textures defined in the shader. */
1649 Uint32 num_storage_buffers; /**< The number of storage buffers defined in the shader. */
1650 Uint32 num_uniform_buffers; /**< The number of uniform buffers defined in the shader. */
1651
1652 SDL_PropertiesID props; /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
1653} SDL_GPUShaderCreateInfo;
1654
1655/**
1656 * A structure specifying the parameters of a texture.
1657 *
1658 * Usage flags can be bitwise OR'd together for combinations of usages. Note
1659 * that certain usage combinations are invalid, for example SAMPLER and
1660 * GRAPHICS_STORAGE.
1661 *
1662 * \since This struct is available since SDL 3.2.0.
1663 *
1664 * \sa SDL_CreateGPUTexture
1665 * \sa SDL_GPUTextureType
1666 * \sa SDL_GPUTextureFormat
1667 * \sa SDL_GPUTextureUsageFlags
1668 * \sa SDL_GPUSampleCount
1669 */
1670typedef struct SDL_GPUTextureCreateInfo
1671{
1672 SDL_GPUTextureType type; /**< The base dimensionality of the texture. */
1673 SDL_GPUTextureFormat format; /**< The pixel format of the texture. */
1674 SDL_GPUTextureUsageFlags usage; /**< How the texture is intended to be used by the client. */
1675 Uint32 width; /**< The width of the texture. */
1676 Uint32 height; /**< The height of the texture. */
1677 Uint32 layer_count_or_depth; /**< The layer count or depth of the texture. This value is treated as a layer count on 2D array textures, and as a depth value on 3D textures. */
1678 Uint32 num_levels; /**< The number of mip levels in the texture. */
1679 SDL_GPUSampleCount sample_count; /**< The number of samples per texel. Only applies if the texture is used as a render target. */
1680
1681 SDL_PropertiesID props; /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
1682} SDL_GPUTextureCreateInfo;
1683
1684/**
1685 * A structure specifying the parameters of a buffer.
1686 *
1687 * Usage flags can be bitwise OR'd together for combinations of usages. Note
1688 * that certain combinations are invalid, for example VERTEX and INDEX.
1689 *
1690 * \since This struct is available since SDL 3.2.0.
1691 *
1692 * \sa SDL_CreateGPUBuffer
1693 * \sa SDL_GPUBufferUsageFlags
1694 */
1695typedef struct SDL_GPUBufferCreateInfo
1696{
1697 SDL_GPUBufferUsageFlags usage; /**< How the buffer is intended to be used by the client. */
1698 Uint32 size; /**< The size in bytes of the buffer. */
1699
1700 SDL_PropertiesID props; /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
1701} SDL_GPUBufferCreateInfo;
1702
1703/**
1704 * A structure specifying the parameters of a transfer buffer.
1705 *
1706 * \since This struct is available since SDL 3.2.0.
1707 *
1708 * \sa SDL_CreateGPUTransferBuffer
1709 */
1710typedef struct SDL_GPUTransferBufferCreateInfo
1711{
1712 SDL_GPUTransferBufferUsage usage; /**< How the transfer buffer is intended to be used by the client. */
1713 Uint32 size; /**< The size in bytes of the transfer buffer. */
1714
1715 SDL_PropertiesID props; /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
1716} SDL_GPUTransferBufferCreateInfo;
1717
1718/* Pipeline state structures */
1719
1720/**
1721 * A structure specifying the parameters of the graphics pipeline rasterizer
1722 * state.
1723 *
1724 * Note that SDL_GPU_FILLMODE_LINE is not supported on many Android devices.
1725 * For those devices, the fill mode will automatically fall back to FILL.
1726 *
1727 * Also note that the D3D12 driver will enable depth clamping even if
1728 * enable_depth_clip is true. If you need this clamp+clip behavior, consider
1729 * enabling depth clip and then manually clamping depth in your fragment
1730 * shaders on Metal and Vulkan.
1731 *
1732 * \since This struct is available since SDL 3.2.0.
1733 *
1734 * \sa SDL_GPUGraphicsPipelineCreateInfo
1735 */
1736typedef struct SDL_GPURasterizerState
1737{
1738 SDL_GPUFillMode fill_mode; /**< Whether polygons will be filled in or drawn as lines. */
1739 SDL_GPUCullMode cull_mode; /**< The facing direction in which triangles will be culled. */
1740 SDL_GPUFrontFace front_face; /**< The vertex winding that will cause a triangle to be determined as front-facing. */
1741 float depth_bias_constant_factor; /**< A scalar factor controlling the depth value added to each fragment. */
1742 float depth_bias_clamp; /**< The maximum depth bias of a fragment. */
1743 float depth_bias_slope_factor; /**< A scalar factor applied to a fragment's slope in depth calculations. */
1744 bool enable_depth_bias; /**< true to bias fragment depth values. */
1745 bool enable_depth_clip; /**< true to enable depth clip, false to enable depth clamp. */
1746 Uint8 padding1;
1747 Uint8 padding2;
1748} SDL_GPURasterizerState;
1749
1750/**
1751 * A structure specifying the parameters of the graphics pipeline multisample
1752 * state.
1753 *
1754 * \since This struct is available since SDL 3.2.0.
1755 *
1756 * \sa SDL_GPUGraphicsPipelineCreateInfo
1757 */
1758typedef struct SDL_GPUMultisampleState
1759{
1760 SDL_GPUSampleCount sample_count; /**< The number of samples to be used in rasterization. */
1761 Uint32 sample_mask; /**< Reserved for future use. Must be set to 0. */
1762 bool enable_mask; /**< Reserved for future use. Must be set to false. */
1763 Uint8 padding1;
1764 Uint8 padding2;
1765 Uint8 padding3;
1766} SDL_GPUMultisampleState;
1767
1768/**
1769 * A structure specifying the parameters of the graphics pipeline depth
1770 * stencil state.
1771 *
1772 * \since This struct is available since SDL 3.2.0.
1773 *
1774 * \sa SDL_GPUGraphicsPipelineCreateInfo
1775 */
1776typedef struct SDL_GPUDepthStencilState
1777{
1778 SDL_GPUCompareOp compare_op; /**< The comparison operator used for depth testing. */
1779 SDL_GPUStencilOpState back_stencil_state; /**< The stencil op state for back-facing triangles. */
1780 SDL_GPUStencilOpState front_stencil_state; /**< The stencil op state for front-facing triangles. */
1781 Uint8 compare_mask; /**< Selects the bits of the stencil values participating in the stencil test. */
1782 Uint8 write_mask; /**< Selects the bits of the stencil values updated by the stencil test. */
1783 bool enable_depth_test; /**< true enables the depth test. */
1784 bool enable_depth_write; /**< true enables depth writes. Depth writes are always disabled when enable_depth_test is false. */
1785 bool enable_stencil_test; /**< true enables the stencil test. */
1786 Uint8 padding1;
1787 Uint8 padding2;
1788 Uint8 padding3;
1789} SDL_GPUDepthStencilState;
1790
1791/**
1792 * A structure specifying the parameters of color targets used in a graphics
1793 * pipeline.
1794 *
1795 * \since This struct is available since SDL 3.2.0.
1796 *
1797 * \sa SDL_GPUGraphicsPipelineTargetInfo
1798 */
1799typedef struct SDL_GPUColorTargetDescription
1800{
1801 SDL_GPUTextureFormat format; /**< The pixel format of the texture to be used as a color target. */
1802 SDL_GPUColorTargetBlendState blend_state; /**< The blend state to be used for the color target. */
1803} SDL_GPUColorTargetDescription;
1804
1805/**
1806 * A structure specifying the descriptions of render targets used in a
1807 * graphics pipeline.
1808 *
1809 * \since This struct is available since SDL 3.2.0.
1810 *
1811 * \sa SDL_GPUGraphicsPipelineCreateInfo
1812 * \sa SDL_GPUColorTargetDescription
1813 * \sa SDL_GPUTextureFormat
1814 */
1815typedef struct SDL_GPUGraphicsPipelineTargetInfo
1816{
1817 const SDL_GPUColorTargetDescription *color_target_descriptions; /**< A pointer to an array of color target descriptions. */
1818 Uint32 num_color_targets; /**< The number of color target descriptions in the above array. */
1819 SDL_GPUTextureFormat depth_stencil_format; /**< The pixel format of the depth-stencil target. Ignored if has_depth_stencil_target is false. */
1820 bool has_depth_stencil_target; /**< true specifies that the pipeline uses a depth-stencil target. */
1821 Uint8 padding1;
1822 Uint8 padding2;
1823 Uint8 padding3;
1824} SDL_GPUGraphicsPipelineTargetInfo;
1825
1826/**
1827 * A structure specifying the parameters of a graphics pipeline state.
1828 *
1829 * \since This struct is available since SDL 3.2.0.
1830 *
1831 * \sa SDL_CreateGPUGraphicsPipeline
1832 * \sa SDL_GPUShader
1833 * \sa SDL_GPUVertexInputState
1834 * \sa SDL_GPUPrimitiveType
1835 * \sa SDL_GPURasterizerState
1836 * \sa SDL_GPUMultisampleState
1837 * \sa SDL_GPUDepthStencilState
1838 * \sa SDL_GPUGraphicsPipelineTargetInfo
1839 */
1840typedef struct SDL_GPUGraphicsPipelineCreateInfo
1841{
1842 SDL_GPUShader *vertex_shader; /**< The vertex shader used by the graphics pipeline. */
1843 SDL_GPUShader *fragment_shader; /**< The fragment shader used by the graphics pipeline. */
1844 SDL_GPUVertexInputState vertex_input_state; /**< The vertex layout of the graphics pipeline. */
1845 SDL_GPUPrimitiveType primitive_type; /**< The primitive topology of the graphics pipeline. */
1846 SDL_GPURasterizerState rasterizer_state; /**< The rasterizer state of the graphics pipeline. */
1847 SDL_GPUMultisampleState multisample_state; /**< The multisample state of the graphics pipeline. */
1848 SDL_GPUDepthStencilState depth_stencil_state; /**< The depth-stencil state of the graphics pipeline. */
1849 SDL_GPUGraphicsPipelineTargetInfo target_info; /**< Formats and blend modes for the render targets of the graphics pipeline. */
1850
1851 SDL_PropertiesID props; /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
1852} SDL_GPUGraphicsPipelineCreateInfo;
1853
1854/**
1855 * A structure specifying the parameters of a compute pipeline state.
1856 *
1857 * \since This struct is available since SDL 3.2.0.
1858 *
1859 * \sa SDL_CreateGPUComputePipeline
1860 * \sa SDL_GPUShaderFormat
1861 */
1862typedef struct SDL_GPUComputePipelineCreateInfo
1863{
1864 size_t code_size; /**< The size in bytes of the compute shader code pointed to. */
1865 const Uint8 *code; /**< A pointer to compute shader code. */
1866 const char *entrypoint; /**< A pointer to a null-terminated UTF-8 string specifying the entry point function name for the shader. */
1867 SDL_GPUShaderFormat format; /**< The format of the compute shader code. */
1868 Uint32 num_samplers; /**< The number of samplers defined in the shader. */
1869 Uint32 num_readonly_storage_textures; /**< The number of readonly storage textures defined in the shader. */
1870 Uint32 num_readonly_storage_buffers; /**< The number of readonly storage buffers defined in the shader. */
1871 Uint32 num_readwrite_storage_textures; /**< The number of read-write storage textures defined in the shader. */
1872 Uint32 num_readwrite_storage_buffers; /**< The number of read-write storage buffers defined in the shader. */
1873 Uint32 num_uniform_buffers; /**< The number of uniform buffers defined in the shader. */
1874 Uint32 threadcount_x; /**< The number of threads in the X dimension. This should match the value in the shader. */
1875 Uint32 threadcount_y; /**< The number of threads in the Y dimension. This should match the value in the shader. */
1876 Uint32 threadcount_z; /**< The number of threads in the Z dimension. This should match the value in the shader. */
1877
1878 SDL_PropertiesID props; /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
1879} SDL_GPUComputePipelineCreateInfo;
1880
1881/**
1882 * A structure specifying the parameters of a color target used by a render
1883 * pass.
1884 *
1885 * The load_op field determines what is done with the texture at the beginning
1886 * of the render pass.
1887 *
1888 * - LOAD: Loads the data currently in the texture. Not recommended for
1889 * multisample textures as it requires significant memory bandwidth.
1890 * - CLEAR: Clears the texture to a single color.
1891 * - DONT_CARE: The driver will do whatever it wants with the texture memory.
1892 * This is a good option if you know that every single pixel will be touched
1893 * in the render pass.
1894 *
1895 * The store_op field determines what is done with the color results of the
1896 * render pass.
1897 *
1898 * - STORE: Stores the results of the render pass in the texture. Not
1899 * recommended for multisample textures as it requires significant memory
1900 * bandwidth.
1901 * - DONT_CARE: The driver will do whatever it wants with the texture memory.
1902 * This is often a good option for depth/stencil textures.
1903 * - RESOLVE: Resolves a multisample texture into resolve_texture, which must
1904 * have a sample count of 1. Then the driver may discard the multisample
1905 * texture memory. This is the most performant method of resolving a
1906 * multisample target.
1907 * - RESOLVE_AND_STORE: Resolves a multisample texture into the
1908 * resolve_texture, which must have a sample count of 1. Then the driver
1909 * stores the multisample texture's contents. Not recommended as it requires
1910 * significant memory bandwidth.
1911 *
1912 * \since This struct is available since SDL 3.2.0.
1913 *
1914 * \sa SDL_BeginGPURenderPass
1915 */
1916typedef struct SDL_GPUColorTargetInfo
1917{
1918 SDL_GPUTexture *texture; /**< The texture that will be used as a color target by a render pass. */
1919 Uint32 mip_level; /**< The mip level to use as a color target. */
1920 Uint32 layer_or_depth_plane; /**< The layer index or depth plane to use as a color target. This value is treated as a layer index on 2D array and cube textures, and as a depth plane on 3D textures. */
1921 SDL_FColor clear_color; /**< The color to clear the color target to at the start of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used. */
1922 SDL_GPULoadOp load_op; /**< What is done with the contents of the color target at the beginning of the render pass. */
1923 SDL_GPUStoreOp store_op; /**< What is done with the results of the render pass. */
1924 SDL_GPUTexture *resolve_texture; /**< The texture that will receive the results of a multisample resolve operation. Ignored if a RESOLVE* store_op is not used. */
1925 Uint32 resolve_mip_level; /**< The mip level of the resolve texture to use for the resolve operation. Ignored if a RESOLVE* store_op is not used. */
1926 Uint32 resolve_layer; /**< The layer index of the resolve texture to use for the resolve operation. Ignored if a RESOLVE* store_op is not used. */
1927 bool cycle; /**< true cycles the texture if the texture is bound and load_op is not LOAD */
1928 bool cycle_resolve_texture; /**< true cycles the resolve texture if the resolve texture is bound. Ignored if a RESOLVE* store_op is not used. */
1929 Uint8 padding1;
1930 Uint8 padding2;
1931} SDL_GPUColorTargetInfo;
1932
1933/**
1934 * A structure specifying the parameters of a depth-stencil target used by a
1935 * render pass.
1936 *
1937 * The load_op field determines what is done with the depth contents of the
1938 * texture at the beginning of the render pass.
1939 *
1940 * - LOAD: Loads the depth values currently in the texture.
1941 * - CLEAR: Clears the texture to a single depth.
1942 * - DONT_CARE: The driver will do whatever it wants with the memory. This is
1943 * a good option if you know that every single pixel will be touched in the
1944 * render pass.
1945 *
1946 * The store_op field determines what is done with the depth results of the
1947 * render pass.
1948 *
1949 * - STORE: Stores the depth results in the texture.
1950 * - DONT_CARE: The driver will do whatever it wants with the depth results.
1951 * This is often a good option for depth/stencil textures that don't need to
1952 * be reused again.
1953 *
1954 * The stencil_load_op field determines what is done with the stencil contents
1955 * of the texture at the beginning of the render pass.
1956 *
1957 * - LOAD: Loads the stencil values currently in the texture.
1958 * - CLEAR: Clears the stencil values to a single value.
1959 * - DONT_CARE: The driver will do whatever it wants with the memory. This is
1960 * a good option if you know that every single pixel will be touched in the
1961 * render pass.
1962 *
1963 * The stencil_store_op field determines what is done with the stencil results
1964 * of the render pass.
1965 *
1966 * - STORE: Stores the stencil results in the texture.
1967 * - DONT_CARE: The driver will do whatever it wants with the stencil results.
1968 * This is often a good option for depth/stencil textures that don't need to
1969 * be reused again.
1970 *
1971 * Note that depth/stencil targets do not support multisample resolves.
1972 *
1973 * \since This struct is available since SDL 3.2.0.
1974 *
1975 * \sa SDL_BeginGPURenderPass
1976 */
1977typedef struct SDL_GPUDepthStencilTargetInfo
1978{
1979 SDL_GPUTexture *texture; /**< The texture that will be used as the depth stencil target by the render pass. */
1980 float clear_depth; /**< The value to clear the depth component to at the beginning of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used. */
1981 SDL_GPULoadOp load_op; /**< What is done with the depth contents at the beginning of the render pass. */
1982 SDL_GPUStoreOp store_op; /**< What is done with the depth results of the render pass. */
1983 SDL_GPULoadOp stencil_load_op; /**< What is done with the stencil contents at the beginning of the render pass. */
1984 SDL_GPUStoreOp stencil_store_op; /**< What is done with the stencil results of the render pass. */
1985 bool cycle; /**< true cycles the texture if the texture is bound and any load ops are not LOAD */
1986 Uint8 clear_stencil; /**< The value to clear the stencil component to at the beginning of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used. */
1987 Uint8 padding1;
1988 Uint8 padding2;
1989} SDL_GPUDepthStencilTargetInfo;
1990
1991/**
1992 * A structure containing parameters for a blit command.
1993 *
1994 * \since This struct is available since SDL 3.2.0.
1995 *
1996 * \sa SDL_BlitGPUTexture
1997 */
1998typedef struct SDL_GPUBlitInfo {
1999 SDL_GPUBlitRegion source; /**< The source region for the blit. */
2000 SDL_GPUBlitRegion destination; /**< The destination region for the blit. */
2001 SDL_GPULoadOp load_op; /**< What is done with the contents of the destination before the blit. */
2002 SDL_FColor clear_color; /**< The color to clear the destination region to before the blit. Ignored if load_op is not SDL_GPU_LOADOP_CLEAR. */
2003 SDL_FlipMode flip_mode; /**< The flip mode for the source region. */
2004 SDL_GPUFilter filter; /**< The filter mode used when blitting. */
2005 bool cycle; /**< true cycles the destination texture if it is already bound. */
2006 Uint8 padding1;
2007 Uint8 padding2;
2008 Uint8 padding3;
2009} SDL_GPUBlitInfo;
2010
2011/* Binding structs */
2012
2013/**
2014 * A structure specifying parameters in a buffer binding call.
2015 *
2016 * \since This struct is available since SDL 3.2.0.
2017 *
2018 * \sa SDL_BindGPUVertexBuffers
2019 * \sa SDL_BindGPUIndexBuffer
2020 */
2021typedef struct SDL_GPUBufferBinding
2022{
2023 SDL_GPUBuffer *buffer; /**< The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_VERTEX for SDL_BindGPUVertexBuffers, or SDL_GPU_BUFFERUSAGE_INDEX for SDL_BindGPUIndexBuffer. */
2024 Uint32 offset; /**< The starting byte of the data to bind in the buffer. */
2025} SDL_GPUBufferBinding;
2026
2027/**
2028 * A structure specifying parameters in a sampler binding call.
2029 *
2030 * \since This struct is available since SDL 3.2.0.
2031 *
2032 * \sa SDL_BindGPUVertexSamplers
2033 * \sa SDL_BindGPUFragmentSamplers
2034 */
2035typedef struct SDL_GPUTextureSamplerBinding
2036{
2037 SDL_GPUTexture *texture; /**< The texture to bind. Must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER. */
2038 SDL_GPUSampler *sampler; /**< The sampler to bind. */
2039} SDL_GPUTextureSamplerBinding;
2040
2041/**
2042 * A structure specifying parameters related to binding buffers in a compute
2043 * pass.
2044 *
2045 * \since This struct is available since SDL 3.2.0.
2046 *
2047 * \sa SDL_BeginGPUComputePass
2048 */
2049typedef struct SDL_GPUStorageBufferReadWriteBinding
2050{
2051 SDL_GPUBuffer *buffer; /**< The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE. */
2052 bool cycle; /**< true cycles the buffer if it is already bound. */
2053 Uint8 padding1;
2054 Uint8 padding2;
2055 Uint8 padding3;
2056} SDL_GPUStorageBufferReadWriteBinding;
2057
2058/**
2059 * A structure specifying parameters related to binding textures in a compute
2060 * pass.
2061 *
2062 * \since This struct is available since SDL 3.2.0.
2063 *
2064 * \sa SDL_BeginGPUComputePass
2065 */
2066typedef struct SDL_GPUStorageTextureReadWriteBinding
2067{
2068 SDL_GPUTexture *texture; /**< The texture to bind. Must have been created with SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE or SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE. */
2069 Uint32 mip_level; /**< The mip level index to bind. */
2070 Uint32 layer; /**< The layer index to bind. */
2071 bool cycle; /**< true cycles the texture if it is already bound. */
2072 Uint8 padding1;
2073 Uint8 padding2;
2074 Uint8 padding3;
2075} SDL_GPUStorageTextureReadWriteBinding;
2076
2077/* Functions */
2078
2079/* Device */
2080
2081/**
2082 * Checks for GPU runtime support.
2083 *
2084 * \param format_flags a bitflag indicating which shader formats the app is
2085 * able to provide.
2086 * \param name the preferred GPU driver, or NULL to let SDL pick the optimal
2087 * driver.
2088 * \returns true if supported, false otherwise.
2089 *
2090 * \since This function is available since SDL 3.2.0.
2091 *
2092 * \sa SDL_CreateGPUDevice
2093 */
2094extern SDL_DECLSPEC bool SDLCALL SDL_GPUSupportsShaderFormats(
2095 SDL_GPUShaderFormat format_flags,
2096 const char *name);
2097
2098/**
2099 * Checks for GPU runtime support.
2100 *
2101 * \param props the properties to use.
2102 * \returns true if supported, false otherwise.
2103 *
2104 * \since This function is available since SDL 3.2.0.
2105 *
2106 * \sa SDL_CreateGPUDeviceWithProperties
2107 */
2108extern SDL_DECLSPEC bool SDLCALL SDL_GPUSupportsProperties(
2109 SDL_PropertiesID props);
2110
2111/**
2112 * Creates a GPU context.
2113 *
2114 * \param format_flags a bitflag indicating which shader formats the app is
2115 * able to provide.
2116 * \param debug_mode enable debug mode properties and validations.
2117 * \param name the preferred GPU driver, or NULL to let SDL pick the optimal
2118 * driver.
2119 * \returns a GPU context on success or NULL on failure; call SDL_GetError()
2120 * for more information.
2121 *
2122 * \since This function is available since SDL 3.2.0.
2123 *
2124 * \sa SDL_GetGPUShaderFormats
2125 * \sa SDL_GetGPUDeviceDriver
2126 * \sa SDL_DestroyGPUDevice
2127 * \sa SDL_GPUSupportsShaderFormats
2128 */
2129extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDevice(
2130 SDL_GPUShaderFormat format_flags,
2131 bool debug_mode,
2132 const char *name);
2133
2134/**
2135 * Creates a GPU context.
2136 *
2137 * These are the supported properties:
2138 *
2139 * - `SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN`: enable debug mode
2140 * properties and validations, defaults to true.
2141 * - `SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN`: enable to prefer
2142 * energy efficiency over maximum GPU performance, defaults to false.
2143 * - `SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING`: the name of the GPU driver to
2144 * use, if a specific one is desired.
2145 *
2146 * These are the current shader format properties:
2147 *
2148 * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN`: The app is able to
2149 * provide shaders for an NDA platform.
2150 * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN`: The app is able to
2151 * provide SPIR-V shaders if applicable.
2152 * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN`: The app is able to
2153 * provide DXBC shaders if applicable
2154 * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN`: The app is able to
2155 * provide DXIL shaders if applicable.
2156 * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN`: The app is able to
2157 * provide MSL shaders if applicable.
2158 * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN`: The app is able to
2159 * provide Metal shader libraries if applicable.
2160 *
2161 * With the D3D12 renderer:
2162 *
2163 * - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING`: the prefix to
2164 * use for all vertex semantics, default is "TEXCOORD".
2165 *
2166 * \param props the properties to use.
2167 * \returns a GPU context on success or NULL on failure; call SDL_GetError()
2168 * for more information.
2169 *
2170 * \since This function is available since SDL 3.2.0.
2171 *
2172 * \sa SDL_GetGPUShaderFormats
2173 * \sa SDL_GetGPUDeviceDriver
2174 * \sa SDL_DestroyGPUDevice
2175 * \sa SDL_GPUSupportsProperties
2176 */
2177extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDeviceWithProperties(
2178 SDL_PropertiesID props);
2179
2180#define SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN "SDL.gpu.device.create.debugmode"
2181#define SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN "SDL.gpu.device.create.preferlowpower"
2182#define SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING "SDL.gpu.device.create.name"
2183#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN "SDL.gpu.device.create.shaders.private"
2184#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN "SDL.gpu.device.create.shaders.spirv"
2185#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN "SDL.gpu.device.create.shaders.dxbc"
2186#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN "SDL.gpu.device.create.shaders.dxil"
2187#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN "SDL.gpu.device.create.shaders.msl"
2188#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN "SDL.gpu.device.create.shaders.metallib"
2189#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING "SDL.gpu.device.create.d3d12.semantic"
2190
2191/**
2192 * Destroys a GPU context previously returned by SDL_CreateGPUDevice.
2193 *
2194 * \param device a GPU Context to destroy.
2195 *
2196 * \since This function is available since SDL 3.2.0.
2197 *
2198 * \sa SDL_CreateGPUDevice
2199 */
2200extern SDL_DECLSPEC void SDLCALL SDL_DestroyGPUDevice(SDL_GPUDevice *device);
2201
2202/**
2203 * Get the number of GPU drivers compiled into SDL.
2204 *
2205 * \returns the number of built in GPU drivers.
2206 *
2207 * \since This function is available since SDL 3.2.0.
2208 *
2209 * \sa SDL_GetGPUDriver
2210 */
2211extern SDL_DECLSPEC int SDLCALL SDL_GetNumGPUDrivers(void);
2212
2213/**
2214 * Get the name of a built in GPU driver.
2215 *
2216 * The GPU drivers are presented in the order in which they are normally
2217 * checked during initialization.
2218 *
2219 * The names of drivers are all simple, low-ASCII identifiers, like "vulkan",
2220 * "metal" or "direct3d12". These never have Unicode characters, and are not
2221 * meant to be proper names.
2222 *
2223 * \param index the index of a GPU driver.
2224 * \returns the name of the GPU driver with the given **index**.
2225 *
2226 * \since This function is available since SDL 3.2.0.
2227 *
2228 * \sa SDL_GetNumGPUDrivers
2229 */
2230extern SDL_DECLSPEC const char * SDLCALL SDL_GetGPUDriver(int index);
2231
2232/**
2233 * Returns the name of the backend used to create this GPU context.
2234 *
2235 * \param device a GPU context to query.
2236 * \returns the name of the device's driver, or NULL on error.
2237 *
2238 * \since This function is available since SDL 3.2.0.
2239 */
2240extern SDL_DECLSPEC const char * SDLCALL SDL_GetGPUDeviceDriver(SDL_GPUDevice *device);
2241
2242/**
2243 * Returns the supported shader formats for this GPU context.
2244 *
2245 * \param device a GPU context to query.
2246 * \returns a bitflag indicating which shader formats the driver is able to
2247 * consume.
2248 *
2249 * \since This function is available since SDL 3.2.0.
2250 */
2251extern SDL_DECLSPEC SDL_GPUShaderFormat SDLCALL SDL_GetGPUShaderFormats(SDL_GPUDevice *device);
2252
2253/* State Creation */
2254
2255/**
2256 * Creates a pipeline object to be used in a compute workflow.
2257 *
2258 * Shader resource bindings must be authored to follow a particular order
2259 * depending on the shader format.
2260 *
2261 * For SPIR-V shaders, use the following resource sets:
2262 *
2263 * - 0: Sampled textures, followed by read-only storage textures, followed by
2264 * read-only storage buffers
2265 * - 1: Read-write storage textures, followed by read-write storage buffers
2266 * - 2: Uniform buffers
2267 *
2268 * For DXBC and DXIL shaders, use the following register order:
2269 *
2270 * - (t[n], space0): Sampled textures, followed by read-only storage textures,
2271 * followed by read-only storage buffers
2272 * - (u[n], space1): Read-write storage textures, followed by read-write
2273 * storage buffers
2274 * - (b[n], space2): Uniform buffers
2275 *
2276 * For MSL/metallib, use the following order:
2277 *
2278 * - [[buffer]]: Uniform buffers, followed by read-only storage buffers,
2279 * followed by read-write storage buffers
2280 * - [[texture]]: Sampled textures, followed by read-only storage textures,
2281 * followed by read-write storage textures
2282 *
2283 * There are optional properties that can be provided through `props`. These
2284 * are the supported properties:
2285 *
2286 * - `SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING`: a name that can be
2287 * displayed in debugging tools.
2288 *
2289 * \param device a GPU Context.
2290 * \param createinfo a struct describing the state of the compute pipeline to
2291 * create.
2292 * \returns a compute pipeline object on success, or NULL on failure; call
2293 * SDL_GetError() for more information.
2294 *
2295 * \since This function is available since SDL 3.2.0.
2296 *
2297 * \sa SDL_BindGPUComputePipeline
2298 * \sa SDL_ReleaseGPUComputePipeline
2299 */
2300extern SDL_DECLSPEC SDL_GPUComputePipeline * SDLCALL SDL_CreateGPUComputePipeline(
2301 SDL_GPUDevice *device,
2302 const SDL_GPUComputePipelineCreateInfo *createinfo);
2303
2304#define SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING "SDL.gpu.computepipeline.create.name"
2305
2306/**
2307 * Creates a pipeline object to be used in a graphics workflow.
2308 *
2309 * There are optional properties that can be provided through `props`. These
2310 * are the supported properties:
2311 *
2312 * - `SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING`: a name that can be
2313 * displayed in debugging tools.
2314 *
2315 * \param device a GPU Context.
2316 * \param createinfo a struct describing the state of the graphics pipeline to
2317 * create.
2318 * \returns a graphics pipeline object on success, or NULL on failure; call
2319 * SDL_GetError() for more information.
2320 *
2321 * \since This function is available since SDL 3.2.0.
2322 *
2323 * \sa SDL_CreateGPUShader
2324 * \sa SDL_BindGPUGraphicsPipeline
2325 * \sa SDL_ReleaseGPUGraphicsPipeline
2326 */
2327extern SDL_DECLSPEC SDL_GPUGraphicsPipeline * SDLCALL SDL_CreateGPUGraphicsPipeline(
2328 SDL_GPUDevice *device,
2329 const SDL_GPUGraphicsPipelineCreateInfo *createinfo);
2330
2331#define SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING "SDL.gpu.graphicspipeline.create.name"
2332
2333/**
2334 * Creates a sampler object to be used when binding textures in a graphics
2335 * workflow.
2336 *
2337 * There are optional properties that can be provided through `props`. These
2338 * are the supported properties:
2339 *
2340 * - `SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING`: a name that can be displayed
2341 * in debugging tools.
2342 *
2343 * \param device a GPU Context.
2344 * \param createinfo a struct describing the state of the sampler to create.
2345 * \returns a sampler object on success, or NULL on failure; call
2346 * SDL_GetError() for more information.
2347 *
2348 * \since This function is available since SDL 3.2.0.
2349 *
2350 * \sa SDL_BindGPUVertexSamplers
2351 * \sa SDL_BindGPUFragmentSamplers
2352 * \sa SDL_ReleaseGPUSampler
2353 */
2354extern SDL_DECLSPEC SDL_GPUSampler * SDLCALL SDL_CreateGPUSampler(
2355 SDL_GPUDevice *device,
2356 const SDL_GPUSamplerCreateInfo *createinfo);
2357
2358#define SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING "SDL.gpu.sampler.create.name"
2359
2360/**
2361 * Creates a shader to be used when creating a graphics pipeline.
2362 *
2363 * Shader resource bindings must be authored to follow a particular order
2364 * depending on the shader format.
2365 *
2366 * For SPIR-V shaders, use the following resource sets:
2367 *
2368 * For vertex shaders:
2369 *
2370 * - 0: Sampled textures, followed by storage textures, followed by storage
2371 * buffers
2372 * - 1: Uniform buffers
2373 *
2374 * For fragment shaders:
2375 *
2376 * - 2: Sampled textures, followed by storage textures, followed by storage
2377 * buffers
2378 * - 3: Uniform buffers
2379 *
2380 * For DXBC and DXIL shaders, use the following register order:
2381 *
2382 * For vertex shaders:
2383 *
2384 * - (t[n], space0): Sampled textures, followed by storage textures, followed
2385 * by storage buffers
2386 * - (s[n], space0): Samplers with indices corresponding to the sampled
2387 * textures
2388 * - (b[n], space1): Uniform buffers
2389 *
2390 * For pixel shaders:
2391 *
2392 * - (t[n], space2): Sampled textures, followed by storage textures, followed
2393 * by storage buffers
2394 * - (s[n], space2): Samplers with indices corresponding to the sampled
2395 * textures
2396 * - (b[n], space3): Uniform buffers
2397 *
2398 * For MSL/metallib, use the following order:
2399 *
2400 * - [[texture]]: Sampled textures, followed by storage textures
2401 * - [[sampler]]: Samplers with indices corresponding to the sampled textures
2402 * - [[buffer]]: Uniform buffers, followed by storage buffers. Vertex buffer 0
2403 * is bound at [[buffer(14)]], vertex buffer 1 at [[buffer(15)]], and so on.
2404 * Rather than manually authoring vertex buffer indices, use the
2405 * [[stage_in]] attribute which will automatically use the vertex input
2406 * information from the SDL_GPUGraphicsPipeline.
2407 *
2408 * Shader semantics other than system-value semantics do not matter in D3D12
2409 * and for ease of use the SDL implementation assumes that non system-value
2410 * semantics will all be TEXCOORD. If you are using HLSL as the shader source
2411 * language, your vertex semantics should start at TEXCOORD0 and increment
2412 * like so: TEXCOORD1, TEXCOORD2, etc. If you wish to change the semantic
2413 * prefix to something other than TEXCOORD you can use
2414 * SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING with
2415 * SDL_CreateGPUDeviceWithProperties().
2416 *
2417 * There are optional properties that can be provided through `props`. These
2418 * are the supported properties:
2419 *
2420 * - `SDL_PROP_GPU_SHADER_CREATE_NAME_STRING`: a name that can be displayed in
2421 * debugging tools.
2422 *
2423 * \param device a GPU Context.
2424 * \param createinfo a struct describing the state of the shader to create.
2425 * \returns a shader object on success, or NULL on failure; call
2426 * SDL_GetError() for more information.
2427 *
2428 * \since This function is available since SDL 3.2.0.
2429 *
2430 * \sa SDL_CreateGPUGraphicsPipeline
2431 * \sa SDL_ReleaseGPUShader
2432 */
2433extern SDL_DECLSPEC SDL_GPUShader * SDLCALL SDL_CreateGPUShader(
2434 SDL_GPUDevice *device,
2435 const SDL_GPUShaderCreateInfo *createinfo);
2436
2437#define SDL_PROP_GPU_SHADER_CREATE_NAME_STRING "SDL.gpu.shader.create.name"
2438
2439/**
2440 * Creates a texture object to be used in graphics or compute workflows.
2441 *
2442 * The contents of this texture are undefined until data is written to the
2443 * texture.
2444 *
2445 * Note that certain combinations of usage flags are invalid. For example, a
2446 * texture cannot have both the SAMPLER and GRAPHICS_STORAGE_READ flags.
2447 *
2448 * If you request a sample count higher than the hardware supports, the
2449 * implementation will automatically fall back to the highest available sample
2450 * count.
2451 *
2452 * There are optional properties that can be provided through
2453 * SDL_GPUTextureCreateInfo's `props`. These are the supported properties:
2454 *
2455 * - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT`: (Direct3D 12 only) if
2456 * the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture
2457 * to a color with this red intensity. Defaults to zero.
2458 * - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT`: (Direct3D 12 only) if
2459 * the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture
2460 * to a color with this green intensity. Defaults to zero.
2461 * - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT`: (Direct3D 12 only) if
2462 * the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture
2463 * to a color with this blue intensity. Defaults to zero.
2464 * - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT`: (Direct3D 12 only) if
2465 * the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture
2466 * to a color with this alpha intensity. Defaults to zero.
2467 * - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT`: (Direct3D 12 only)
2468 * if the texture usage is SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET, clear
2469 * the texture to a depth of this value. Defaults to zero.
2470 * - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER`: (Direct3D 12
2471 * only) if the texture usage is SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET,
2472 * clear the texture to a stencil of this Uint8 value. Defaults to zero.
2473 * - `SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING`: a name that can be displayed
2474 * in debugging tools.
2475 *
2476 * \param device a GPU Context.
2477 * \param createinfo a struct describing the state of the texture to create.
2478 * \returns a texture object on success, or NULL on failure; call
2479 * SDL_GetError() for more information.
2480 *
2481 * \since This function is available since SDL 3.2.0.
2482 *
2483 * \sa SDL_UploadToGPUTexture
2484 * \sa SDL_DownloadFromGPUTexture
2485 * \sa SDL_BindGPUVertexSamplers
2486 * \sa SDL_BindGPUVertexStorageTextures
2487 * \sa SDL_BindGPUFragmentSamplers
2488 * \sa SDL_BindGPUFragmentStorageTextures
2489 * \sa SDL_BindGPUComputeStorageTextures
2490 * \sa SDL_BlitGPUTexture
2491 * \sa SDL_ReleaseGPUTexture
2492 * \sa SDL_GPUTextureSupportsFormat
2493 */
2494extern SDL_DECLSPEC SDL_GPUTexture * SDLCALL SDL_CreateGPUTexture(
2495 SDL_GPUDevice *device,
2496 const SDL_GPUTextureCreateInfo *createinfo);
2497
2498#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT "SDL.gpu.texture.create.d3d12.clear.r"
2499#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT "SDL.gpu.texture.create.d3d12.clear.g"
2500#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT "SDL.gpu.texture.create.d3d12.clear.b"
2501#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT "SDL.gpu.texture.create.d3d12.clear.a"
2502#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT "SDL.gpu.texture.create.d3d12.clear.depth"
2503#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER "SDL.gpu.texture.create.d3d12.clear.stencil"
2504#define SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING "SDL.gpu.texture.create.name"
2505
2506/**
2507 * Creates a buffer object to be used in graphics or compute workflows.
2508 *
2509 * The contents of this buffer are undefined until data is written to the
2510 * buffer.
2511 *
2512 * Note that certain combinations of usage flags are invalid. For example, a
2513 * buffer cannot have both the VERTEX and INDEX flags.
2514 *
2515 * If you use a STORAGE flag, the data in the buffer must respect std140
2516 * layout conventions. In practical terms this means you must ensure that vec3
2517 * and vec4 fields are 16-byte aligned.
2518 *
2519 * For better understanding of underlying concepts and memory management with
2520 * SDL GPU API, you may refer
2521 * [this blog post](https://moonside.games/posts/sdl-gpu-concepts-cycling/)
2522 * .
2523 *
2524 * There are optional properties that can be provided through `props`. These
2525 * are the supported properties:
2526 *
2527 * - `SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING`: a name that can be displayed in
2528 * debugging tools.
2529 *
2530 * \param device a GPU Context.
2531 * \param createinfo a struct describing the state of the buffer to create.
2532 * \returns a buffer object on success, or NULL on failure; call
2533 * SDL_GetError() for more information.
2534 *
2535 * \since This function is available since SDL 3.2.0.
2536 *
2537 * \sa SDL_UploadToGPUBuffer
2538 * \sa SDL_DownloadFromGPUBuffer
2539 * \sa SDL_CopyGPUBufferToBuffer
2540 * \sa SDL_BindGPUVertexBuffers
2541 * \sa SDL_BindGPUIndexBuffer
2542 * \sa SDL_BindGPUVertexStorageBuffers
2543 * \sa SDL_BindGPUFragmentStorageBuffers
2544 * \sa SDL_DrawGPUPrimitivesIndirect
2545 * \sa SDL_DrawGPUIndexedPrimitivesIndirect
2546 * \sa SDL_BindGPUComputeStorageBuffers
2547 * \sa SDL_DispatchGPUComputeIndirect
2548 * \sa SDL_ReleaseGPUBuffer
2549 */
2550extern SDL_DECLSPEC SDL_GPUBuffer * SDLCALL SDL_CreateGPUBuffer(
2551 SDL_GPUDevice *device,
2552 const SDL_GPUBufferCreateInfo *createinfo);
2553
2554#define SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING "SDL.gpu.buffer.create.name"
2555
2556/**
2557 * Creates a transfer buffer to be used when uploading to or downloading from
2558 * graphics resources.
2559 *
2560 * Download buffers can be particularly expensive to create, so it is good
2561 * practice to reuse them if data will be downloaded regularly.
2562 *
2563 * There are optional properties that can be provided through `props`. These
2564 * are the supported properties:
2565 *
2566 * - `SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING`: a name that can be
2567 * displayed in debugging tools.
2568 *
2569 * \param device a GPU Context.
2570 * \param createinfo a struct describing the state of the transfer buffer to
2571 * create.
2572 * \returns a transfer buffer on success, or NULL on failure; call
2573 * SDL_GetError() for more information.
2574 *
2575 * \since This function is available since SDL 3.2.0.
2576 *
2577 * \sa SDL_UploadToGPUBuffer
2578 * \sa SDL_DownloadFromGPUBuffer
2579 * \sa SDL_UploadToGPUTexture
2580 * \sa SDL_DownloadFromGPUTexture
2581 * \sa SDL_ReleaseGPUTransferBuffer
2582 */
2583extern SDL_DECLSPEC SDL_GPUTransferBuffer * SDLCALL SDL_CreateGPUTransferBuffer(
2584 SDL_GPUDevice *device,
2585 const SDL_GPUTransferBufferCreateInfo *createinfo);
2586
2587#define SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING "SDL.gpu.transferbuffer.create.name"
2588
2589/* Debug Naming */
2590
2591/**
2592 * Sets an arbitrary string constant to label a buffer.
2593 *
2594 * You should use SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING with
2595 * SDL_CreateGPUBuffer instead of this function to avoid thread safety issues.
2596 *
2597 * \param device a GPU Context.
2598 * \param buffer a buffer to attach the name to.
2599 * \param text a UTF-8 string constant to mark as the name of the buffer.
2600 *
2601 * \threadsafety This function is not thread safe, you must make sure the
2602 * buffer is not simultaneously used by any other thread.
2603 *
2604 * \since This function is available since SDL 3.2.0.
2605 *
2606 * \sa SDL_CreateGPUBuffer
2607 */
2608extern SDL_DECLSPEC void SDLCALL SDL_SetGPUBufferName(
2609 SDL_GPUDevice *device,
2610 SDL_GPUBuffer *buffer,
2611 const char *text);
2612
2613/**
2614 * Sets an arbitrary string constant to label a texture.
2615 *
2616 * You should use SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING with
2617 * SDL_CreateGPUTexture instead of this function to avoid thread safety
2618 * issues.
2619 *
2620 * \param device a GPU Context.
2621 * \param texture a texture to attach the name to.
2622 * \param text a UTF-8 string constant to mark as the name of the texture.
2623 *
2624 * \threadsafety This function is not thread safe, you must make sure the
2625 * texture is not simultaneously used by any other thread.
2626 *
2627 * \since This function is available since SDL 3.2.0.
2628 *
2629 * \sa SDL_CreateGPUTexture
2630 */
2631extern SDL_DECLSPEC void SDLCALL SDL_SetGPUTextureName(
2632 SDL_GPUDevice *device,
2633 SDL_GPUTexture *texture,
2634 const char *text);
2635
2636/**
2637 * Inserts an arbitrary string label into the command buffer callstream.
2638 *
2639 * Useful for debugging.
2640 *
2641 * \param command_buffer a command buffer.
2642 * \param text a UTF-8 string constant to insert as the label.
2643 *
2644 * \since This function is available since SDL 3.2.0.
2645 */
2646extern SDL_DECLSPEC void SDLCALL SDL_InsertGPUDebugLabel(
2647 SDL_GPUCommandBuffer *command_buffer,
2648 const char *text);
2649
2650/**
2651 * Begins a debug group with an arbitary name.
2652 *
2653 * Used for denoting groups of calls when viewing the command buffer
2654 * callstream in a graphics debugging tool.
2655 *
2656 * Each call to SDL_PushGPUDebugGroup must have a corresponding call to
2657 * SDL_PopGPUDebugGroup.
2658 *
2659 * On some backends (e.g. Metal), pushing a debug group during a
2660 * render/blit/compute pass will create a group that is scoped to the native
2661 * pass rather than the command buffer. For best results, if you push a debug
2662 * group during a pass, always pop it in the same pass.
2663 *
2664 * \param command_buffer a command buffer.
2665 * \param name a UTF-8 string constant that names the group.
2666 *
2667 * \since This function is available since SDL 3.2.0.
2668 *
2669 * \sa SDL_PopGPUDebugGroup
2670 */
2671extern SDL_DECLSPEC void SDLCALL SDL_PushGPUDebugGroup(
2672 SDL_GPUCommandBuffer *command_buffer,
2673 const char *name);
2674
2675/**
2676 * Ends the most-recently pushed debug group.
2677 *
2678 * \param command_buffer a command buffer.
2679 *
2680 * \since This function is available since SDL 3.2.0.
2681 *
2682 * \sa SDL_PushGPUDebugGroup
2683 */
2684extern SDL_DECLSPEC void SDLCALL SDL_PopGPUDebugGroup(
2685 SDL_GPUCommandBuffer *command_buffer);
2686
2687/* Disposal */
2688
2689/**
2690 * Frees the given texture as soon as it is safe to do so.
2691 *
2692 * You must not reference the texture after calling this function.
2693 *
2694 * \param device a GPU context.
2695 * \param texture a texture to be destroyed.
2696 *
2697 * \since This function is available since SDL 3.2.0.
2698 */
2699extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUTexture(
2700 SDL_GPUDevice *device,
2701 SDL_GPUTexture *texture);
2702
2703/**
2704 * Frees the given sampler as soon as it is safe to do so.
2705 *
2706 * You must not reference the sampler after calling this function.
2707 *
2708 * \param device a GPU context.
2709 * \param sampler a sampler to be destroyed.
2710 *
2711 * \since This function is available since SDL 3.2.0.
2712 */
2713extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUSampler(
2714 SDL_GPUDevice *device,
2715 SDL_GPUSampler *sampler);
2716
2717/**
2718 * Frees the given buffer as soon as it is safe to do so.
2719 *
2720 * You must not reference the buffer after calling this function.
2721 *
2722 * \param device a GPU context.
2723 * \param buffer a buffer to be destroyed.
2724 *
2725 * \since This function is available since SDL 3.2.0.
2726 */
2727extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUBuffer(
2728 SDL_GPUDevice *device,
2729 SDL_GPUBuffer *buffer);
2730
2731/**
2732 * Frees the given transfer buffer as soon as it is safe to do so.
2733 *
2734 * You must not reference the transfer buffer after calling this function.
2735 *
2736 * \param device a GPU context.
2737 * \param transfer_buffer a transfer buffer to be destroyed.
2738 *
2739 * \since This function is available since SDL 3.2.0.
2740 */
2741extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUTransferBuffer(
2742 SDL_GPUDevice *device,
2743 SDL_GPUTransferBuffer *transfer_buffer);
2744
2745/**
2746 * Frees the given compute pipeline as soon as it is safe to do so.
2747 *
2748 * You must not reference the compute pipeline after calling this function.
2749 *
2750 * \param device a GPU context.
2751 * \param compute_pipeline a compute pipeline to be destroyed.
2752 *
2753 * \since This function is available since SDL 3.2.0.
2754 */
2755extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUComputePipeline(
2756 SDL_GPUDevice *device,
2757 SDL_GPUComputePipeline *compute_pipeline);
2758
2759/**
2760 * Frees the given shader as soon as it is safe to do so.
2761 *
2762 * You must not reference the shader after calling this function.
2763 *
2764 * \param device a GPU context.
2765 * \param shader a shader to be destroyed.
2766 *
2767 * \since This function is available since SDL 3.2.0.
2768 */
2769extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUShader(
2770 SDL_GPUDevice *device,
2771 SDL_GPUShader *shader);
2772
2773/**
2774 * Frees the given graphics pipeline as soon as it is safe to do so.
2775 *
2776 * You must not reference the graphics pipeline after calling this function.
2777 *
2778 * \param device a GPU context.
2779 * \param graphics_pipeline a graphics pipeline to be destroyed.
2780 *
2781 * \since This function is available since SDL 3.2.0.
2782 */
2783extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUGraphicsPipeline(
2784 SDL_GPUDevice *device,
2785 SDL_GPUGraphicsPipeline *graphics_pipeline);
2786
2787/**
2788 * Acquire a command buffer.
2789 *
2790 * This command buffer is managed by the implementation and should not be
2791 * freed by the user. The command buffer may only be used on the thread it was
2792 * acquired on. The command buffer should be submitted on the thread it was
2793 * acquired on.
2794 *
2795 * It is valid to acquire multiple command buffers on the same thread at once.
2796 * In fact a common design pattern is to acquire two command buffers per frame
2797 * where one is dedicated to render and compute passes and the other is
2798 * dedicated to copy passes and other preparatory work such as generating
2799 * mipmaps. Interleaving commands between the two command buffers reduces the
2800 * total amount of passes overall which improves rendering performance.
2801 *
2802 * \param device a GPU context.
2803 * \returns a command buffer, or NULL on failure; call SDL_GetError() for more
2804 * information.
2805 *
2806 * \since This function is available since SDL 3.2.0.
2807 *
2808 * \sa SDL_SubmitGPUCommandBuffer
2809 * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
2810 */
2811extern SDL_DECLSPEC SDL_GPUCommandBuffer * SDLCALL SDL_AcquireGPUCommandBuffer(
2812 SDL_GPUDevice *device);
2813
2814/* Uniform Data */
2815
2816/**
2817 * Pushes data to a vertex uniform slot on the command buffer.
2818 *
2819 * Subsequent draw calls will use this uniform data.
2820 *
2821 * The data being pushed must respect std140 layout conventions. In practical
2822 * terms this means you must ensure that vec3 and vec4 fields are 16-byte
2823 * aligned.
2824 *
2825 * \param command_buffer a command buffer.
2826 * \param slot_index the vertex uniform slot to push data to.
2827 * \param data client data to write.
2828 * \param length the length of the data to write.
2829 *
2830 * \since This function is available since SDL 3.2.0.
2831 */
2832extern SDL_DECLSPEC void SDLCALL SDL_PushGPUVertexUniformData(
2833 SDL_GPUCommandBuffer *command_buffer,
2834 Uint32 slot_index,
2835 const void *data,
2836 Uint32 length);
2837
2838/**
2839 * Pushes data to a fragment uniform slot on the command buffer.
2840 *
2841 * Subsequent draw calls will use this uniform data.
2842 *
2843 * The data being pushed must respect std140 layout conventions. In practical
2844 * terms this means you must ensure that vec3 and vec4 fields are 16-byte
2845 * aligned.
2846 *
2847 * \param command_buffer a command buffer.
2848 * \param slot_index the fragment uniform slot to push data to.
2849 * \param data client data to write.
2850 * \param length the length of the data to write.
2851 *
2852 * \since This function is available since SDL 3.2.0.
2853 */
2854extern SDL_DECLSPEC void SDLCALL SDL_PushGPUFragmentUniformData(
2855 SDL_GPUCommandBuffer *command_buffer,
2856 Uint32 slot_index,
2857 const void *data,
2858 Uint32 length);
2859
2860/**
2861 * Pushes data to a uniform slot on the command buffer.
2862 *
2863 * Subsequent draw calls will use this uniform data.
2864 *
2865 * The data being pushed must respect std140 layout conventions. In practical
2866 * terms this means you must ensure that vec3 and vec4 fields are 16-byte
2867 * aligned.
2868 *
2869 * \param command_buffer a command buffer.
2870 * \param slot_index the uniform slot to push data to.
2871 * \param data client data to write.
2872 * \param length the length of the data to write.
2873 *
2874 * \since This function is available since SDL 3.2.0.
2875 */
2876extern SDL_DECLSPEC void SDLCALL SDL_PushGPUComputeUniformData(
2877 SDL_GPUCommandBuffer *command_buffer,
2878 Uint32 slot_index,
2879 const void *data,
2880 Uint32 length);
2881
2882/* Graphics State */
2883
2884/**
2885 * Begins a render pass on a command buffer.
2886 *
2887 * A render pass consists of a set of texture subresources (or depth slices in
2888 * the 3D texture case) which will be rendered to during the render pass,
2889 * along with corresponding clear values and load/store operations. All
2890 * operations related to graphics pipelines must take place inside of a render
2891 * pass. A default viewport and scissor state are automatically set when this
2892 * is called. You cannot begin another render pass, or begin a compute pass or
2893 * copy pass until you have ended the render pass.
2894 *
2895 * \param command_buffer a command buffer.
2896 * \param color_target_infos an array of texture subresources with
2897 * corresponding clear values and load/store ops.
2898 * \param num_color_targets the number of color targets in the
2899 * color_target_infos array.
2900 * \param depth_stencil_target_info a texture subresource with corresponding
2901 * clear value and load/store ops, may be
2902 * NULL.
2903 * \returns a render pass handle.
2904 *
2905 * \since This function is available since SDL 3.2.0.
2906 *
2907 * \sa SDL_EndGPURenderPass
2908 */
2909extern SDL_DECLSPEC SDL_GPURenderPass * SDLCALL SDL_BeginGPURenderPass(
2910 SDL_GPUCommandBuffer *command_buffer,
2911 const SDL_GPUColorTargetInfo *color_target_infos,
2912 Uint32 num_color_targets,
2913 const SDL_GPUDepthStencilTargetInfo *depth_stencil_target_info);
2914
2915/**
2916 * Binds a graphics pipeline on a render pass to be used in rendering.
2917 *
2918 * A graphics pipeline must be bound before making any draw calls.
2919 *
2920 * \param render_pass a render pass handle.
2921 * \param graphics_pipeline the graphics pipeline to bind.
2922 *
2923 * \since This function is available since SDL 3.2.0.
2924 */
2925extern SDL_DECLSPEC void SDLCALL SDL_BindGPUGraphicsPipeline(
2926 SDL_GPURenderPass *render_pass,
2927 SDL_GPUGraphicsPipeline *graphics_pipeline);
2928
2929/**
2930 * Sets the current viewport state on a command buffer.
2931 *
2932 * \param render_pass a render pass handle.
2933 * \param viewport the viewport to set.
2934 *
2935 * \since This function is available since SDL 3.2.0.
2936 */
2937extern SDL_DECLSPEC void SDLCALL SDL_SetGPUViewport(
2938 SDL_GPURenderPass *render_pass,
2939 const SDL_GPUViewport *viewport);
2940
2941/**
2942 * Sets the current scissor state on a command buffer.
2943 *
2944 * \param render_pass a render pass handle.
2945 * \param scissor the scissor area to set.
2946 *
2947 * \since This function is available since SDL 3.2.0.
2948 */
2949extern SDL_DECLSPEC void SDLCALL SDL_SetGPUScissor(
2950 SDL_GPURenderPass *render_pass,
2951 const SDL_Rect *scissor);
2952
2953/**
2954 * Sets the current blend constants on a command buffer.
2955 *
2956 * \param render_pass a render pass handle.
2957 * \param blend_constants the blend constant color.
2958 *
2959 * \since This function is available since SDL 3.2.0.
2960 *
2961 * \sa SDL_GPU_BLENDFACTOR_CONSTANT_COLOR
2962 * \sa SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR
2963 */
2964extern SDL_DECLSPEC void SDLCALL SDL_SetGPUBlendConstants(
2965 SDL_GPURenderPass *render_pass,
2966 SDL_FColor blend_constants);
2967
2968/**
2969 * Sets the current stencil reference value on a command buffer.
2970 *
2971 * \param render_pass a render pass handle.
2972 * \param reference the stencil reference value to set.
2973 *
2974 * \since This function is available since SDL 3.2.0.
2975 */
2976extern SDL_DECLSPEC void SDLCALL SDL_SetGPUStencilReference(
2977 SDL_GPURenderPass *render_pass,
2978 Uint8 reference);
2979
2980/**
2981 * Binds vertex buffers on a command buffer for use with subsequent draw
2982 * calls.
2983 *
2984 * \param render_pass a render pass handle.
2985 * \param first_slot the vertex buffer slot to begin binding from.
2986 * \param bindings an array of SDL_GPUBufferBinding structs containing vertex
2987 * buffers and offset values.
2988 * \param num_bindings the number of bindings in the bindings array.
2989 *
2990 * \since This function is available since SDL 3.2.0.
2991 */
2992extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexBuffers(
2993 SDL_GPURenderPass *render_pass,
2994 Uint32 first_slot,
2995 const SDL_GPUBufferBinding *bindings,
2996 Uint32 num_bindings);
2997
2998/**
2999 * Binds an index buffer on a command buffer for use with subsequent draw
3000 * calls.
3001 *
3002 * \param render_pass a render pass handle.
3003 * \param binding a pointer to a struct containing an index buffer and offset.
3004 * \param index_element_size whether the index values in the buffer are 16- or
3005 * 32-bit.
3006 *
3007 * \since This function is available since SDL 3.2.0.
3008 */
3009extern SDL_DECLSPEC void SDLCALL SDL_BindGPUIndexBuffer(
3010 SDL_GPURenderPass *render_pass,
3011 const SDL_GPUBufferBinding *binding,
3012 SDL_GPUIndexElementSize index_element_size);
3013
3014/**
3015 * Binds texture-sampler pairs for use on the vertex shader.
3016 *
3017 * The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.
3018 *
3019 * Be sure your shader is set up according to the requirements documented in
3020 * SDL_CreateGPUShader().
3021 *
3022 * \param render_pass a render pass handle.
3023 * \param first_slot the vertex sampler slot to begin binding from.
3024 * \param texture_sampler_bindings an array of texture-sampler binding
3025 * structs.
3026 * \param num_bindings the number of texture-sampler pairs to bind from the
3027 * array.
3028 *
3029 * \since This function is available since SDL 3.2.0.
3030 *
3031 * \sa SDL_CreateGPUShader
3032 */
3033extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexSamplers(
3034 SDL_GPURenderPass *render_pass,
3035 Uint32 first_slot,
3036 const SDL_GPUTextureSamplerBinding *texture_sampler_bindings,
3037 Uint32 num_bindings);
3038
3039/**
3040 * Binds storage textures for use on the vertex shader.
3041 *
3042 * These textures must have been created with
3043 * SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.
3044 *
3045 * Be sure your shader is set up according to the requirements documented in
3046 * SDL_CreateGPUShader().
3047 *
3048 * \param render_pass a render pass handle.
3049 * \param first_slot the vertex storage texture slot to begin binding from.
3050 * \param storage_textures an array of storage textures.
3051 * \param num_bindings the number of storage texture to bind from the array.
3052 *
3053 * \since This function is available since SDL 3.2.0.
3054 *
3055 * \sa SDL_CreateGPUShader
3056 */
3057extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageTextures(
3058 SDL_GPURenderPass *render_pass,
3059 Uint32 first_slot,
3060 SDL_GPUTexture *const *storage_textures,
3061 Uint32 num_bindings);
3062
3063/**
3064 * Binds storage buffers for use on the vertex shader.
3065 *
3066 * These buffers must have been created with
3067 * SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.
3068 *
3069 * Be sure your shader is set up according to the requirements documented in
3070 * SDL_CreateGPUShader().
3071 *
3072 * \param render_pass a render pass handle.
3073 * \param first_slot the vertex storage buffer slot to begin binding from.
3074 * \param storage_buffers an array of buffers.
3075 * \param num_bindings the number of buffers to bind from the array.
3076 *
3077 * \since This function is available since SDL 3.2.0.
3078 *
3079 * \sa SDL_CreateGPUShader
3080 */
3081extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageBuffers(
3082 SDL_GPURenderPass *render_pass,
3083 Uint32 first_slot,
3084 SDL_GPUBuffer *const *storage_buffers,
3085 Uint32 num_bindings);
3086
3087/**
3088 * Binds texture-sampler pairs for use on the fragment shader.
3089 *
3090 * The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.
3091 *
3092 * Be sure your shader is set up according to the requirements documented in
3093 * SDL_CreateGPUShader().
3094 *
3095 * \param render_pass a render pass handle.
3096 * \param first_slot the fragment sampler slot to begin binding from.
3097 * \param texture_sampler_bindings an array of texture-sampler binding
3098 * structs.
3099 * \param num_bindings the number of texture-sampler pairs to bind from the
3100 * array.
3101 *
3102 * \since This function is available since SDL 3.2.0.
3103 *
3104 * \sa SDL_CreateGPUShader
3105 */
3106extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentSamplers(
3107 SDL_GPURenderPass *render_pass,
3108 Uint32 first_slot,
3109 const SDL_GPUTextureSamplerBinding *texture_sampler_bindings,
3110 Uint32 num_bindings);
3111
3112/**
3113 * Binds storage textures for use on the fragment shader.
3114 *
3115 * These textures must have been created with
3116 * SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.
3117 *
3118 * Be sure your shader is set up according to the requirements documented in
3119 * SDL_CreateGPUShader().
3120 *
3121 * \param render_pass a render pass handle.
3122 * \param first_slot the fragment storage texture slot to begin binding from.
3123 * \param storage_textures an array of storage textures.
3124 * \param num_bindings the number of storage textures to bind from the array.
3125 *
3126 * \since This function is available since SDL 3.2.0.
3127 *
3128 * \sa SDL_CreateGPUShader
3129 */
3130extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageTextures(
3131 SDL_GPURenderPass *render_pass,
3132 Uint32 first_slot,
3133 SDL_GPUTexture *const *storage_textures,
3134 Uint32 num_bindings);
3135
3136/**
3137 * Binds storage buffers for use on the fragment shader.
3138 *
3139 * These buffers must have been created with
3140 * SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.
3141 *
3142 * Be sure your shader is set up according to the requirements documented in
3143 * SDL_CreateGPUShader().
3144 *
3145 * \param render_pass a render pass handle.
3146 * \param first_slot the fragment storage buffer slot to begin binding from.
3147 * \param storage_buffers an array of storage buffers.
3148 * \param num_bindings the number of storage buffers to bind from the array.
3149 *
3150 * \since This function is available since SDL 3.2.0.
3151 *
3152 * \sa SDL_CreateGPUShader
3153 */
3154extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageBuffers(
3155 SDL_GPURenderPass *render_pass,
3156 Uint32 first_slot,
3157 SDL_GPUBuffer *const *storage_buffers,
3158 Uint32 num_bindings);
3159
3160/* Drawing */
3161
3162/**
3163 * Draws data using bound graphics state with an index buffer and instancing
3164 * enabled.
3165 *
3166 * You must not call this function before binding a graphics pipeline.
3167 *
3168 * Note that the `first_vertex` and `first_instance` parameters are NOT
3169 * compatible with built-in vertex/instance ID variables in shaders (for
3170 * example, SV_VertexID); GPU APIs and shader languages do not define these
3171 * built-in variables consistently, so if your shader depends on them, the
3172 * only way to keep behavior consistent and portable is to always pass 0 for
3173 * the correlating parameter in the draw calls.
3174 *
3175 * \param render_pass a render pass handle.
3176 * \param num_indices the number of indices to draw per instance.
3177 * \param num_instances the number of instances to draw.
3178 * \param first_index the starting index within the index buffer.
3179 * \param vertex_offset value added to vertex index before indexing into the
3180 * vertex buffer.
3181 * \param first_instance the ID of the first instance to draw.
3182 *
3183 * \since This function is available since SDL 3.2.0.
3184 */
3185extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUIndexedPrimitives(
3186 SDL_GPURenderPass *render_pass,
3187 Uint32 num_indices,
3188 Uint32 num_instances,
3189 Uint32 first_index,
3190 Sint32 vertex_offset,
3191 Uint32 first_instance);
3192
3193/**
3194 * Draws data using bound graphics state.
3195 *
3196 * You must not call this function before binding a graphics pipeline.
3197 *
3198 * Note that the `first_vertex` and `first_instance` parameters are NOT
3199 * compatible with built-in vertex/instance ID variables in shaders (for
3200 * example, SV_VertexID); GPU APIs and shader languages do not define these
3201 * built-in variables consistently, so if your shader depends on them, the
3202 * only way to keep behavior consistent and portable is to always pass 0 for
3203 * the correlating parameter in the draw calls.
3204 *
3205 * \param render_pass a render pass handle.
3206 * \param num_vertices the number of vertices to draw.
3207 * \param num_instances the number of instances that will be drawn.
3208 * \param first_vertex the index of the first vertex to draw.
3209 * \param first_instance the ID of the first instance to draw.
3210 *
3211 * \since This function is available since SDL 3.2.0.
3212 */
3213extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUPrimitives(
3214 SDL_GPURenderPass *render_pass,
3215 Uint32 num_vertices,
3216 Uint32 num_instances,
3217 Uint32 first_vertex,
3218 Uint32 first_instance);
3219
3220/**
3221 * Draws data using bound graphics state and with draw parameters set from a
3222 * buffer.
3223 *
3224 * The buffer must consist of tightly-packed draw parameter sets that each
3225 * match the layout of SDL_GPUIndirectDrawCommand. You must not call this
3226 * function before binding a graphics pipeline.
3227 *
3228 * \param render_pass a render pass handle.
3229 * \param buffer a buffer containing draw parameters.
3230 * \param offset the offset to start reading from the draw buffer.
3231 * \param draw_count the number of draw parameter sets that should be read
3232 * from the draw buffer.
3233 *
3234 * \since This function is available since SDL 3.2.0.
3235 */
3236extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUPrimitivesIndirect(
3237 SDL_GPURenderPass *render_pass,
3238 SDL_GPUBuffer *buffer,
3239 Uint32 offset,
3240 Uint32 draw_count);
3241
3242/**
3243 * Draws data using bound graphics state with an index buffer enabled and with
3244 * draw parameters set from a buffer.
3245 *
3246 * The buffer must consist of tightly-packed draw parameter sets that each
3247 * match the layout of SDL_GPUIndexedIndirectDrawCommand. You must not call
3248 * this function before binding a graphics pipeline.
3249 *
3250 * \param render_pass a render pass handle.
3251 * \param buffer a buffer containing draw parameters.
3252 * \param offset the offset to start reading from the draw buffer.
3253 * \param draw_count the number of draw parameter sets that should be read
3254 * from the draw buffer.
3255 *
3256 * \since This function is available since SDL 3.2.0.
3257 */
3258extern SDL_DECLSPEC void SDLCALL SDL_DrawGPUIndexedPrimitivesIndirect(
3259 SDL_GPURenderPass *render_pass,
3260 SDL_GPUBuffer *buffer,
3261 Uint32 offset,
3262 Uint32 draw_count);
3263
3264/**
3265 * Ends the given render pass.
3266 *
3267 * All bound graphics state on the render pass command buffer is unset. The
3268 * render pass handle is now invalid.
3269 *
3270 * \param render_pass a render pass handle.
3271 *
3272 * \since This function is available since SDL 3.2.0.
3273 */
3274extern SDL_DECLSPEC void SDLCALL SDL_EndGPURenderPass(
3275 SDL_GPURenderPass *render_pass);
3276
3277/* Compute Pass */
3278
3279/**
3280 * Begins a compute pass on a command buffer.
3281 *
3282 * A compute pass is defined by a set of texture subresources and buffers that
3283 * may be written to by compute pipelines. These textures and buffers must
3284 * have been created with the COMPUTE_STORAGE_WRITE bit or the
3285 * COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE bit. If you do not create a texture
3286 * with COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE, you must not read from the
3287 * texture in the compute pass. All operations related to compute pipelines
3288 * must take place inside of a compute pass. You must not begin another
3289 * compute pass, or a render pass or copy pass before ending the compute pass.
3290 *
3291 * A VERY IMPORTANT NOTE - Reads and writes in compute passes are NOT
3292 * implicitly synchronized. This means you may cause data races by both
3293 * reading and writing a resource region in a compute pass, or by writing
3294 * multiple times to a resource region. If your compute work depends on
3295 * reading the completed output from a previous dispatch, you MUST end the
3296 * current compute pass and begin a new one before you can safely access the
3297 * data. Otherwise you will receive unexpected results. Reading and writing a
3298 * texture in the same compute pass is only supported by specific texture
3299 * formats. Make sure you check the format support!
3300 *
3301 * \param command_buffer a command buffer.
3302 * \param storage_texture_bindings an array of writeable storage texture
3303 * binding structs.
3304 * \param num_storage_texture_bindings the number of storage textures to bind
3305 * from the array.
3306 * \param storage_buffer_bindings an array of writeable storage buffer binding
3307 * structs.
3308 * \param num_storage_buffer_bindings the number of storage buffers to bind
3309 * from the array.
3310 * \returns a compute pass handle.
3311 *
3312 * \since This function is available since SDL 3.2.0.
3313 *
3314 * \sa SDL_EndGPUComputePass
3315 */
3316extern SDL_DECLSPEC SDL_GPUComputePass * SDLCALL SDL_BeginGPUComputePass(
3317 SDL_GPUCommandBuffer *command_buffer,
3318 const SDL_GPUStorageTextureReadWriteBinding *storage_texture_bindings,
3319 Uint32 num_storage_texture_bindings,
3320 const SDL_GPUStorageBufferReadWriteBinding *storage_buffer_bindings,
3321 Uint32 num_storage_buffer_bindings);
3322
3323/**
3324 * Binds a compute pipeline on a command buffer for use in compute dispatch.
3325 *
3326 * \param compute_pass a compute pass handle.
3327 * \param compute_pipeline a compute pipeline to bind.
3328 *
3329 * \since This function is available since SDL 3.2.0.
3330 */
3331extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputePipeline(
3332 SDL_GPUComputePass *compute_pass,
3333 SDL_GPUComputePipeline *compute_pipeline);
3334
3335/**
3336 * Binds texture-sampler pairs for use on the compute shader.
3337 *
3338 * The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.
3339 *
3340 * Be sure your shader is set up according to the requirements documented in
3341 * SDL_CreateGPUShader().
3342 *
3343 * \param compute_pass a compute pass handle.
3344 * \param first_slot the compute sampler slot to begin binding from.
3345 * \param texture_sampler_bindings an array of texture-sampler binding
3346 * structs.
3347 * \param num_bindings the number of texture-sampler bindings to bind from the
3348 * array.
3349 *
3350 * \since This function is available since SDL 3.2.0.
3351 *
3352 * \sa SDL_CreateGPUShader
3353 */
3354extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers(
3355 SDL_GPUComputePass *compute_pass,
3356 Uint32 first_slot,
3357 const SDL_GPUTextureSamplerBinding *texture_sampler_bindings,
3358 Uint32 num_bindings);
3359
3360/**
3361 * Binds storage textures as readonly for use on the compute pipeline.
3362 *
3363 * These textures must have been created with
3364 * SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ.
3365 *
3366 * Be sure your shader is set up according to the requirements documented in
3367 * SDL_CreateGPUShader().
3368 *
3369 * \param compute_pass a compute pass handle.
3370 * \param first_slot the compute storage texture slot to begin binding from.
3371 * \param storage_textures an array of storage textures.
3372 * \param num_bindings the number of storage textures to bind from the array.
3373 *
3374 * \since This function is available since SDL 3.2.0.
3375 *
3376 * \sa SDL_CreateGPUShader
3377 */
3378extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
3379 SDL_GPUComputePass *compute_pass,
3380 Uint32 first_slot,
3381 SDL_GPUTexture *const *storage_textures,
3382 Uint32 num_bindings);
3383
3384/**
3385 * Binds storage buffers as readonly for use on the compute pipeline.
3386 *
3387 * These buffers must have been created with
3388 * SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ.
3389 *
3390 * Be sure your shader is set up according to the requirements documented in
3391 * SDL_CreateGPUShader().
3392 *
3393 * \param compute_pass a compute pass handle.
3394 * \param first_slot the compute storage buffer slot to begin binding from.
3395 * \param storage_buffers an array of storage buffer binding structs.
3396 * \param num_bindings the number of storage buffers to bind from the array.
3397 *
3398 * \since This function is available since SDL 3.2.0.
3399 *
3400 * \sa SDL_CreateGPUShader
3401 */
3402extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageBuffers(
3403 SDL_GPUComputePass *compute_pass,
3404 Uint32 first_slot,
3405 SDL_GPUBuffer *const *storage_buffers,
3406 Uint32 num_bindings);
3407
3408/**
3409 * Dispatches compute work.
3410 *
3411 * You must not call this function before binding a compute pipeline.
3412 *
3413 * A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and
3414 * the dispatches write to the same resource region as each other, there is no
3415 * guarantee of which order the writes will occur. If the write order matters,
3416 * you MUST end the compute pass and begin another one.
3417 *
3418 * \param compute_pass a compute pass handle.
3419 * \param groupcount_x number of local workgroups to dispatch in the X
3420 * dimension.
3421 * \param groupcount_y number of local workgroups to dispatch in the Y
3422 * dimension.
3423 * \param groupcount_z number of local workgroups to dispatch in the Z
3424 * dimension.
3425 *
3426 * \since This function is available since SDL 3.2.0.
3427 */
3428extern SDL_DECLSPEC void SDLCALL SDL_DispatchGPUCompute(
3429 SDL_GPUComputePass *compute_pass,
3430 Uint32 groupcount_x,
3431 Uint32 groupcount_y,
3432 Uint32 groupcount_z);
3433
3434/**
3435 * Dispatches compute work with parameters set from a buffer.
3436 *
3437 * The buffer layout should match the layout of
3438 * SDL_GPUIndirectDispatchCommand. You must not call this function before
3439 * binding a compute pipeline.
3440 *
3441 * A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and
3442 * the dispatches write to the same resource region as each other, there is no
3443 * guarantee of which order the writes will occur. If the write order matters,
3444 * you MUST end the compute pass and begin another one.
3445 *
3446 * \param compute_pass a compute pass handle.
3447 * \param buffer a buffer containing dispatch parameters.
3448 * \param offset the offset to start reading from the dispatch buffer.
3449 *
3450 * \since This function is available since SDL 3.2.0.
3451 */
3452extern SDL_DECLSPEC void SDLCALL SDL_DispatchGPUComputeIndirect(
3453 SDL_GPUComputePass *compute_pass,
3454 SDL_GPUBuffer *buffer,
3455 Uint32 offset);
3456
3457/**
3458 * Ends the current compute pass.
3459 *
3460 * All bound compute state on the command buffer is unset. The compute pass
3461 * handle is now invalid.
3462 *
3463 * \param compute_pass a compute pass handle.
3464 *
3465 * \since This function is available since SDL 3.2.0.
3466 */
3467extern SDL_DECLSPEC void SDLCALL SDL_EndGPUComputePass(
3468 SDL_GPUComputePass *compute_pass);
3469
3470/* TransferBuffer Data */
3471
3472/**
3473 * Maps a transfer buffer into application address space.
3474 *
3475 * You must unmap the transfer buffer before encoding upload commands. The
3476 * memory is owned by the graphics driver - do NOT call SDL_free() on the
3477 * returned pointer.
3478 *
3479 * \param device a GPU context.
3480 * \param transfer_buffer a transfer buffer.
3481 * \param cycle if true, cycles the transfer buffer if it is already bound.
3482 * \returns the address of the mapped transfer buffer memory, or NULL on
3483 * failure; call SDL_GetError() for more information.
3484 *
3485 * \since This function is available since SDL 3.2.0.
3486 */
3487extern SDL_DECLSPEC void * SDLCALL SDL_MapGPUTransferBuffer(
3488 SDL_GPUDevice *device,
3489 SDL_GPUTransferBuffer *transfer_buffer,
3490 bool cycle);
3491
3492/**
3493 * Unmaps a previously mapped transfer buffer.
3494 *
3495 * \param device a GPU context.
3496 * \param transfer_buffer a previously mapped transfer buffer.
3497 *
3498 * \since This function is available since SDL 3.2.0.
3499 */
3500extern SDL_DECLSPEC void SDLCALL SDL_UnmapGPUTransferBuffer(
3501 SDL_GPUDevice *device,
3502 SDL_GPUTransferBuffer *transfer_buffer);
3503
3504/* Copy Pass */
3505
3506/**
3507 * Begins a copy pass on a command buffer.
3508 *
3509 * All operations related to copying to or from buffers or textures take place
3510 * inside a copy pass. You must not begin another copy pass, or a render pass
3511 * or compute pass before ending the copy pass.
3512 *
3513 * \param command_buffer a command buffer.
3514 * \returns a copy pass handle.
3515 *
3516 * \since This function is available since SDL 3.2.0.
3517 */
3518extern SDL_DECLSPEC SDL_GPUCopyPass * SDLCALL SDL_BeginGPUCopyPass(
3519 SDL_GPUCommandBuffer *command_buffer);
3520
3521/**
3522 * Uploads data from a transfer buffer to a texture.
3523 *
3524 * The upload occurs on the GPU timeline. You may assume that the upload has
3525 * finished in subsequent commands.
3526 *
3527 * You must align the data in the transfer buffer to a multiple of the texel
3528 * size of the texture format.
3529 *
3530 * \param copy_pass a copy pass handle.
3531 * \param source the source transfer buffer with image layout information.
3532 * \param destination the destination texture region.
3533 * \param cycle if true, cycles the texture if the texture is bound, otherwise
3534 * overwrites the data.
3535 *
3536 * \since This function is available since SDL 3.2.0.
3537 */
3538extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUTexture(
3539 SDL_GPUCopyPass *copy_pass,
3540 const SDL_GPUTextureTransferInfo *source,
3541 const SDL_GPUTextureRegion *destination,
3542 bool cycle);
3543
3544/**
3545 * Uploads data from a transfer buffer to a buffer.
3546 *
3547 * The upload occurs on the GPU timeline. You may assume that the upload has
3548 * finished in subsequent commands.
3549 *
3550 * \param copy_pass a copy pass handle.
3551 * \param source the source transfer buffer with offset.
3552 * \param destination the destination buffer with offset and size.
3553 * \param cycle if true, cycles the buffer if it is already bound, otherwise
3554 * overwrites the data.
3555 *
3556 * \since This function is available since SDL 3.2.0.
3557 */
3558extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUBuffer(
3559 SDL_GPUCopyPass *copy_pass,
3560 const SDL_GPUTransferBufferLocation *source,
3561 const SDL_GPUBufferRegion *destination,
3562 bool cycle);
3563
3564/**
3565 * Performs a texture-to-texture copy.
3566 *
3567 * This copy occurs on the GPU timeline. You may assume the copy has finished
3568 * in subsequent commands.
3569 *
3570 * \param copy_pass a copy pass handle.
3571 * \param source a source texture region.
3572 * \param destination a destination texture region.
3573 * \param w the width of the region to copy.
3574 * \param h the height of the region to copy.
3575 * \param d the depth of the region to copy.
3576 * \param cycle if true, cycles the destination texture if the destination
3577 * texture is bound, otherwise overwrites the data.
3578 *
3579 * \since This function is available since SDL 3.2.0.
3580 */
3581extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUTextureToTexture(
3582 SDL_GPUCopyPass *copy_pass,
3583 const SDL_GPUTextureLocation *source,
3584 const SDL_GPUTextureLocation *destination,
3585 Uint32 w,
3586 Uint32 h,
3587 Uint32 d,
3588 bool cycle);
3589
3590/**
3591 * Performs a buffer-to-buffer copy.
3592 *
3593 * This copy occurs on the GPU timeline. You may assume the copy has finished
3594 * in subsequent commands.
3595 *
3596 * \param copy_pass a copy pass handle.
3597 * \param source the buffer and offset to copy from.
3598 * \param destination the buffer and offset to copy to.
3599 * \param size the length of the buffer to copy.
3600 * \param cycle if true, cycles the destination buffer if it is already bound,
3601 * otherwise overwrites the data.
3602 *
3603 * \since This function is available since SDL 3.2.0.
3604 */
3605extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUBufferToBuffer(
3606 SDL_GPUCopyPass *copy_pass,
3607 const SDL_GPUBufferLocation *source,
3608 const SDL_GPUBufferLocation *destination,
3609 Uint32 size,
3610 bool cycle);
3611
3612/**
3613 * Copies data from a texture to a transfer buffer on the GPU timeline.
3614 *
3615 * This data is not guaranteed to be copied until the command buffer fence is
3616 * signaled.
3617 *
3618 * \param copy_pass a copy pass handle.
3619 * \param source the source texture region.
3620 * \param destination the destination transfer buffer with image layout
3621 * information.
3622 *
3623 * \since This function is available since SDL 3.2.0.
3624 */
3625extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUTexture(
3626 SDL_GPUCopyPass *copy_pass,
3627 const SDL_GPUTextureRegion *source,
3628 const SDL_GPUTextureTransferInfo *destination);
3629
3630/**
3631 * Copies data from a buffer to a transfer buffer on the GPU timeline.
3632 *
3633 * This data is not guaranteed to be copied until the command buffer fence is
3634 * signaled.
3635 *
3636 * \param copy_pass a copy pass handle.
3637 * \param source the source buffer with offset and size.
3638 * \param destination the destination transfer buffer with offset.
3639 *
3640 * \since This function is available since SDL 3.2.0.
3641 */
3642extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUBuffer(
3643 SDL_GPUCopyPass *copy_pass,
3644 const SDL_GPUBufferRegion *source,
3645 const SDL_GPUTransferBufferLocation *destination);
3646
3647/**
3648 * Ends the current copy pass.
3649 *
3650 * \param copy_pass a copy pass handle.
3651 *
3652 * \since This function is available since SDL 3.2.0.
3653 */
3654extern SDL_DECLSPEC void SDLCALL SDL_EndGPUCopyPass(
3655 SDL_GPUCopyPass *copy_pass);
3656
3657/**
3658 * Generates mipmaps for the given texture.
3659 *
3660 * This function must not be called inside of any pass.
3661 *
3662 * \param command_buffer a command_buffer.
3663 * \param texture a texture with more than 1 mip level.
3664 *
3665 * \since This function is available since SDL 3.2.0.
3666 */
3667extern SDL_DECLSPEC void SDLCALL SDL_GenerateMipmapsForGPUTexture(
3668 SDL_GPUCommandBuffer *command_buffer,
3669 SDL_GPUTexture *texture);
3670
3671/**
3672 * Blits from a source texture region to a destination texture region.
3673 *
3674 * This function must not be called inside of any pass.
3675 *
3676 * \param command_buffer a command buffer.
3677 * \param info the blit info struct containing the blit parameters.
3678 *
3679 * \since This function is available since SDL 3.2.0.
3680 */
3681extern SDL_DECLSPEC void SDLCALL SDL_BlitGPUTexture(
3682 SDL_GPUCommandBuffer *command_buffer,
3683 const SDL_GPUBlitInfo *info);
3684
3685/* Submission/Presentation */
3686
3687/**
3688 * Determines whether a swapchain composition is supported by the window.
3689 *
3690 * The window must be claimed before calling this function.
3691 *
3692 * \param device a GPU context.
3693 * \param window an SDL_Window.
3694 * \param swapchain_composition the swapchain composition to check.
3695 * \returns true if supported, false if unsupported.
3696 *
3697 * \since This function is available since SDL 3.2.0.
3698 *
3699 * \sa SDL_ClaimWindowForGPUDevice
3700 */
3701extern SDL_DECLSPEC bool SDLCALL SDL_WindowSupportsGPUSwapchainComposition(
3702 SDL_GPUDevice *device,
3703 SDL_Window *window,
3704 SDL_GPUSwapchainComposition swapchain_composition);
3705
3706/**
3707 * Determines whether a presentation mode is supported by the window.
3708 *
3709 * The window must be claimed before calling this function.
3710 *
3711 * \param device a GPU context.
3712 * \param window an SDL_Window.
3713 * \param present_mode the presentation mode to check.
3714 * \returns true if supported, false if unsupported.
3715 *
3716 * \since This function is available since SDL 3.2.0.
3717 *
3718 * \sa SDL_ClaimWindowForGPUDevice
3719 */
3720extern SDL_DECLSPEC bool SDLCALL SDL_WindowSupportsGPUPresentMode(
3721 SDL_GPUDevice *device,
3722 SDL_Window *window,
3723 SDL_GPUPresentMode present_mode);
3724
3725/**
3726 * Claims a window, creating a swapchain structure for it.
3727 *
3728 * This must be called before SDL_AcquireGPUSwapchainTexture is called using
3729 * the window. You should only call this function from the thread that created
3730 * the window.
3731 *
3732 * The swapchain will be created with SDL_GPU_SWAPCHAINCOMPOSITION_SDR and
3733 * SDL_GPU_PRESENTMODE_VSYNC. If you want to have different swapchain
3734 * parameters, you must call SDL_SetGPUSwapchainParameters after claiming the
3735 * window.
3736 *
3737 * \param device a GPU context.
3738 * \param window an SDL_Window.
3739 * \returns true on success, or false on failure; call SDL_GetError() for more
3740 * information.
3741 *
3742 * \threadsafety This function should only be called from the thread that
3743 * created the window.
3744 *
3745 * \since This function is available since SDL 3.2.0.
3746 *
3747 * \sa SDL_WaitAndAcquireGPUSwapchainTexture
3748 * \sa SDL_ReleaseWindowFromGPUDevice
3749 * \sa SDL_WindowSupportsGPUPresentMode
3750 * \sa SDL_WindowSupportsGPUSwapchainComposition
3751 */
3752extern SDL_DECLSPEC bool SDLCALL SDL_ClaimWindowForGPUDevice(
3753 SDL_GPUDevice *device,
3754 SDL_Window *window);
3755
3756/**
3757 * Unclaims a window, destroying its swapchain structure.
3758 *
3759 * \param device a GPU context.
3760 * \param window an SDL_Window that has been claimed.
3761 *
3762 * \since This function is available since SDL 3.2.0.
3763 *
3764 * \sa SDL_ClaimWindowForGPUDevice
3765 */
3766extern SDL_DECLSPEC void SDLCALL SDL_ReleaseWindowFromGPUDevice(
3767 SDL_GPUDevice *device,
3768 SDL_Window *window);
3769
3770/**
3771 * Changes the swapchain parameters for the given claimed window.
3772 *
3773 * This function will fail if the requested present mode or swapchain
3774 * composition are unsupported by the device. Check if the parameters are
3775 * supported via SDL_WindowSupportsGPUPresentMode /
3776 * SDL_WindowSupportsGPUSwapchainComposition prior to calling this function.
3777 *
3778 * SDL_GPU_PRESENTMODE_VSYNC with SDL_GPU_SWAPCHAINCOMPOSITION_SDR are always
3779 * supported.
3780 *
3781 * \param device a GPU context.
3782 * \param window an SDL_Window that has been claimed.
3783 * \param swapchain_composition the desired composition of the swapchain.
3784 * \param present_mode the desired present mode for the swapchain.
3785 * \returns true if successful, false on error; call SDL_GetError() for more
3786 * information.
3787 *
3788 * \since This function is available since SDL 3.2.0.
3789 *
3790 * \sa SDL_WindowSupportsGPUPresentMode
3791 * \sa SDL_WindowSupportsGPUSwapchainComposition
3792 */
3793extern SDL_DECLSPEC bool SDLCALL SDL_SetGPUSwapchainParameters(
3794 SDL_GPUDevice *device,
3795 SDL_Window *window,
3796 SDL_GPUSwapchainComposition swapchain_composition,
3797 SDL_GPUPresentMode present_mode);
3798
3799/**
3800 * Configures the maximum allowed number of frames in flight.
3801 *
3802 * The default value when the device is created is 2. This means that after
3803 * you have submitted 2 frames for presentation, if the GPU has not finished
3804 * working on the first frame, SDL_AcquireGPUSwapchainTexture() will fill the
3805 * swapchain texture pointer with NULL, and
3806 * SDL_WaitAndAcquireGPUSwapchainTexture() will block.
3807 *
3808 * Higher values increase throughput at the expense of visual latency. Lower
3809 * values decrease visual latency at the expense of throughput.
3810 *
3811 * Note that calling this function will stall and flush the command queue to
3812 * prevent synchronization issues.
3813 *
3814 * The minimum value of allowed frames in flight is 1, and the maximum is 3.
3815 *
3816 * \param device a GPU context.
3817 * \param allowed_frames_in_flight the maximum number of frames that can be
3818 * pending on the GPU.
3819 * \returns true if successful, false on error; call SDL_GetError() for more
3820 * information.
3821 *
3822 * \since This function is available since SDL 3.2.0.
3823 */
3824extern SDL_DECLSPEC bool SDLCALL SDL_SetGPUAllowedFramesInFlight(
3825 SDL_GPUDevice *device,
3826 Uint32 allowed_frames_in_flight);
3827
3828/**
3829 * Obtains the texture format of the swapchain for the given window.
3830 *
3831 * Note that this format can change if the swapchain parameters change.
3832 *
3833 * \param device a GPU context.
3834 * \param window an SDL_Window that has been claimed.
3835 * \returns the texture format of the swapchain.
3836 *
3837 * \since This function is available since SDL 3.2.0.
3838 */
3839extern SDL_DECLSPEC SDL_GPUTextureFormat SDLCALL SDL_GetGPUSwapchainTextureFormat(
3840 SDL_GPUDevice *device,
3841 SDL_Window *window);
3842
3843/**
3844 * Acquire a texture to use in presentation.
3845 *
3846 * When a swapchain texture is acquired on a command buffer, it will
3847 * automatically be submitted for presentation when the command buffer is
3848 * submitted. The swapchain texture should only be referenced by the command
3849 * buffer used to acquire it.
3850 *
3851 * This function will fill the swapchain texture handle with NULL if too many
3852 * frames are in flight. This is not an error.
3853 *
3854 * If you use this function, it is possible to create a situation where many
3855 * command buffers are allocated while the rendering context waits for the GPU
3856 * to catch up, which will cause memory usage to grow. You should use
3857 * SDL_WaitAndAcquireGPUSwapchainTexture() unless you know what you are doing
3858 * with timing.
3859 *
3860 * The swapchain texture is managed by the implementation and must not be
3861 * freed by the user. You MUST NOT call this function from any thread other
3862 * than the one that created the window.
3863 *
3864 * \param command_buffer a command buffer.
3865 * \param window a window that has been claimed.
3866 * \param swapchain_texture a pointer filled in with a swapchain texture
3867 * handle.
3868 * \param swapchain_texture_width a pointer filled in with the swapchain
3869 * texture width, may be NULL.
3870 * \param swapchain_texture_height a pointer filled in with the swapchain
3871 * texture height, may be NULL.
3872 * \returns true on success, false on error; call SDL_GetError() for more
3873 * information.
3874 *
3875 * \threadsafety This function should only be called from the thread that
3876 * created the window.
3877 *
3878 * \since This function is available since SDL 3.2.0.
3879 *
3880 * \sa SDL_ClaimWindowForGPUDevice
3881 * \sa SDL_SubmitGPUCommandBuffer
3882 * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
3883 * \sa SDL_CancelGPUCommandBuffer
3884 * \sa SDL_GetWindowSizeInPixels
3885 * \sa SDL_WaitForGPUSwapchain
3886 * \sa SDL_WaitAndAcquireGPUSwapchainTexture
3887 * \sa SDL_SetGPUAllowedFramesInFlight
3888 */
3889extern SDL_DECLSPEC bool SDLCALL SDL_AcquireGPUSwapchainTexture(
3890 SDL_GPUCommandBuffer *command_buffer,
3891 SDL_Window *window,
3892 SDL_GPUTexture **swapchain_texture,
3893 Uint32 *swapchain_texture_width,
3894 Uint32 *swapchain_texture_height);
3895
3896/**
3897 * Blocks the thread until a swapchain texture is available to be acquired.
3898 *
3899 * \param device a GPU context.
3900 * \param window a window that has been claimed.
3901 * \returns true on success, false on failure; call SDL_GetError() for more
3902 * information.
3903 *
3904 * \threadsafety This function should only be called from the thread that
3905 * created the window.
3906 *
3907 * \since This function is available since SDL 3.2.0.
3908 *
3909 * \sa SDL_AcquireGPUSwapchainTexture
3910 * \sa SDL_WaitAndAcquireGPUSwapchainTexture
3911 * \sa SDL_SetGPUAllowedFramesInFlight
3912 */
3913extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUSwapchain(
3914 SDL_GPUDevice *device,
3915 SDL_Window *window);
3916
3917/**
3918 * Blocks the thread until a swapchain texture is available to be acquired,
3919 * and then acquires it.
3920 *
3921 * When a swapchain texture is acquired on a command buffer, it will
3922 * automatically be submitted for presentation when the command buffer is
3923 * submitted. The swapchain texture should only be referenced by the command
3924 * buffer used to acquire it. It is an error to call
3925 * SDL_CancelGPUCommandBuffer() after a swapchain texture is acquired.
3926 *
3927 * This function can fill the swapchain texture handle with NULL in certain
3928 * cases, for example if the window is minimized. This is not an error. You
3929 * should always make sure to check whether the pointer is NULL before
3930 * actually using it.
3931 *
3932 * The swapchain texture is managed by the implementation and must not be
3933 * freed by the user. You MUST NOT call this function from any thread other
3934 * than the one that created the window.
3935 *
3936 * The swapchain texture is write-only and cannot be used as a sampler or for
3937 * another reading operation.
3938 *
3939 * \param command_buffer a command buffer.
3940 * \param window a window that has been claimed.
3941 * \param swapchain_texture a pointer filled in with a swapchain texture
3942 * handle.
3943 * \param swapchain_texture_width a pointer filled in with the swapchain
3944 * texture width, may be NULL.
3945 * \param swapchain_texture_height a pointer filled in with the swapchain
3946 * texture height, may be NULL.
3947 * \returns true on success, false on error; call SDL_GetError() for more
3948 * information.
3949 *
3950 * \threadsafety This function should only be called from the thread that
3951 * created the window.
3952 *
3953 * \since This function is available since SDL 3.2.0.
3954 *
3955 * \sa SDL_SubmitGPUCommandBuffer
3956 * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
3957 * \sa SDL_AcquireGPUSwapchainTexture
3958 */
3959extern SDL_DECLSPEC bool SDLCALL SDL_WaitAndAcquireGPUSwapchainTexture(
3960 SDL_GPUCommandBuffer *command_buffer,
3961 SDL_Window *window,
3962 SDL_GPUTexture **swapchain_texture,
3963 Uint32 *swapchain_texture_width,
3964 Uint32 *swapchain_texture_height);
3965
3966/**
3967 * Submits a command buffer so its commands can be processed on the GPU.
3968 *
3969 * It is invalid to use the command buffer after this is called.
3970 *
3971 * This must be called from the thread the command buffer was acquired on.
3972 *
3973 * All commands in the submission are guaranteed to begin executing before any
3974 * command in a subsequent submission begins executing.
3975 *
3976 * \param command_buffer a command buffer.
3977 * \returns true on success, false on failure; call SDL_GetError() for more
3978 * information.
3979 *
3980 * \since This function is available since SDL 3.2.0.
3981 *
3982 * \sa SDL_AcquireGPUCommandBuffer
3983 * \sa SDL_WaitAndAcquireGPUSwapchainTexture
3984 * \sa SDL_AcquireGPUSwapchainTexture
3985 * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
3986 */
3987extern SDL_DECLSPEC bool SDLCALL SDL_SubmitGPUCommandBuffer(
3988 SDL_GPUCommandBuffer *command_buffer);
3989
3990/**
3991 * Submits a command buffer so its commands can be processed on the GPU, and
3992 * acquires a fence associated with the command buffer.
3993 *
3994 * You must release this fence when it is no longer needed or it will cause a
3995 * leak. It is invalid to use the command buffer after this is called.
3996 *
3997 * This must be called from the thread the command buffer was acquired on.
3998 *
3999 * All commands in the submission are guaranteed to begin executing before any
4000 * command in a subsequent submission begins executing.
4001 *
4002 * \param command_buffer a command buffer.
4003 * \returns a fence associated with the command buffer, or NULL on failure;
4004 * call SDL_GetError() for more information.
4005 *
4006 * \since This function is available since SDL 3.2.0.
4007 *
4008 * \sa SDL_AcquireGPUCommandBuffer
4009 * \sa SDL_WaitAndAcquireGPUSwapchainTexture
4010 * \sa SDL_AcquireGPUSwapchainTexture
4011 * \sa SDL_SubmitGPUCommandBuffer
4012 * \sa SDL_ReleaseGPUFence
4013 */
4014extern SDL_DECLSPEC SDL_GPUFence * SDLCALL SDL_SubmitGPUCommandBufferAndAcquireFence(
4015 SDL_GPUCommandBuffer *command_buffer);
4016
4017/**
4018 * Cancels a command buffer.
4019 *
4020 * None of the enqueued commands are executed.
4021 *
4022 * It is an error to call this function after a swapchain texture has been
4023 * acquired.
4024 *
4025 * This must be called from the thread the command buffer was acquired on.
4026 *
4027 * You must not reference the command buffer after calling this function.
4028 *
4029 * \param command_buffer a command buffer.
4030 * \returns true on success, false on error; call SDL_GetError() for more
4031 * information.
4032 *
4033 * \since This function is available since SDL 3.2.0.
4034 *
4035 * \sa SDL_WaitAndAcquireGPUSwapchainTexture
4036 * \sa SDL_AcquireGPUCommandBuffer
4037 * \sa SDL_AcquireGPUSwapchainTexture
4038 */
4039extern SDL_DECLSPEC bool SDLCALL SDL_CancelGPUCommandBuffer(
4040 SDL_GPUCommandBuffer *command_buffer);
4041
4042/**
4043 * Blocks the thread until the GPU is completely idle.
4044 *
4045 * \param device a GPU context.
4046 * \returns true on success, false on failure; call SDL_GetError() for more
4047 * information.
4048 *
4049 * \since This function is available since SDL 3.2.0.
4050 *
4051 * \sa SDL_WaitForGPUFences
4052 */
4053extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUIdle(
4054 SDL_GPUDevice *device);
4055
4056/**
4057 * Blocks the thread until the given fences are signaled.
4058 *
4059 * \param device a GPU context.
4060 * \param wait_all if 0, wait for any fence to be signaled, if 1, wait for all
4061 * fences to be signaled.
4062 * \param fences an array of fences to wait on.
4063 * \param num_fences the number of fences in the fences array.
4064 * \returns true on success, false on failure; call SDL_GetError() for more
4065 * information.
4066 *
4067 * \since This function is available since SDL 3.2.0.
4068 *
4069 * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
4070 * \sa SDL_WaitForGPUIdle
4071 */
4072extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUFences(
4073 SDL_GPUDevice *device,
4074 bool wait_all,
4075 SDL_GPUFence *const *fences,
4076 Uint32 num_fences);
4077
4078/**
4079 * Checks the status of a fence.
4080 *
4081 * \param device a GPU context.
4082 * \param fence a fence.
4083 * \returns true if the fence is signaled, false if it is not.
4084 *
4085 * \since This function is available since SDL 3.2.0.
4086 *
4087 * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
4088 */
4089extern SDL_DECLSPEC bool SDLCALL SDL_QueryGPUFence(
4090 SDL_GPUDevice *device,
4091 SDL_GPUFence *fence);
4092
4093/**
4094 * Releases a fence obtained from SDL_SubmitGPUCommandBufferAndAcquireFence.
4095 *
4096 * You must not reference the fence after calling this function.
4097 *
4098 * \param device a GPU context.
4099 * \param fence a fence.
4100 *
4101 * \since This function is available since SDL 3.2.0.
4102 *
4103 * \sa SDL_SubmitGPUCommandBufferAndAcquireFence
4104 */
4105extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUFence(
4106 SDL_GPUDevice *device,
4107 SDL_GPUFence *fence);
4108
4109/* Format Info */
4110
4111/**
4112 * Obtains the texel block size for a texture format.
4113 *
4114 * \param format the texture format you want to know the texel size of.
4115 * \returns the texel block size of the texture format.
4116 *
4117 * \since This function is available since SDL 3.2.0.
4118 *
4119 * \sa SDL_UploadToGPUTexture
4120 */
4121extern SDL_DECLSPEC Uint32 SDLCALL SDL_GPUTextureFormatTexelBlockSize(
4122 SDL_GPUTextureFormat format);
4123
4124/**
4125 * Determines whether a texture format is supported for a given type and
4126 * usage.
4127 *
4128 * \param device a GPU context.
4129 * \param format the texture format to check.
4130 * \param type the type of texture (2D, 3D, Cube).
4131 * \param usage a bitmask of all usage scenarios to check.
4132 * \returns whether the texture format is supported for this type and usage.
4133 *
4134 * \since This function is available since SDL 3.2.0.
4135 */
4136extern SDL_DECLSPEC bool SDLCALL SDL_GPUTextureSupportsFormat(
4137 SDL_GPUDevice *device,
4138 SDL_GPUTextureFormat format,
4139 SDL_GPUTextureType type,
4140 SDL_GPUTextureUsageFlags usage);
4141
4142/**
4143 * Determines if a sample count for a texture format is supported.
4144 *
4145 * \param device a GPU context.
4146 * \param format the texture format to check.
4147 * \param sample_count the sample count to check.
4148 * \returns whether the sample count is supported for this texture format.
4149 *
4150 * \since This function is available since SDL 3.2.0.
4151 */
4152extern SDL_DECLSPEC bool SDLCALL SDL_GPUTextureSupportsSampleCount(
4153 SDL_GPUDevice *device,
4154 SDL_GPUTextureFormat format,
4155 SDL_GPUSampleCount sample_count);
4156
4157/**
4158 * Calculate the size in bytes of a texture format with dimensions.
4159 *
4160 * \param format a texture format.
4161 * \param width width in pixels.
4162 * \param height height in pixels.
4163 * \param depth_or_layer_count depth for 3D textures or layer count otherwise.
4164 * \returns the size of a texture with this format and dimensions.
4165 *
4166 * \since This function is available since SDL 3.2.0.
4167 */
4168extern SDL_DECLSPEC Uint32 SDLCALL SDL_CalculateGPUTextureFormatSize(
4169 SDL_GPUTextureFormat format,
4170 Uint32 width,
4171 Uint32 height,
4172 Uint32 depth_or_layer_count);
4173
4174#ifdef SDL_PLATFORM_GDK
4175
4176/**
4177 * Call this to suspend GPU operation on Xbox when you receive the
4178 * SDL_EVENT_DID_ENTER_BACKGROUND event.
4179 *
4180 * Do NOT call any SDL_GPU functions after calling this function! This must
4181 * also be called before calling SDL_GDKSuspendComplete.
4182 *
4183 * \param device a GPU context.
4184 *
4185 * \since This function is available since SDL 3.2.0.
4186 *
4187 * \sa SDL_AddEventWatch
4188 */
4189extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendGPU(SDL_GPUDevice *device);
4190
4191/**
4192 * Call this to resume GPU operation on Xbox when you receive the
4193 * SDL_EVENT_WILL_ENTER_FOREGROUND event.
4194 *
4195 * When resuming, this function MUST be called before calling any other
4196 * SDL_GPU functions.
4197 *
4198 * \param device a GPU context.
4199 *
4200 * \since This function is available since SDL 3.2.0.
4201 *
4202 * \sa SDL_AddEventWatch
4203 */
4204extern SDL_DECLSPEC void SDLCALL SDL_GDKResumeGPU(SDL_GPUDevice *device);
4205
4206#endif /* SDL_PLATFORM_GDK */
4207
4208#ifdef __cplusplus
4209}
4210#endif /* __cplusplus */
4211#include <SDL3/SDL_close_code.h>
4212
4213#endif /* SDL_gpu_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_guid.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_guid.h
new file mode 100644
index 0000000..312c42c
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_guid.h
@@ -0,0 +1,106 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: GUID */
23
24/**
25 * # CategoryGUID
26 *
27 * A GUID is a 128-bit value that represents something that is uniquely
28 * identifiable by this value: "globally unique."
29 *
30 * SDL provides functions to convert a GUID to/from a string.
31 */
32
33#ifndef SDL_guid_h_
34#define SDL_guid_h_
35
36#include <SDL3/SDL_stdinc.h>
37
38#include <SDL3/SDL_begin_code.h>
39/* Set up for C function definitions, even when using C++ */
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44/**
45 * An SDL_GUID is a 128-bit identifier for an input device that identifies
46 * that device across runs of SDL programs on the same platform.
47 *
48 * If the device is detached and then re-attached to a different port, or if
49 * the base system is rebooted, the device should still report the same GUID.
50 *
51 * GUIDs are as precise as possible but are not guaranteed to distinguish
52 * physically distinct but equivalent devices. For example, two game
53 * controllers from the same vendor with the same product ID and revision may
54 * have the same GUID.
55 *
56 * GUIDs may be platform-dependent (i.e., the same device may report different
57 * GUIDs on different operating systems).
58 *
59 * \since This struct is available since SDL 3.2.0.
60 */
61typedef struct SDL_GUID {
62 Uint8 data[16];
63} SDL_GUID;
64
65/* Function prototypes */
66
67/**
68 * Get an ASCII string representation for a given SDL_GUID.
69 *
70 * \param guid the SDL_GUID you wish to convert to string.
71 * \param pszGUID buffer in which to write the ASCII string.
72 * \param cbGUID the size of pszGUID, should be at least 33 bytes.
73 *
74 * \threadsafety It is safe to call this function from any thread.
75 *
76 * \since This function is available since SDL 3.2.0.
77 *
78 * \sa SDL_StringToGUID
79 */
80extern SDL_DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID);
81
82/**
83 * Convert a GUID string into a SDL_GUID structure.
84 *
85 * Performs no error checking. If this function is given a string containing
86 * an invalid GUID, the function will silently succeed, but the GUID generated
87 * will not be useful.
88 *
89 * \param pchGUID string containing an ASCII representation of a GUID.
90 * \returns a SDL_GUID structure.
91 *
92 * \threadsafety It is safe to call this function from any thread.
93 *
94 * \since This function is available since SDL 3.2.0.
95 *
96 * \sa SDL_GUIDToString
97 */
98extern SDL_DECLSPEC SDL_GUID SDLCALL SDL_StringToGUID(const char *pchGUID);
99
100/* Ends C function definitions when using C++ */
101#ifdef __cplusplus
102}
103#endif
104#include <SDL3/SDL_close_code.h>
105
106#endif /* SDL_guid_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_haptic.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_haptic.h
new file mode 100644
index 0000000..a45335b
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_haptic.h
@@ -0,0 +1,1441 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryHaptic
24 *
25 * The SDL haptic subsystem manages haptic (force feedback) devices.
26 *
27 * The basic usage is as follows:
28 *
29 * - Initialize the subsystem (SDL_INIT_HAPTIC).
30 * - Open a haptic device.
31 * - SDL_OpenHaptic() to open from index.
32 * - SDL_OpenHapticFromJoystick() to open from an existing joystick.
33 * - Create an effect (SDL_HapticEffect).
34 * - Upload the effect with SDL_CreateHapticEffect().
35 * - Run the effect with SDL_RunHapticEffect().
36 * - (optional) Free the effect with SDL_DestroyHapticEffect().
37 * - Close the haptic device with SDL_CloseHaptic().
38 *
39 * Simple rumble example:
40 *
41 * ```c
42 * SDL_Haptic *haptic = NULL;
43 *
44 * // Open the device
45 * SDL_HapticID *haptics = SDL_GetHaptics(NULL);
46 * if (haptics) {
47 * haptic = SDL_OpenHaptic(haptics[0]);
48 * SDL_free(haptics);
49 * }
50 * if (haptic == NULL)
51 * return;
52 *
53 * // Initialize simple rumble
54 * if (!SDL_InitHapticRumble(haptic))
55 * return;
56 *
57 * // Play effect at 50% strength for 2 seconds
58 * if (!SDL_PlayHapticRumble(haptic, 0.5, 2000))
59 * return;
60 * SDL_Delay(2000);
61 *
62 * // Clean up
63 * SDL_CloseHaptic(haptic);
64 * ```
65 *
66 * Complete example:
67 *
68 * ```c
69 * bool test_haptic(SDL_Joystick *joystick)
70 * {
71 * SDL_Haptic *haptic;
72 * SDL_HapticEffect effect;
73 * int effect_id;
74 *
75 * // Open the device
76 * haptic = SDL_OpenHapticFromJoystick(joystick);
77 * if (haptic == NULL) return false; // Most likely joystick isn't haptic
78 *
79 * // See if it can do sine waves
80 * if ((SDL_GetHapticFeatures(haptic) & SDL_HAPTIC_SINE)==0) {
81 * SDL_CloseHaptic(haptic); // No sine effect
82 * return false;
83 * }
84 *
85 * // Create the effect
86 * SDL_memset(&effect, 0, sizeof(SDL_HapticEffect)); // 0 is safe default
87 * effect.type = SDL_HAPTIC_SINE;
88 * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
89 * effect.periodic.direction.dir[0] = 18000; // Force comes from south
90 * effect.periodic.period = 1000; // 1000 ms
91 * effect.periodic.magnitude = 20000; // 20000/32767 strength
92 * effect.periodic.length = 5000; // 5 seconds long
93 * effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
94 * effect.periodic.fade_length = 1000; // Takes 1 second to fade away
95 *
96 * // Upload the effect
97 * effect_id = SDL_CreateHapticEffect(haptic, &effect);
98 *
99 * // Test the effect
100 * SDL_RunHapticEffect(haptic, effect_id, 1);
101 * SDL_Delay(5000); // Wait for the effect to finish
102 *
103 * // We destroy the effect, although closing the device also does this
104 * SDL_DestroyHapticEffect(haptic, effect_id);
105 *
106 * // Close the device
107 * SDL_CloseHaptic(haptic);
108 *
109 * return true; // Success
110 * }
111 * ```
112 *
113 * Note that the SDL haptic subsystem is not thread-safe.
114 */
115
116
117#ifndef SDL_haptic_h_
118#define SDL_haptic_h_
119
120#include <SDL3/SDL_stdinc.h>
121#include <SDL3/SDL_error.h>
122#include <SDL3/SDL_joystick.h>
123
124#include <SDL3/SDL_begin_code.h>
125/* Set up for C function definitions, even when using C++ */
126#ifdef __cplusplus
127extern "C" {
128#endif /* __cplusplus */
129
130/* FIXME:
131 *
132 * At the moment the magnitude variables are mixed between signed/unsigned, and
133 * it is also not made clear that ALL of those variables expect a max of 0x7FFF.
134 *
135 * Some platforms may have higher precision than that (Linux FF, Windows XInput)
136 * so we should fix the inconsistency in favor of higher possible precision,
137 * adjusting for platforms that use different scales.
138 * -flibit
139 */
140
141/**
142 * The haptic structure used to identify an SDL haptic.
143 *
144 * \since This struct is available since SDL 3.2.0.
145 *
146 * \sa SDL_OpenHaptic
147 * \sa SDL_OpenHapticFromJoystick
148 * \sa SDL_CloseHaptic
149 */
150typedef struct SDL_Haptic SDL_Haptic;
151
152
153/**
154 * \name Haptic features
155 *
156 * Different haptic features a device can have.
157 */
158/* @{ */
159
160/**
161 * \name Haptic effects
162 */
163/* @{ */
164
165/**
166 * Constant effect supported.
167 *
168 * Constant haptic effect.
169 *
170 * \since This macro is available since SDL 3.2.0.
171 *
172 * \sa SDL_HapticCondition
173 */
174#define SDL_HAPTIC_CONSTANT (1u<<0)
175
176/**
177 * Sine wave effect supported.
178 *
179 * Periodic haptic effect that simulates sine waves.
180 *
181 * \since This macro is available since SDL 3.2.0.
182 *
183 * \sa SDL_HapticPeriodic
184 */
185#define SDL_HAPTIC_SINE (1u<<1)
186
187/**
188 * Square wave effect supported.
189 *
190 * Periodic haptic effect that simulates square waves.
191 *
192 * \since This macro is available since SDL 3.2.0.
193 *
194 * \sa SDL_HapticPeriodic
195 */
196#define SDL_HAPTIC_SQUARE (1u<<2)
197
198/**
199 * Triangle wave effect supported.
200 *
201 * Periodic haptic effect that simulates triangular waves.
202 *
203 * \since This macro is available since SDL 3.2.0.
204 *
205 * \sa SDL_HapticPeriodic
206 */
207#define SDL_HAPTIC_TRIANGLE (1u<<3)
208
209/**
210 * Sawtoothup wave effect supported.
211 *
212 * Periodic haptic effect that simulates saw tooth up waves.
213 *
214 * \since This macro is available since SDL 3.2.0.
215 *
216 * \sa SDL_HapticPeriodic
217 */
218#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
219
220/**
221 * Sawtoothdown wave effect supported.
222 *
223 * Periodic haptic effect that simulates saw tooth down waves.
224 *
225 * \since This macro is available since SDL 3.2.0.
226 *
227 * \sa SDL_HapticPeriodic
228 */
229#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
230
231/**
232 * Ramp effect supported.
233 *
234 * Ramp haptic effect.
235 *
236 * \since This macro is available since SDL 3.2.0.
237 *
238 * \sa SDL_HapticRamp
239 */
240#define SDL_HAPTIC_RAMP (1u<<6)
241
242/**
243 * Spring effect supported - uses axes position.
244 *
245 * Condition haptic effect that simulates a spring. Effect is based on the
246 * axes position.
247 *
248 * \since This macro is available since SDL 3.2.0.
249 *
250 * \sa SDL_HapticCondition
251 */
252#define SDL_HAPTIC_SPRING (1u<<7)
253
254/**
255 * Damper effect supported - uses axes velocity.
256 *
257 * Condition haptic effect that simulates dampening. Effect is based on the
258 * axes velocity.
259 *
260 * \since This macro is available since SDL 3.2.0.
261 *
262 * \sa SDL_HapticCondition
263 */
264#define SDL_HAPTIC_DAMPER (1u<<8)
265
266/**
267 * Inertia effect supported - uses axes acceleration.
268 *
269 * Condition haptic effect that simulates inertia. Effect is based on the axes
270 * acceleration.
271 *
272 * \since This macro is available since SDL 3.2.0.
273 *
274 * \sa SDL_HapticCondition
275 */
276#define SDL_HAPTIC_INERTIA (1u<<9)
277
278/**
279 * Friction effect supported - uses axes movement.
280 *
281 * Condition haptic effect that simulates friction. Effect is based on the
282 * axes movement.
283 *
284 * \since This macro is available since SDL 3.2.0.
285 *
286 * \sa SDL_HapticCondition
287 */
288#define SDL_HAPTIC_FRICTION (1u<<10)
289
290/**
291 * Left/Right effect supported.
292 *
293 * Haptic effect for direct control over high/low frequency motors.
294 *
295 * \since This macro is available since SDL 3.2.0.
296 *
297 * \sa SDL_HapticLeftRight
298 */
299#define SDL_HAPTIC_LEFTRIGHT (1u<<11)
300
301/**
302 * Reserved for future use.
303 *
304 * \since This macro is available since SDL 3.2.0.
305 */
306#define SDL_HAPTIC_RESERVED1 (1u<<12)
307
308/**
309 * Reserved for future use.
310 *
311 * \since This macro is available since SDL 3.2.0.
312 */
313#define SDL_HAPTIC_RESERVED2 (1u<<13)
314
315/**
316 * Reserved for future use.
317 *
318 * \since This macro is available since SDL 3.2.0.
319 */
320#define SDL_HAPTIC_RESERVED3 (1u<<14)
321
322/**
323 * Custom effect is supported.
324 *
325 * User defined custom haptic effect.
326 *
327 * \since This macro is available since SDL 3.2.0.
328 */
329#define SDL_HAPTIC_CUSTOM (1u<<15)
330
331/* @} *//* Haptic effects */
332
333/* These last few are features the device has, not effects */
334
335/**
336 * Device can set global gain.
337 *
338 * Device supports setting the global gain.
339 *
340 * \since This macro is available since SDL 3.2.0.
341 *
342 * \sa SDL_SetHapticGain
343 */
344#define SDL_HAPTIC_GAIN (1u<<16)
345
346/**
347 * Device can set autocenter.
348 *
349 * Device supports setting autocenter.
350 *
351 * \since This macro is available since SDL 3.2.0.
352 *
353 * \sa SDL_SetHapticAutocenter
354 */
355#define SDL_HAPTIC_AUTOCENTER (1u<<17)
356
357/**
358 * Device can be queried for effect status.
359 *
360 * Device supports querying effect status.
361 *
362 * \since This macro is available since SDL 3.2.0.
363 *
364 * \sa SDL_GetHapticEffectStatus
365 */
366#define SDL_HAPTIC_STATUS (1u<<18)
367
368/**
369 * Device can be paused.
370 *
371 * Devices supports being paused.
372 *
373 * \since This macro is available since SDL 3.2.0.
374 *
375 * \sa SDL_PauseHaptic
376 * \sa SDL_ResumeHaptic
377 */
378#define SDL_HAPTIC_PAUSE (1u<<19)
379
380
381/**
382 * \name Direction encodings
383 */
384/* @{ */
385
386/**
387 * Uses polar coordinates for the direction.
388 *
389 * \since This macro is available since SDL 3.2.0.
390 *
391 * \sa SDL_HapticDirection
392 */
393#define SDL_HAPTIC_POLAR 0
394
395/**
396 * Uses cartesian coordinates for the direction.
397 *
398 * \since This macro is available since SDL 3.2.0.
399 *
400 * \sa SDL_HapticDirection
401 */
402#define SDL_HAPTIC_CARTESIAN 1
403
404/**
405 * Uses spherical coordinates for the direction.
406 *
407 * \since This macro is available since SDL 3.2.0.
408 *
409 * \sa SDL_HapticDirection
410 */
411#define SDL_HAPTIC_SPHERICAL 2
412
413/**
414 * Use this value to play an effect on the steering wheel axis.
415 *
416 * This provides better compatibility across platforms and devices as SDL will
417 * guess the correct axis.
418 *
419 * \since This macro is available since SDL 3.2.0.
420 *
421 * \sa SDL_HapticDirection
422 */
423#define SDL_HAPTIC_STEERING_AXIS 3
424
425/* @} *//* Direction encodings */
426
427/* @} *//* Haptic features */
428
429/*
430 * Misc defines.
431 */
432
433/**
434 * Used to play a device an infinite number of times.
435 *
436 * \since This macro is available since SDL 3.2.0.
437 *
438 * \sa SDL_RunHapticEffect
439 */
440#define SDL_HAPTIC_INFINITY 4294967295U
441
442
443/**
444 * Structure that represents a haptic direction.
445 *
446 * This is the direction where the force comes from, instead of the direction
447 * in which the force is exerted.
448 *
449 * Directions can be specified by:
450 *
451 * - SDL_HAPTIC_POLAR : Specified by polar coordinates.
452 * - SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
453 * - SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.
454 *
455 * Cardinal directions of the haptic device are relative to the positioning of
456 * the device. North is considered to be away from the user.
457 *
458 * The following diagram represents the cardinal directions:
459 *
460 * ```
461 * .--.
462 * |__| .-------.
463 * |=.| |.-----.|
464 * |--| || ||
465 * | | |'-----'|
466 * |__|~')_____('
467 * [ COMPUTER ]
468 *
469 *
470 * North (0,-1)
471 * ^
472 * |
473 * |
474 * (-1,0) West <----[ HAPTIC ]----> East (1,0)
475 * |
476 * |
477 * v
478 * South (0,1)
479 *
480 *
481 * [ USER ]
482 * \|||/
483 * (o o)
484 * ---ooO-(_)-Ooo---
485 * ```
486 *
487 * If type is SDL_HAPTIC_POLAR, direction is encoded by hundredths of a degree
488 * starting north and turning clockwise. SDL_HAPTIC_POLAR only uses the first
489 * `dir` parameter. The cardinal directions would be:
490 *
491 * - North: 0 (0 degrees)
492 * - East: 9000 (90 degrees)
493 * - South: 18000 (180 degrees)
494 * - West: 27000 (270 degrees)
495 *
496 * If type is SDL_HAPTIC_CARTESIAN, direction is encoded by three positions (X
497 * axis, Y axis and Z axis (with 3 axes)). SDL_HAPTIC_CARTESIAN uses the first
498 * three `dir` parameters. The cardinal directions would be:
499 *
500 * - North: 0,-1, 0
501 * - East: 1, 0, 0
502 * - South: 0, 1, 0
503 * - West: -1, 0, 0
504 *
505 * The Z axis represents the height of the effect if supported, otherwise it's
506 * unused. In cartesian encoding (1, 2) would be the same as (2, 4), you can
507 * use any multiple you want, only the direction matters.
508 *
509 * If type is SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations. The
510 * first two `dir` parameters are used. The `dir` parameters are as follows
511 * (all values are in hundredths of degrees):
512 *
513 * - Degrees from (1, 0) rotated towards (0, 1).
514 * - Degrees towards (0, 0, 1) (device needs at least 3 axes).
515 *
516 * Example of force coming from the south with all encodings (force coming
517 * from the south means the user will have to pull the stick to counteract):
518 *
519 * ```c
520 * SDL_HapticDirection direction;
521 *
522 * // Cartesian directions
523 * direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.
524 * direction.dir[0] = 0; // X position
525 * direction.dir[1] = 1; // Y position
526 * // Assuming the device has 2 axes, we don't need to specify third parameter.
527 *
528 * // Polar directions
529 * direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.
530 * direction.dir[0] = 18000; // Polar only uses first parameter
531 *
532 * // Spherical coordinates
533 * direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding
534 * direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.
535 * ```
536 *
537 * \since This struct is available since SDL 3.2.0.
538 *
539 * \sa SDL_HAPTIC_POLAR
540 * \sa SDL_HAPTIC_CARTESIAN
541 * \sa SDL_HAPTIC_SPHERICAL
542 * \sa SDL_HAPTIC_STEERING_AXIS
543 * \sa SDL_HapticEffect
544 * \sa SDL_GetNumHapticAxes
545 */
546typedef struct SDL_HapticDirection
547{
548 Uint8 type; /**< The type of encoding. */
549 Sint32 dir[3]; /**< The encoded direction. */
550} SDL_HapticDirection;
551
552
553/**
554 * A structure containing a template for a Constant effect.
555 *
556 * This struct is exclusively for the SDL_HAPTIC_CONSTANT effect.
557 *
558 * A constant effect applies a constant force in the specified direction to
559 * the joystick.
560 *
561 * \since This struct is available since SDL 3.2.0.
562 *
563 * \sa SDL_HAPTIC_CONSTANT
564 * \sa SDL_HapticEffect
565 */
566typedef struct SDL_HapticConstant
567{
568 /* Header */
569 Uint16 type; /**< SDL_HAPTIC_CONSTANT */
570 SDL_HapticDirection direction; /**< Direction of the effect. */
571
572 /* Replay */
573 Uint32 length; /**< Duration of the effect. */
574 Uint16 delay; /**< Delay before starting the effect. */
575
576 /* Trigger */
577 Uint16 button; /**< Button that triggers the effect. */
578 Uint16 interval; /**< How soon it can be triggered again after button. */
579
580 /* Constant */
581 Sint16 level; /**< Strength of the constant effect. */
582
583 /* Envelope */
584 Uint16 attack_length; /**< Duration of the attack. */
585 Uint16 attack_level; /**< Level at the start of the attack. */
586 Uint16 fade_length; /**< Duration of the fade. */
587 Uint16 fade_level; /**< Level at the end of the fade. */
588} SDL_HapticConstant;
589
590/**
591 * A structure containing a template for a Periodic effect.
592 *
593 * The struct handles the following effects:
594 *
595 * - SDL_HAPTIC_SINE
596 * - SDL_HAPTIC_SQUARE
597 * - SDL_HAPTIC_TRIANGLE
598 * - SDL_HAPTIC_SAWTOOTHUP
599 * - SDL_HAPTIC_SAWTOOTHDOWN
600 *
601 * A periodic effect consists in a wave-shaped effect that repeats itself over
602 * time. The type determines the shape of the wave and the parameters
603 * determine the dimensions of the wave.
604 *
605 * Phase is given by hundredth of a degree meaning that giving the phase a
606 * value of 9000 will displace it 25% of its period. Here are sample values:
607 *
608 * - 0: No phase displacement.
609 * - 9000: Displaced 25% of its period.
610 * - 18000: Displaced 50% of its period.
611 * - 27000: Displaced 75% of its period.
612 * - 36000: Displaced 100% of its period, same as 0, but 0 is preferred.
613 *
614 * Examples:
615 *
616 * ```
617 * SDL_HAPTIC_SINE
618 * __ __ __ __
619 * / \ / \ / \ /
620 * / \__/ \__/ \__/
621 *
622 * SDL_HAPTIC_SQUARE
623 * __ __ __ __ __
624 * | | | | | | | | | |
625 * | |__| |__| |__| |__| |
626 *
627 * SDL_HAPTIC_TRIANGLE
628 * /\ /\ /\ /\ /\
629 * / \ / \ / \ / \ /
630 * / \/ \/ \/ \/
631 *
632 * SDL_HAPTIC_SAWTOOTHUP
633 * /| /| /| /| /| /| /|
634 * / | / | / | / | / | / | / |
635 * / |/ |/ |/ |/ |/ |/ |
636 *
637 * SDL_HAPTIC_SAWTOOTHDOWN
638 * \ |\ |\ |\ |\ |\ |\ |
639 * \ | \ | \ | \ | \ | \ | \ |
640 * \| \| \| \| \| \| \|
641 * ```
642 *
643 * \since This struct is available since SDL 3.2.0.
644 *
645 * \sa SDL_HAPTIC_SINE
646 * \sa SDL_HAPTIC_SQUARE
647 * \sa SDL_HAPTIC_TRIANGLE
648 * \sa SDL_HAPTIC_SAWTOOTHUP
649 * \sa SDL_HAPTIC_SAWTOOTHDOWN
650 * \sa SDL_HapticEffect
651 */
652typedef struct SDL_HapticPeriodic
653{
654 /* Header */
655 Uint16 type; /**< SDL_HAPTIC_SINE, SDL_HAPTIC_SQUARE
656 SDL_HAPTIC_TRIANGLE, SDL_HAPTIC_SAWTOOTHUP or
657 SDL_HAPTIC_SAWTOOTHDOWN */
658 SDL_HapticDirection direction; /**< Direction of the effect. */
659
660 /* Replay */
661 Uint32 length; /**< Duration of the effect. */
662 Uint16 delay; /**< Delay before starting the effect. */
663
664 /* Trigger */
665 Uint16 button; /**< Button that triggers the effect. */
666 Uint16 interval; /**< How soon it can be triggered again after button. */
667
668 /* Periodic */
669 Uint16 period; /**< Period of the wave. */
670 Sint16 magnitude; /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
671 Sint16 offset; /**< Mean value of the wave. */
672 Uint16 phase; /**< Positive phase shift given by hundredth of a degree. */
673
674 /* Envelope */
675 Uint16 attack_length; /**< Duration of the attack. */
676 Uint16 attack_level; /**< Level at the start of the attack. */
677 Uint16 fade_length; /**< Duration of the fade. */
678 Uint16 fade_level; /**< Level at the end of the fade. */
679} SDL_HapticPeriodic;
680
681/**
682 * A structure containing a template for a Condition effect.
683 *
684 * The struct handles the following effects:
685 *
686 * - SDL_HAPTIC_SPRING: Effect based on axes position.
687 * - SDL_HAPTIC_DAMPER: Effect based on axes velocity.
688 * - SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
689 * - SDL_HAPTIC_FRICTION: Effect based on axes movement.
690 *
691 * Direction is handled by condition internals instead of a direction member.
692 * The condition effect specific members have three parameters. The first
693 * refers to the X axis, the second refers to the Y axis and the third refers
694 * to the Z axis. The right terms refer to the positive side of the axis and
695 * the left terms refer to the negative side of the axis. Please refer to the
696 * SDL_HapticDirection diagram for which side is positive and which is
697 * negative.
698 *
699 * \since This struct is available since SDL 3.2.0.
700 *
701 * \sa SDL_HapticDirection
702 * \sa SDL_HAPTIC_SPRING
703 * \sa SDL_HAPTIC_DAMPER
704 * \sa SDL_HAPTIC_INERTIA
705 * \sa SDL_HAPTIC_FRICTION
706 * \sa SDL_HapticEffect
707 */
708typedef struct SDL_HapticCondition
709{
710 /* Header */
711 Uint16 type; /**< SDL_HAPTIC_SPRING, SDL_HAPTIC_DAMPER,
712 SDL_HAPTIC_INERTIA or SDL_HAPTIC_FRICTION */
713 SDL_HapticDirection direction; /**< Direction of the effect. */
714
715 /* Replay */
716 Uint32 length; /**< Duration of the effect. */
717 Uint16 delay; /**< Delay before starting the effect. */
718
719 /* Trigger */
720 Uint16 button; /**< Button that triggers the effect. */
721 Uint16 interval; /**< How soon it can be triggered again after button. */
722
723 /* Condition */
724 Uint16 right_sat[3]; /**< Level when joystick is to the positive side; max 0xFFFF. */
725 Uint16 left_sat[3]; /**< Level when joystick is to the negative side; max 0xFFFF. */
726 Sint16 right_coeff[3]; /**< How fast to increase the force towards the positive side. */
727 Sint16 left_coeff[3]; /**< How fast to increase the force towards the negative side. */
728 Uint16 deadband[3]; /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */
729 Sint16 center[3]; /**< Position of the dead zone. */
730} SDL_HapticCondition;
731
732/**
733 * A structure containing a template for a Ramp effect.
734 *
735 * This struct is exclusively for the SDL_HAPTIC_RAMP effect.
736 *
737 * The ramp effect starts at start strength and ends at end strength. It
738 * augments in linear fashion. If you use attack and fade with a ramp the
739 * effects get added to the ramp effect making the effect become quadratic
740 * instead of linear.
741 *
742 * \since This struct is available since SDL 3.2.0.
743 *
744 * \sa SDL_HAPTIC_RAMP
745 * \sa SDL_HapticEffect
746 */
747typedef struct SDL_HapticRamp
748{
749 /* Header */
750 Uint16 type; /**< SDL_HAPTIC_RAMP */
751 SDL_HapticDirection direction; /**< Direction of the effect. */
752
753 /* Replay */
754 Uint32 length; /**< Duration of the effect. */
755 Uint16 delay; /**< Delay before starting the effect. */
756
757 /* Trigger */
758 Uint16 button; /**< Button that triggers the effect. */
759 Uint16 interval; /**< How soon it can be triggered again after button. */
760
761 /* Ramp */
762 Sint16 start; /**< Beginning strength level. */
763 Sint16 end; /**< Ending strength level. */
764
765 /* Envelope */
766 Uint16 attack_length; /**< Duration of the attack. */
767 Uint16 attack_level; /**< Level at the start of the attack. */
768 Uint16 fade_length; /**< Duration of the fade. */
769 Uint16 fade_level; /**< Level at the end of the fade. */
770} SDL_HapticRamp;
771
772/**
773 * A structure containing a template for a Left/Right effect.
774 *
775 * This struct is exclusively for the SDL_HAPTIC_LEFTRIGHT effect.
776 *
777 * The Left/Right effect is used to explicitly control the large and small
778 * motors, commonly found in modern game controllers. The small (right) motor
779 * is high frequency, and the large (left) motor is low frequency.
780 *
781 * \since This struct is available since SDL 3.2.0.
782 *
783 * \sa SDL_HAPTIC_LEFTRIGHT
784 * \sa SDL_HapticEffect
785 */
786typedef struct SDL_HapticLeftRight
787{
788 /* Header */
789 Uint16 type; /**< SDL_HAPTIC_LEFTRIGHT */
790
791 /* Replay */
792 Uint32 length; /**< Duration of the effect in milliseconds. */
793
794 /* Rumble */
795 Uint16 large_magnitude; /**< Control of the large controller motor. */
796 Uint16 small_magnitude; /**< Control of the small controller motor. */
797} SDL_HapticLeftRight;
798
799/**
800 * A structure containing a template for the SDL_HAPTIC_CUSTOM effect.
801 *
802 * This struct is exclusively for the SDL_HAPTIC_CUSTOM effect.
803 *
804 * A custom force feedback effect is much like a periodic effect, where the
805 * application can define its exact shape. You will have to allocate the data
806 * yourself. Data should consist of channels * samples Uint16 samples.
807 *
808 * If channels is one, the effect is rotated using the defined direction.
809 * Otherwise it uses the samples in data for the different axes.
810 *
811 * \since This struct is available since SDL 3.2.0.
812 *
813 * \sa SDL_HAPTIC_CUSTOM
814 * \sa SDL_HapticEffect
815 */
816typedef struct SDL_HapticCustom
817{
818 /* Header */
819 Uint16 type; /**< SDL_HAPTIC_CUSTOM */
820 SDL_HapticDirection direction; /**< Direction of the effect. */
821
822 /* Replay */
823 Uint32 length; /**< Duration of the effect. */
824 Uint16 delay; /**< Delay before starting the effect. */
825
826 /* Trigger */
827 Uint16 button; /**< Button that triggers the effect. */
828 Uint16 interval; /**< How soon it can be triggered again after button. */
829
830 /* Custom */
831 Uint8 channels; /**< Axes to use, minimum of one. */
832 Uint16 period; /**< Sample periods. */
833 Uint16 samples; /**< Amount of samples. */
834 Uint16 *data; /**< Should contain channels*samples items. */
835
836 /* Envelope */
837 Uint16 attack_length; /**< Duration of the attack. */
838 Uint16 attack_level; /**< Level at the start of the attack. */
839 Uint16 fade_length; /**< Duration of the fade. */
840 Uint16 fade_level; /**< Level at the end of the fade. */
841} SDL_HapticCustom;
842
843/**
844 * The generic template for any haptic effect.
845 *
846 * All values max at 32767 (0x7FFF). Signed values also can be negative. Time
847 * values unless specified otherwise are in milliseconds.
848 *
849 * You can also pass SDL_HAPTIC_INFINITY to length instead of a 0-32767 value.
850 * Neither delay, interval, attack_length nor fade_length support
851 * SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends.
852 *
853 * Additionally, the SDL_HAPTIC_RAMP effect does not support a duration of
854 * SDL_HAPTIC_INFINITY.
855 *
856 * Button triggers may not be supported on all devices, it is advised to not
857 * use them if possible. Buttons start at index 1 instead of index 0 like the
858 * joystick.
859 *
860 * If both attack_length and fade_level are 0, the envelope is not used,
861 * otherwise both values are used.
862 *
863 * Common parts:
864 *
865 * ```c
866 * // Replay - All effects have this
867 * Uint32 length; // Duration of effect (ms).
868 * Uint16 delay; // Delay before starting effect.
869 *
870 * // Trigger - All effects have this
871 * Uint16 button; // Button that triggers effect.
872 * Uint16 interval; // How soon before effect can be triggered again.
873 *
874 * // Envelope - All effects except condition effects have this
875 * Uint16 attack_length; // Duration of the attack (ms).
876 * Uint16 attack_level; // Level at the start of the attack.
877 * Uint16 fade_length; // Duration of the fade out (ms).
878 * Uint16 fade_level; // Level at the end of the fade.
879 * ```
880 *
881 * Here we have an example of a constant effect evolution in time:
882 *
883 * ```
884 * Strength
885 * ^
886 * |
887 * | effect level --> _________________
888 * | / \
889 * | / \
890 * | / \
891 * | / \
892 * | attack_level --> | \
893 * | | | <--- fade_level
894 * |
895 * +--------------------------------------------------> Time
896 * [--] [---]
897 * attack_length fade_length
898 *
899 * [------------------][-----------------------]
900 * delay length
901 * ```
902 *
903 * Note either the attack_level or the fade_level may be above the actual
904 * effect level.
905 *
906 * \since This struct is available since SDL 3.2.0.
907 *
908 * \sa SDL_HapticConstant
909 * \sa SDL_HapticPeriodic
910 * \sa SDL_HapticCondition
911 * \sa SDL_HapticRamp
912 * \sa SDL_HapticLeftRight
913 * \sa SDL_HapticCustom
914 */
915typedef union SDL_HapticEffect
916{
917 /* Common for all force feedback effects */
918 Uint16 type; /**< Effect type. */
919 SDL_HapticConstant constant; /**< Constant effect. */
920 SDL_HapticPeriodic periodic; /**< Periodic effect. */
921 SDL_HapticCondition condition; /**< Condition effect. */
922 SDL_HapticRamp ramp; /**< Ramp effect. */
923 SDL_HapticLeftRight leftright; /**< Left/Right effect. */
924 SDL_HapticCustom custom; /**< Custom effect. */
925} SDL_HapticEffect;
926
927/**
928 * This is a unique ID for a haptic device for the time it is connected to the
929 * system, and is never reused for the lifetime of the application.
930 *
931 * If the haptic device is disconnected and reconnected, it will get a new ID.
932 *
933 * The value 0 is an invalid ID.
934 *
935 * \since This datatype is available since SDL 3.2.0.
936 */
937typedef Uint32 SDL_HapticID;
938
939
940/* Function prototypes */
941
942/**
943 * Get a list of currently connected haptic devices.
944 *
945 * \param count a pointer filled in with the number of haptic devices
946 * returned, may be NULL.
947 * \returns a 0 terminated array of haptic device instance IDs or NULL on
948 * failure; call SDL_GetError() for more information. This should be
949 * freed with SDL_free() when it is no longer needed.
950 *
951 * \since This function is available since SDL 3.2.0.
952 *
953 * \sa SDL_OpenHaptic
954 */
955extern SDL_DECLSPEC SDL_HapticID * SDLCALL SDL_GetHaptics(int *count);
956
957/**
958 * Get the implementation dependent name of a haptic device.
959 *
960 * This can be called before any haptic devices are opened.
961 *
962 * \param instance_id the haptic device instance ID.
963 * \returns the name of the selected haptic device. If no name can be found,
964 * this function returns NULL; call SDL_GetError() for more
965 * information.
966 *
967 * \since This function is available since SDL 3.2.0.
968 *
969 * \sa SDL_GetHapticName
970 * \sa SDL_OpenHaptic
971 */
972extern SDL_DECLSPEC const char * SDLCALL SDL_GetHapticNameForID(SDL_HapticID instance_id);
973
974/**
975 * Open a haptic device for use.
976 *
977 * The index passed as an argument refers to the N'th haptic device on this
978 * system.
979 *
980 * When opening a haptic device, its gain will be set to maximum and
981 * autocenter will be disabled. To modify these values use SDL_SetHapticGain()
982 * and SDL_SetHapticAutocenter().
983 *
984 * \param instance_id the haptic device instance ID.
985 * \returns the device identifier or NULL on failure; call SDL_GetError() for
986 * more information.
987 *
988 * \since This function is available since SDL 3.2.0.
989 *
990 * \sa SDL_CloseHaptic
991 * \sa SDL_GetHaptics
992 * \sa SDL_OpenHapticFromJoystick
993 * \sa SDL_OpenHapticFromMouse
994 * \sa SDL_SetHapticAutocenter
995 * \sa SDL_SetHapticGain
996 */
997extern SDL_DECLSPEC SDL_Haptic * SDLCALL SDL_OpenHaptic(SDL_HapticID instance_id);
998
999
1000/**
1001 * Get the SDL_Haptic associated with an instance ID, if it has been opened.
1002 *
1003 * \param instance_id the instance ID to get the SDL_Haptic for.
1004 * \returns an SDL_Haptic on success or NULL on failure or if it hasn't been
1005 * opened yet; call SDL_GetError() for more information.
1006 *
1007 * \since This function is available since SDL 3.2.0.
1008 */
1009extern SDL_DECLSPEC SDL_Haptic * SDLCALL SDL_GetHapticFromID(SDL_HapticID instance_id);
1010
1011/**
1012 * Get the instance ID of an opened haptic device.
1013 *
1014 * \param haptic the SDL_Haptic device to query.
1015 * \returns the instance ID of the specified haptic device on success or 0 on
1016 * failure; call SDL_GetError() for more information.
1017 *
1018 * \since This function is available since SDL 3.2.0.
1019 */
1020extern SDL_DECLSPEC SDL_HapticID SDLCALL SDL_GetHapticID(SDL_Haptic *haptic);
1021
1022/**
1023 * Get the implementation dependent name of a haptic device.
1024 *
1025 * \param haptic the SDL_Haptic obtained from SDL_OpenJoystick().
1026 * \returns the name of the selected haptic device. If no name can be found,
1027 * this function returns NULL; call SDL_GetError() for more
1028 * information.
1029 *
1030 * \since This function is available since SDL 3.2.0.
1031 *
1032 * \sa SDL_GetHapticNameForID
1033 */
1034extern SDL_DECLSPEC const char * SDLCALL SDL_GetHapticName(SDL_Haptic *haptic);
1035
1036/**
1037 * Query whether or not the current mouse has haptic capabilities.
1038 *
1039 * \returns true if the mouse is haptic or false if it isn't.
1040 *
1041 * \since This function is available since SDL 3.2.0.
1042 *
1043 * \sa SDL_OpenHapticFromMouse
1044 */
1045extern SDL_DECLSPEC bool SDLCALL SDL_IsMouseHaptic(void);
1046
1047/**
1048 * Try to open a haptic device from the current mouse.
1049 *
1050 * \returns the haptic device identifier or NULL on failure; call
1051 * SDL_GetError() for more information.
1052 *
1053 * \since This function is available since SDL 3.2.0.
1054 *
1055 * \sa SDL_CloseHaptic
1056 * \sa SDL_IsMouseHaptic
1057 */
1058extern SDL_DECLSPEC SDL_Haptic * SDLCALL SDL_OpenHapticFromMouse(void);
1059
1060/**
1061 * Query if a joystick has haptic features.
1062 *
1063 * \param joystick the SDL_Joystick to test for haptic capabilities.
1064 * \returns true if the joystick is haptic or false if it isn't.
1065 *
1066 * \since This function is available since SDL 3.2.0.
1067 *
1068 * \sa SDL_OpenHapticFromJoystick
1069 */
1070extern SDL_DECLSPEC bool SDLCALL SDL_IsJoystickHaptic(SDL_Joystick *joystick);
1071
1072/**
1073 * Open a haptic device for use from a joystick device.
1074 *
1075 * You must still close the haptic device separately. It will not be closed
1076 * with the joystick.
1077 *
1078 * When opened from a joystick you should first close the haptic device before
1079 * closing the joystick device. If not, on some implementations the haptic
1080 * device will also get unallocated and you'll be unable to use force feedback
1081 * on that device.
1082 *
1083 * \param joystick the SDL_Joystick to create a haptic device from.
1084 * \returns a valid haptic device identifier on success or NULL on failure;
1085 * call SDL_GetError() for more information.
1086 *
1087 * \since This function is available since SDL 3.2.0.
1088 *
1089 * \sa SDL_CloseHaptic
1090 * \sa SDL_IsJoystickHaptic
1091 */
1092extern SDL_DECLSPEC SDL_Haptic * SDLCALL SDL_OpenHapticFromJoystick(SDL_Joystick *joystick);
1093
1094/**
1095 * Close a haptic device previously opened with SDL_OpenHaptic().
1096 *
1097 * \param haptic the SDL_Haptic device to close.
1098 *
1099 * \since This function is available since SDL 3.2.0.
1100 *
1101 * \sa SDL_OpenHaptic
1102 */
1103extern SDL_DECLSPEC void SDLCALL SDL_CloseHaptic(SDL_Haptic *haptic);
1104
1105/**
1106 * Get the number of effects a haptic device can store.
1107 *
1108 * On some platforms this isn't fully supported, and therefore is an
1109 * approximation. Always check to see if your created effect was actually
1110 * created and do not rely solely on SDL_GetMaxHapticEffects().
1111 *
1112 * \param haptic the SDL_Haptic device to query.
1113 * \returns the number of effects the haptic device can store or a negative
1114 * error code on failure; call SDL_GetError() for more information.
1115 *
1116 * \since This function is available since SDL 3.2.0.
1117 *
1118 * \sa SDL_GetMaxHapticEffectsPlaying
1119 * \sa SDL_GetHapticFeatures
1120 */
1121extern SDL_DECLSPEC int SDLCALL SDL_GetMaxHapticEffects(SDL_Haptic *haptic);
1122
1123/**
1124 * Get the number of effects a haptic device can play at the same time.
1125 *
1126 * This is not supported on all platforms, but will always return a value.
1127 *
1128 * \param haptic the SDL_Haptic device to query maximum playing effects.
1129 * \returns the number of effects the haptic device can play at the same time
1130 * or -1 on failure; call SDL_GetError() for more information.
1131 *
1132 * \since This function is available since SDL 3.2.0.
1133 *
1134 * \sa SDL_GetMaxHapticEffects
1135 * \sa SDL_GetHapticFeatures
1136 */
1137extern SDL_DECLSPEC int SDLCALL SDL_GetMaxHapticEffectsPlaying(SDL_Haptic *haptic);
1138
1139/**
1140 * Get the haptic device's supported features in bitwise manner.
1141 *
1142 * \param haptic the SDL_Haptic device to query.
1143 * \returns a list of supported haptic features in bitwise manner (OR'd), or 0
1144 * on failure; call SDL_GetError() for more information.
1145 *
1146 * \since This function is available since SDL 3.2.0.
1147 *
1148 * \sa SDL_HapticEffectSupported
1149 * \sa SDL_GetMaxHapticEffects
1150 */
1151extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetHapticFeatures(SDL_Haptic *haptic);
1152
1153/**
1154 * Get the number of haptic axes the device has.
1155 *
1156 * The number of haptic axes might be useful if working with the
1157 * SDL_HapticDirection effect.
1158 *
1159 * \param haptic the SDL_Haptic device to query.
1160 * \returns the number of axes on success or -1 on failure; call
1161 * SDL_GetError() for more information.
1162 *
1163 * \since This function is available since SDL 3.2.0.
1164 */
1165extern SDL_DECLSPEC int SDLCALL SDL_GetNumHapticAxes(SDL_Haptic *haptic);
1166
1167/**
1168 * Check to see if an effect is supported by a haptic device.
1169 *
1170 * \param haptic the SDL_Haptic device to query.
1171 * \param effect the desired effect to query.
1172 * \returns true if the effect is supported or false if it isn't.
1173 *
1174 * \since This function is available since SDL 3.2.0.
1175 *
1176 * \sa SDL_CreateHapticEffect
1177 * \sa SDL_GetHapticFeatures
1178 */
1179extern SDL_DECLSPEC bool SDLCALL SDL_HapticEffectSupported(SDL_Haptic *haptic, const SDL_HapticEffect *effect);
1180
1181/**
1182 * Create a new haptic effect on a specified device.
1183 *
1184 * \param haptic an SDL_Haptic device to create the effect on.
1185 * \param effect an SDL_HapticEffect structure containing the properties of
1186 * the effect to create.
1187 * \returns the ID of the effect on success or -1 on failure; call
1188 * SDL_GetError() for more information.
1189 *
1190 * \since This function is available since SDL 3.2.0.
1191 *
1192 * \sa SDL_DestroyHapticEffect
1193 * \sa SDL_RunHapticEffect
1194 * \sa SDL_UpdateHapticEffect
1195 */
1196extern SDL_DECLSPEC int SDLCALL SDL_CreateHapticEffect(SDL_Haptic *haptic, const SDL_HapticEffect *effect);
1197
1198/**
1199 * Update the properties of an effect.
1200 *
1201 * Can be used dynamically, although behavior when dynamically changing
1202 * direction may be strange. Specifically the effect may re-upload itself and
1203 * start playing from the start. You also cannot change the type either when
1204 * running SDL_UpdateHapticEffect().
1205 *
1206 * \param haptic the SDL_Haptic device that has the effect.
1207 * \param effect the identifier of the effect to update.
1208 * \param data an SDL_HapticEffect structure containing the new effect
1209 * properties to use.
1210 * \returns true on success or false on failure; call SDL_GetError() for more
1211 * information.
1212 *
1213 * \since This function is available since SDL 3.2.0.
1214 *
1215 * \sa SDL_CreateHapticEffect
1216 * \sa SDL_RunHapticEffect
1217 */
1218extern SDL_DECLSPEC bool SDLCALL SDL_UpdateHapticEffect(SDL_Haptic *haptic, int effect, const SDL_HapticEffect *data);
1219
1220/**
1221 * Run the haptic effect on its associated haptic device.
1222 *
1223 * To repeat the effect over and over indefinitely, set `iterations` to
1224 * `SDL_HAPTIC_INFINITY`. (Repeats the envelope - attack and fade.) To make
1225 * one instance of the effect last indefinitely (so the effect does not fade),
1226 * set the effect's `length` in its structure/union to `SDL_HAPTIC_INFINITY`
1227 * instead.
1228 *
1229 * \param haptic the SDL_Haptic device to run the effect on.
1230 * \param effect the ID of the haptic effect to run.
1231 * \param iterations the number of iterations to run the effect; use
1232 * `SDL_HAPTIC_INFINITY` to repeat forever.
1233 * \returns true on success or false on failure; call SDL_GetError() for more
1234 * information.
1235 *
1236 * \since This function is available since SDL 3.2.0.
1237 *
1238 * \sa SDL_GetHapticEffectStatus
1239 * \sa SDL_StopHapticEffect
1240 * \sa SDL_StopHapticEffects
1241 */
1242extern SDL_DECLSPEC bool SDLCALL SDL_RunHapticEffect(SDL_Haptic *haptic, int effect, Uint32 iterations);
1243
1244/**
1245 * Stop the haptic effect on its associated haptic device.
1246 *
1247 * \param haptic the SDL_Haptic device to stop the effect on.
1248 * \param effect the ID of the haptic effect to stop.
1249 * \returns true on success or false on failure; call SDL_GetError() for more
1250 * information.
1251 *
1252 * \since This function is available since SDL 3.2.0.
1253 *
1254 * \sa SDL_RunHapticEffect
1255 * \sa SDL_StopHapticEffects
1256 */
1257extern SDL_DECLSPEC bool SDLCALL SDL_StopHapticEffect(SDL_Haptic *haptic, int effect);
1258
1259/**
1260 * Destroy a haptic effect on the device.
1261 *
1262 * This will stop the effect if it's running. Effects are automatically
1263 * destroyed when the device is closed.
1264 *
1265 * \param haptic the SDL_Haptic device to destroy the effect on.
1266 * \param effect the ID of the haptic effect to destroy.
1267 *
1268 * \since This function is available since SDL 3.2.0.
1269 *
1270 * \sa SDL_CreateHapticEffect
1271 */
1272extern SDL_DECLSPEC void SDLCALL SDL_DestroyHapticEffect(SDL_Haptic *haptic, int effect);
1273
1274/**
1275 * Get the status of the current effect on the specified haptic device.
1276 *
1277 * Device must support the SDL_HAPTIC_STATUS feature.
1278 *
1279 * \param haptic the SDL_Haptic device to query for the effect status on.
1280 * \param effect the ID of the haptic effect to query its status.
1281 * \returns true if it is playing, false if it isn't playing or haptic status
1282 * isn't supported.
1283 *
1284 * \since This function is available since SDL 3.2.0.
1285 *
1286 * \sa SDL_GetHapticFeatures
1287 */
1288extern SDL_DECLSPEC bool SDLCALL SDL_GetHapticEffectStatus(SDL_Haptic *haptic, int effect);
1289
1290/**
1291 * Set the global gain of the specified haptic device.
1292 *
1293 * Device must support the SDL_HAPTIC_GAIN feature.
1294 *
1295 * The user may specify the maximum gain by setting the environment variable
1296 * `SDL_HAPTIC_GAIN_MAX` which should be between 0 and 100. All calls to
1297 * SDL_SetHapticGain() will scale linearly using `SDL_HAPTIC_GAIN_MAX` as the
1298 * maximum.
1299 *
1300 * \param haptic the SDL_Haptic device to set the gain on.
1301 * \param gain value to set the gain to, should be between 0 and 100 (0 -
1302 * 100).
1303 * \returns true on success or false on failure; call SDL_GetError() for more
1304 * information.
1305 *
1306 * \since This function is available since SDL 3.2.0.
1307 *
1308 * \sa SDL_GetHapticFeatures
1309 */
1310extern SDL_DECLSPEC bool SDLCALL SDL_SetHapticGain(SDL_Haptic *haptic, int gain);
1311
1312/**
1313 * Set the global autocenter of the device.
1314 *
1315 * Autocenter should be between 0 and 100. Setting it to 0 will disable
1316 * autocentering.
1317 *
1318 * Device must support the SDL_HAPTIC_AUTOCENTER feature.
1319 *
1320 * \param haptic the SDL_Haptic device to set autocentering on.
1321 * \param autocenter value to set autocenter to (0-100).
1322 * \returns true on success or false on failure; call SDL_GetError() for more
1323 * information.
1324 *
1325 * \since This function is available since SDL 3.2.0.
1326 *
1327 * \sa SDL_GetHapticFeatures
1328 */
1329extern SDL_DECLSPEC bool SDLCALL SDL_SetHapticAutocenter(SDL_Haptic *haptic, int autocenter);
1330
1331/**
1332 * Pause a haptic device.
1333 *
1334 * Device must support the `SDL_HAPTIC_PAUSE` feature. Call SDL_ResumeHaptic()
1335 * to resume playback.
1336 *
1337 * Do not modify the effects nor add new ones while the device is paused. That
1338 * can cause all sorts of weird errors.
1339 *
1340 * \param haptic the SDL_Haptic device to pause.
1341 * \returns true on success or false on failure; call SDL_GetError() for more
1342 * information.
1343 *
1344 * \since This function is available since SDL 3.2.0.
1345 *
1346 * \sa SDL_ResumeHaptic
1347 */
1348extern SDL_DECLSPEC bool SDLCALL SDL_PauseHaptic(SDL_Haptic *haptic);
1349
1350/**
1351 * Resume a haptic device.
1352 *
1353 * Call to unpause after SDL_PauseHaptic().
1354 *
1355 * \param haptic the SDL_Haptic device to unpause.
1356 * \returns true on success or false on failure; call SDL_GetError() for more
1357 * information.
1358 *
1359 * \since This function is available since SDL 3.2.0.
1360 *
1361 * \sa SDL_PauseHaptic
1362 */
1363extern SDL_DECLSPEC bool SDLCALL SDL_ResumeHaptic(SDL_Haptic *haptic);
1364
1365/**
1366 * Stop all the currently playing effects on a haptic device.
1367 *
1368 * \param haptic the SDL_Haptic device to stop.
1369 * \returns true on success or false on failure; call SDL_GetError() for more
1370 * information.
1371 *
1372 * \since This function is available since SDL 3.2.0.
1373 *
1374 * \sa SDL_RunHapticEffect
1375 * \sa SDL_StopHapticEffects
1376 */
1377extern SDL_DECLSPEC bool SDLCALL SDL_StopHapticEffects(SDL_Haptic *haptic);
1378
1379/**
1380 * Check whether rumble is supported on a haptic device.
1381 *
1382 * \param haptic haptic device to check for rumble support.
1383 * \returns true if the effect is supported or false if it isn't.
1384 *
1385 * \since This function is available since SDL 3.2.0.
1386 *
1387 * \sa SDL_InitHapticRumble
1388 */
1389extern SDL_DECLSPEC bool SDLCALL SDL_HapticRumbleSupported(SDL_Haptic *haptic);
1390
1391/**
1392 * Initialize a haptic device for simple rumble playback.
1393 *
1394 * \param haptic the haptic device to initialize for simple rumble playback.
1395 * \returns true on success or false on failure; call SDL_GetError() for more
1396 * information.
1397 *
1398 * \since This function is available since SDL 3.2.0.
1399 *
1400 * \sa SDL_PlayHapticRumble
1401 * \sa SDL_StopHapticRumble
1402 * \sa SDL_HapticRumbleSupported
1403 */
1404extern SDL_DECLSPEC bool SDLCALL SDL_InitHapticRumble(SDL_Haptic *haptic);
1405
1406/**
1407 * Run a simple rumble effect on a haptic device.
1408 *
1409 * \param haptic the haptic device to play the rumble effect on.
1410 * \param strength strength of the rumble to play as a 0-1 float value.
1411 * \param length length of the rumble to play in milliseconds.
1412 * \returns true on success or false on failure; call SDL_GetError() for more
1413 * information.
1414 *
1415 * \since This function is available since SDL 3.2.0.
1416 *
1417 * \sa SDL_InitHapticRumble
1418 * \sa SDL_StopHapticRumble
1419 */
1420extern SDL_DECLSPEC bool SDLCALL SDL_PlayHapticRumble(SDL_Haptic *haptic, float strength, Uint32 length);
1421
1422/**
1423 * Stop the simple rumble on a haptic device.
1424 *
1425 * \param haptic the haptic device to stop the rumble effect on.
1426 * \returns true on success or false on failure; call SDL_GetError() for more
1427 * information.
1428 *
1429 * \since This function is available since SDL 3.2.0.
1430 *
1431 * \sa SDL_PlayHapticRumble
1432 */
1433extern SDL_DECLSPEC bool SDLCALL SDL_StopHapticRumble(SDL_Haptic *haptic);
1434
1435/* Ends C function definitions when using C++ */
1436#ifdef __cplusplus
1437}
1438#endif
1439#include <SDL3/SDL_close_code.h>
1440
1441#endif /* SDL_haptic_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_hidapi.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_hidapi.h
new file mode 100644
index 0000000..131b037
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_hidapi.h
@@ -0,0 +1,552 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: HIDAPI */
23
24/**
25 * # CategoryHIDAPI
26 *
27 * Header file for SDL HIDAPI functions.
28 *
29 * This is an adaptation of the original HIDAPI interface by Alan Ott, and
30 * includes source code licensed under the following license:
31 *
32 * ```
33 * HIDAPI - Multi-Platform library for
34 * communication with HID devices.
35 *
36 * Copyright 2009, Alan Ott, Signal 11 Software.
37 * All Rights Reserved.
38 *
39 * This software may be used by anyone for any reason so
40 * long as the copyright notice in the source files
41 * remains intact.
42 * ```
43 *
44 * (Note that this license is the same as item three of SDL's zlib license, so
45 * it adds no new requirements on the user.)
46 *
47 * If you would like a version of SDL without this code, you can build SDL
48 * with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for
49 * example on iOS or tvOS to avoid a dependency on the CoreBluetooth
50 * framework.
51 */
52
53#ifndef SDL_hidapi_h_
54#define SDL_hidapi_h_
55
56#include <SDL3/SDL_stdinc.h>
57#include <SDL3/SDL_error.h>
58
59#include <SDL3/SDL_begin_code.h>
60/* Set up for C function definitions, even when using C++ */
61#ifdef __cplusplus
62extern "C" {
63#endif
64
65/**
66 * An opaque handle representing an open HID device.
67 *
68 * \since This struct is available since SDL 3.2.0.
69 */
70typedef struct SDL_hid_device SDL_hid_device;
71
72/**
73 * HID underlying bus types.
74 *
75 * \since This enum is available since SDL 3.2.0.
76 */
77typedef enum SDL_hid_bus_type {
78 /** Unknown bus type */
79 SDL_HID_API_BUS_UNKNOWN = 0x00,
80
81 /** USB bus
82 Specifications:
83 https://usb.org/hid */
84 SDL_HID_API_BUS_USB = 0x01,
85
86 /** Bluetooth or Bluetooth LE bus
87 Specifications:
88 https://www.bluetooth.com/specifications/specs/human-interface-device-profile-1-1-1/
89 https://www.bluetooth.com/specifications/specs/hid-service-1-0/
90 https://www.bluetooth.com/specifications/specs/hid-over-gatt-profile-1-0/ */
91 SDL_HID_API_BUS_BLUETOOTH = 0x02,
92
93 /** I2C bus
94 Specifications:
95 https://docs.microsoft.com/previous-versions/windows/hardware/design/dn642101(v=vs.85) */
96 SDL_HID_API_BUS_I2C = 0x03,
97
98 /** SPI bus
99 Specifications:
100 https://www.microsoft.com/download/details.aspx?id=103325 */
101 SDL_HID_API_BUS_SPI = 0x04
102
103} SDL_hid_bus_type;
104
105/** hidapi info structure */
106
107/**
108 * Information about a connected HID device
109 *
110 * \since This struct is available since SDL 3.2.0.
111 */
112typedef struct SDL_hid_device_info
113{
114 /** Platform-specific device path */
115 char *path;
116 /** Device Vendor ID */
117 unsigned short vendor_id;
118 /** Device Product ID */
119 unsigned short product_id;
120 /** Serial Number */
121 wchar_t *serial_number;
122 /** Device Release Number in binary-coded decimal,
123 also known as Device Version Number */
124 unsigned short release_number;
125 /** Manufacturer String */
126 wchar_t *manufacturer_string;
127 /** Product string */
128 wchar_t *product_string;
129 /** Usage Page for this Device/Interface
130 (Windows/Mac/hidraw only) */
131 unsigned short usage_page;
132 /** Usage for this Device/Interface
133 (Windows/Mac/hidraw only) */
134 unsigned short usage;
135 /** The USB interface which this logical device
136 represents.
137
138 Valid only if the device is a USB HID device.
139 Set to -1 in all other cases.
140 */
141 int interface_number;
142
143 /** Additional information about the USB interface.
144 Valid on libusb and Android implementations. */
145 int interface_class;
146 int interface_subclass;
147 int interface_protocol;
148
149 /** Underlying bus type */
150 SDL_hid_bus_type bus_type;
151
152 /** Pointer to the next device */
153 struct SDL_hid_device_info *next;
154
155} SDL_hid_device_info;
156
157
158/**
159 * Initialize the HIDAPI library.
160 *
161 * This function initializes the HIDAPI library. Calling it is not strictly
162 * necessary, as it will be called automatically by SDL_hid_enumerate() and
163 * any of the SDL_hid_open_*() functions if it is needed. This function should
164 * be called at the beginning of execution however, if there is a chance of
165 * HIDAPI handles being opened by different threads simultaneously.
166 *
167 * Each call to this function should have a matching call to SDL_hid_exit()
168 *
169 * \returns 0 on success or a negative error code on failure; call
170 * SDL_GetError() for more information.
171 *
172 * \since This function is available since SDL 3.2.0.
173 *
174 * \sa SDL_hid_exit
175 */
176extern SDL_DECLSPEC int SDLCALL SDL_hid_init(void);
177
178/**
179 * Finalize the HIDAPI library.
180 *
181 * This function frees all of the static data associated with HIDAPI. It
182 * should be called at the end of execution to avoid memory leaks.
183 *
184 * \returns 0 on success or a negative error code on failure; call
185 * SDL_GetError() for more information.
186 *
187 * \since This function is available since SDL 3.2.0.
188 *
189 * \sa SDL_hid_init
190 */
191extern SDL_DECLSPEC int SDLCALL SDL_hid_exit(void);
192
193/**
194 * Check to see if devices may have been added or removed.
195 *
196 * Enumerating the HID devices is an expensive operation, so you can call this
197 * to see if there have been any system device changes since the last call to
198 * this function. A change in the counter returned doesn't necessarily mean
199 * that anything has changed, but you can call SDL_hid_enumerate() to get an
200 * updated device list.
201 *
202 * Calling this function for the first time may cause a thread or other system
203 * resource to be allocated to track device change notifications.
204 *
205 * \returns a change counter that is incremented with each potential device
206 * change, or 0 if device change detection isn't available.
207 *
208 * \since This function is available since SDL 3.2.0.
209 *
210 * \sa SDL_hid_enumerate
211 */
212extern SDL_DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
213
214/**
215 * Enumerate the HID Devices.
216 *
217 * This function returns a linked list of all the HID devices attached to the
218 * system which match vendor_id and product_id. If `vendor_id` is set to 0
219 * then any vendor matches. If `product_id` is set to 0 then any product
220 * matches. If `vendor_id` and `product_id` are both set to 0, then all HID
221 * devices will be returned.
222 *
223 * By default SDL will only enumerate controllers, to reduce risk of hanging
224 * or crashing on bad drivers, but SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS
225 * can be set to "0" to enumerate all HID devices.
226 *
227 * \param vendor_id the Vendor ID (VID) of the types of device to open, or 0
228 * to match any vendor.
229 * \param product_id the Product ID (PID) of the types of device to open, or 0
230 * to match any product.
231 * \returns a pointer to a linked list of type SDL_hid_device_info, containing
232 * information about the HID devices attached to the system, or NULL
233 * in the case of failure. Free this linked list by calling
234 * SDL_hid_free_enumeration().
235 *
236 * \since This function is available since SDL 3.2.0.
237 *
238 * \sa SDL_hid_device_change_count
239 */
240extern SDL_DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
241
242/**
243 * Free an enumeration linked list.
244 *
245 * This function frees a linked list created by SDL_hid_enumerate().
246 *
247 * \param devs pointer to a list of struct_device returned from
248 * SDL_hid_enumerate().
249 *
250 * \since This function is available since SDL 3.2.0.
251 */
252extern SDL_DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
253
254/**
255 * Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
256 * a serial number.
257 *
258 * If `serial_number` is NULL, the first device with the specified VID and PID
259 * is opened.
260 *
261 * \param vendor_id the Vendor ID (VID) of the device to open.
262 * \param product_id the Product ID (PID) of the device to open.
263 * \param serial_number the Serial Number of the device to open (Optionally
264 * NULL).
265 * \returns a pointer to a SDL_hid_device object on success or NULL on
266 * failure; call SDL_GetError() for more information.
267 *
268 * \since This function is available since SDL 3.2.0.
269 */
270extern SDL_DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
271
272/**
273 * Open a HID device by its path name.
274 *
275 * The path name be determined by calling SDL_hid_enumerate(), or a
276 * platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
277 *
278 * \param path the path name of the device to open.
279 * \returns a pointer to a SDL_hid_device object on success or NULL on
280 * failure; call SDL_GetError() for more information.
281 *
282 * \since This function is available since SDL 3.2.0.
283 */
284extern SDL_DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path);
285
286/**
287 * Write an Output report to a HID device.
288 *
289 * The first byte of `data` must contain the Report ID. For devices which only
290 * support a single report, this must be set to 0x0. The remaining bytes
291 * contain the report data. Since the Report ID is mandatory, calls to
292 * SDL_hid_write() will always contain one more byte than the report contains.
293 * For example, if a hid report is 16 bytes long, 17 bytes must be passed to
294 * SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
295 * followed by the report data (16 bytes). In this example, the length passed
296 * in would be 17.
297 *
298 * SDL_hid_write() will send the data on the first OUT endpoint, if one
299 * exists. If it does not, it will send the data through the Control Endpoint
300 * (Endpoint 0).
301 *
302 * \param dev a device handle returned from SDL_hid_open().
303 * \param data the data to send, including the report number as the first
304 * byte.
305 * \param length the length in bytes of the data to send.
306 * \returns the actual number of bytes written and -1 on on failure; call
307 * SDL_GetError() for more information.
308 *
309 * \since This function is available since SDL 3.2.0.
310 */
311extern SDL_DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
312
313/**
314 * Read an Input report from a HID device with timeout.
315 *
316 * Input reports are returned to the host through the INTERRUPT IN endpoint.
317 * The first byte will contain the Report number if the device uses numbered
318 * reports.
319 *
320 * \param dev a device handle returned from SDL_hid_open().
321 * \param data a buffer to put the read data into.
322 * \param length the number of bytes to read. For devices with multiple
323 * reports, make sure to read an extra byte for the report
324 * number.
325 * \param milliseconds timeout in milliseconds or -1 for blocking wait.
326 * \returns the actual number of bytes read and -1 on on failure; call
327 * SDL_GetError() for more information. If no packet was available to
328 * be read within the timeout period, this function returns 0.
329 *
330 * \since This function is available since SDL 3.2.0.
331 */
332extern SDL_DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
333
334/**
335 * Read an Input report from a HID device.
336 *
337 * Input reports are returned to the host through the INTERRUPT IN endpoint.
338 * The first byte will contain the Report number if the device uses numbered
339 * reports.
340 *
341 * \param dev a device handle returned from SDL_hid_open().
342 * \param data a buffer to put the read data into.
343 * \param length the number of bytes to read. For devices with multiple
344 * reports, make sure to read an extra byte for the report
345 * number.
346 * \returns the actual number of bytes read and -1 on failure; call
347 * SDL_GetError() for more information. If no packet was available to
348 * be read and the handle is in non-blocking mode, this function
349 * returns 0.
350 *
351 * \since This function is available since SDL 3.2.0.
352 */
353extern SDL_DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
354
355/**
356 * Set the device handle to be non-blocking.
357 *
358 * In non-blocking mode calls to SDL_hid_read() will return immediately with a
359 * value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
360 * will wait (block) until there is data to read before returning.
361 *
362 * Nonblocking can be turned on and off at any time.
363 *
364 * \param dev a device handle returned from SDL_hid_open().
365 * \param nonblock enable or not the nonblocking reads - 1 to enable
366 * nonblocking - 0 to disable nonblocking.
367 * \returns 0 on success or a negative error code on failure; call
368 * SDL_GetError() for more information.
369 *
370 * \since This function is available since SDL 3.2.0.
371 */
372extern SDL_DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
373
374/**
375 * Send a Feature report to the device.
376 *
377 * Feature reports are sent over the Control endpoint as a Set_Report
378 * transfer. The first byte of `data` must contain the Report ID. For devices
379 * which only support a single report, this must be set to 0x0. The remaining
380 * bytes contain the report data. Since the Report ID is mandatory, calls to
381 * SDL_hid_send_feature_report() will always contain one more byte than the
382 * report contains. For example, if a hid report is 16 bytes long, 17 bytes
383 * must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
384 * devices which do not use numbered reports), followed by the report data (16
385 * bytes). In this example, the length passed in would be 17.
386 *
387 * \param dev a device handle returned from SDL_hid_open().
388 * \param data the data to send, including the report number as the first
389 * byte.
390 * \param length the length in bytes of the data to send, including the report
391 * number.
392 * \returns the actual number of bytes written and -1 on failure; call
393 * SDL_GetError() for more information.
394 *
395 * \since This function is available since SDL 3.2.0.
396 */
397extern SDL_DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
398
399/**
400 * Get a feature report from a HID device.
401 *
402 * Set the first byte of `data` to the Report ID of the report to be read.
403 * Make sure to allow space for this extra byte in `data`. Upon return, the
404 * first byte will still contain the Report ID, and the report data will start
405 * in data[1].
406 *
407 * \param dev a device handle returned from SDL_hid_open().
408 * \param data a buffer to put the read data into, including the Report ID.
409 * Set the first byte of `data` to the Report ID of the report to
410 * be read, or set it to zero if your device does not use numbered
411 * reports.
412 * \param length the number of bytes to read, including an extra byte for the
413 * report ID. The buffer can be longer than the actual report.
414 * \returns the number of bytes read plus one for the report ID (which is
415 * still in the first byte), or -1 on on failure; call SDL_GetError()
416 * for more information.
417 *
418 * \since This function is available since SDL 3.2.0.
419 */
420extern SDL_DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
421
422/**
423 * Get an input report from a HID device.
424 *
425 * Set the first byte of `data` to the Report ID of the report to be read.
426 * Make sure to allow space for this extra byte in `data`. Upon return, the
427 * first byte will still contain the Report ID, and the report data will start
428 * in data[1].
429 *
430 * \param dev a device handle returned from SDL_hid_open().
431 * \param data a buffer to put the read data into, including the Report ID.
432 * Set the first byte of `data` to the Report ID of the report to
433 * be read, or set it to zero if your device does not use numbered
434 * reports.
435 * \param length the number of bytes to read, including an extra byte for the
436 * report ID. The buffer can be longer than the actual report.
437 * \returns the number of bytes read plus one for the report ID (which is
438 * still in the first byte), or -1 on on failure; call SDL_GetError()
439 * for more information.
440 *
441 * \since This function is available since SDL 3.2.0.
442 */
443extern SDL_DECLSPEC int SDLCALL SDL_hid_get_input_report(SDL_hid_device *dev, unsigned char *data, size_t length);
444
445/**
446 * Close a HID device.
447 *
448 * \param dev a device handle returned from SDL_hid_open().
449 * \returns 0 on success or a negative error code on failure; call
450 * SDL_GetError() for more information.
451 *
452 * \since This function is available since SDL 3.2.0.
453 */
454extern SDL_DECLSPEC int SDLCALL SDL_hid_close(SDL_hid_device *dev);
455
456/**
457 * Get The Manufacturer String from a HID device.
458 *
459 * \param dev a device handle returned from SDL_hid_open().
460 * \param string a wide string buffer to put the data into.
461 * \param maxlen the length of the buffer in multiples of wchar_t.
462 * \returns 0 on success or a negative error code on failure; call
463 * SDL_GetError() for more information.
464 *
465 * \since This function is available since SDL 3.2.0.
466 */
467extern SDL_DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
468
469/**
470 * Get The Product String from a HID device.
471 *
472 * \param dev a device handle returned from SDL_hid_open().
473 * \param string a wide string buffer to put the data into.
474 * \param maxlen the length of the buffer in multiples of wchar_t.
475 * \returns 0 on success or a negative error code on failure; call
476 * SDL_GetError() for more information.
477 *
478 * \since This function is available since SDL 3.2.0.
479 */
480extern SDL_DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
481
482/**
483 * Get The Serial Number String from a HID device.
484 *
485 * \param dev a device handle returned from SDL_hid_open().
486 * \param string a wide string buffer to put the data into.
487 * \param maxlen the length of the buffer in multiples of wchar_t.
488 * \returns 0 on success or a negative error code on failure; call
489 * SDL_GetError() for more information.
490 *
491 * \since This function is available since SDL 3.2.0.
492 */
493extern SDL_DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
494
495/**
496 * Get a string from a HID device, based on its string index.
497 *
498 * \param dev a device handle returned from SDL_hid_open().
499 * \param string_index the index of the string to get.
500 * \param string a wide string buffer to put the data into.
501 * \param maxlen the length of the buffer in multiples of wchar_t.
502 * \returns 0 on success or a negative error code on failure; call
503 * SDL_GetError() for more information.
504 *
505 * \since This function is available since SDL 3.2.0.
506 */
507extern SDL_DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
508
509/**
510 * Get the device info from a HID device.
511 *
512 * \param dev a device handle returned from SDL_hid_open().
513 * \returns a pointer to the SDL_hid_device_info for this hid_device or NULL
514 * on failure; call SDL_GetError() for more information. This struct
515 * is valid until the device is closed with SDL_hid_close().
516 *
517 * \since This function is available since SDL 3.2.0.
518 */
519extern SDL_DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_get_device_info(SDL_hid_device *dev);
520
521/**
522 * Get a report descriptor from a HID device.
523 *
524 * User has to provide a preallocated buffer where descriptor will be copied
525 * to. The recommended size for a preallocated buffer is 4096 bytes.
526 *
527 * \param dev a device handle returned from SDL_hid_open().
528 * \param buf the buffer to copy descriptor into.
529 * \param buf_size the size of the buffer in bytes.
530 * \returns the number of bytes actually copied or -1 on failure; call
531 * SDL_GetError() for more information.
532 *
533 * \since This function is available since SDL 3.2.0.
534 */
535extern SDL_DECLSPEC int SDLCALL SDL_hid_get_report_descriptor(SDL_hid_device *dev, unsigned char *buf, size_t buf_size);
536
537/**
538 * Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers.
539 *
540 * \param active true to start the scan, false to stop the scan.
541 *
542 * \since This function is available since SDL 3.2.0.
543 */
544extern SDL_DECLSPEC void SDLCALL SDL_hid_ble_scan(bool active);
545
546/* Ends C function definitions when using C++ */
547#ifdef __cplusplus
548}
549#endif
550#include <SDL3/SDL_close_code.h>
551
552#endif /* SDL_hidapi_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_hints.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_hints.h
new file mode 100644
index 0000000..a081535
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_hints.h
@@ -0,0 +1,4486 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryHints
24 *
25 * This file contains functions to set and get configuration hints, as well as
26 * listing each of them alphabetically.
27 *
28 * The convention for naming hints is SDL_HINT_X, where "SDL_X" is the
29 * environment variable that can be used to override the default.
30 *
31 * In general these hints are just that - they may or may not be supported or
32 * applicable on any given platform, but they provide a way for an application
33 * or user to give the library a hint as to how they would like the library to
34 * work.
35 */
36
37#ifndef SDL_hints_h_
38#define SDL_hints_h_
39
40#include <SDL3/SDL_error.h>
41#include <SDL3/SDL_stdinc.h>
42
43#include <SDL3/SDL_begin_code.h>
44/* Set up for C function definitions, even when using C++ */
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/**
50 * Specify the behavior of Alt+Tab while the keyboard is grabbed.
51 *
52 * By default, SDL emulates Alt+Tab functionality while the keyboard is
53 * grabbed and your window is full-screen. This prevents the user from getting
54 * stuck in your application if you've enabled keyboard grab.
55 *
56 * The variable can be set to the following values:
57 *
58 * - "0": SDL will not handle Alt+Tab. Your application is responsible for
59 * handling Alt+Tab while the keyboard is grabbed.
60 * - "1": SDL will minimize your window when Alt+Tab is pressed (default)
61 *
62 * This hint can be set anytime.
63 *
64 * \since This hint is available since SDL 3.2.0.
65 */
66#define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
67
68/**
69 * A variable to control whether the SDL activity is allowed to be re-created.
70 *
71 * If this hint is true, the activity can be recreated on demand by the OS,
72 * and Java static data and C++ static data remain with their current values.
73 * If this hint is false, then SDL will call exit() when you return from your
74 * main function and the application will be terminated and then started fresh
75 * each time.
76 *
77 * The variable can be set to the following values:
78 *
79 * - "0": The application starts fresh at each launch. (default)
80 * - "1": The application activity can be recreated by the OS.
81 *
82 * This hint can be set anytime.
83 *
84 * \since This hint is available since SDL 3.2.0.
85 */
86#define SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"
87
88/**
89 * A variable to control whether the event loop will block itself when the app
90 * is paused.
91 *
92 * The variable can be set to the following values:
93 *
94 * - "0": Non blocking.
95 * - "1": Blocking. (default)
96 *
97 * This hint should be set before SDL is initialized.
98 *
99 * \since This hint is available since SDL 3.2.0.
100 */
101#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
102
103/**
104 * A variable to control whether low latency audio should be enabled.
105 *
106 * Some devices have poor quality output when this is enabled, but this is
107 * usually an improvement in audio latency.
108 *
109 * The variable can be set to the following values:
110 *
111 * - "0": Low latency audio is not enabled.
112 * - "1": Low latency audio is enabled. (default)
113 *
114 * This hint should be set before SDL audio is initialized.
115 *
116 * \since This hint is available since SDL 3.2.0.
117 */
118#define SDL_HINT_ANDROID_LOW_LATENCY_AUDIO "SDL_ANDROID_LOW_LATENCY_AUDIO"
119
120/**
121 * A variable to control whether we trap the Android back button to handle it
122 * manually.
123 *
124 * This is necessary for the right mouse button to work on some Android
125 * devices, or to be able to trap the back button for use in your code
126 * reliably. If this hint is true, the back button will show up as an
127 * SDL_EVENT_KEY_DOWN / SDL_EVENT_KEY_UP pair with a keycode of
128 * SDL_SCANCODE_AC_BACK.
129 *
130 * The variable can be set to the following values:
131 *
132 * - "0": Back button will be handled as usual for system. (default)
133 * - "1": Back button will be trapped, allowing you to handle the key press
134 * manually. (This will also let right mouse click work on systems where the
135 * right mouse button functions as back.)
136 *
137 * This hint can be set anytime.
138 *
139 * \since This hint is available since SDL 3.2.0.
140 */
141#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
142
143/**
144 * A variable setting the app ID string.
145 *
146 * This string is used by desktop compositors to identify and group windows
147 * together, as well as match applications with associated desktop settings
148 * and icons.
149 *
150 * This will override SDL_PROP_APP_METADATA_IDENTIFIER_STRING, if set by the
151 * application.
152 *
153 * This hint should be set before SDL is initialized.
154 *
155 * \since This hint is available since SDL 3.2.0.
156 */
157#define SDL_HINT_APP_ID "SDL_APP_ID"
158
159/**
160 * A variable setting the application name.
161 *
162 * This hint lets you specify the application name sent to the OS when
163 * required. For example, this will often appear in volume control applets for
164 * audio streams, and in lists of applications which are inhibiting the
165 * screensaver. You should use a string that describes your program ("My Game
166 * 2: The Revenge")
167 *
168 * This will override SDL_PROP_APP_METADATA_NAME_STRING, if set by the
169 * application.
170 *
171 * This hint should be set before SDL is initialized.
172 *
173 * \since This hint is available since SDL 3.2.0.
174 */
175#define SDL_HINT_APP_NAME "SDL_APP_NAME"
176
177/**
178 * A variable controlling whether controllers used with the Apple TV generate
179 * UI events.
180 *
181 * When UI events are generated by controller input, the app will be
182 * backgrounded when the Apple TV remote's menu button is pressed, and when
183 * the pause or B buttons on gamepads are pressed.
184 *
185 * More information about properly making use of controllers for the Apple TV
186 * can be found here:
187 * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
188 *
189 * The variable can be set to the following values:
190 *
191 * - "0": Controller input does not generate UI events. (default)
192 * - "1": Controller input generates UI events.
193 *
194 * This hint can be set anytime.
195 *
196 * \since This hint is available since SDL 3.2.0.
197 */
198#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
199
200/**
201 * A variable controlling whether the Apple TV remote's joystick axes will
202 * automatically match the rotation of the remote.
203 *
204 * The variable can be set to the following values:
205 *
206 * - "0": Remote orientation does not affect joystick axes. (default)
207 * - "1": Joystick axes are based on the orientation of the remote.
208 *
209 * This hint can be set anytime.
210 *
211 * \since This hint is available since SDL 3.2.0.
212 */
213#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
214
215/**
216 * Specify the default ALSA audio device name.
217 *
218 * This variable is a specific audio device to open when the "default" audio
219 * device is used.
220 *
221 * This hint will be ignored when opening the default playback device if
222 * SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE is set, or when opening the
223 * default recording device if SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE is
224 * set.
225 *
226 * This hint should be set before an audio device is opened.
227 *
228 * \since This hint is available since SDL 3.2.0.
229 *
230 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE
231 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE
232 */
233#define SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE "SDL_AUDIO_ALSA_DEFAULT_DEVICE"
234
235/**
236 * Specify the default ALSA audio playback device name.
237 *
238 * This variable is a specific audio device to open for playback, when the
239 * "default" audio device is used.
240 *
241 * If this hint isn't set, SDL will check SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
242 * before choosing a reasonable default.
243 *
244 * This hint should be set before an audio device is opened.
245 *
246 * \since This hint is available since SDL 3.2.0.
247 *
248 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE
249 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
250 */
251#define SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE "SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE"
252
253/**
254 * Specify the default ALSA audio recording device name.
255 *
256 * This variable is a specific audio device to open for recording, when the
257 * "default" audio device is used.
258 *
259 * If this hint isn't set, SDL will check SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
260 * before choosing a reasonable default.
261 *
262 * This hint should be set before an audio device is opened.
263 *
264 * \since This hint is available since SDL 3.2.0.
265 *
266 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE
267 * \sa SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE
268 */
269#define SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE "SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE"
270
271/**
272 * A variable controlling the audio category on iOS and macOS.
273 *
274 * The variable can be set to the following values:
275 *
276 * - "ambient": Use the AVAudioSessionCategoryAmbient audio category, will be
277 * muted by the phone mute switch (default)
278 * - "playback": Use the AVAudioSessionCategoryPlayback category.
279 *
280 * For more information, see Apple's documentation:
281 * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
282 *
283 * This hint should be set before an audio device is opened.
284 *
285 * \since This hint is available since SDL 3.2.0.
286 */
287#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
288
289/**
290 * A variable controlling the default audio channel count.
291 *
292 * If the application doesn't specify the audio channel count when opening the
293 * device, this hint can be used to specify a default channel count that will
294 * be used. This defaults to "1" for recording and "2" for playback devices.
295 *
296 * This hint should be set before an audio device is opened.
297 *
298 * \since This hint is available since SDL 3.2.0.
299 */
300#define SDL_HINT_AUDIO_CHANNELS "SDL_AUDIO_CHANNELS"
301
302/**
303 * Specify an application icon name for an audio device.
304 *
305 * Some audio backends (such as Pulseaudio and Pipewire) allow you to set an
306 * XDG icon name for your application. Among other things, this icon might
307 * show up in a system control panel that lets the user adjust the volume on
308 * specific audio streams instead of using one giant master volume slider.
309 * Note that this is unrelated to the icon used by the windowing system, which
310 * may be set with SDL_SetWindowIcon (or via desktop file on Wayland).
311 *
312 * Setting this to "" or leaving it unset will have SDL use a reasonable
313 * default, "applications-games", which is likely to be installed. See
314 * https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
315 * and
316 * https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
317 * for the relevant XDG icon specs.
318 *
319 * This hint should be set before an audio device is opened.
320 *
321 * \since This hint is available since SDL 3.2.0.
322 */
323#define SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME "SDL_AUDIO_DEVICE_APP_ICON_NAME"
324
325/**
326 * A variable controlling device buffer size.
327 *
328 * This hint is an integer > 0, that represents the size of the device's
329 * buffer in sample frames (stereo audio data in 16-bit format is 4 bytes per
330 * sample frame, for example).
331 *
332 * SDL3 generally decides this value on behalf of the app, but if for some
333 * reason the app needs to dictate this (because they want either lower
334 * latency or higher throughput AND ARE WILLING TO DEAL WITH what that might
335 * require of the app), they can specify it.
336 *
337 * SDL will try to accommodate this value, but there is no promise you'll get
338 * the buffer size requested. Many platforms won't honor this request at all,
339 * or might adjust it.
340 *
341 * This hint should be set before an audio device is opened.
342 *
343 * \since This hint is available since SDL 3.2.0.
344 */
345#define SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES "SDL_AUDIO_DEVICE_SAMPLE_FRAMES"
346
347/**
348 * Specify an audio stream name for an audio device.
349 *
350 * Some audio backends (such as PulseAudio) allow you to describe your audio
351 * stream. Among other things, this description might show up in a system
352 * control panel that lets the user adjust the volume on specific audio
353 * streams instead of using one giant master volume slider.
354 *
355 * This hints lets you transmit that information to the OS. The contents of
356 * this hint are used while opening an audio device. You should use a string
357 * that describes your what your program is playing ("audio stream" is
358 * probably sufficient in many cases, but this could be useful for something
359 * like "team chat" if you have a headset playing VoIP audio separately).
360 *
361 * Setting this to "" or leaving it unset will have SDL use a reasonable
362 * default: "audio stream" or something similar.
363 *
364 * Note that while this talks about audio streams, this is an OS-level
365 * concept, so it applies to a physical audio device in this case, and not an
366 * SDL_AudioStream, nor an SDL logical audio device.
367 *
368 * This hint should be set before an audio device is opened.
369 *
370 * \since This hint is available since SDL 3.2.0.
371 */
372#define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
373
374/**
375 * Specify an application role for an audio device.
376 *
377 * Some audio backends (such as Pipewire) allow you to describe the role of
378 * your audio stream. Among other things, this description might show up in a
379 * system control panel or software for displaying and manipulating media
380 * playback/recording graphs.
381 *
382 * This hints lets you transmit that information to the OS. The contents of
383 * this hint are used while opening an audio device. You should use a string
384 * that describes your what your program is playing (Game, Music, Movie,
385 * etc...).
386 *
387 * Setting this to "" or leaving it unset will have SDL use a reasonable
388 * default: "Game" or something similar.
389 *
390 * Note that while this talks about audio streams, this is an OS-level
391 * concept, so it applies to a physical audio device in this case, and not an
392 * SDL_AudioStream, nor an SDL logical audio device.
393 *
394 * This hint should be set before an audio device is opened.
395 *
396 * \since This hint is available since SDL 3.2.0.
397 */
398#define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
399
400/**
401 * Specify the input file when recording audio using the disk audio driver.
402 *
403 * This defaults to "sdlaudio-in.raw"
404 *
405 * This hint should be set before an audio device is opened.
406 *
407 * \since This hint is available since SDL 3.2.0.
408 */
409#define SDL_HINT_AUDIO_DISK_INPUT_FILE "SDL_AUDIO_DISK_INPUT_FILE"
410
411/**
412 * Specify the output file when playing audio using the disk audio driver.
413 *
414 * This defaults to "sdlaudio.raw"
415 *
416 * This hint should be set before an audio device is opened.
417 *
418 * \since This hint is available since SDL 3.2.0.
419 */
420#define SDL_HINT_AUDIO_DISK_OUTPUT_FILE "SDL_AUDIO_DISK_OUTPUT_FILE"
421
422/**
423 * A variable controlling the audio rate when using the disk audio driver.
424 *
425 * The disk audio driver normally simulates real-time for the audio rate that
426 * was specified, but you can use this variable to adjust this rate higher or
427 * lower down to 0. The default value is "1.0".
428 *
429 * This hint should be set before an audio device is opened.
430 *
431 * \since This hint is available since SDL 3.2.0.
432 */
433#define SDL_HINT_AUDIO_DISK_TIMESCALE "SDL_AUDIO_DISK_TIMESCALE"
434
435/**
436 * A variable that specifies an audio backend to use.
437 *
438 * By default, SDL will try all available audio backends in a reasonable order
439 * until it finds one that can work, but this hint allows the app or user to
440 * force a specific driver, such as "pipewire" if, say, you are on PulseAudio
441 * but want to try talking to the lower level instead.
442 *
443 * This hint should be set before SDL is initialized.
444 *
445 * \since This hint is available since SDL 3.2.0.
446 */
447#define SDL_HINT_AUDIO_DRIVER "SDL_AUDIO_DRIVER"
448
449/**
450 * A variable controlling the audio rate when using the dummy audio driver.
451 *
452 * The dummy audio driver normally simulates real-time for the audio rate that
453 * was specified, but you can use this variable to adjust this rate higher or
454 * lower down to 0. The default value is "1.0".
455 *
456 * This hint should be set before an audio device is opened.
457 *
458 * \since This hint is available since SDL 3.2.0.
459 */
460#define SDL_HINT_AUDIO_DUMMY_TIMESCALE "SDL_AUDIO_DUMMY_TIMESCALE"
461
462/**
463 * A variable controlling the default audio format.
464 *
465 * If the application doesn't specify the audio format when opening the
466 * device, this hint can be used to specify a default format that will be
467 * used.
468 *
469 * The variable can be set to the following values:
470 *
471 * - "U8": Unsigned 8-bit audio
472 * - "S8": Signed 8-bit audio
473 * - "S16LE": Signed 16-bit little-endian audio
474 * - "S16BE": Signed 16-bit big-endian audio
475 * - "S16": Signed 16-bit native-endian audio (default)
476 * - "S32LE": Signed 32-bit little-endian audio
477 * - "S32BE": Signed 32-bit big-endian audio
478 * - "S32": Signed 32-bit native-endian audio
479 * - "F32LE": Floating point little-endian audio
480 * - "F32BE": Floating point big-endian audio
481 * - "F32": Floating point native-endian audio
482 *
483 * This hint should be set before an audio device is opened.
484 *
485 * \since This hint is available since SDL 3.2.0.
486 */
487#define SDL_HINT_AUDIO_FORMAT "SDL_AUDIO_FORMAT"
488
489/**
490 * A variable controlling the default audio frequency.
491 *
492 * If the application doesn't specify the audio frequency when opening the
493 * device, this hint can be used to specify a default frequency that will be
494 * used. This defaults to "44100".
495 *
496 * This hint should be set before an audio device is opened.
497 *
498 * \since This hint is available since SDL 3.2.0.
499 */
500#define SDL_HINT_AUDIO_FREQUENCY "SDL_AUDIO_FREQUENCY"
501
502/**
503 * A variable that causes SDL to not ignore audio "monitors".
504 *
505 * This is currently only used by the PulseAudio driver.
506 *
507 * By default, SDL ignores audio devices that aren't associated with physical
508 * hardware. Changing this hint to "1" will expose anything SDL sees that
509 * appears to be an audio source or sink. This will add "devices" to the list
510 * that the user probably doesn't want or need, but it can be useful in
511 * scenarios where you want to hook up SDL to some sort of virtual device,
512 * etc.
513 *
514 * The variable can be set to the following values:
515 *
516 * - "0": Audio monitor devices will be ignored. (default)
517 * - "1": Audio monitor devices will show up in the device list.
518 *
519 * This hint should be set before SDL is initialized.
520 *
521 * \since This hint is available since SDL 3.2.0.
522 */
523#define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
524
525/**
526 * A variable controlling whether SDL updates joystick state when getting
527 * input events.
528 *
529 * The variable can be set to the following values:
530 *
531 * - "0": You'll call SDL_UpdateJoysticks() manually.
532 * - "1": SDL will automatically call SDL_UpdateJoysticks(). (default)
533 *
534 * This hint can be set anytime.
535 *
536 * \since This hint is available since SDL 3.2.0.
537 */
538#define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
539
540/**
541 * A variable controlling whether SDL updates sensor state when getting input
542 * events.
543 *
544 * The variable can be set to the following values:
545 *
546 * - "0": You'll call SDL_UpdateSensors() manually.
547 * - "1": SDL will automatically call SDL_UpdateSensors(). (default)
548 *
549 * This hint can be set anytime.
550 *
551 * \since This hint is available since SDL 3.2.0.
552 */
553#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
554
555/**
556 * Prevent SDL from using version 4 of the bitmap header when saving BMPs.
557 *
558 * The bitmap header version 4 is required for proper alpha channel support
559 * and SDL will use it when required. Should this not be desired, this hint
560 * can force the use of the 40 byte header version which is supported
561 * everywhere.
562 *
563 * The variable can be set to the following values:
564 *
565 * - "0": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
566 * BMP file with an alpha mask. SDL will use the bitmap header version 4 and
567 * set the alpha mask accordingly. (default)
568 * - "1": Surfaces with a colorkey or an alpha channel are saved to a 32-bit
569 * BMP file without an alpha mask. The alpha channel data will be in the
570 * file, but applications are going to ignore it.
571 *
572 * This hint can be set anytime.
573 *
574 * \since This hint is available since SDL 3.2.0.
575 */
576#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
577
578/**
579 * A variable that decides what camera backend to use.
580 *
581 * By default, SDL will try all available camera backends in a reasonable
582 * order until it finds one that can work, but this hint allows the app or
583 * user to force a specific target, such as "directshow" if, say, you are on
584 * Windows Media Foundations but want to try DirectShow instead.
585 *
586 * The default value is unset, in which case SDL will try to figure out the
587 * best camera backend on your behalf. This hint needs to be set before
588 * SDL_Init() is called to be useful.
589 *
590 * \since This hint is available since SDL 3.2.0.
591 */
592#define SDL_HINT_CAMERA_DRIVER "SDL_CAMERA_DRIVER"
593
594/**
595 * A variable that limits what CPU features are available.
596 *
597 * By default, SDL marks all features the current CPU supports as available.
598 * This hint allows to limit these to a subset.
599 *
600 * When the hint is unset, or empty, SDL will enable all detected CPU
601 * features.
602 *
603 * The variable can be set to a comma separated list containing the following
604 * items:
605 *
606 * - "all"
607 * - "altivec"
608 * - "sse"
609 * - "sse2"
610 * - "sse3"
611 * - "sse41"
612 * - "sse42"
613 * - "avx"
614 * - "avx2"
615 * - "avx512f"
616 * - "arm-simd"
617 * - "neon"
618 * - "lsx"
619 * - "lasx"
620 *
621 * The items can be prefixed by '+'/'-' to add/remove features.
622 *
623 * \since This hint is available since SDL 3.2.0.
624 */
625#define SDL_HINT_CPU_FEATURE_MASK "SDL_CPU_FEATURE_MASK"
626
627/**
628 * A variable controlling whether DirectInput should be used for controllers.
629 *
630 * The variable can be set to the following values:
631 *
632 * - "0": Disable DirectInput detection.
633 * - "1": Enable DirectInput detection. (default)
634 *
635 * This hint should be set before SDL is initialized.
636 *
637 * \since This hint is available since SDL 3.2.0.
638 */
639#define SDL_HINT_JOYSTICK_DIRECTINPUT "SDL_JOYSTICK_DIRECTINPUT"
640
641/**
642 * A variable that specifies a dialog backend to use.
643 *
644 * By default, SDL will try all available dialog backends in a reasonable
645 * order until it finds one that can work, but this hint allows the app or
646 * user to force a specific target.
647 *
648 * If the specified target does not exist or is not available, the
649 * dialog-related function calls will fail.
650 *
651 * This hint currently only applies to platforms using the generic "Unix"
652 * dialog implementation, but may be extended to more platforms in the future.
653 * Note that some Unix and Unix-like platforms have their own implementation,
654 * such as macOS and Haiku.
655 *
656 * The variable can be set to the following values:
657 *
658 * - NULL: Select automatically (default, all platforms)
659 * - "portal": Use XDG Portals through DBus (Unix only)
660 * - "zenity": Use the Zenity program (Unix only)
661 *
662 * More options may be added in the future.
663 *
664 * This hint can be set anytime.
665 *
666 * \since This hint is available since SDL 3.2.0.
667 */
668#define SDL_HINT_FILE_DIALOG_DRIVER "SDL_FILE_DIALOG_DRIVER"
669
670/**
671 * Override for SDL_GetDisplayUsableBounds().
672 *
673 * If set, this hint will override the expected results for
674 * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
675 * to do this, but this allows an embedded system to request that some of the
676 * screen be reserved for other uses when paired with a well-behaved
677 * application.
678 *
679 * The contents of this hint must be 4 comma-separated integers, the first is
680 * the bounds x, then y, width and height, in that order.
681 *
682 * This hint can be set anytime.
683 *
684 * \since This hint is available since SDL 3.2.0.
685 */
686#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
687
688/**
689 * Disable giving back control to the browser automatically when running with
690 * asyncify.
691 *
692 * With -s ASYNCIFY, SDL calls emscripten_sleep during operations such as
693 * refreshing the screen or polling events.
694 *
695 * This hint only applies to the emscripten platform.
696 *
697 * The variable can be set to the following values:
698 *
699 * - "0": Disable emscripten_sleep calls (if you give back browser control
700 * manually or use asyncify for other purposes).
701 * - "1": Enable emscripten_sleep calls. (default)
702 *
703 * This hint can be set anytime.
704 *
705 * \since This hint is available since SDL 3.2.0.
706 */
707#define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
708
709/**
710 * Specify the CSS selector used for the "default" window/canvas.
711 *
712 * This hint only applies to the emscripten platform.
713 *
714 * The default value is "#canvas"
715 *
716 * This hint should be set before creating a window.
717 *
718 * \since This hint is available since SDL 3.2.0.
719 */
720#define SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR "SDL_EMSCRIPTEN_CANVAS_SELECTOR"
721
722/**
723 * Override the binding element for keyboard inputs for Emscripten builds.
724 *
725 * This hint only applies to the emscripten platform.
726 *
727 * The variable can be one of:
728 *
729 * - "#window": the javascript window object (default)
730 * - "#document": the javascript document object
731 * - "#screen": the javascript window.screen object
732 * - "#canvas": the WebGL canvas element
733 * - "#none": Don't bind anything at all
734 * - any other string without a leading # sign applies to the element on the
735 * page with that ID.
736 *
737 * This hint should be set before creating a window.
738 *
739 * \since This hint is available since SDL 3.2.0.
740 */
741#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
742
743/**
744 * A variable that controls whether the on-screen keyboard should be shown
745 * when text input is active.
746 *
747 * The variable can be set to the following values:
748 *
749 * - "auto": The on-screen keyboard will be shown if there is no physical
750 * keyboard attached. (default)
751 * - "0": Do not show the on-screen keyboard.
752 * - "1": Show the on-screen keyboard, if available.
753 *
754 * This hint must be set before SDL_StartTextInput() is called
755 *
756 * \since This hint is available since SDL 3.2.0.
757 */
758#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
759
760/**
761 * A variable containing a list of evdev devices to use if udev is not
762 * available.
763 *
764 * The list of devices is in the form:
765 *
766 * deviceclass:path[,deviceclass:path[,...]]
767 *
768 * where device class is an integer representing the SDL_UDEV_deviceclass and
769 * path is the full path to the event device.
770 *
771 * This hint should be set before SDL is initialized.
772 *
773 * \since This hint is available since SDL 3.2.0.
774 */
775#define SDL_HINT_EVDEV_DEVICES "SDL_EVDEV_DEVICES"
776
777/**
778 * A variable controlling verbosity of the logging of SDL events pushed onto
779 * the internal queue.
780 *
781 * The variable can be set to the following values, from least to most
782 * verbose:
783 *
784 * - "0": Don't log any events. (default)
785 * - "1": Log most events (other than the really spammy ones).
786 * - "2": Include mouse and finger motion events.
787 *
788 * This is generally meant to be used to debug SDL itself, but can be useful
789 * for application developers that need better visibility into what is going
790 * on in the event queue. Logged events are sent through SDL_Log(), which
791 * means by default they appear on stdout on most platforms or maybe
792 * OutputDebugString() on Windows, and can be funneled by the app with
793 * SDL_SetLogOutputFunction(), etc.
794 *
795 * This hint can be set anytime.
796 *
797 * \since This hint is available since SDL 3.2.0.
798 */
799#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
800
801/**
802 * A variable controlling whether raising the window should be done more
803 * forcefully.
804 *
805 * The variable can be set to the following values:
806 *
807 * - "0": Honor the OS policy for raising windows. (default)
808 * - "1": Force the window to be raised, overriding any OS policy.
809 *
810 * At present, this is only an issue under MS Windows, which makes it nearly
811 * impossible to programmatically move a window to the foreground, for
812 * "security" reasons. See http://stackoverflow.com/a/34414846 for a
813 * discussion.
814 *
815 * This hint can be set anytime.
816 *
817 * \since This hint is available since SDL 3.2.0.
818 */
819#define SDL_HINT_FORCE_RAISEWINDOW "SDL_FORCE_RAISEWINDOW"
820
821/**
822 * A variable controlling how 3D acceleration is used to accelerate the SDL
823 * screen surface.
824 *
825 * SDL can try to accelerate the SDL screen surface by using streaming
826 * textures with a 3D rendering engine. This variable controls whether and how
827 * this is done.
828 *
829 * The variable can be set to the following values:
830 *
831 * - "0": Disable 3D acceleration
832 * - "1": Enable 3D acceleration, using the default renderer. (default)
833 * - "X": Enable 3D acceleration, using X where X is one of the valid
834 * rendering drivers. (e.g. "direct3d", "opengl", etc.)
835 *
836 * This hint should be set before calling SDL_GetWindowSurface()
837 *
838 * \since This hint is available since SDL 3.2.0.
839 */
840#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
841
842/**
843 * A variable that lets you manually hint extra gamecontroller db entries.
844 *
845 * The variable should be newline delimited rows of gamecontroller config
846 * data, see SDL_gamepad.h
847 *
848 * You can update mappings after SDL is initialized with
849 * SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
850 *
851 * This hint should be set before SDL is initialized.
852 *
853 * \since This hint is available since SDL 3.2.0.
854 */
855#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
856
857/**
858 * A variable that lets you provide a file with extra gamecontroller db
859 * entries.
860 *
861 * The file should contain lines of gamecontroller config data, see
862 * SDL_gamepad.h
863 *
864 * You can update mappings after SDL is initialized with
865 * SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
866 *
867 * This hint should be set before SDL is initialized.
868 *
869 * \since This hint is available since SDL 3.2.0.
870 */
871#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
872
873/**
874 * A variable that overrides the automatic controller type detection.
875 *
876 * The variable should be comma separated entries, in the form: VID/PID=type
877 *
878 * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
879 *
880 * This hint affects what low level protocol is used with the HIDAPI driver.
881 *
882 * The variable can be set to the following values:
883 *
884 * - "Xbox360"
885 * - "XboxOne"
886 * - "PS3"
887 * - "PS4"
888 * - "PS5"
889 * - "SwitchPro"
890 *
891 * This hint should be set before SDL is initialized.
892 *
893 * \since This hint is available since SDL 3.2.0.
894 */
895#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
896
897/**
898 * A variable containing a list of devices to skip when scanning for game
899 * controllers.
900 *
901 * The format of the string is a comma separated list of USB VID/PID pairs in
902 * hexadecimal form, e.g.
903 *
904 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
905 *
906 * The variable can also take the form of "@file", in which case the named
907 * file will be loaded and interpreted as the value of the variable.
908 *
909 * This hint can be set anytime.
910 *
911 * \since This hint is available since SDL 3.2.0.
912 */
913#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
914
915/**
916 * If set, all devices will be skipped when scanning for game controllers
917 * except for the ones listed in this variable.
918 *
919 * The format of the string is a comma separated list of USB VID/PID pairs in
920 * hexadecimal form, e.g.
921 *
922 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
923 *
924 * The variable can also take the form of "@file", in which case the named
925 * file will be loaded and interpreted as the value of the variable.
926 *
927 * This hint can be set anytime.
928 *
929 * \since This hint is available since SDL 3.2.0.
930 */
931#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
932
933/**
934 * A variable that controls whether the device's built-in accelerometer and
935 * gyro should be used as sensors for gamepads.
936 *
937 * The variable can be set to the following values:
938 *
939 * - "0": Sensor fusion is disabled
940 * - "1": Sensor fusion is enabled for all controllers that lack sensors
941 *
942 * Or the variable can be a comma separated list of USB VID/PID pairs in
943 * hexadecimal form, e.g.
944 *
945 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
946 *
947 * The variable can also take the form of "@file", in which case the named
948 * file will be loaded and interpreted as the value of the variable.
949 *
950 * This hint should be set before a gamepad is opened.
951 *
952 * \since This hint is available since SDL 3.2.0.
953 */
954#define SDL_HINT_GAMECONTROLLER_SENSOR_FUSION "SDL_GAMECONTROLLER_SENSOR_FUSION"
955
956/**
957 * This variable sets the default text of the TextInput window on GDK
958 * platforms.
959 *
960 * This hint is available only if SDL_GDK_TEXTINPUT defined.
961 *
962 * This hint should be set before calling SDL_StartTextInput()
963 *
964 * \since This hint is available since SDL 3.2.0.
965 */
966#define SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT "SDL_GDK_TEXTINPUT_DEFAULT_TEXT"
967
968/**
969 * This variable sets the description of the TextInput window on GDK
970 * platforms.
971 *
972 * This hint is available only if SDL_GDK_TEXTINPUT defined.
973 *
974 * This hint should be set before calling SDL_StartTextInput()
975 *
976 * \since This hint is available since SDL 3.2.0.
977 */
978#define SDL_HINT_GDK_TEXTINPUT_DESCRIPTION "SDL_GDK_TEXTINPUT_DESCRIPTION"
979
980/**
981 * This variable sets the maximum input length of the TextInput window on GDK
982 * platforms.
983 *
984 * The value must be a stringified integer, for example "10" to allow for up
985 * to 10 characters of text input.
986 *
987 * This hint is available only if SDL_GDK_TEXTINPUT defined.
988 *
989 * This hint should be set before calling SDL_StartTextInput()
990 *
991 * \since This hint is available since SDL 3.2.0.
992 */
993#define SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH "SDL_GDK_TEXTINPUT_MAX_LENGTH"
994
995/**
996 * This variable sets the input scope of the TextInput window on GDK
997 * platforms.
998 *
999 * Set this hint to change the XGameUiTextEntryInputScope value that will be
1000 * passed to the window creation function. The value must be a stringified
1001 * integer, for example "0" for XGameUiTextEntryInputScope::Default.
1002 *
1003 * This hint is available only if SDL_GDK_TEXTINPUT defined.
1004 *
1005 * This hint should be set before calling SDL_StartTextInput()
1006 *
1007 * \since This hint is available since SDL 3.2.0.
1008 */
1009#define SDL_HINT_GDK_TEXTINPUT_SCOPE "SDL_GDK_TEXTINPUT_SCOPE"
1010
1011/**
1012 * This variable sets the title of the TextInput window on GDK platforms.
1013 *
1014 * This hint is available only if SDL_GDK_TEXTINPUT defined.
1015 *
1016 * This hint should be set before calling SDL_StartTextInput()
1017 *
1018 * \since This hint is available since SDL 3.2.0.
1019 */
1020#define SDL_HINT_GDK_TEXTINPUT_TITLE "SDL_GDK_TEXTINPUT_TITLE"
1021
1022/**
1023 * A variable to control whether HIDAPI uses libusb for device access.
1024 *
1025 * By default libusb will only be used for a few devices that require direct
1026 * USB access, and this can be controlled with
1027 * SDL_HINT_HIDAPI_LIBUSB_WHITELIST.
1028 *
1029 * The variable can be set to the following values:
1030 *
1031 * - "0": HIDAPI will not use libusb for device access.
1032 * - "1": HIDAPI will use libusb for device access if available. (default)
1033 *
1034 * This hint should be set before SDL is initialized.
1035 *
1036 * \since This hint is available since SDL 3.2.0.
1037 */
1038#define SDL_HINT_HIDAPI_LIBUSB "SDL_HIDAPI_LIBUSB"
1039
1040/**
1041 * A variable to control whether HIDAPI uses libusb only for whitelisted
1042 * devices.
1043 *
1044 * By default libusb will only be used for a few devices that require direct
1045 * USB access.
1046 *
1047 * The variable can be set to the following values:
1048 *
1049 * - "0": HIDAPI will use libusb for all device access.
1050 * - "1": HIDAPI will use libusb only for whitelisted devices. (default)
1051 *
1052 * This hint should be set before SDL is initialized.
1053 *
1054 * \since This hint is available since SDL 3.2.0.
1055 */
1056#define SDL_HINT_HIDAPI_LIBUSB_WHITELIST "SDL_HIDAPI_LIBUSB_WHITELIST"
1057
1058/**
1059 * A variable to control whether HIDAPI uses udev for device detection.
1060 *
1061 * The variable can be set to the following values:
1062 *
1063 * - "0": HIDAPI will poll for device changes.
1064 * - "1": HIDAPI will use udev for device detection. (default)
1065 *
1066 * This hint should be set before SDL is initialized.
1067 *
1068 * \since This hint is available since SDL 3.2.0.
1069 */
1070#define SDL_HINT_HIDAPI_UDEV "SDL_HIDAPI_UDEV"
1071
1072/**
1073 * A variable that specifies a GPU backend to use.
1074 *
1075 * By default, SDL will try all available GPU backends in a reasonable order
1076 * until it finds one that can work, but this hint allows the app or user to
1077 * force a specific target, such as "direct3d12" if, say, your hardware
1078 * supports Vulkan but you want to try using D3D12 instead.
1079 *
1080 * This hint should be set before any GPU functions are called.
1081 *
1082 * \since This hint is available since SDL 3.2.0.
1083 */
1084#define SDL_HINT_GPU_DRIVER "SDL_GPU_DRIVER"
1085
1086/**
1087 * A variable to control whether SDL_hid_enumerate() enumerates all HID
1088 * devices or only controllers.
1089 *
1090 * The variable can be set to the following values:
1091 *
1092 * - "0": SDL_hid_enumerate() will enumerate all HID devices.
1093 * - "1": SDL_hid_enumerate() will only enumerate controllers. (default)
1094 *
1095 * By default SDL will only enumerate controllers, to reduce risk of hanging
1096 * or crashing on devices with bad drivers and avoiding macOS keyboard capture
1097 * permission prompts.
1098 *
1099 * This hint can be set anytime.
1100 *
1101 * \since This hint is available since SDL 3.2.0.
1102 */
1103#define SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"
1104
1105/**
1106 * A variable containing a list of devices to ignore in SDL_hid_enumerate().
1107 *
1108 * The format of the string is a comma separated list of USB VID/PID pairs in
1109 * hexadecimal form, e.g.
1110 *
1111 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1112 *
1113 * For example, to ignore the Shanwan DS3 controller and any Valve controller,
1114 * you might use the string "0x2563/0x0523,0x28de/0x0000"
1115 *
1116 * This hint can be set anytime.
1117 *
1118 * \since This hint is available since SDL 3.2.0.
1119 */
1120#define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES"
1121
1122/**
1123 * A variable describing what IME UI elements the application can display.
1124 *
1125 * By default IME UI is handled using native components by the OS where
1126 * possible, however this can interfere with or not be visible when exclusive
1127 * fullscreen mode is used.
1128 *
1129 * The variable can be set to a comma separated list containing the following
1130 * items:
1131 *
1132 * - "none" or "0": The application can't render any IME elements, and native
1133 * UI should be used. (default)
1134 * - "composition": The application handles SDL_EVENT_TEXT_EDITING events and
1135 * can render the composition text.
1136 * - "candidates": The application handles SDL_EVENT_TEXT_EDITING_CANDIDATES
1137 * and can render the candidate list.
1138 *
1139 * This hint should be set before SDL is initialized.
1140 *
1141 * \since This hint is available since SDL 3.2.0.
1142 */
1143#define SDL_HINT_IME_IMPLEMENTED_UI "SDL_IME_IMPLEMENTED_UI"
1144
1145/**
1146 * A variable controlling whether the home indicator bar on iPhone X should be
1147 * hidden.
1148 *
1149 * The variable can be set to the following values:
1150 *
1151 * - "0": The indicator bar is not hidden. (default for windowed applications)
1152 * - "1": The indicator bar is hidden and is shown when the screen is touched
1153 * (useful for movie playback applications).
1154 * - "2": The indicator bar is dim and the first swipe makes it visible and
1155 * the second swipe performs the "home" action. (default for fullscreen
1156 * applications)
1157 *
1158 * This hint can be set anytime.
1159 *
1160 * \since This hint is available since SDL 3.2.0.
1161 */
1162#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
1163
1164/**
1165 * A variable that lets you enable joystick (and gamecontroller) events even
1166 * when your app is in the background.
1167 *
1168 * The variable can be set to the following values:
1169 *
1170 * - "0": Disable joystick & gamecontroller input events when the application
1171 * is in the background. (default)
1172 * - "1": Enable joystick & gamecontroller input events when the application
1173 * is in the background.
1174 *
1175 * This hint can be set anytime.
1176 *
1177 * \since This hint is available since SDL 3.2.0.
1178 */
1179#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
1180
1181/**
1182 * A variable containing a list of arcade stick style controllers.
1183 *
1184 * The format of the string is a comma separated list of USB VID/PID pairs in
1185 * hexadecimal form, e.g.
1186 *
1187 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1188 *
1189 * The variable can also take the form of "@file", in which case the named
1190 * file will be loaded and interpreted as the value of the variable.
1191 *
1192 * This hint can be set anytime.
1193 *
1194 * \since This hint is available since SDL 3.2.0.
1195 */
1196#define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES "SDL_JOYSTICK_ARCADESTICK_DEVICES"
1197
1198/**
1199 * A variable containing a list of devices that are not arcade stick style
1200 * controllers.
1201 *
1202 * This will override SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES and the built in
1203 * device list.
1204 *
1205 * The format of the string is a comma separated list of USB VID/PID pairs in
1206 * hexadecimal form, e.g.
1207 *
1208 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1209 *
1210 * The variable can also take the form of "@file", in which case the named
1211 * file will be loaded and interpreted as the value of the variable.
1212 *
1213 * This hint can be set anytime.
1214 *
1215 * \since This hint is available since SDL 3.2.0.
1216 */
1217#define SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED"
1218
1219/**
1220 * A variable containing a list of devices that should not be considered
1221 * joysticks.
1222 *
1223 * The format of the string is a comma separated list of USB VID/PID pairs in
1224 * hexadecimal form, e.g.
1225 *
1226 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1227 *
1228 * The variable can also take the form of "@file", in which case the named
1229 * file will be loaded and interpreted as the value of the variable.
1230 *
1231 * This hint can be set anytime.
1232 *
1233 * \since This hint is available since SDL 3.2.0.
1234 */
1235#define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES "SDL_JOYSTICK_BLACKLIST_DEVICES"
1236
1237/**
1238 * A variable containing a list of devices that should be considered
1239 * joysticks.
1240 *
1241 * This will override SDL_HINT_JOYSTICK_BLACKLIST_DEVICES and the built in
1242 * device list.
1243 *
1244 * The format of the string is a comma separated list of USB VID/PID pairs in
1245 * hexadecimal form, e.g.
1246 *
1247 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1248 *
1249 * The variable can also take the form of "@file", in which case the named
1250 * file will be loaded and interpreted as the value of the variable.
1251 *
1252 * This hint can be set anytime.
1253 *
1254 * \since This hint is available since SDL 3.2.0.
1255 */
1256#define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"
1257
1258/**
1259 * A variable containing a comma separated list of devices to open as
1260 * joysticks.
1261 *
1262 * This variable is currently only used by the Linux joystick driver.
1263 *
1264 * \since This hint is available since SDL 3.2.0.
1265 */
1266#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
1267
1268/**
1269 * A variable controlling whether enhanced reports should be used for
1270 * controllers when using the HIDAPI driver.
1271 *
1272 * Enhanced reports allow rumble and effects on Bluetooth PlayStation
1273 * controllers and gyro on Nintendo Switch controllers, but break Windows
1274 * DirectInput for other applications that don't use SDL.
1275 *
1276 * Once enhanced reports are enabled, they can't be disabled on PlayStation
1277 * controllers without power cycling the controller.
1278 *
1279 * The variable can be set to the following values:
1280 *
1281 * - "0": enhanced reports are not enabled.
1282 * - "1": enhanced reports are enabled. (default)
1283 * - "auto": enhanced features are advertised to the application, but SDL
1284 * doesn't change the controller report mode unless the application uses
1285 * them.
1286 *
1287 * This hint can be enabled anytime.
1288 *
1289 * \since This hint is available since SDL 3.2.0.
1290 */
1291#define SDL_HINT_JOYSTICK_ENHANCED_REPORTS "SDL_JOYSTICK_ENHANCED_REPORTS"
1292
1293/**
1294 * A variable containing a list of flightstick style controllers.
1295 *
1296 * The format of the string is a comma separated list of USB VID/PID pairs in
1297 * hexadecimal form, e.g.
1298 *
1299 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1300 *
1301 * The variable can also take the form of @file, in which case the named file
1302 * will be loaded and interpreted as the value of the variable.
1303 *
1304 * This hint can be set anytime.
1305 *
1306 * \since This hint is available since SDL 3.2.0.
1307 */
1308#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"
1309
1310/**
1311 * A variable containing a list of devices that are not flightstick style
1312 * controllers.
1313 *
1314 * This will override SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES and the built in
1315 * device list.
1316 *
1317 * The format of the string is a comma separated list of USB VID/PID pairs in
1318 * hexadecimal form, e.g.
1319 *
1320 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1321 *
1322 * The variable can also take the form of "@file", in which case the named
1323 * file will be loaded and interpreted as the value of the variable.
1324 *
1325 * This hint can be set anytime.
1326 *
1327 * \since This hint is available since SDL 3.2.0.
1328 */
1329#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"
1330
1331/**
1332 * A variable controlling whether GameInput should be used for controller
1333 * handling on Windows.
1334 *
1335 * The variable can be set to the following values:
1336 *
1337 * - "0": GameInput is not used.
1338 * - "1": GameInput is used.
1339 *
1340 * The default is "1" on GDK platforms, and "0" otherwise.
1341 *
1342 * This hint should be set before SDL is initialized.
1343 *
1344 * \since This hint is available since SDL 3.2.0.
1345 */
1346#define SDL_HINT_JOYSTICK_GAMEINPUT "SDL_JOYSTICK_GAMEINPUT"
1347
1348/**
1349 * A variable containing a list of devices known to have a GameCube form
1350 * factor.
1351 *
1352 * The format of the string is a comma separated list of USB VID/PID pairs in
1353 * hexadecimal form, e.g.
1354 *
1355 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1356 *
1357 * The variable can also take the form of "@file", in which case the named
1358 * file will be loaded and interpreted as the value of the variable.
1359 *
1360 * This hint can be set anytime.
1361 *
1362 * \since This hint is available since SDL 3.2.0.
1363 */
1364#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES "SDL_JOYSTICK_GAMECUBE_DEVICES"
1365
1366/**
1367 * A variable containing a list of devices known not to have a GameCube form
1368 * factor.
1369 *
1370 * This will override SDL_HINT_JOYSTICK_GAMECUBE_DEVICES and the built in
1371 * device list.
1372 *
1373 * The format of the string is a comma separated list of USB VID/PID pairs in
1374 * hexadecimal form, e.g.
1375 *
1376 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
1377 *
1378 * The variable can also take the form of "@file", in which case the named
1379 * file will be loaded and interpreted as the value of the variable.
1380 *
1381 * This hint can be set anytime.
1382 *
1383 * \since This hint is available since SDL 3.2.0.
1384 */
1385#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"
1386
1387/**
1388 * A variable controlling whether the HIDAPI joystick drivers should be used.
1389 *
1390 * The variable can be set to the following values:
1391 *
1392 * - "0": HIDAPI drivers are not used.
1393 * - "1": HIDAPI drivers are used. (default)
1394 *
1395 * This variable is the default for all drivers, but can be overridden by the
1396 * hints for specific drivers below.
1397 *
1398 * This hint should be set before initializing joysticks and gamepads.
1399 *
1400 * \since This hint is available since SDL 3.2.0.
1401 */
1402#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
1403
1404/**
1405 * A variable controlling whether Nintendo Switch Joy-Con controllers will be
1406 * combined into a single Pro-like controller when using the HIDAPI driver.
1407 *
1408 * The variable can be set to the following values:
1409 *
1410 * - "0": Left and right Joy-Con controllers will not be combined and each
1411 * will be a mini-gamepad.
1412 * - "1": Left and right Joy-Con controllers will be combined into a single
1413 * controller. (default)
1414 *
1415 * This hint should be set before initializing joysticks and gamepads.
1416 *
1417 * \since This hint is available since SDL 3.2.0.
1418 */
1419#define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
1420
1421/**
1422 * A variable controlling whether the HIDAPI driver for Nintendo GameCube
1423 * controllers should be used.
1424 *
1425 * The variable can be set to the following values:
1426 *
1427 * - "0": HIDAPI driver is not used.
1428 * - "1": HIDAPI driver is used.
1429 *
1430 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
1431 *
1432 * This hint should be set before initializing joysticks and gamepads.
1433 *
1434 * \since This hint is available since SDL 3.2.0.
1435 */
1436#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
1437
1438/**
1439 * A variable controlling whether rumble is used to implement the GameCube
1440 * controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2).
1441 *
1442 * This is useful for applications that need full compatibility for things
1443 * like ADSR envelopes. - Stop is implemented by setting low_frequency_rumble
1444 * to 0 and high_frequency_rumble >0 - Rumble is both at any arbitrary value -
1445 * StopHard is implemented by setting both low_frequency_rumble and
1446 * high_frequency_rumble to 0
1447 *
1448 * The variable can be set to the following values:
1449 *
1450 * - "0": Normal rumble behavior is behavior is used. (default)
1451 * - "1": Proper GameCube controller rumble behavior is used.
1452 *
1453 * This hint can be set anytime.
1454 *
1455 * \since This hint is available since SDL 3.2.0.
1456 */
1457#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE"
1458
1459/**
1460 * A variable controlling whether the HIDAPI driver for Nintendo Switch
1461 * Joy-Cons should be used.
1462 *
1463 * The variable can be set to the following values:
1464 *
1465 * - "0": HIDAPI driver is not used.
1466 * - "1": HIDAPI driver is used.
1467 *
1468 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1469 *
1470 * This hint should be set before initializing joysticks and gamepads.
1471 *
1472 * \since This hint is available since SDL 3.2.0.
1473 */
1474#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
1475
1476/**
1477 * A variable controlling whether the Home button LED should be turned on when
1478 * a Nintendo Switch Joy-Con controller is opened.
1479 *
1480 * The variable can be set to the following values:
1481 *
1482 * - "0": home button LED is turned off
1483 * - "1": home button LED is turned on
1484 *
1485 * By default the Home button LED state is not changed. This hint can also be
1486 * set to a floating point value between 0.0 and 1.0 which controls the
1487 * brightness of the Home button LED.
1488 *
1489 * This hint can be set anytime.
1490 *
1491 * \since This hint is available since SDL 3.2.0.
1492 */
1493#define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
1494
1495/**
1496 * A variable controlling whether the HIDAPI driver for Amazon Luna
1497 * controllers connected via Bluetooth should be used.
1498 *
1499 * The variable can be set to the following values:
1500 *
1501 * - "0": HIDAPI driver is not used.
1502 * - "1": HIDAPI driver is used.
1503 *
1504 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1505 *
1506 * This hint should be set before initializing joysticks and gamepads.
1507 *
1508 * \since This hint is available since SDL 3.2.0.
1509 */
1510#define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
1511
1512/**
1513 * A variable controlling whether the HIDAPI driver for Nintendo Online
1514 * classic controllers should be used.
1515 *
1516 * The variable can be set to the following values:
1517 *
1518 * - "0": HIDAPI driver is not used.
1519 * - "1": HIDAPI driver is used.
1520 *
1521 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1522 *
1523 * This hint should be set before initializing joysticks and gamepads.
1524 *
1525 * \since This hint is available since SDL 3.2.0.
1526 */
1527#define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
1528
1529/**
1530 * A variable controlling whether the HIDAPI driver for PS3 controllers should
1531 * be used.
1532 *
1533 * The variable can be set to the following values:
1534 *
1535 * - "0": HIDAPI driver is not used.
1536 * - "1": HIDAPI driver is used.
1537 *
1538 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on
1539 * other platforms.
1540 *
1541 * For official Sony driver (sixaxis.sys) use
1542 * SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER. See
1543 * https://github.com/ViGEm/DsHidMini for an alternative driver on Windows.
1544 *
1545 * This hint should be set before initializing joysticks and gamepads.
1546 *
1547 * \since This hint is available since SDL 3.2.0.
1548 */
1549#define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
1550
1551/**
1552 * A variable controlling whether the Sony driver (sixaxis.sys) for PS3
1553 * controllers (Sixaxis/DualShock 3) should be used.
1554 *
1555 * The variable can be set to the following values:
1556 *
1557 * - "0": Sony driver (sixaxis.sys) is not used.
1558 * - "1": Sony driver (sixaxis.sys) is used.
1559 *
1560 * The default value is 0.
1561 *
1562 * This hint should be set before initializing joysticks and gamepads.
1563 *
1564 * \since This hint is available since SDL 3.2.0.
1565 */
1566#define SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER "SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER"
1567
1568/**
1569 * A variable controlling whether the HIDAPI driver for PS4 controllers should
1570 * be used.
1571 *
1572 * The variable can be set to the following values:
1573 *
1574 * - "0": HIDAPI driver is not used.
1575 * - "1": HIDAPI driver is used.
1576 *
1577 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1578 *
1579 * This hint should be set before initializing joysticks and gamepads.
1580 *
1581 * \since This hint is available since SDL 3.2.0.
1582 */
1583#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
1584
1585/**
1586 * A variable controlling the update rate of the PS4 controller over Bluetooth
1587 * when using the HIDAPI driver.
1588 *
1589 * This defaults to 4 ms, to match the behavior over USB, and to be more
1590 * friendly to other Bluetooth devices and older Bluetooth hardware on the
1591 * computer. It can be set to "1" (1000Hz), "2" (500Hz) and "4" (250Hz)
1592 *
1593 * This hint can be set anytime, but only takes effect when extended input
1594 * reports are enabled.
1595 *
1596 * \since This hint is available since SDL 3.2.0.
1597 */
1598#define SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL "SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL"
1599
1600/**
1601 * A variable controlling whether the HIDAPI driver for PS5 controllers should
1602 * be used.
1603 *
1604 * The variable can be set to the following values:
1605 *
1606 * - "0": HIDAPI driver is not used.
1607 * - "1": HIDAPI driver is used.
1608 *
1609 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1610 *
1611 * This hint should be set before initializing joysticks and gamepads.
1612 *
1613 * \since This hint is available since SDL 3.2.0.
1614 */
1615#define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
1616
1617/**
1618 * A variable controlling whether the player LEDs should be lit to indicate
1619 * which player is associated with a PS5 controller.
1620 *
1621 * The variable can be set to the following values:
1622 *
1623 * - "0": player LEDs are not enabled.
1624 * - "1": player LEDs are enabled. (default)
1625 *
1626 * \since This hint is available since SDL 3.2.0.
1627 */
1628#define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
1629
1630/**
1631 * A variable controlling whether the HIDAPI driver for NVIDIA SHIELD
1632 * controllers should be used.
1633 *
1634 * The variable can be set to the following values:
1635 *
1636 * - "0": HIDAPI driver is not used.
1637 * - "1": HIDAPI driver is used.
1638 *
1639 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1640 *
1641 * This hint should be set before initializing joysticks and gamepads.
1642 *
1643 * \since This hint is available since SDL 3.2.0.
1644 */
1645#define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD"
1646
1647/**
1648 * A variable controlling whether the HIDAPI driver for Google Stadia
1649 * controllers should be used.
1650 *
1651 * The variable can be set to the following values:
1652 *
1653 * - "0": HIDAPI driver is not used.
1654 * - "1": HIDAPI driver is used.
1655 *
1656 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1657 *
1658 * \since This hint is available since SDL 3.2.0.
1659 */
1660#define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
1661
1662/**
1663 * A variable controlling whether the HIDAPI driver for Bluetooth Steam
1664 * Controllers should be used.
1665 *
1666 * The variable can be set to the following values:
1667 *
1668 * - "0": HIDAPI driver is not used. (default)
1669 * - "1": HIDAPI driver is used for Steam Controllers, which requires
1670 * Bluetooth access and may prompt the user for permission on iOS and
1671 * Android.
1672 *
1673 * This hint should be set before initializing joysticks and gamepads.
1674 *
1675 * \since This hint is available since SDL 3.2.0.
1676 */
1677#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
1678
1679/**
1680 * A variable controlling whether the Steam button LED should be turned on
1681 * when a Steam controller is opened.
1682 *
1683 * The variable can be set to the following values:
1684 *
1685 * - "0": Steam button LED is turned off.
1686 * - "1": Steam button LED is turned on.
1687 *
1688 * By default the Steam button LED state is not changed. This hint can also be
1689 * set to a floating point value between 0.0 and 1.0 which controls the
1690 * brightness of the Steam button LED.
1691 *
1692 * This hint can be set anytime.
1693 *
1694 * \since This hint is available since SDL 3.2.0.
1695 */
1696#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED "SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED"
1697
1698/**
1699 * A variable controlling whether the HIDAPI driver for the Steam Deck builtin
1700 * controller should be used.
1701 *
1702 * The variable can be set to the following values:
1703 *
1704 * - "0": HIDAPI driver is not used.
1705 * - "1": HIDAPI driver is used.
1706 *
1707 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1708 *
1709 * This hint should be set before initializing joysticks and gamepads.
1710 *
1711 * \since This hint is available since SDL 3.2.0.
1712 */
1713#define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK "SDL_JOYSTICK_HIDAPI_STEAMDECK"
1714
1715/**
1716 * A variable controlling whether the HIDAPI driver for HORI licensed Steam
1717 * controllers should be used.
1718 *
1719 * This variable can be set to the following values: "0" - HIDAPI driver is
1720 * not used "1" - HIDAPI driver is used
1721 *
1722 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
1723 */
1724#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI "SDL_JOYSTICK_HIDAPI_STEAM_HORI"
1725
1726/**
1727 * A variable controlling whether the HIDAPI driver for Nintendo Switch
1728 * controllers should be used.
1729 *
1730 * The variable can be set to the following values:
1731 *
1732 * - "0": HIDAPI driver is not used.
1733 * - "1": HIDAPI driver is used.
1734 *
1735 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
1736 *
1737 * This hint should be set before initializing joysticks and gamepads.
1738 *
1739 * \since This hint is available since SDL 3.2.0.
1740 */
1741#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
1742
1743/**
1744 * A variable controlling whether the Home button LED should be turned on when
1745 * a Nintendo Switch Pro controller is opened.
1746 *
1747 * The variable can be set to the following values:
1748 *
1749 * - "0": Home button LED is turned off.
1750 * - "1": Home button LED is turned on.
1751 *
1752 * By default the Home button LED state is not changed. This hint can also be
1753 * set to a floating point value between 0.0 and 1.0 which controls the
1754 * brightness of the Home button LED.
1755 *
1756 * This hint can be set anytime.
1757 *
1758 * \since This hint is available since SDL 3.2.0.
1759 */
1760#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
1761
1762/**
1763 * A variable controlling whether the player LEDs should be lit to indicate
1764 * which player is associated with a Nintendo Switch controller.
1765 *
1766 * The variable can be set to the following values:
1767 *
1768 * - "0": Player LEDs are not enabled.
1769 * - "1": Player LEDs are enabled. (default)
1770 *
1771 * This hint can be set anytime.
1772 *
1773 * \since This hint is available since SDL 3.2.0.
1774 */
1775#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
1776
1777/**
1778 * A variable controlling whether Nintendo Switch Joy-Con controllers will be
1779 * in vertical mode when using the HIDAPI driver.
1780 *
1781 * The variable can be set to the following values:
1782 *
1783 * - "0": Left and right Joy-Con controllers will not be in vertical mode.
1784 * (default)
1785 * - "1": Left and right Joy-Con controllers will be in vertical mode.
1786 *
1787 * This hint should be set before opening a Joy-Con controller.
1788 *
1789 * \since This hint is available since SDL 3.2.0.
1790 */
1791#define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
1792
1793/**
1794 * A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U
1795 * controllers should be used.
1796 *
1797 * The variable can be set to the following values:
1798 *
1799 * - "0": HIDAPI driver is not used.
1800 * - "1": HIDAPI driver is used.
1801 *
1802 * This driver doesn't work with the dolphinbar, so the default is false for
1803 * now.
1804 *
1805 * This hint should be set before initializing joysticks and gamepads.
1806 *
1807 * \since This hint is available since SDL 3.2.0.
1808 */
1809#define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII"
1810
1811/**
1812 * A variable controlling whether the player LEDs should be lit to indicate
1813 * which player is associated with a Wii controller.
1814 *
1815 * The variable can be set to the following values:
1816 *
1817 * - "0": Player LEDs are not enabled.
1818 * - "1": Player LEDs are enabled. (default)
1819 *
1820 * This hint can be set anytime.
1821 *
1822 * \since This hint is available since SDL 3.2.0.
1823 */
1824#define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
1825
1826/**
1827 * A variable controlling whether the HIDAPI driver for XBox controllers
1828 * should be used.
1829 *
1830 * The variable can be set to the following values:
1831 *
1832 * - "0": HIDAPI driver is not used.
1833 * - "1": HIDAPI driver is used.
1834 *
1835 * The default is "0" on Windows, otherwise the value of
1836 * SDL_HINT_JOYSTICK_HIDAPI
1837 *
1838 * This hint should be set before initializing joysticks and gamepads.
1839 *
1840 * \since This hint is available since SDL 3.2.0.
1841 */
1842#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
1843
1844/**
1845 * A variable controlling whether the HIDAPI driver for XBox 360 controllers
1846 * should be used.
1847 *
1848 * The variable can be set to the following values:
1849 *
1850 * - "0": HIDAPI driver is not used.
1851 * - "1": HIDAPI driver is used.
1852 *
1853 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
1854 *
1855 * This hint should be set before initializing joysticks and gamepads.
1856 *
1857 * \since This hint is available since SDL 3.2.0.
1858 */
1859#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
1860
1861/**
1862 * A variable controlling whether the player LEDs should be lit to indicate
1863 * which player is associated with an Xbox 360 controller.
1864 *
1865 * The variable can be set to the following values:
1866 *
1867 * - "0": Player LEDs are not enabled.
1868 * - "1": Player LEDs are enabled. (default)
1869 *
1870 * This hint can be set anytime.
1871 *
1872 * \since This hint is available since SDL 3.2.0.
1873 */
1874#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
1875
1876/**
1877 * A variable controlling whether the HIDAPI driver for XBox 360 wireless
1878 * controllers should be used.
1879 *
1880 * The variable can be set to the following values:
1881 *
1882 * - "0": HIDAPI driver is not used.
1883 * - "1": HIDAPI driver is used.
1884 *
1885 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360
1886 *
1887 * This hint should be set before initializing joysticks and gamepads.
1888 *
1889 * \since This hint is available since SDL 3.2.0.
1890 */
1891#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
1892
1893/**
1894 * A variable controlling whether the HIDAPI driver for XBox One controllers
1895 * should be used.
1896 *
1897 * The variable can be set to the following values:
1898 *
1899 * - "0": HIDAPI driver is not used.
1900 * - "1": HIDAPI driver is used.
1901 *
1902 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX.
1903 *
1904 * This hint should be set before initializing joysticks and gamepads.
1905 *
1906 * \since This hint is available since SDL 3.2.0.
1907 */
1908#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
1909
1910/**
1911 * A variable controlling whether the Home button LED should be turned on when
1912 * an Xbox One controller is opened.
1913 *
1914 * The variable can be set to the following values:
1915 *
1916 * - "0": Home button LED is turned off.
1917 * - "1": Home button LED is turned on.
1918 *
1919 * By default the Home button LED state is not changed. This hint can also be
1920 * set to a floating point value between 0.0 and 1.0 which controls the
1921 * brightness of the Home button LED. The default brightness is 0.4.
1922 *
1923 * This hint can be set anytime.
1924 *
1925 * \since This hint is available since SDL 3.2.0.
1926 */
1927#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
1928
1929/**
1930 * A variable controlling whether IOKit should be used for controller
1931 * handling.
1932 *
1933 * The variable can be set to the following values:
1934 *
1935 * - "0": IOKit is not used.
1936 * - "1": IOKit is used. (default)
1937 *
1938 * This hint should be set before SDL is initialized.
1939 *
1940 * \since This hint is available since SDL 3.2.0.
1941 */
1942#define SDL_HINT_JOYSTICK_IOKIT "SDL_JOYSTICK_IOKIT"
1943
1944/**
1945 * A variable controlling whether to use the classic /dev/input/js* joystick
1946 * interface or the newer /dev/input/event* joystick interface on Linux.
1947 *
1948 * The variable can be set to the following values:
1949 *
1950 * - "0": Use /dev/input/event* (default)
1951 * - "1": Use /dev/input/js*
1952 *
1953 * This hint should be set before SDL is initialized.
1954 *
1955 * \since This hint is available since SDL 3.2.0.
1956 */
1957#define SDL_HINT_JOYSTICK_LINUX_CLASSIC "SDL_JOYSTICK_LINUX_CLASSIC"
1958
1959/**
1960 * A variable controlling whether joysticks on Linux adhere to their
1961 * HID-defined deadzones or return unfiltered values.
1962 *
1963 * The variable can be set to the following values:
1964 *
1965 * - "0": Return unfiltered joystick axis values. (default)
1966 * - "1": Return axis values with deadzones taken into account.
1967 *
1968 * This hint should be set before a controller is opened.
1969 *
1970 * \since This hint is available since SDL 3.2.0.
1971 */
1972#define SDL_HINT_JOYSTICK_LINUX_DEADZONES "SDL_JOYSTICK_LINUX_DEADZONES"
1973
1974/**
1975 * A variable controlling whether joysticks on Linux will always treat 'hat'
1976 * axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking
1977 * whether they may be analog.
1978 *
1979 * The variable can be set to the following values:
1980 *
1981 * - "0": Only map hat axis inputs to digital hat outputs if the input axes
1982 * appear to actually be digital. (default)
1983 * - "1": Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as
1984 * digital hats.
1985 *
1986 * This hint should be set before a controller is opened.
1987 *
1988 * \since This hint is available since SDL 3.2.0.
1989 */
1990#define SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS "SDL_JOYSTICK_LINUX_DIGITAL_HATS"
1991
1992/**
1993 * A variable controlling whether digital hats on Linux will apply deadzones
1994 * to their underlying input axes or use unfiltered values.
1995 *
1996 * The variable can be set to the following values:
1997 *
1998 * - "0": Return digital hat values based on unfiltered input axis values.
1999 * - "1": Return digital hat values with deadzones on the input axes taken
2000 * into account. (default)
2001 *
2002 * This hint should be set before a controller is opened.
2003 *
2004 * \since This hint is available since SDL 3.2.0.
2005 */
2006#define SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES "SDL_JOYSTICK_LINUX_HAT_DEADZONES"
2007
2008/**
2009 * A variable controlling whether GCController should be used for controller
2010 * handling.
2011 *
2012 * The variable can be set to the following values:
2013 *
2014 * - "0": GCController is not used.
2015 * - "1": GCController is used. (default)
2016 *
2017 * This hint should be set before SDL is initialized.
2018 *
2019 * \since This hint is available since SDL 3.2.0.
2020 */
2021#define SDL_HINT_JOYSTICK_MFI "SDL_JOYSTICK_MFI"
2022
2023/**
2024 * A variable controlling whether the RAWINPUT joystick drivers should be used
2025 * for better handling XInput-capable devices.
2026 *
2027 * The variable can be set to the following values:
2028 *
2029 * - "0": RAWINPUT drivers are not used. (default)
2030 * - "1": RAWINPUT drivers are used.
2031 *
2032 * This hint should be set before SDL is initialized.
2033 *
2034 * \since This hint is available since SDL 3.2.0.
2035 */
2036#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
2037
2038/**
2039 * A variable controlling whether the RAWINPUT driver should pull correlated
2040 * data from XInput.
2041 *
2042 * The variable can be set to the following values:
2043 *
2044 * - "0": RAWINPUT driver will only use data from raw input APIs.
2045 * - "1": RAWINPUT driver will also pull data from XInput and
2046 * Windows.Gaming.Input, providing better trigger axes, guide button
2047 * presses, and rumble support for Xbox controllers. (default)
2048 *
2049 * This hint should be set before a gamepad is opened.
2050 *
2051 * \since This hint is available since SDL 3.2.0.
2052 */
2053#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
2054
2055/**
2056 * A variable controlling whether the ROG Chakram mice should show up as
2057 * joysticks.
2058 *
2059 * The variable can be set to the following values:
2060 *
2061 * - "0": ROG Chakram mice do not show up as joysticks. (default)
2062 * - "1": ROG Chakram mice show up as joysticks.
2063 *
2064 * This hint should be set before SDL is initialized.
2065 *
2066 * \since This hint is available since SDL 3.2.0.
2067 */
2068#define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
2069
2070/**
2071 * A variable controlling whether a separate thread should be used for
2072 * handling joystick detection and raw input messages on Windows.
2073 *
2074 * The variable can be set to the following values:
2075 *
2076 * - "0": A separate thread is not used.
2077 * - "1": A separate thread is used for handling raw input messages. (default)
2078 *
2079 * This hint should be set before SDL is initialized.
2080 *
2081 * \since This hint is available since SDL 3.2.0.
2082 */
2083#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
2084
2085/**
2086 * A variable containing a list of throttle style controllers.
2087 *
2088 * The format of the string is a comma separated list of USB VID/PID pairs in
2089 * hexadecimal form, e.g.
2090 *
2091 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2092 *
2093 * The variable can also take the form of "@file", in which case the named
2094 * file will be loaded and interpreted as the value of the variable.
2095 *
2096 * This hint can be set anytime.
2097 *
2098 * \since This hint is available since SDL 3.2.0.
2099 */
2100#define SDL_HINT_JOYSTICK_THROTTLE_DEVICES "SDL_JOYSTICK_THROTTLE_DEVICES"
2101
2102/**
2103 * A variable containing a list of devices that are not throttle style
2104 * controllers.
2105 *
2106 * This will override SDL_HINT_JOYSTICK_THROTTLE_DEVICES and the built in
2107 * device list.
2108 *
2109 * The format of the string is a comma separated list of USB VID/PID pairs in
2110 * hexadecimal form, e.g.
2111 *
2112 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2113 *
2114 * The variable can also take the form of "@file", in which case the named
2115 * file will be loaded and interpreted as the value of the variable.
2116 *
2117 * This hint can be set anytime.
2118 *
2119 * \since This hint is available since SDL 3.2.0.
2120 */
2121#define SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"
2122
2123/**
2124 * A variable controlling whether Windows.Gaming.Input should be used for
2125 * controller handling.
2126 *
2127 * The variable can be set to the following values:
2128 *
2129 * - "0": WGI is not used.
2130 * - "1": WGI is used. (default)
2131 *
2132 * This hint should be set before SDL is initialized.
2133 *
2134 * \since This hint is available since SDL 3.2.0.
2135 */
2136#define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI"
2137
2138/**
2139 * A variable containing a list of wheel style controllers.
2140 *
2141 * The format of the string is a comma separated list of USB VID/PID pairs in
2142 * hexadecimal form, e.g.
2143 *
2144 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2145 *
2146 * The variable can also take the form of "@file", in which case the named
2147 * file will be loaded and interpreted as the value of the variable.
2148 *
2149 * This hint can be set anytime.
2150 *
2151 * \since This hint is available since SDL 3.2.0.
2152 */
2153#define SDL_HINT_JOYSTICK_WHEEL_DEVICES "SDL_JOYSTICK_WHEEL_DEVICES"
2154
2155/**
2156 * A variable containing a list of devices that are not wheel style
2157 * controllers.
2158 *
2159 * This will override SDL_HINT_JOYSTICK_WHEEL_DEVICES and the built in device
2160 * list.
2161 *
2162 * The format of the string is a comma separated list of USB VID/PID pairs in
2163 * hexadecimal form, e.g.
2164 *
2165 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2166 *
2167 * The variable can also take the form of "@file", in which case the named
2168 * file will be loaded and interpreted as the value of the variable.
2169 *
2170 * This hint can be set anytime.
2171 *
2172 * \since This hint is available since SDL 3.2.0.
2173 */
2174#define SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"
2175
2176/**
2177 * A variable containing a list of devices known to have all axes centered at
2178 * zero.
2179 *
2180 * The format of the string is a comma separated list of USB VID/PID pairs in
2181 * hexadecimal form, e.g.
2182 *
2183 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
2184 *
2185 * The variable can also take the form of "@file", in which case the named
2186 * file will be loaded and interpreted as the value of the variable.
2187 *
2188 * This hint should be set before a controller is opened.
2189 *
2190 * \since This hint is available since SDL 3.2.0.
2191 */
2192#define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"
2193
2194/**
2195 * A variable containing a list of devices and their desired number of haptic
2196 * (force feedback) enabled axis.
2197 *
2198 * The format of the string is a comma separated list of USB VID/PID pairs in
2199 * hexadecimal form plus the number of desired axes, e.g.
2200 *
2201 * `0xAAAA/0xBBBB/1,0xCCCC/0xDDDD/3`
2202 *
2203 * This hint supports a "wildcard" device that will set the number of haptic
2204 * axes on all initialized haptic devices which were not defined explicitly in
2205 * this hint.
2206 *
2207 * `0xFFFF/0xFFFF/1`
2208 *
2209 * This hint should be set before a controller is opened. The number of haptic
2210 * axes won't exceed the number of real axes found on the device.
2211 *
2212 * \since This hint is available since SDL 3.2.5.
2213 */
2214#define SDL_HINT_JOYSTICK_HAPTIC_AXES "SDL_JOYSTICK_HAPTIC_AXES"
2215
2216/**
2217 * A variable that controls keycode representation in keyboard events.
2218 *
2219 * This variable is a comma separated set of options for translating keycodes
2220 * in events:
2221 *
2222 * - "none": Keycode options are cleared, this overrides other options.
2223 * - "hide_numpad": The numpad keysyms will be translated into their
2224 * non-numpad versions based on the current NumLock state. For example,
2225 * SDLK_KP_4 would become SDLK_4 if SDL_KMOD_NUM is set in the event
2226 * modifiers, and SDLK_LEFT if it is unset.
2227 * - "french_numbers": The number row on French keyboards is inverted, so
2228 * pressing the 1 key would yield the keycode SDLK_1, or '1', instead of
2229 * SDLK_AMPERSAND, or '&'
2230 * - "latin_letters": For keyboards using non-Latin letters, such as Russian
2231 * or Thai, the letter keys generate keycodes as though it had an en_US
2232 * layout. e.g. pressing the key associated with SDL_SCANCODE_A on a Russian
2233 * keyboard would yield 'a' instead of a Cyrillic letter.
2234 *
2235 * The default value for this hint is "french_numbers,latin_letters"
2236 *
2237 * Some platforms like Emscripten only provide modified keycodes and the
2238 * options are not used.
2239 *
2240 * These options do not affect the return value of SDL_GetKeyFromScancode() or
2241 * SDL_GetScancodeFromKey(), they just apply to the keycode included in key
2242 * events.
2243 *
2244 * This hint can be set anytime.
2245 *
2246 * \since This hint is available since SDL 3.2.0.
2247 */
2248#define SDL_HINT_KEYCODE_OPTIONS "SDL_KEYCODE_OPTIONS"
2249
2250/**
2251 * A variable that controls what KMSDRM device to use.
2252 *
2253 * SDL might open something like "/dev/dri/cardNN" to access KMSDRM
2254 * functionality, where "NN" is a device index number. SDL makes a guess at
2255 * the best index to use (usually zero), but the app or user can set this hint
2256 * to a number between 0 and 99 to force selection.
2257 *
2258 * This hint should be set before SDL is initialized.
2259 *
2260 * \since This hint is available since SDL 3.2.0.
2261 */
2262#define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX"
2263
2264/**
2265 * A variable that controls whether SDL requires DRM master access in order to
2266 * initialize the KMSDRM video backend.
2267 *
2268 * The DRM subsystem has a concept of a "DRM master" which is a DRM client
2269 * that has the ability to set planes, set cursor, etc. When SDL is DRM
2270 * master, it can draw to the screen using the SDL rendering APIs. Without DRM
2271 * master, SDL is still able to process input and query attributes of attached
2272 * displays, but it cannot change display state or draw to the screen
2273 * directly.
2274 *
2275 * In some cases, it can be useful to have the KMSDRM backend even if it
2276 * cannot be used for rendering. An app may want to use SDL for input
2277 * processing while using another rendering API (such as an MMAL overlay on
2278 * Raspberry Pi) or using its own code to render to DRM overlays that SDL
2279 * doesn't support.
2280 *
2281 * The variable can be set to the following values:
2282 *
2283 * - "0": SDL will allow usage of the KMSDRM backend without DRM master.
2284 * - "1": SDL Will require DRM master to use the KMSDRM backend. (default)
2285 *
2286 * This hint should be set before SDL is initialized.
2287 *
2288 * \since This hint is available since SDL 3.2.0.
2289 */
2290#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
2291
2292/**
2293 * A variable controlling the default SDL log levels.
2294 *
2295 * This variable is a comma separated set of category=level tokens that define
2296 * the default logging levels for SDL applications.
2297 *
2298 * The category can be a numeric category, one of "app", "error", "assert",
2299 * "system", "audio", "video", "render", "input", "test", or `*` for any
2300 * unspecified category.
2301 *
2302 * The level can be a numeric level, one of "verbose", "debug", "info",
2303 * "warn", "error", "critical", or "quiet" to disable that category.
2304 *
2305 * You can omit the category if you want to set the logging level for all
2306 * categories.
2307 *
2308 * If this hint isn't set, the default log levels are equivalent to:
2309 *
2310 * `app=info,assert=warn,test=verbose,*=error`
2311 *
2312 * This hint can be set anytime.
2313 *
2314 * \since This hint is available since SDL 3.2.0.
2315 */
2316#define SDL_HINT_LOGGING "SDL_LOGGING"
2317
2318/**
2319 * A variable controlling whether to force the application to become the
2320 * foreground process when launched on macOS.
2321 *
2322 * The variable can be set to the following values:
2323 *
2324 * - "0": The application is brought to the foreground when launched.
2325 * (default)
2326 * - "1": The application may remain in the background when launched.
2327 *
2328 * This hint needs to be set before SDL_Init().
2329 *
2330 * \since This hint is available since SDL 3.2.0.
2331 */
2332#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
2333
2334/**
2335 * A variable that determines whether Ctrl+Click should generate a right-click
2336 * event on macOS.
2337 *
2338 * The variable can be set to the following values:
2339 *
2340 * - "0": Ctrl+Click does not generate a right mouse button click event.
2341 * (default)
2342 * - "1": Ctrl+Click generated a right mouse button click event.
2343 *
2344 * This hint can be set anytime.
2345 *
2346 * \since This hint is available since SDL 3.2.0.
2347 */
2348#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
2349
2350/**
2351 * A variable controlling whether dispatching OpenGL context updates should
2352 * block the dispatching thread until the main thread finishes processing on
2353 * macOS.
2354 *
2355 * The variable can be set to the following values:
2356 *
2357 * - "0": Dispatching OpenGL context updates will block the dispatching thread
2358 * until the main thread finishes processing. (default)
2359 * - "1": Dispatching OpenGL context updates will allow the dispatching thread
2360 * to continue execution.
2361 *
2362 * Generally you want the default, but if you have OpenGL code in a background
2363 * thread on a Mac, and the main thread hangs because it's waiting for that
2364 * background thread, but that background thread is also hanging because it's
2365 * waiting for the main thread to do an update, this might fix your issue.
2366 *
2367 * This hint can be set anytime.
2368 *
2369 * \since This hint is available since SDL 3.2.0.
2370 */
2371#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
2372
2373/**
2374 * A variable controlling whether the Option key on macOS should be remapped
2375 * to act as the Alt key.
2376 *
2377 * The variable can be set to the following values:
2378 *
2379 * - "none": The Option key is not remapped to Alt. (default)
2380 * - "only_left": Only the left Option key is remapped to Alt.
2381 * - "only_right": Only the right Option key is remapped to Alt.
2382 * - "both": Both Option keys are remapped to Alt.
2383 *
2384 * This will prevent the triggering of key compositions that rely on the
2385 * Option key, but will still send the Alt modifier for keyboard events. In
2386 * the case that both Alt and Option are pressed, the Option key will be
2387 * ignored. This is particularly useful for applications like terminal
2388 * emulators and graphical user interfaces (GUIs) that rely on Alt key
2389 * functionality for shortcuts or navigation. This does not apply to
2390 * SDL_GetKeyFromScancode and only has an effect if IME is enabled.
2391 *
2392 * This hint can be set anytime.
2393 *
2394 * \since This hint is available since SDL 3.2.0.
2395 */
2396#define SDL_HINT_MAC_OPTION_AS_ALT "SDL_MAC_OPTION_AS_ALT"
2397
2398/**
2399 * A variable controlling whether SDL_EVENT_MOUSE_WHEEL event values will have
2400 * momentum on macOS.
2401 *
2402 * The variable can be set to the following values:
2403 *
2404 * - "0": The mouse wheel events will have no momentum. (default)
2405 * - "1": The mouse wheel events will have momentum.
2406 *
2407 * This hint needs to be set before SDL_Init().
2408 *
2409 * \since This hint is available since SDL 3.2.0.
2410 */
2411#define SDL_HINT_MAC_SCROLL_MOMENTUM "SDL_MAC_SCROLL_MOMENTUM"
2412
2413/**
2414 * Request SDL_AppIterate() be called at a specific rate.
2415 *
2416 * If this is set to a number, it represents Hz, so "60" means try to iterate
2417 * 60 times per second. "0" means to iterate as fast as possible. Negative
2418 * values are illegal, but reserved, in case they are useful in a future
2419 * revision of SDL.
2420 *
2421 * There are other strings that have special meaning. If set to "waitevent",
2422 * SDL_AppIterate will not be called until new event(s) have arrived (and been
2423 * processed by SDL_AppEvent). This can be useful for apps that are completely
2424 * idle except in response to input.
2425 *
2426 * On some platforms, or if you are using SDL_main instead of SDL_AppIterate,
2427 * this hint is ignored. When the hint can be used, it is allowed to be
2428 * changed at any time.
2429 *
2430 * This defaults to 0, and specifying NULL for the hint's value will restore
2431 * the default.
2432 *
2433 * This hint can be set anytime.
2434 *
2435 * \since This hint is available since SDL 3.2.0.
2436 */
2437#define SDL_HINT_MAIN_CALLBACK_RATE "SDL_MAIN_CALLBACK_RATE"
2438
2439/**
2440 * A variable controlling whether the mouse is captured while mouse buttons
2441 * are pressed.
2442 *
2443 * The variable can be set to the following values:
2444 *
2445 * - "0": The mouse is not captured while mouse buttons are pressed.
2446 * - "1": The mouse is captured while mouse buttons are pressed.
2447 *
2448 * By default the mouse is captured while mouse buttons are pressed so if the
2449 * mouse is dragged outside the window, the application continues to receive
2450 * mouse events until the button is released.
2451 *
2452 * This hint can be set anytime.
2453 *
2454 * \since This hint is available since SDL 3.2.0.
2455 */
2456#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
2457
2458/**
2459 * A variable setting the double click radius, in pixels.
2460 *
2461 * This hint can be set anytime.
2462 *
2463 * \since This hint is available since SDL 3.2.0.
2464 */
2465#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
2466
2467/**
2468 * A variable setting the double click time, in milliseconds.
2469 *
2470 * This hint can be set anytime.
2471 *
2472 * \since This hint is available since SDL 3.2.0.
2473 */
2474#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
2475
2476/**
2477 * A variable setting which system cursor to use as the default cursor.
2478 *
2479 * This should be an integer corresponding to the SDL_SystemCursor enum. The
2480 * default value is zero (SDL_SYSTEM_CURSOR_DEFAULT).
2481 *
2482 * This hint needs to be set before SDL_Init().
2483 *
2484 * \since This hint is available since SDL 3.2.0.
2485 */
2486#define SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR"
2487
2488/**
2489 * A variable controlling whether warping a hidden mouse cursor will activate
2490 * relative mouse mode.
2491 *
2492 * When this hint is set, the mouse cursor is hidden, and multiple warps to
2493 * the window center occur within a short time period, SDL will emulate mouse
2494 * warps using relative mouse mode. This can provide smoother and more
2495 * reliable mouse motion for some older games, which continuously calculate
2496 * the distance travelled by the mouse pointer and warp it back to the center
2497 * of the window, rather than using relative mouse motion.
2498 *
2499 * Note that relative mouse mode may have different mouse acceleration
2500 * behavior than pointer warps.
2501 *
2502 * If your application needs to repeatedly warp the hidden mouse cursor at a
2503 * high-frequency for other purposes, it should disable this hint.
2504 *
2505 * The variable can be set to the following values:
2506 *
2507 * - "0": Attempts to warp the mouse will always be made.
2508 * - "1": Some mouse warps will be emulated by forcing relative mouse mode.
2509 * (default)
2510 *
2511 * If not set, this is automatically enabled unless an application uses
2512 * relative mouse mode directly.
2513 *
2514 * This hint can be set anytime.
2515 *
2516 * \since This hint is available since SDL 3.2.0.
2517 */
2518#define SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE"
2519
2520/**
2521 * Allow mouse click events when clicking to focus an SDL window.
2522 *
2523 * The variable can be set to the following values:
2524 *
2525 * - "0": Ignore mouse clicks that activate a window. (default)
2526 * - "1": Generate events for mouse clicks that activate a window.
2527 *
2528 * This hint can be set anytime.
2529 *
2530 * \since This hint is available since SDL 3.2.0.
2531 */
2532#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
2533
2534/**
2535 * A variable setting the speed scale for mouse motion, in floating point,
2536 * when the mouse is not in relative mode.
2537 *
2538 * This hint can be set anytime.
2539 *
2540 * \since This hint is available since SDL 3.2.0.
2541 */
2542#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
2543
2544/**
2545 * A variable controlling whether relative mouse mode constrains the mouse to
2546 * the center of the window.
2547 *
2548 * Constraining to the center of the window works better for FPS games and
2549 * when the application is running over RDP. Constraining to the whole window
2550 * works better for 2D games and increases the chance that the mouse will be
2551 * in the correct position when using high DPI mice.
2552 *
2553 * The variable can be set to the following values:
2554 *
2555 * - "0": Relative mouse mode constrains the mouse to the window.
2556 * - "1": Relative mouse mode constrains the mouse to the center of the
2557 * window. (default)
2558 *
2559 * This hint can be set anytime.
2560 *
2561 * \since This hint is available since SDL 3.2.0.
2562 */
2563#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
2564
2565/**
2566 * A variable setting the scale for mouse motion, in floating point, when the
2567 * mouse is in relative mode.
2568 *
2569 * This hint can be set anytime.
2570 *
2571 * \since This hint is available since SDL 3.2.0.
2572 */
2573#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
2574
2575/**
2576 * A variable controlling whether the system mouse acceleration curve is used
2577 * for relative mouse motion.
2578 *
2579 * The variable can be set to the following values:
2580 *
2581 * - "0": Relative mouse motion will be unscaled. (default)
2582 * - "1": Relative mouse motion will be scaled using the system mouse
2583 * acceleration curve.
2584 *
2585 * If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will be applied after
2586 * system speed scale.
2587 *
2588 * This hint can be set anytime.
2589 *
2590 * \since This hint is available since SDL 3.2.0.
2591 */
2592#define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
2593
2594/**
2595 * A variable controlling whether a motion event should be generated for mouse
2596 * warping in relative mode.
2597 *
2598 * The variable can be set to the following values:
2599 *
2600 * - "0": Warping the mouse will not generate a motion event in relative mode
2601 * - "1": Warping the mouse will generate a motion event in relative mode
2602 *
2603 * By default warping the mouse will not generate motion events in relative
2604 * mode. This avoids the application having to filter out large relative
2605 * motion due to warping.
2606 *
2607 * This hint can be set anytime.
2608 *
2609 * \since This hint is available since SDL 3.2.0.
2610 */
2611#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
2612
2613/**
2614 * A variable controlling whether the hardware cursor stays visible when
2615 * relative mode is active.
2616 *
2617 * This variable can be set to the following values:
2618 *
2619 * - "0": The cursor will be hidden while relative mode is active (default)
2620 * - "1": The cursor will remain visible while relative mode is active
2621 *
2622 * Note that for systems without raw hardware inputs, relative mode is
2623 * implemented using warping, so the hardware cursor will visibly warp between
2624 * frames if this is enabled on those systems.
2625 *
2626 * This hint can be set anytime.
2627 *
2628 * \since This hint is available since SDL 3.2.0.
2629 */
2630#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"
2631
2632/**
2633 * A variable controlling whether mouse events should generate synthetic touch
2634 * events.
2635 *
2636 * The variable can be set to the following values:
2637 *
2638 * - "0": Mouse events will not generate touch events. (default for desktop
2639 * platforms)
2640 * - "1": Mouse events will generate touch events. (default for mobile
2641 * platforms, such as Android and iOS)
2642 *
2643 * This hint can be set anytime.
2644 *
2645 * \since This hint is available since SDL 3.2.0.
2646 */
2647#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
2648
2649/**
2650 * A variable controlling whether the keyboard should be muted on the console.
2651 *
2652 * Normally the keyboard is muted while SDL applications are running so that
2653 * keyboard input doesn't show up as key strokes on the console. This hint
2654 * allows you to turn that off for debugging purposes.
2655 *
2656 * The variable can be set to the following values:
2657 *
2658 * - "0": Allow keystrokes to go through to the console.
2659 * - "1": Mute keyboard input so it doesn't show up on the console. (default)
2660 *
2661 * This hint should be set before SDL is initialized.
2662 *
2663 * \since This hint is available since SDL 3.2.0.
2664 */
2665#define SDL_HINT_MUTE_CONSOLE_KEYBOARD "SDL_MUTE_CONSOLE_KEYBOARD"
2666
2667/**
2668 * Tell SDL not to catch the SIGINT or SIGTERM signals on POSIX platforms.
2669 *
2670 * The variable can be set to the following values:
2671 *
2672 * - "0": SDL will install a SIGINT and SIGTERM handler, and when it catches a
2673 * signal, convert it into an SDL_EVENT_QUIT event. (default)
2674 * - "1": SDL will not install a signal handler at all.
2675 *
2676 * This hint should be set before SDL is initialized.
2677 *
2678 * \since This hint is available since SDL 3.2.0.
2679 */
2680#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
2681
2682/**
2683 * Specify the OpenGL library to load.
2684 *
2685 * This hint should be set before creating an OpenGL window or creating an
2686 * OpenGL context. If this hint isn't set, SDL will choose a reasonable
2687 * default.
2688 *
2689 * \since This hint is available since SDL 3.2.0.
2690 */
2691#define SDL_HINT_OPENGL_LIBRARY "SDL_OPENGL_LIBRARY"
2692
2693/**
2694 * Specify the EGL library to load.
2695 *
2696 * This hint should be set before creating an OpenGL window or creating an
2697 * OpenGL context. This hint is only considered if SDL is using EGL to manage
2698 * OpenGL contexts. If this hint isn't set, SDL will choose a reasonable
2699 * default.
2700 *
2701 * \since This hint is available since SDL 3.2.0.
2702 */
2703#define SDL_HINT_EGL_LIBRARY "SDL_EGL_LIBRARY"
2704
2705/**
2706 * A variable controlling what driver to use for OpenGL ES contexts.
2707 *
2708 * On some platforms, currently Windows and X11, OpenGL drivers may support
2709 * creating contexts with an OpenGL ES profile. By default SDL uses these
2710 * profiles, when available, otherwise it attempts to load an OpenGL ES
2711 * library, e.g. that provided by the ANGLE project. This variable controls
2712 * whether SDL follows this default behaviour or will always load an OpenGL ES
2713 * library.
2714 *
2715 * Circumstances where this is useful include - Testing an app with a
2716 * particular OpenGL ES implementation, e.g ANGLE, or emulator, e.g. those
2717 * from ARM, Imagination or Qualcomm. - Resolving OpenGL ES function addresses
2718 * at link time by linking with the OpenGL ES library instead of querying them
2719 * at run time with SDL_GL_GetProcAddress().
2720 *
2721 * Caution: for an application to work with the default behaviour across
2722 * different OpenGL drivers it must query the OpenGL ES function addresses at
2723 * run time using SDL_GL_GetProcAddress().
2724 *
2725 * This variable is ignored on most platforms because OpenGL ES is native or
2726 * not supported.
2727 *
2728 * The variable can be set to the following values:
2729 *
2730 * - "0": Use ES profile of OpenGL, if available. (default)
2731 * - "1": Load OpenGL ES library using the default library names.
2732 *
2733 * This hint should be set before SDL is initialized.
2734 *
2735 * \since This hint is available since SDL 3.2.0.
2736 */
2737#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
2738
2739/**
2740 * Mechanism to specify openvr_api library location
2741 *
2742 * By default, when using the OpenVR driver, it will search for the API
2743 * library in the current folder. But, if you wish to use a system API you can
2744 * specify that by using this hint. This should be the full or relative path
2745 * to a .dll on Windows or .so on Linux.
2746 *
2747 * \since This hint is available since SDL 3.2.0.
2748 */
2749#define SDL_HINT_OPENVR_LIBRARY "SDL_OPENVR_LIBRARY"
2750
2751/**
2752 * A variable controlling which orientations are allowed on iOS/Android.
2753 *
2754 * In some circumstances it is necessary to be able to explicitly control
2755 * which UI orientations are allowed.
2756 *
2757 * This variable is a space delimited list of the following values:
2758 *
2759 * - "LandscapeLeft"
2760 * - "LandscapeRight"
2761 * - "Portrait"
2762 * - "PortraitUpsideDown"
2763 *
2764 * This hint should be set before SDL is initialized.
2765 *
2766 * \since This hint is available since SDL 3.2.0.
2767 */
2768#define SDL_HINT_ORIENTATIONS "SDL_ORIENTATIONS"
2769
2770/**
2771 * A variable controlling the use of a sentinel event when polling the event
2772 * queue.
2773 *
2774 * When polling for events, SDL_PumpEvents is used to gather new events from
2775 * devices. If a device keeps producing new events between calls to
2776 * SDL_PumpEvents, a poll loop will become stuck until the new events stop.
2777 * This is most noticeable when moving a high frequency mouse.
2778 *
2779 * The variable can be set to the following values:
2780 *
2781 * - "0": Disable poll sentinels.
2782 * - "1": Enable poll sentinels. (default)
2783 *
2784 * This hint can be set anytime.
2785 *
2786 * \since This hint is available since SDL 3.2.0.
2787 */
2788#define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
2789
2790/**
2791 * Override for SDL_GetPreferredLocales().
2792 *
2793 * If set, this will be favored over anything the OS might report for the
2794 * user's preferred locales. Changing this hint at runtime will not generate a
2795 * SDL_EVENT_LOCALE_CHANGED event (but if you can change the hint, you can
2796 * push your own event, if you want).
2797 *
2798 * The format of this hint is a comma-separated list of language and locale,
2799 * combined with an underscore, as is a common format: "en_GB". Locale is
2800 * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
2801 *
2802 * This hint can be set anytime.
2803 *
2804 * \since This hint is available since SDL 3.2.0.
2805 */
2806#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
2807
2808/**
2809 * A variable that decides whether to send SDL_EVENT_QUIT when closing the
2810 * last window.
2811 *
2812 * The variable can be set to the following values:
2813 *
2814 * - "0": SDL will not send an SDL_EVENT_QUIT event when the last window is
2815 * requesting to close. Note that in this case, there are still other
2816 * legitimate reasons one might get an SDL_EVENT_QUIT event: choosing "Quit"
2817 * from the macOS menu bar, sending a SIGINT (ctrl-c) on Unix, etc.
2818 * - "1": SDL will send a quit event when the last window is requesting to
2819 * close. (default)
2820 *
2821 * If there is at least one active system tray icon, SDL_EVENT_QUIT will
2822 * instead be sent when both the last window will be closed and the last tray
2823 * icon will be destroyed.
2824 *
2825 * This hint can be set anytime.
2826 *
2827 * \since This hint is available since SDL 3.2.0.
2828 */
2829#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
2830
2831/**
2832 * A variable controlling whether the Direct3D device is initialized for
2833 * thread-safe operations.
2834 *
2835 * The variable can be set to the following values:
2836 *
2837 * - "0": Thread-safety is not enabled. (default)
2838 * - "1": Thread-safety is enabled.
2839 *
2840 * This hint should be set before creating a renderer.
2841 *
2842 * \since This hint is available since SDL 3.2.0.
2843 */
2844#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
2845
2846/**
2847 * A variable controlling whether to enable Direct3D 11+'s Debug Layer.
2848 *
2849 * This variable does not have any effect on the Direct3D 9 based renderer.
2850 *
2851 * The variable can be set to the following values:
2852 *
2853 * - "0": Disable Debug Layer use. (default)
2854 * - "1": Enable Debug Layer use.
2855 *
2856 * This hint should be set before creating a renderer.
2857 *
2858 * \since This hint is available since SDL 3.2.0.
2859 */
2860#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
2861
2862/**
2863 * A variable controlling whether to enable Vulkan Validation Layers.
2864 *
2865 * This variable can be set to the following values:
2866 *
2867 * - "0": Disable Validation Layer use
2868 * - "1": Enable Validation Layer use
2869 *
2870 * By default, SDL does not use Vulkan Validation Layers.
2871 *
2872 * \since This hint is available since SDL 3.2.0.
2873 */
2874#define SDL_HINT_RENDER_VULKAN_DEBUG "SDL_RENDER_VULKAN_DEBUG"
2875
2876/**
2877 * A variable controlling whether to create the GPU device in debug mode.
2878 *
2879 * This variable can be set to the following values:
2880 *
2881 * - "0": Disable debug mode use (default)
2882 * - "1": Enable debug mode use
2883 *
2884 * This hint should be set before creating a renderer.
2885 *
2886 * \since This hint is available since SDL 3.2.0.
2887 */
2888#define SDL_HINT_RENDER_GPU_DEBUG "SDL_RENDER_GPU_DEBUG"
2889
2890/**
2891 * A variable controlling whether to prefer a low-power GPU on multi-GPU
2892 * systems.
2893 *
2894 * This variable can be set to the following values:
2895 *
2896 * - "0": Prefer high-performance GPU (default)
2897 * - "1": Prefer low-power GPU
2898 *
2899 * This hint should be set before creating a renderer.
2900 *
2901 * \since This hint is available since SDL 3.2.0.
2902 */
2903#define SDL_HINT_RENDER_GPU_LOW_POWER "SDL_RENDER_GPU_LOW_POWER"
2904
2905/**
2906 * A variable specifying which render driver to use.
2907 *
2908 * If the application doesn't pick a specific renderer to use, this variable
2909 * specifies the name of the preferred renderer. If the preferred renderer
2910 * can't be initialized, creating a renderer will fail.
2911 *
2912 * This variable is case insensitive and can be set to the following values:
2913 *
2914 * - "direct3d"
2915 * - "direct3d11"
2916 * - "direct3d12"
2917 * - "opengl"
2918 * - "opengles2"
2919 * - "opengles"
2920 * - "metal"
2921 * - "vulkan"
2922 * - "gpu"
2923 * - "software"
2924 *
2925 * This hint accepts a comma-separated list of driver names, and each will be
2926 * tried in the order listed when creating a renderer until one succeeds or
2927 * all of them fail.
2928 *
2929 * The default varies by platform, but it's the first one in the list that is
2930 * available on the current platform.
2931 *
2932 * This hint should be set before creating a renderer.
2933 *
2934 * \since This hint is available since SDL 3.2.0.
2935 */
2936#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
2937
2938/**
2939 * A variable controlling how the 2D render API renders lines.
2940 *
2941 * The variable can be set to the following values:
2942 *
2943 * - "0": Use the default line drawing method (Bresenham's line algorithm)
2944 * - "1": Use the driver point API using Bresenham's line algorithm (correct,
2945 * draws many points)
2946 * - "2": Use the driver line API (occasionally misses line endpoints based on
2947 * hardware driver quirks
2948 * - "3": Use the driver geometry API (correct, draws thicker diagonal lines)
2949 *
2950 * This hint should be set before creating a renderer.
2951 *
2952 * \since This hint is available since SDL 3.2.0.
2953 */
2954#define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
2955
2956/**
2957 * A variable controlling whether the Metal render driver select low power
2958 * device over default one.
2959 *
2960 * The variable can be set to the following values:
2961 *
2962 * - "0": Use the preferred OS device. (default)
2963 * - "1": Select a low power device.
2964 *
2965 * This hint should be set before creating a renderer.
2966 *
2967 * \since This hint is available since SDL 3.2.0.
2968 */
2969#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
2970
2971/**
2972 * A variable controlling whether updates to the SDL screen surface should be
2973 * synchronized with the vertical refresh, to avoid tearing.
2974 *
2975 * This hint overrides the application preference when creating a renderer.
2976 *
2977 * The variable can be set to the following values:
2978 *
2979 * - "0": Disable vsync. (default)
2980 * - "1": Enable vsync.
2981 *
2982 * This hint should be set before creating a renderer.
2983 *
2984 * \since This hint is available since SDL 3.2.0.
2985 */
2986#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
2987
2988/**
2989 * A variable to control whether the return key on the soft keyboard should
2990 * hide the soft keyboard on Android and iOS.
2991 *
2992 * This hint sets the default value of SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN.
2993 *
2994 * The variable can be set to the following values:
2995 *
2996 * - "0": The return key will be handled as a key event. (default)
2997 * - "1": The return key will hide the keyboard.
2998 *
2999 * This hint can be set anytime.
3000 *
3001 * \since This hint is available since SDL 3.2.0.
3002 */
3003#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
3004
3005/**
3006 * A variable containing a list of ROG gamepad capable mice.
3007 *
3008 * The format of the string is a comma separated list of USB VID/PID pairs in
3009 * hexadecimal form, e.g.
3010 *
3011 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
3012 *
3013 * The variable can also take the form of "@file", in which case the named
3014 * file will be loaded and interpreted as the value of the variable.
3015 *
3016 * This hint should be set before SDL is initialized.
3017 *
3018 * \since This hint is available since SDL 3.2.0.
3019 *
3020 * \sa SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED
3021 */
3022#define SDL_HINT_ROG_GAMEPAD_MICE "SDL_ROG_GAMEPAD_MICE"
3023
3024/**
3025 * A variable containing a list of devices that are not ROG gamepad capable
3026 * mice.
3027 *
3028 * This will override SDL_HINT_ROG_GAMEPAD_MICE and the built in device list.
3029 *
3030 * The format of the string is a comma separated list of USB VID/PID pairs in
3031 * hexadecimal form, e.g.
3032 *
3033 * `0xAAAA/0xBBBB,0xCCCC/0xDDDD`
3034 *
3035 * The variable can also take the form of "@file", in which case the named
3036 * file will be loaded and interpreted as the value of the variable.
3037 *
3038 * This hint should be set before SDL is initialized.
3039 *
3040 * \since This hint is available since SDL 3.2.0.
3041 */
3042#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
3043
3044/**
3045 * A variable controlling which Dispmanx layer to use on a Raspberry PI.
3046 *
3047 * Also known as Z-order. The variable can take a negative or positive value.
3048 * The default is 10000.
3049 *
3050 * This hint should be set before SDL is initialized.
3051 *
3052 * \since This hint is available since SDL 3.2.0.
3053 */
3054#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
3055
3056/**
3057 * Specify an "activity name" for screensaver inhibition.
3058 *
3059 * Some platforms, notably Linux desktops, list the applications which are
3060 * inhibiting the screensaver or other power-saving features.
3061 *
3062 * This hint lets you specify the "activity name" sent to the OS when
3063 * SDL_DisableScreenSaver() is used (or the screensaver is automatically
3064 * disabled). The contents of this hint are used when the screensaver is
3065 * disabled. You should use a string that describes what your program is doing
3066 * (and, therefore, why the screensaver is disabled). For example, "Playing a
3067 * game" or "Watching a video".
3068 *
3069 * Setting this to "" or leaving it unset will have SDL use a reasonable
3070 * default: "Playing a game" or something similar.
3071 *
3072 * This hint should be set before calling SDL_DisableScreenSaver()
3073 *
3074 * \since This hint is available since SDL 3.2.0.
3075 */
3076#define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
3077
3078/**
3079 * A variable controlling whether SDL calls dbus_shutdown() on quit.
3080 *
3081 * This is useful as a debug tool to validate memory leaks, but shouldn't ever
3082 * be set in production applications, as other libraries used by the
3083 * application might use dbus under the hood and this can cause crashes if
3084 * they continue after SDL_Quit().
3085 *
3086 * The variable can be set to the following values:
3087 *
3088 * - "0": SDL will not call dbus_shutdown() on quit. (default)
3089 * - "1": SDL will call dbus_shutdown() on quit.
3090 *
3091 * This hint can be set anytime.
3092 *
3093 * \since This hint is available since SDL 3.2.0.
3094 */
3095#define SDL_HINT_SHUTDOWN_DBUS_ON_QUIT "SDL_SHUTDOWN_DBUS_ON_QUIT"
3096
3097/**
3098 * A variable that specifies a backend to use for title storage.
3099 *
3100 * By default, SDL will try all available storage backends in a reasonable
3101 * order until it finds one that can work, but this hint allows the app or
3102 * user to force a specific target, such as "pc" if, say, you are on Steam but
3103 * want to avoid SteamRemoteStorage for title data.
3104 *
3105 * This hint should be set before SDL is initialized.
3106 *
3107 * \since This hint is available since SDL 3.2.0.
3108 */
3109#define SDL_HINT_STORAGE_TITLE_DRIVER "SDL_STORAGE_TITLE_DRIVER"
3110
3111/**
3112 * A variable that specifies a backend to use for user storage.
3113 *
3114 * By default, SDL will try all available storage backends in a reasonable
3115 * order until it finds one that can work, but this hint allows the app or
3116 * user to force a specific target, such as "pc" if, say, you are on Steam but
3117 * want to avoid SteamRemoteStorage for user data.
3118 *
3119 * This hint should be set before SDL is initialized.
3120 *
3121 * \since This hint is available since SDL 3.2.0.
3122 */
3123#define SDL_HINT_STORAGE_USER_DRIVER "SDL_STORAGE_USER_DRIVER"
3124
3125/**
3126 * Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as
3127 * realtime.
3128 *
3129 * On some platforms, like Linux, a realtime priority thread may be subject to
3130 * restrictions that require special handling by the application. This hint
3131 * exists to let SDL know that the app is prepared to handle said
3132 * restrictions.
3133 *
3134 * On Linux, SDL will apply the following configuration to any thread that
3135 * becomes realtime:
3136 *
3137 * - The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
3138 * - An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
3139 * - Exceeding this limit will result in the kernel sending SIGKILL to the
3140 * app, refer to the man pages for more information.
3141 *
3142 * The variable can be set to the following values:
3143 *
3144 * - "0": default platform specific behaviour
3145 * - "1": Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling
3146 * policy
3147 *
3148 * This hint should be set before calling SDL_SetCurrentThreadPriority()
3149 *
3150 * \since This hint is available since SDL 3.2.0.
3151 */
3152#define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
3153
3154/**
3155 * A string specifying additional information to use with
3156 * SDL_SetCurrentThreadPriority.
3157 *
3158 * By default SDL_SetCurrentThreadPriority will make appropriate system
3159 * changes in order to apply a thread priority. For example on systems using
3160 * pthreads the scheduler policy is changed automatically to a policy that
3161 * works well with a given priority. Code which has specific requirements can
3162 * override SDL's default behavior with this hint.
3163 *
3164 * pthread hint values are "current", "other", "fifo" and "rr". Currently no
3165 * other platform hint values are defined but may be in the future.
3166 *
3167 * On Linux, the kernel may send SIGKILL to realtime tasks which exceed the
3168 * distro configured execution budget for rtkit. This budget can be queried
3169 * through RLIMIT_RTTIME after calling SDL_SetCurrentThreadPriority().
3170 *
3171 * This hint should be set before calling SDL_SetCurrentThreadPriority()
3172 *
3173 * \since This hint is available since SDL 3.2.0.
3174 */
3175#define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
3176
3177/**
3178 * A variable that controls the timer resolution, in milliseconds.
3179 *
3180 * The higher resolution the timer, the more frequently the CPU services timer
3181 * interrupts, and the more precise delays are, but this takes up power and
3182 * CPU time. This hint is only used on Windows.
3183 *
3184 * See this blog post for more information:
3185 * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
3186 *
3187 * The default value is "1".
3188 *
3189 * If this variable is set to "0", the system timer resolution is not set.
3190 *
3191 * This hint can be set anytime.
3192 *
3193 * \since This hint is available since SDL 3.2.0.
3194 */
3195#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
3196
3197/**
3198 * A variable controlling whether touch events should generate synthetic mouse
3199 * events.
3200 *
3201 * The variable can be set to the following values:
3202 *
3203 * - "0": Touch events will not generate mouse events.
3204 * - "1": Touch events will generate mouse events. (default)
3205 *
3206 * This hint can be set anytime.
3207 *
3208 * \since This hint is available since SDL 3.2.0.
3209 */
3210#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
3211
3212/**
3213 * A variable controlling whether trackpads should be treated as touch
3214 * devices.
3215 *
3216 * On macOS (and possibly other platforms in the future), SDL will report
3217 * touches on a trackpad as mouse input, which is generally what users expect
3218 * from this device; however, these are often actually full multitouch-capable
3219 * touch devices, so it might be preferable to some apps to treat them as
3220 * such.
3221 *
3222 * The variable can be set to the following values:
3223 *
3224 * - "0": Trackpad will send mouse events. (default)
3225 * - "1": Trackpad will send touch events.
3226 *
3227 * This hint should be set before SDL is initialized.
3228 *
3229 * \since This hint is available since SDL 3.2.0.
3230 */
3231#define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
3232
3233/**
3234 * A variable controlling whether the Android / tvOS remotes should be listed
3235 * as joystick devices, instead of sending keyboard events.
3236 *
3237 * The variable can be set to the following values:
3238 *
3239 * - "0": Remotes send enter/escape/arrow key events.
3240 * - "1": Remotes are available as 2 axis, 2 button joysticks. (default)
3241 *
3242 * This hint should be set before SDL is initialized.
3243 *
3244 * \since This hint is available since SDL 3.2.0.
3245 */
3246#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
3247
3248/**
3249 * A variable controlling whether the screensaver is enabled.
3250 *
3251 * The variable can be set to the following values:
3252 *
3253 * - "0": Disable screensaver. (default)
3254 * - "1": Enable screensaver.
3255 *
3256 * This hint should be set before SDL is initialized.
3257 *
3258 * \since This hint is available since SDL 3.2.0.
3259 */
3260#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
3261
3262/**
3263 * A comma separated list containing the names of the displays that SDL should
3264 * sort to the front of the display list.
3265 *
3266 * When this hint is set, displays with matching name strings will be
3267 * prioritized in the list of displays, as exposed by calling
3268 * SDL_GetDisplays(), with the first listed becoming the primary display. The
3269 * naming convention can vary depending on the environment, but it is usually
3270 * a connector name (e.g. 'DP-1', 'DP-2', 'HDMI-A-1',etc...).
3271 *
3272 * On Wayland and X11 desktops, the connector names associated with displays
3273 * can typically be found by using the `xrandr` utility.
3274 *
3275 * This hint is currently supported on the following drivers:
3276 *
3277 * - KMSDRM (kmsdrm)
3278 * - Wayland (wayland)
3279 * - X11 (x11)
3280 *
3281 * This hint should be set before SDL is initialized.
3282 *
3283 * \since This hint is available since SDL 3.2.0.
3284 */
3285#define SDL_HINT_VIDEO_DISPLAY_PRIORITY "SDL_VIDEO_DISPLAY_PRIORITY"
3286
3287/**
3288 * Tell the video driver that we only want a double buffer.
3289 *
3290 * By default, most lowlevel 2D APIs will use a triple buffer scheme that
3291 * wastes no CPU time on waiting for vsync after issuing a flip, but
3292 * introduces a frame of latency. On the other hand, using a double buffer
3293 * scheme instead is recommended for cases where low latency is an important
3294 * factor because we save a whole frame of latency.
3295 *
3296 * We do so by waiting for vsync immediately after issuing a flip, usually
3297 * just after eglSwapBuffers call in the backend's *_SwapWindow function.
3298 *
3299 * This hint is currently supported on the following drivers:
3300 *
3301 * - Raspberry Pi (raspberrypi)
3302 * - Wayland (wayland)
3303 *
3304 * This hint should be set before SDL is initialized.
3305 *
3306 * \since This hint is available since SDL 3.2.0.
3307 */
3308#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
3309
3310/**
3311 * A variable that specifies a video backend to use.
3312 *
3313 * By default, SDL will try all available video backends in a reasonable order
3314 * until it finds one that can work, but this hint allows the app or user to
3315 * force a specific target, such as "x11" if, say, you are on Wayland but want
3316 * to try talking to the X server instead.
3317 *
3318 * This hint accepts a comma-separated list of driver names, and each will be
3319 * tried in the order listed during init, until one succeeds or all of them
3320 * fail.
3321 *
3322 * This hint should be set before SDL is initialized.
3323 *
3324 * \since This hint is available since SDL 3.2.0.
3325 */
3326#define SDL_HINT_VIDEO_DRIVER "SDL_VIDEO_DRIVER"
3327
3328/**
3329 * A variable controlling whether the dummy video driver saves output frames.
3330 *
3331 * - "0": Video frames are not saved to disk. (default)
3332 * - "1": Video frames are saved to files in the format "SDL_windowX-Y.bmp",
3333 * where X is the window ID, and Y is the frame number.
3334 *
3335 * This hint can be set anytime.
3336 *
3337 * \since This hint is available since SDL 3.2.0.
3338 */
3339#define SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES "SDL_VIDEO_DUMMY_SAVE_FRAMES"
3340
3341/**
3342 * If eglGetPlatformDisplay fails, fall back to calling eglGetDisplay.
3343 *
3344 * The variable can be set to one of the following values:
3345 *
3346 * - "0": Do not fall back to eglGetDisplay.
3347 * - "1": Fall back to eglGetDisplay if eglGetPlatformDisplay fails. (default)
3348 *
3349 * This hint should be set before SDL is initialized.
3350 *
3351 * \since This hint is available since SDL 3.2.0.
3352 */
3353#define SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK"
3354
3355/**
3356 * A variable controlling whether the OpenGL context should be created with
3357 * EGL.
3358 *
3359 * The variable can be set to the following values:
3360 *
3361 * - "0": Use platform-specific GL context creation API (GLX, WGL, CGL, etc).
3362 * (default)
3363 * - "1": Use EGL
3364 *
3365 * This hint should be set before SDL is initialized.
3366 *
3367 * \since This hint is available since SDL 3.2.0.
3368 */
3369#define SDL_HINT_VIDEO_FORCE_EGL "SDL_VIDEO_FORCE_EGL"
3370
3371/**
3372 * A variable that specifies the policy for fullscreen Spaces on macOS.
3373 *
3374 * The variable can be set to the following values:
3375 *
3376 * - "0": Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
3377 * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen" button on their
3378 * titlebars).
3379 * - "1": Enable Spaces support (FULLSCREEN_DESKTOP will use them and
3380 * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen" button on their
3381 * titlebars). (default)
3382 *
3383 * This hint should be set before creating a window.
3384 *
3385 * \since This hint is available since SDL 3.2.0.
3386 */
3387#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
3388
3389/**
3390 * A variable that specifies the menu visibility when a window is fullscreen
3391 * in Spaces on macOS.
3392 *
3393 * The variable can be set to the following values:
3394 *
3395 * - "0": The menu will be hidden when the window is in a fullscreen space,
3396 * and not accessible by moving the mouse to the top of the screen.
3397 * - "1": The menu will be accessible when the window is in a fullscreen
3398 * space.
3399 * - "auto": The menu will be hidden if fullscreen mode was toggled on
3400 * programmatically via `SDL_SetWindowFullscreen()`, and accessible if
3401 * fullscreen was entered via the "fullscreen" button on the window title
3402 * bar. (default)
3403 *
3404 * This hint can be set anytime.
3405 *
3406 * \since This hint is available since SDL 3.2.0.
3407 */
3408#define SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY"
3409
3410/**
3411 * A variable controlling whether fullscreen windows are minimized when they
3412 * lose focus.
3413 *
3414 * The variable can be set to the following values:
3415 *
3416 * - "0": Fullscreen windows will not be minimized when they lose focus.
3417 * (default)
3418 * - "1": Fullscreen windows are minimized when they lose focus.
3419 *
3420 * This hint can be set anytime.
3421 *
3422 * \since This hint is available since SDL 3.2.0.
3423 */
3424#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
3425
3426/**
3427 * A variable controlling whether the offscreen video driver saves output
3428 * frames.
3429 *
3430 * This only saves frames that are generated using software rendering, not
3431 * accelerated OpenGL rendering.
3432 *
3433 * - "0": Video frames are not saved to disk. (default)
3434 * - "1": Video frames are saved to files in the format "SDL_windowX-Y.bmp",
3435 * where X is the window ID, and Y is the frame number.
3436 *
3437 * This hint can be set anytime.
3438 *
3439 * \since This hint is available since SDL 3.2.0.
3440 */
3441#define SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES"
3442
3443/**
3444 * A variable controlling whether all window operations will block until
3445 * complete.
3446 *
3447 * Window systems that run asynchronously may not have the results of window
3448 * operations that resize or move the window applied immediately upon the
3449 * return of the requesting function. Setting this hint will cause such
3450 * operations to block after every call until the pending operation has
3451 * completed. Setting this to '1' is the equivalent of calling
3452 * SDL_SyncWindow() after every function call.
3453 *
3454 * Be aware that amount of time spent blocking while waiting for window
3455 * operations to complete can be quite lengthy, as animations may have to
3456 * complete, which can take upwards of multiple seconds in some cases.
3457 *
3458 * The variable can be set to the following values:
3459 *
3460 * - "0": Window operations are non-blocking. (default)
3461 * - "1": Window operations will block until completed.
3462 *
3463 * This hint can be set anytime.
3464 *
3465 * \since This hint is available since SDL 3.2.0.
3466 */
3467#define SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS "SDL_VIDEO_SYNC_WINDOW_OPERATIONS"
3468
3469/**
3470 * A variable controlling whether the libdecor Wayland backend is allowed to
3471 * be used.
3472 *
3473 * libdecor is used over xdg-shell when xdg-decoration protocol is
3474 * unavailable.
3475 *
3476 * The variable can be set to the following values:
3477 *
3478 * - "0": libdecor use is disabled.
3479 * - "1": libdecor use is enabled. (default)
3480 *
3481 * This hint should be set before SDL is initialized.
3482 *
3483 * \since This hint is available since SDL 3.2.0.
3484 */
3485#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
3486
3487/**
3488 * A variable controlling whether video mode emulation is enabled under
3489 * Wayland.
3490 *
3491 * When this hint is set, a standard set of emulated CVT video modes will be
3492 * exposed for use by the application. If it is disabled, the only modes
3493 * exposed will be the logical desktop size and, in the case of a scaled
3494 * desktop, the native display resolution.
3495 *
3496 * The variable can be set to the following values:
3497 *
3498 * - "0": Video mode emulation is disabled.
3499 * - "1": Video mode emulation is enabled. (default)
3500 *
3501 * This hint should be set before SDL is initialized.
3502 *
3503 * \since This hint is available since SDL 3.2.0.
3504 */
3505#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
3506
3507/**
3508 * A variable controlling how modes with a non-native aspect ratio are
3509 * displayed under Wayland.
3510 *
3511 * When this hint is set, the requested scaling will be used when displaying
3512 * fullscreen video modes that don't match the display's native aspect ratio.
3513 * This is contingent on compositor viewport support.
3514 *
3515 * The variable can be set to the following values:
3516 *
3517 * - "aspect" - Video modes will be displayed scaled, in their proper aspect
3518 * ratio, with black bars.
3519 * - "stretch" - Video modes will be scaled to fill the entire display.
3520 * (default)
3521 * - "none" - Video modes will be displayed as 1:1 with no scaling.
3522 *
3523 * This hint should be set before creating a window.
3524 *
3525 * \since This hint is available since SDL 3.2.0.
3526 */
3527#define SDL_HINT_VIDEO_WAYLAND_MODE_SCALING "SDL_VIDEO_WAYLAND_MODE_SCALING"
3528
3529/**
3530 * A variable controlling whether the libdecor Wayland backend is preferred
3531 * over native decorations.
3532 *
3533 * When this hint is set, libdecor will be used to provide window decorations,
3534 * even if xdg-decoration is available. (Note that, by default, libdecor will
3535 * use xdg-decoration itself if available).
3536 *
3537 * The variable can be set to the following values:
3538 *
3539 * - "0": libdecor is enabled only if server-side decorations are unavailable.
3540 * (default)
3541 * - "1": libdecor is always enabled if available.
3542 *
3543 * This hint should be set before SDL is initialized.
3544 *
3545 * \since This hint is available since SDL 3.2.0.
3546 */
3547#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
3548
3549/**
3550 * A variable forcing non-DPI-aware Wayland windows to output at 1:1 scaling.
3551 *
3552 * This must be set before initializing the video subsystem.
3553 *
3554 * When this hint is set, Wayland windows that are not flagged as being
3555 * DPI-aware will be output with scaling designed to force 1:1 pixel mapping.
3556 *
3557 * This is intended to allow legacy applications to be displayed without
3558 * desktop scaling being applied, and has issues with certain display
3559 * configurations, as this forces the window to behave in a way that Wayland
3560 * desktops were not designed to accommodate:
3561 *
3562 * - Rounding errors can result with odd window sizes and/or desktop scales,
3563 * which can cause the window contents to appear slightly blurry.
3564 * - Positioning the window may be imprecise due to unit conversions and
3565 * rounding.
3566 * - The window may be unusably small on scaled desktops.
3567 * - The window may jump in size when moving between displays of different
3568 * scale factors.
3569 * - Displays may appear to overlap when using a multi-monitor setup with
3570 * scaling enabled.
3571 * - Possible loss of cursor precision due to the logical size of the window
3572 * being reduced.
3573 *
3574 * New applications should be designed with proper DPI awareness handling
3575 * instead of enabling this.
3576 *
3577 * The variable can be set to the following values:
3578 *
3579 * - "0": Windows will be scaled normally.
3580 * - "1": Windows will be forced to scale to achieve 1:1 output.
3581 *
3582 * This hint should be set before creating a window.
3583 *
3584 * \since This hint is available since SDL 3.2.0.
3585 */
3586#define SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY "SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY"
3587
3588/**
3589 * A variable specifying which shader compiler to preload when using the
3590 * Chrome ANGLE binaries.
3591 *
3592 * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It can
3593 * use two different sets of binaries, those compiled by the user from source
3594 * or those provided by the Chrome browser. In the later case, these binaries
3595 * require that SDL loads a DLL providing the shader compiler.
3596 *
3597 * The variable can be set to the following values:
3598 *
3599 * - "d3dcompiler_46.dll" - best for Vista or later. (default)
3600 * - "d3dcompiler_43.dll" - for XP support.
3601 * - "none" - do not load any library, useful if you compiled ANGLE from
3602 * source and included the compiler in your binaries.
3603 *
3604 * This hint should be set before SDL is initialized.
3605 *
3606 * \since This hint is available since SDL 3.2.0.
3607 */
3608#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
3609
3610/**
3611 * A variable controlling whether SDL should call XSelectInput() to enable
3612 * input events on X11 windows wrapped by SDL windows.
3613 *
3614 * The variable can be set to the following values:
3615 *
3616 * - "0": Don't call XSelectInput(), assuming the native window code has done
3617 * it already.
3618 * - "1": Call XSelectInput() to enable input events. (default)
3619 *
3620 * This hint should be set before creating a window.
3621 *
3622 * \since This hint is available since SDL 3.2.10.
3623 */
3624#define SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT "SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT"
3625
3626/**
3627 * A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint
3628 * should be used.
3629 *
3630 * The variable can be set to the following values:
3631 *
3632 * - "0": Disable _NET_WM_BYPASS_COMPOSITOR.
3633 * - "1": Enable _NET_WM_BYPASS_COMPOSITOR. (default)
3634 *
3635 * This hint should be set before creating a window.
3636 *
3637 * \since This hint is available since SDL 3.2.0.
3638 */
3639#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
3640
3641/**
3642 * A variable controlling whether the X11 _NET_WM_PING protocol should be
3643 * supported.
3644 *
3645 * By default SDL will use _NET_WM_PING, but for applications that know they
3646 * will not always be able to respond to ping requests in a timely manner they
3647 * can turn it off to avoid the window manager thinking the app is hung.
3648 *
3649 * The variable can be set to the following values:
3650 *
3651 * - "0": Disable _NET_WM_PING.
3652 * - "1": Enable _NET_WM_PING. (default)
3653 *
3654 * This hint should be set before creating a window.
3655 *
3656 * \since This hint is available since SDL 3.2.0.
3657 */
3658#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
3659
3660/**
3661 * A variable controlling whether SDL uses DirectColor visuals.
3662 *
3663 * The variable can be set to the following values:
3664 *
3665 * - "0": Disable DirectColor visuals.
3666 * - "1": Enable DirectColor visuals. (default)
3667 *
3668 * This hint should be set before initializing the video subsystem.
3669 *
3670 * \since This hint is available since SDL 3.2.0.
3671 */
3672#define SDL_HINT_VIDEO_X11_NODIRECTCOLOR "SDL_VIDEO_X11_NODIRECTCOLOR"
3673
3674/**
3675 * A variable forcing the content scaling factor for X11 displays.
3676 *
3677 * The variable can be set to a floating point value in the range 1.0-10.0f
3678 *
3679 * This hint should be set before SDL is initialized.
3680 *
3681 * \since This hint is available since SDL 3.2.0.
3682 */
3683#define SDL_HINT_VIDEO_X11_SCALING_FACTOR "SDL_VIDEO_X11_SCALING_FACTOR"
3684
3685/**
3686 * A variable forcing the visual ID used for X11 display modes.
3687 *
3688 * This hint should be set before initializing the video subsystem.
3689 *
3690 * \since This hint is available since SDL 3.2.0.
3691 */
3692#define SDL_HINT_VIDEO_X11_VISUALID "SDL_VIDEO_X11_VISUALID"
3693
3694/**
3695 * A variable forcing the visual ID chosen for new X11 windows.
3696 *
3697 * This hint should be set before creating a window.
3698 *
3699 * \since This hint is available since SDL 3.2.0.
3700 */
3701#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
3702
3703/**
3704 * A variable controlling whether the X11 XRandR extension should be used.
3705 *
3706 * The variable can be set to the following values:
3707 *
3708 * - "0": Disable XRandR.
3709 * - "1": Enable XRandR. (default)
3710 *
3711 * This hint should be set before SDL is initialized.
3712 *
3713 * \since This hint is available since SDL 3.2.0.
3714 */
3715#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
3716
3717/**
3718 * A variable controlling whether touch should be enabled on the back panel of
3719 * the PlayStation Vita.
3720 *
3721 * The variable can be set to the following values:
3722 *
3723 * - "0": Disable touch on the back panel.
3724 * - "1": Enable touch on the back panel. (default)
3725 *
3726 * This hint should be set before SDL is initialized.
3727 *
3728 * \since This hint is available since SDL 3.2.0.
3729 */
3730#define SDL_HINT_VITA_ENABLE_BACK_TOUCH "SDL_VITA_ENABLE_BACK_TOUCH"
3731
3732/**
3733 * A variable controlling whether touch should be enabled on the front panel
3734 * of the PlayStation Vita.
3735 *
3736 * The variable can be set to the following values:
3737 *
3738 * - "0": Disable touch on the front panel.
3739 * - "1": Enable touch on the front panel. (default)
3740 *
3741 * This hint should be set before SDL is initialized.
3742 *
3743 * \since This hint is available since SDL 3.2.0.
3744 */
3745#define SDL_HINT_VITA_ENABLE_FRONT_TOUCH "SDL_VITA_ENABLE_FRONT_TOUCH"
3746
3747/**
3748 * A variable controlling the module path on the PlayStation Vita.
3749 *
3750 * This hint defaults to "app0:module"
3751 *
3752 * This hint should be set before SDL is initialized.
3753 *
3754 * \since This hint is available since SDL 3.2.0.
3755 */
3756#define SDL_HINT_VITA_MODULE_PATH "SDL_VITA_MODULE_PATH"
3757
3758/**
3759 * A variable controlling whether to perform PVR initialization on the
3760 * PlayStation Vita.
3761 *
3762 * - "0": Skip PVR initialization.
3763 * - "1": Perform the normal PVR initialization. (default)
3764 *
3765 * This hint should be set before SDL is initialized.
3766 *
3767 * \since This hint is available since SDL 3.2.0.
3768 */
3769#define SDL_HINT_VITA_PVR_INIT "SDL_VITA_PVR_INIT"
3770
3771/**
3772 * A variable overriding the resolution reported on the PlayStation Vita.
3773 *
3774 * The variable can be set to the following values:
3775 *
3776 * - "544": 544p (default)
3777 * - "720": 725p for PSTV
3778 * - "1080": 1088i for PSTV
3779 *
3780 * This hint should be set before SDL is initialized.
3781 *
3782 * \since This hint is available since SDL 3.2.0.
3783 */
3784#define SDL_HINT_VITA_RESOLUTION "SDL_VITA_RESOLUTION"
3785
3786/**
3787 * A variable controlling whether OpenGL should be used instead of OpenGL ES
3788 * on the PlayStation Vita.
3789 *
3790 * The variable can be set to the following values:
3791 *
3792 * - "0": Use OpenGL ES. (default)
3793 * - "1": Use OpenGL.
3794 *
3795 * This hint should be set before SDL is initialized.
3796 *
3797 * \since This hint is available since SDL 3.2.0.
3798 */
3799#define SDL_HINT_VITA_PVR_OPENGL "SDL_VITA_PVR_OPENGL"
3800
3801/**
3802 * A variable controlling which touchpad should generate synthetic mouse
3803 * events.
3804 *
3805 * The variable can be set to the following values:
3806 *
3807 * - "0": Only front touchpad should generate mouse events. (default)
3808 * - "1": Only back touchpad should generate mouse events.
3809 * - "2": Both touchpads should generate mouse events.
3810 *
3811 * This hint can be set anytime.
3812 *
3813 * \since This hint is available since SDL 3.2.0.
3814 */
3815#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_VITA_TOUCH_MOUSE_DEVICE"
3816
3817/**
3818 * A variable overriding the display index used in SDL_Vulkan_CreateSurface()
3819 *
3820 * The display index starts at 0, which is the default.
3821 *
3822 * This hint should be set before calling SDL_Vulkan_CreateSurface()
3823 *
3824 * \since This hint is available since SDL 3.2.0.
3825 */
3826#define SDL_HINT_VULKAN_DISPLAY "SDL_VULKAN_DISPLAY"
3827
3828/**
3829 * Specify the Vulkan library to load.
3830 *
3831 * This hint should be set before creating a Vulkan window or calling
3832 * SDL_Vulkan_LoadLibrary().
3833 *
3834 * \since This hint is available since SDL 3.2.0.
3835 */
3836#define SDL_HINT_VULKAN_LIBRARY "SDL_VULKAN_LIBRARY"
3837
3838/**
3839 * A variable controlling how the fact chunk affects the loading of a WAVE
3840 * file.
3841 *
3842 * The fact chunk stores information about the number of samples of a WAVE
3843 * file. The Standards Update from Microsoft notes that this value can be used
3844 * to 'determine the length of the data in seconds'. This is especially useful
3845 * for compressed formats (for which this is a mandatory chunk) if they
3846 * produce multiple sample frames per block and truncating the block is not
3847 * allowed. The fact chunk can exactly specify how many sample frames there
3848 * should be in this case.
3849 *
3850 * Unfortunately, most application seem to ignore the fact chunk and so SDL
3851 * ignores it by default as well.
3852 *
3853 * The variable can be set to the following values:
3854 *
3855 * - "truncate" - Use the number of samples to truncate the wave data if the
3856 * fact chunk is present and valid.
3857 * - "strict" - Like "truncate", but raise an error if the fact chunk is
3858 * invalid, not present for non-PCM formats, or if the data chunk doesn't
3859 * have that many samples.
3860 * - "ignorezero" - Like "truncate", but ignore fact chunk if the number of
3861 * samples is zero.
3862 * - "ignore" - Ignore fact chunk entirely. (default)
3863 *
3864 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
3865 *
3866 * \since This hint is available since SDL 3.2.0.
3867 */
3868#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
3869
3870/**
3871 * A variable controlling the maximum number of chunks in a WAVE file.
3872 *
3873 * This sets an upper bound on the number of chunks in a WAVE file to avoid
3874 * wasting time on malformed or corrupt WAVE files. This defaults to "10000".
3875 *
3876 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
3877 *
3878 * \since This hint is available since SDL 3.2.0.
3879 */
3880#define SDL_HINT_WAVE_CHUNK_LIMIT "SDL_WAVE_CHUNK_LIMIT"
3881
3882/**
3883 * A variable controlling how the size of the RIFF chunk affects the loading
3884 * of a WAVE file.
3885 *
3886 * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
3887 * file) is not always reliable. In case the size is wrong, it's possible to
3888 * just ignore it and step through the chunks until a fixed limit is reached.
3889 *
3890 * Note that files that have trailing data unrelated to the WAVE file or
3891 * corrupt files may slow down the loading process without a reliable
3892 * boundary. By default, SDL stops after 10000 chunks to prevent wasting time.
3893 * Use SDL_HINT_WAVE_CHUNK_LIMIT to adjust this value.
3894 *
3895 * The variable can be set to the following values:
3896 *
3897 * - "force" - Always use the RIFF chunk size as a boundary for the chunk
3898 * search.
3899 * - "ignorezero" - Like "force", but a zero size searches up to 4 GiB.
3900 * (default)
3901 * - "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB.
3902 * - "maximum" - Search for chunks until the end of file. (not recommended)
3903 *
3904 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
3905 *
3906 * \since This hint is available since SDL 3.2.0.
3907 */
3908#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
3909
3910/**
3911 * A variable controlling how a truncated WAVE file is handled.
3912 *
3913 * A WAVE file is considered truncated if any of the chunks are incomplete or
3914 * the data chunk size is not a multiple of the block size. By default, SDL
3915 * decodes until the first incomplete block, as most applications seem to do.
3916 *
3917 * The variable can be set to the following values:
3918 *
3919 * - "verystrict" - Raise an error if the file is truncated.
3920 * - "strict" - Like "verystrict", but the size of the RIFF chunk is ignored.
3921 * - "dropframe" - Decode until the first incomplete sample frame.
3922 * - "dropblock" - Decode until the first incomplete block. (default)
3923 *
3924 * This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO()
3925 *
3926 * \since This hint is available since SDL 3.2.0.
3927 */
3928#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
3929
3930/**
3931 * A variable controlling whether the window is activated when the
3932 * SDL_RaiseWindow function is called.
3933 *
3934 * The variable can be set to the following values:
3935 *
3936 * - "0": The window is not activated when the SDL_RaiseWindow function is
3937 * called.
3938 * - "1": The window is activated when the SDL_RaiseWindow function is called.
3939 * (default)
3940 *
3941 * This hint can be set anytime.
3942 *
3943 * \since This hint is available since SDL 3.2.0.
3944 */
3945#define SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED "SDL_WINDOW_ACTIVATE_WHEN_RAISED"
3946
3947/**
3948 * A variable controlling whether the window is activated when the
3949 * SDL_ShowWindow function is called.
3950 *
3951 * The variable can be set to the following values:
3952 *
3953 * - "0": The window is not activated when the SDL_ShowWindow function is
3954 * called.
3955 * - "1": The window is activated when the SDL_ShowWindow function is called.
3956 * (default)
3957 *
3958 * This hint can be set anytime.
3959 *
3960 * \since This hint is available since SDL 3.2.0.
3961 */
3962#define SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"
3963
3964/**
3965 * If set to "0" then never set the top-most flag on an SDL Window even if the
3966 * application requests it.
3967 *
3968 * This is a debugging aid for developers and not expected to be used by end
3969 * users.
3970 *
3971 * The variable can be set to the following values:
3972 *
3973 * - "0": don't allow topmost
3974 * - "1": allow topmost (default)
3975 *
3976 * This hint can be set anytime.
3977 *
3978 * \since This hint is available since SDL 3.2.0.
3979 */
3980#define SDL_HINT_WINDOW_ALLOW_TOPMOST "SDL_WINDOW_ALLOW_TOPMOST"
3981
3982/**
3983 * A variable controlling whether the window frame and title bar are
3984 * interactive when the cursor is hidden.
3985 *
3986 * The variable can be set to the following values:
3987 *
3988 * - "0": The window frame is not interactive when the cursor is hidden (no
3989 * move, resize, etc).
3990 * - "1": The window frame is interactive when the cursor is hidden. (default)
3991 *
3992 * This hint can be set anytime.
3993 *
3994 * \since This hint is available since SDL 3.2.0.
3995 */
3996#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
3997
3998/**
3999 * A variable controlling whether SDL generates window-close events for Alt+F4
4000 * on Windows.
4001 *
4002 * The variable can be set to the following values:
4003 *
4004 * - "0": SDL will only do normal key handling for Alt+F4.
4005 * - "1": SDL will generate a window-close event when it sees Alt+F4.
4006 * (default)
4007 *
4008 * This hint can be set anytime.
4009 *
4010 * \since This hint is available since SDL 3.2.0.
4011 */
4012#define SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 "SDL_WINDOWS_CLOSE_ON_ALT_F4"
4013
4014/**
4015 * A variable controlling whether menus can be opened with their keyboard
4016 * shortcut (Alt+mnemonic).
4017 *
4018 * If the mnemonics are enabled, then menus can be opened by pressing the Alt
4019 * key and the corresponding mnemonic (for example, Alt+F opens the File
4020 * menu). However, in case an invalid mnemonic is pressed, Windows makes an
4021 * audible beep to convey that nothing happened. This is true even if the
4022 * window has no menu at all!
4023 *
4024 * Because most SDL applications don't have menus, and some want to use the
4025 * Alt key for other purposes, SDL disables mnemonics (and the beeping) by
4026 * default.
4027 *
4028 * Note: This also affects keyboard events: with mnemonics enabled, when a
4029 * menu is opened from the keyboard, you will not receive a KEYUP event for
4030 * the mnemonic key, and *might* not receive one for Alt.
4031 *
4032 * The variable can be set to the following values:
4033 *
4034 * - "0": Alt+mnemonic does nothing, no beeping. (default)
4035 * - "1": Alt+mnemonic opens menus, invalid mnemonics produce a beep.
4036 *
4037 * This hint can be set anytime.
4038 *
4039 * \since This hint is available since SDL 3.2.0.
4040 */
4041#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
4042
4043/**
4044 * A variable controlling whether the windows message loop is processed by
4045 * SDL.
4046 *
4047 * The variable can be set to the following values:
4048 *
4049 * - "0": The window message loop is not run.
4050 * - "1": The window message loop is processed in SDL_PumpEvents(). (default)
4051 *
4052 * This hint can be set anytime.
4053 *
4054 * \since This hint is available since SDL 3.2.0.
4055 */
4056#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
4057
4058/**
4059 * A variable controlling whether GameInput is used for raw keyboard and mouse
4060 * on Windows.
4061 *
4062 * The variable can be set to the following values:
4063 *
4064 * - "0": GameInput is not used for raw keyboard and mouse events.
4065 * - "1": GameInput is used for raw keyboard and mouse events, if available.
4066 * (default)
4067 *
4068 * This hint should be set before SDL is initialized.
4069 *
4070 * \since This hint is available since SDL 3.2.0.
4071 */
4072#define SDL_HINT_WINDOWS_GAMEINPUT "SDL_WINDOWS_GAMEINPUT"
4073
4074/**
4075 * A variable controlling whether raw keyboard events are used on Windows.
4076 *
4077 * The variable can be set to the following values:
4078 *
4079 * - "0": The Windows message loop is used for keyboard events. (default)
4080 * - "1": Low latency raw keyboard events are used.
4081 *
4082 * This hint can be set anytime.
4083 *
4084 * \since This hint is available since SDL 3.2.0.
4085 */
4086#define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"
4087
4088/**
4089 * A variable controlling whether SDL uses Kernel Semaphores on Windows.
4090 *
4091 * Kernel Semaphores are inter-process and require a context switch on every
4092 * interaction. On Windows 8 and newer, the WaitOnAddress API is available.
4093 * Using that and atomics to implement semaphores increases performance. SDL
4094 * will fall back to Kernel Objects on older OS versions or if forced to by
4095 * this hint.
4096 *
4097 * The variable can be set to the following values:
4098 *
4099 * - "0": Use Atomics and WaitOnAddress API when available, otherwise fall
4100 * back to Kernel Objects. (default)
4101 * - "1": Force the use of Kernel Objects in all cases.
4102 *
4103 * This hint should be set before SDL is initialized.
4104 *
4105 * \since This hint is available since SDL 3.2.0.
4106 */
4107#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
4108
4109/**
4110 * A variable to specify custom icon resource id from RC file on Windows
4111 * platform.
4112 *
4113 * This hint should be set before SDL is initialized.
4114 *
4115 * \since This hint is available since SDL 3.2.0.
4116 */
4117#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
4118
4119/**
4120 * A variable to specify custom icon resource id from RC file on Windows
4121 * platform.
4122 *
4123 * This hint should be set before SDL is initialized.
4124 *
4125 * \since This hint is available since SDL 3.2.0.
4126 */
4127#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
4128
4129/**
4130 * A variable controlling whether SDL uses the D3D9Ex API introduced in
4131 * Windows Vista, instead of normal D3D9.
4132 *
4133 * Direct3D 9Ex contains changes to state management that can eliminate device
4134 * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may
4135 * require some changes to your application to cope with the new behavior, so
4136 * this is disabled by default.
4137 *
4138 * For more information on Direct3D 9Ex, see:
4139 *
4140 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
4141 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
4142 *
4143 * The variable can be set to the following values:
4144 *
4145 * - "0": Use the original Direct3D 9 API. (default)
4146 * - "1": Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex
4147 * is unavailable)
4148 *
4149 * This hint should be set before SDL is initialized.
4150 *
4151 * \since This hint is available since SDL 3.2.0.
4152 */
4153#define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
4154
4155/**
4156 * A variable controlling whether SDL will clear the window contents when the
4157 * WM_ERASEBKGND message is received.
4158 *
4159 * The variable can be set to the following values:
4160 *
4161 * - "0"/"never": Never clear the window.
4162 * - "1"/"initial": Clear the window when the first WM_ERASEBKGND event fires.
4163 * (default)
4164 * - "2"/"always": Clear the window on every WM_ERASEBKGND event.
4165 *
4166 * This hint should be set before creating a window.
4167 *
4168 * \since This hint is available since SDL 3.2.0.
4169 */
4170#define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE "SDL_WINDOWS_ERASE_BACKGROUND_MODE"
4171
4172/**
4173 * A variable controlling whether X11 windows are marked as override-redirect.
4174 *
4175 * If set, this _might_ increase framerate at the expense of the desktop not
4176 * working as expected. Override-redirect windows aren't noticed by the window
4177 * manager at all.
4178 *
4179 * You should probably only use this for fullscreen windows, and you probably
4180 * shouldn't even use it for that. But it's here if you want to try!
4181 *
4182 * The variable can be set to the following values:
4183 *
4184 * - "0": Do not mark the window as override-redirect. (default)
4185 * - "1": Mark the window as override-redirect.
4186 *
4187 * This hint should be set before creating a window.
4188 *
4189 * \since This hint is available since SDL 3.2.0.
4190 */
4191#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
4192
4193/**
4194 * A variable specifying the type of an X11 window.
4195 *
4196 * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property to
4197 * report to the window manager the type of window it wants to create. This
4198 * might be set to various things if SDL_WINDOW_TOOLTIP or
4199 * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
4200 * haven't set a specific type, this hint can be used to specify a custom
4201 * type. For example, a dock window might set this to
4202 * "_NET_WM_WINDOW_TYPE_DOCK".
4203 *
4204 * This hint should be set before creating a window.
4205 *
4206 * \since This hint is available since SDL 3.2.0.
4207 */
4208#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
4209
4210/**
4211 * Specify the XCB library to load for the X11 driver.
4212 *
4213 * The default is platform-specific, often "libX11-xcb.so.1".
4214 *
4215 * This hint should be set before initializing the video subsystem.
4216 *
4217 * \since This hint is available since SDL 3.2.0.
4218 */
4219#define SDL_HINT_X11_XCB_LIBRARY "SDL_X11_XCB_LIBRARY"
4220
4221/**
4222 * A variable controlling whether XInput should be used for controller
4223 * handling.
4224 *
4225 * The variable can be set to the following values:
4226 *
4227 * - "0": XInput is not enabled.
4228 * - "1": XInput is enabled. (default)
4229 *
4230 * This hint should be set before SDL is initialized.
4231 *
4232 * \since This hint is available since SDL 3.2.0.
4233 */
4234#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
4235
4236/**
4237 * A variable controlling response to SDL_assert failures.
4238 *
4239 * The variable can be set to the following case-sensitive values:
4240 *
4241 * - "abort": Program terminates immediately.
4242 * - "break": Program triggers a debugger breakpoint.
4243 * - "retry": Program reruns the SDL_assert's test again.
4244 * - "ignore": Program continues on, ignoring this assertion failure this
4245 * time.
4246 * - "always_ignore": Program continues on, ignoring this assertion failure
4247 * for the rest of the run.
4248 *
4249 * Note that SDL_SetAssertionHandler offers a programmatic means to deal with
4250 * assertion failures through a callback, and this hint is largely intended to
4251 * be used via environment variables by end users and automated tools.
4252 *
4253 * This hint should be set before an assertion failure is triggered and can be
4254 * changed at any time.
4255 *
4256 * \since This hint is available since SDL 3.2.0.
4257 */
4258#define SDL_HINT_ASSERT "SDL_ASSERT"
4259
4260/**
4261 * A variable controlling whether pen events should generate synthetic mouse
4262 * events.
4263 *
4264 * The variable can be set to the following values:
4265 *
4266 * - "0": Pen events will not generate mouse events.
4267 * - "1": Pen events will generate mouse events. (default)
4268 *
4269 * This hint can be set anytime.
4270 *
4271 * \since This hint is available since SDL 3.2.0.
4272 */
4273#define SDL_HINT_PEN_MOUSE_EVENTS "SDL_PEN_MOUSE_EVENTS"
4274
4275/**
4276 * A variable controlling whether pen events should generate synthetic touch
4277 * events.
4278 *
4279 * The variable can be set to the following values:
4280 *
4281 * - "0": Pen events will not generate touch events.
4282 * - "1": Pen events will generate touch events. (default)
4283 *
4284 * This hint can be set anytime.
4285 *
4286 * \since This hint is available since SDL 3.2.0.
4287 */
4288#define SDL_HINT_PEN_TOUCH_EVENTS "SDL_PEN_TOUCH_EVENTS"
4289
4290
4291/**
4292 * An enumeration of hint priorities.
4293 *
4294 * \since This enum is available since SDL 3.2.0.
4295 */
4296typedef enum SDL_HintPriority
4297{
4298 SDL_HINT_DEFAULT,
4299 SDL_HINT_NORMAL,
4300 SDL_HINT_OVERRIDE
4301} SDL_HintPriority;
4302
4303/**
4304 * Set a hint with a specific priority.
4305 *
4306 * The priority controls the behavior when setting a hint that already has a
4307 * value. Hints will replace existing hints of their priority and lower.
4308 * Environment variables are considered to have override priority.
4309 *
4310 * \param name the hint to set.
4311 * \param value the value of the hint variable.
4312 * \param priority the SDL_HintPriority level for the hint.
4313 * \returns true on success or false on failure; call SDL_GetError() for more
4314 * information.
4315 *
4316 * \threadsafety It is safe to call this function from any thread.
4317 *
4318 * \since This function is available since SDL 3.2.0.
4319 *
4320 * \sa SDL_GetHint
4321 * \sa SDL_ResetHint
4322 * \sa SDL_SetHint
4323 */
4324extern SDL_DECLSPEC bool SDLCALL SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority);
4325
4326/**
4327 * Set a hint with normal priority.
4328 *
4329 * Hints will not be set if there is an existing override hint or environment
4330 * variable that takes precedence. You can use SDL_SetHintWithPriority() to
4331 * set the hint with override priority instead.
4332 *
4333 * \param name the hint to set.
4334 * \param value the value of the hint variable.
4335 * \returns true on success or false on failure; call SDL_GetError() for more
4336 * information.
4337 *
4338 * \threadsafety It is safe to call this function from any thread.
4339 *
4340 * \since This function is available since SDL 3.2.0.
4341 *
4342 * \sa SDL_GetHint
4343 * \sa SDL_ResetHint
4344 * \sa SDL_SetHintWithPriority
4345 */
4346extern SDL_DECLSPEC bool SDLCALL SDL_SetHint(const char *name, const char *value);
4347
4348/**
4349 * Reset a hint to the default value.
4350 *
4351 * This will reset a hint to the value of the environment variable, or NULL if
4352 * the environment isn't set. Callbacks will be called normally with this
4353 * change.
4354 *
4355 * \param name the hint to set.
4356 * \returns true on success or false on failure; call SDL_GetError() for more
4357 * information.
4358 *
4359 * \threadsafety It is safe to call this function from any thread.
4360 *
4361 * \since This function is available since SDL 3.2.0.
4362 *
4363 * \sa SDL_SetHint
4364 * \sa SDL_ResetHints
4365 */
4366extern SDL_DECLSPEC bool SDLCALL SDL_ResetHint(const char *name);
4367
4368/**
4369 * Reset all hints to the default values.
4370 *
4371 * This will reset all hints to the value of the associated environment
4372 * variable, or NULL if the environment isn't set. Callbacks will be called
4373 * normally with this change.
4374 *
4375 * \threadsafety It is safe to call this function from any thread.
4376 *
4377 * \since This function is available since SDL 3.2.0.
4378 *
4379 * \sa SDL_ResetHint
4380 */
4381extern SDL_DECLSPEC void SDLCALL SDL_ResetHints(void);
4382
4383/**
4384 * Get the value of a hint.
4385 *
4386 * \param name the hint to query.
4387 * \returns the string value of a hint or NULL if the hint isn't set.
4388 *
4389 * \threadsafety It is safe to call this function from any thread, however the
4390 * return value only remains valid until the hint is changed; if
4391 * another thread might do so, the app should supply locks
4392 * and/or make a copy of the string. Note that using a hint
4393 * callback instead is always thread-safe, as SDL holds a lock
4394 * on the thread subsystem during the callback.
4395 *
4396 * \since This function is available since SDL 3.2.0.
4397 *
4398 * \sa SDL_SetHint
4399 * \sa SDL_SetHintWithPriority
4400 */
4401extern SDL_DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
4402
4403/**
4404 * Get the boolean value of a hint variable.
4405 *
4406 * \param name the name of the hint to get the boolean value from.
4407 * \param default_value the value to return if the hint does not exist.
4408 * \returns the boolean value of a hint or the provided default value if the
4409 * hint does not exist.
4410 *
4411 * \threadsafety It is safe to call this function from any thread.
4412 *
4413 * \since This function is available since SDL 3.2.0.
4414 *
4415 * \sa SDL_GetHint
4416 * \sa SDL_SetHint
4417 */
4418extern SDL_DECLSPEC bool SDLCALL SDL_GetHintBoolean(const char *name, bool default_value);
4419
4420/**
4421 * A callback used to send notifications of hint value changes.
4422 *
4423 * This is called an initial time during SDL_AddHintCallback with the hint's
4424 * current value, and then again each time the hint's value changes.
4425 *
4426 * \param userdata what was passed as `userdata` to SDL_AddHintCallback().
4427 * \param name what was passed as `name` to SDL_AddHintCallback().
4428 * \param oldValue the previous hint value.
4429 * \param newValue the new value hint is to be set to.
4430 *
4431 * \threadsafety This callback is fired from whatever thread is setting a new
4432 * hint value. SDL holds a lock on the hint subsystem when
4433 * calling this callback.
4434 *
4435 * \since This datatype is available since SDL 3.2.0.
4436 *
4437 * \sa SDL_AddHintCallback
4438 */
4439typedef void(SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
4440
4441/**
4442 * Add a function to watch a particular hint.
4443 *
4444 * The callback function is called _during_ this function, to provide it an
4445 * initial value, and again each time the hint's value changes.
4446 *
4447 * \param name the hint to watch.
4448 * \param callback An SDL_HintCallback function that will be called when the
4449 * hint value changes.
4450 * \param userdata a pointer to pass to the callback function.
4451 * \returns true on success or false on failure; call SDL_GetError() for more
4452 * information.
4453 *
4454 * \threadsafety It is safe to call this function from any thread.
4455 *
4456 * \since This function is available since SDL 3.2.0.
4457 *
4458 * \sa SDL_RemoveHintCallback
4459 */
4460extern SDL_DECLSPEC bool SDLCALL SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata);
4461
4462/**
4463 * Remove a function watching a particular hint.
4464 *
4465 * \param name the hint being watched.
4466 * \param callback an SDL_HintCallback function that will be called when the
4467 * hint value changes.
4468 * \param userdata a pointer being passed to the callback function.
4469 *
4470 * \threadsafety It is safe to call this function from any thread.
4471 *
4472 * \since This function is available since SDL 3.2.0.
4473 *
4474 * \sa SDL_AddHintCallback
4475 */
4476extern SDL_DECLSPEC void SDLCALL SDL_RemoveHintCallback(const char *name,
4477 SDL_HintCallback callback,
4478 void *userdata);
4479
4480/* Ends C function definitions when using C++ */
4481#ifdef __cplusplus
4482}
4483#endif
4484#include <SDL3/SDL_close_code.h>
4485
4486#endif /* SDL_hints_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_init.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_init.h
new file mode 100644
index 0000000..27ebe4b
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_init.h
@@ -0,0 +1,497 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryInit
24 *
25 * All SDL programs need to initialize the library before starting to work
26 * with it.
27 *
28 * Almost everything can simply call SDL_Init() near startup, with a handful
29 * of flags to specify subsystems to touch. These are here to make sure SDL
30 * does not even attempt to touch low-level pieces of the operating system
31 * that you don't intend to use. For example, you might be using SDL for video
32 * and input but chose an external library for audio, and in this case you
33 * would just need to leave off the `SDL_INIT_AUDIO` flag to make sure that
34 * external library has complete control.
35 *
36 * Most apps, when terminating, should call SDL_Quit(). This will clean up
37 * (nearly) everything that SDL might have allocated, and crucially, it'll
38 * make sure that the display's resolution is back to what the user expects if
39 * you had previously changed it for your game.
40 *
41 * SDL3 apps are strongly encouraged to call SDL_SetAppMetadata() at startup
42 * to fill in details about the program. This is completely optional, but it
43 * helps in small ways (we can provide an About dialog box for the macOS menu,
44 * we can name the app in the system's audio mixer, etc). Those that want to
45 * provide a _lot_ of information should look at the more-detailed
46 * SDL_SetAppMetadataProperty().
47 */
48
49#ifndef SDL_init_h_
50#define SDL_init_h_
51
52#include <SDL3/SDL_stdinc.h>
53#include <SDL3/SDL_error.h>
54#include <SDL3/SDL_events.h>
55
56#include <SDL3/SDL_begin_code.h>
57/* Set up for C function definitions, even when using C++ */
58#ifdef __cplusplus
59extern "C" {
60#endif
61
62/* As of version 0.5, SDL is loaded dynamically into the application */
63
64/**
65 * Initialization flags for SDL_Init and/or SDL_InitSubSystem
66 *
67 * These are the flags which may be passed to SDL_Init(). You should specify
68 * the subsystems which you will be using in your application.
69 *
70 * \since This datatype is available since SDL 3.2.0.
71 *
72 * \sa SDL_Init
73 * \sa SDL_Quit
74 * \sa SDL_InitSubSystem
75 * \sa SDL_QuitSubSystem
76 * \sa SDL_WasInit
77 */
78typedef Uint32 SDL_InitFlags;
79
80#define SDL_INIT_AUDIO 0x00000010u /**< `SDL_INIT_AUDIO` implies `SDL_INIT_EVENTS` */
81#define SDL_INIT_VIDEO 0x00000020u /**< `SDL_INIT_VIDEO` implies `SDL_INIT_EVENTS`, should be initialized on the main thread */
82#define SDL_INIT_JOYSTICK 0x00000200u /**< `SDL_INIT_JOYSTICK` implies `SDL_INIT_EVENTS` */
83#define SDL_INIT_HAPTIC 0x00001000u
84#define SDL_INIT_GAMEPAD 0x00002000u /**< `SDL_INIT_GAMEPAD` implies `SDL_INIT_JOYSTICK` */
85#define SDL_INIT_EVENTS 0x00004000u
86#define SDL_INIT_SENSOR 0x00008000u /**< `SDL_INIT_SENSOR` implies `SDL_INIT_EVENTS` */
87#define SDL_INIT_CAMERA 0x00010000u /**< `SDL_INIT_CAMERA` implies `SDL_INIT_EVENTS` */
88
89/**
90 * Return values for optional main callbacks.
91 *
92 * Returning SDL_APP_SUCCESS or SDL_APP_FAILURE from SDL_AppInit,
93 * SDL_AppEvent, or SDL_AppIterate will terminate the program and report
94 * success/failure to the operating system. What that means is
95 * platform-dependent. On Unix, for example, on success, the process error
96 * code will be zero, and on failure it will be 1. This interface doesn't
97 * allow you to return specific exit codes, just whether there was an error
98 * generally or not.
99 *
100 * Returning SDL_APP_CONTINUE from these functions will let the app continue
101 * to run.
102 *
103 * See
104 * [Main callbacks in SDL3](https://wiki.libsdl.org/SDL3/README/main-functions#main-callbacks-in-sdl3)
105 * for complete details.
106 *
107 * \since This enum is available since SDL 3.2.0.
108 */
109typedef enum SDL_AppResult
110{
111 SDL_APP_CONTINUE, /**< Value that requests that the app continue from the main callbacks. */
112 SDL_APP_SUCCESS, /**< Value that requests termination with success from the main callbacks. */
113 SDL_APP_FAILURE /**< Value that requests termination with error from the main callbacks. */
114} SDL_AppResult;
115
116/**
117 * Function pointer typedef for SDL_AppInit.
118 *
119 * These are used by SDL_EnterAppMainCallbacks. This mechanism operates behind
120 * the scenes for apps using the optional main callbacks. Apps that want to
121 * use this should just implement SDL_AppInit directly.
122 *
123 * \param appstate a place where the app can optionally store a pointer for
124 * future use.
125 * \param argc the standard ANSI C main's argc; number of elements in `argv`.
126 * \param argv the standard ANSI C main's argv; array of command line
127 * arguments.
128 * \returns SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to
129 * terminate with success, SDL_APP_CONTINUE to continue.
130 *
131 * \since This datatype is available since SDL 3.2.0.
132 */
133typedef SDL_AppResult (SDLCALL *SDL_AppInit_func)(void **appstate, int argc, char *argv[]);
134
135/**
136 * Function pointer typedef for SDL_AppIterate.
137 *
138 * These are used by SDL_EnterAppMainCallbacks. This mechanism operates behind
139 * the scenes for apps using the optional main callbacks. Apps that want to
140 * use this should just implement SDL_AppIterate directly.
141 *
142 * \param appstate an optional pointer, provided by the app in SDL_AppInit.
143 * \returns SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to
144 * terminate with success, SDL_APP_CONTINUE to continue.
145 *
146 * \since This datatype is available since SDL 3.2.0.
147 */
148typedef SDL_AppResult (SDLCALL *SDL_AppIterate_func)(void *appstate);
149
150/**
151 * Function pointer typedef for SDL_AppEvent.
152 *
153 * These are used by SDL_EnterAppMainCallbacks. This mechanism operates behind
154 * the scenes for apps using the optional main callbacks. Apps that want to
155 * use this should just implement SDL_AppEvent directly.
156 *
157 * \param appstate an optional pointer, provided by the app in SDL_AppInit.
158 * \param event the new event for the app to examine.
159 * \returns SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to
160 * terminate with success, SDL_APP_CONTINUE to continue.
161 *
162 * \since This datatype is available since SDL 3.2.0.
163 */
164typedef SDL_AppResult (SDLCALL *SDL_AppEvent_func)(void *appstate, SDL_Event *event);
165
166/**
167 * Function pointer typedef for SDL_AppQuit.
168 *
169 * These are used by SDL_EnterAppMainCallbacks. This mechanism operates behind
170 * the scenes for apps using the optional main callbacks. Apps that want to
171 * use this should just implement SDL_AppEvent directly.
172 *
173 * \param appstate an optional pointer, provided by the app in SDL_AppInit.
174 * \param result the result code that terminated the app (success or failure).
175 *
176 * \since This datatype is available since SDL 3.2.0.
177 */
178typedef void (SDLCALL *SDL_AppQuit_func)(void *appstate, SDL_AppResult result);
179
180
181/**
182 * Initialize the SDL library.
183 *
184 * SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
185 * two may be used interchangeably. Though for readability of your code
186 * SDL_InitSubSystem() might be preferred.
187 *
188 * The file I/O (for example: SDL_IOFromFile) and threading (SDL_CreateThread)
189 * subsystems are initialized by default. Message boxes
190 * (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
191 * video subsystem, in hopes of being useful in showing an error dialog when
192 * SDL_Init fails. You must specifically initialize other subsystems if you
193 * use them in your application.
194 *
195 * Logging (such as SDL_Log) works without initialization, too.
196 *
197 * `flags` may be any of the following OR'd together:
198 *
199 * - `SDL_INIT_AUDIO`: audio subsystem; automatically initializes the events
200 * subsystem
201 * - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
202 * subsystem, should be initialized on the main thread.
203 * - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
204 * events subsystem
205 * - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
206 * - `SDL_INIT_GAMEPAD`: gamepad subsystem; automatically initializes the
207 * joystick subsystem
208 * - `SDL_INIT_EVENTS`: events subsystem
209 * - `SDL_INIT_SENSOR`: sensor subsystem; automatically initializes the events
210 * subsystem
211 * - `SDL_INIT_CAMERA`: camera subsystem; automatically initializes the events
212 * subsystem
213 *
214 * Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
215 * for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
216 * call SDL_Quit() to force shutdown). If a subsystem is already loaded then
217 * this call will increase the ref-count and return.
218 *
219 * Consider reporting some basic metadata about your application before
220 * calling SDL_Init, using either SDL_SetAppMetadata() or
221 * SDL_SetAppMetadataProperty().
222 *
223 * \param flags subsystem initialization flags.
224 * \returns true on success or false on failure; call SDL_GetError() for more
225 * information.
226 *
227 * \since This function is available since SDL 3.2.0.
228 *
229 * \sa SDL_SetAppMetadata
230 * \sa SDL_SetAppMetadataProperty
231 * \sa SDL_InitSubSystem
232 * \sa SDL_Quit
233 * \sa SDL_SetMainReady
234 * \sa SDL_WasInit
235 */
236extern SDL_DECLSPEC bool SDLCALL SDL_Init(SDL_InitFlags flags);
237
238/**
239 * Compatibility function to initialize the SDL library.
240 *
241 * This function and SDL_Init() are interchangeable.
242 *
243 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
244 * \returns true on success or false on failure; call SDL_GetError() for more
245 * information.
246 *
247 * \since This function is available since SDL 3.2.0.
248 *
249 * \sa SDL_Init
250 * \sa SDL_Quit
251 * \sa SDL_QuitSubSystem
252 */
253extern SDL_DECLSPEC bool SDLCALL SDL_InitSubSystem(SDL_InitFlags flags);
254
255/**
256 * Shut down specific SDL subsystems.
257 *
258 * You still need to call SDL_Quit() even if you close all open subsystems
259 * with SDL_QuitSubSystem().
260 *
261 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
262 *
263 * \since This function is available since SDL 3.2.0.
264 *
265 * \sa SDL_InitSubSystem
266 * \sa SDL_Quit
267 */
268extern SDL_DECLSPEC void SDLCALL SDL_QuitSubSystem(SDL_InitFlags flags);
269
270/**
271 * Get a mask of the specified subsystems which are currently initialized.
272 *
273 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
274 * \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
275 * returns the initialization status of the specified subsystems.
276 *
277 * \since This function is available since SDL 3.2.0.
278 *
279 * \sa SDL_Init
280 * \sa SDL_InitSubSystem
281 */
282extern SDL_DECLSPEC SDL_InitFlags SDLCALL SDL_WasInit(SDL_InitFlags flags);
283
284/**
285 * Clean up all initialized subsystems.
286 *
287 * You should call this function even if you have already shutdown each
288 * initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
289 * function even in the case of errors in initialization.
290 *
291 * You can use this function with atexit() to ensure that it is run when your
292 * application is shutdown, but it is not wise to do this from a library or
293 * other dynamically loaded code.
294 *
295 * \since This function is available since SDL 3.2.0.
296 *
297 * \sa SDL_Init
298 * \sa SDL_QuitSubSystem
299 */
300extern SDL_DECLSPEC void SDLCALL SDL_Quit(void);
301
302/**
303 * Return whether this is the main thread.
304 *
305 * On Apple platforms, the main thread is the thread that runs your program's
306 * main() entry point. On other platforms, the main thread is the one that
307 * calls SDL_Init(SDL_INIT_VIDEO), which should usually be the one that runs
308 * your program's main() entry point. If you are using the main callbacks,
309 * SDL_AppInit(), SDL_AppIterate(), and SDL_AppQuit() are all called on the
310 * main thread.
311 *
312 * \returns true if this thread is the main thread, or false otherwise.
313 *
314 * \threadsafety It is safe to call this function from any thread.
315 *
316 * \since This function is available since SDL 3.2.0.
317 *
318 * \sa SDL_RunOnMainThread
319 */
320extern SDL_DECLSPEC bool SDLCALL SDL_IsMainThread(void);
321
322/**
323 * Callback run on the main thread.
324 *
325 * \param userdata an app-controlled pointer that is passed to the callback.
326 *
327 * \since This datatype is available since SDL 3.2.0.
328 *
329 * \sa SDL_RunOnMainThread
330 */
331typedef void (SDLCALL *SDL_MainThreadCallback)(void *userdata);
332
333/**
334 * Call a function on the main thread during event processing.
335 *
336 * If this is called on the main thread, the callback is executed immediately.
337 * If this is called on another thread, this callback is queued for execution
338 * on the main thread during event processing.
339 *
340 * Be careful of deadlocks when using this functionality. You should not have
341 * the main thread wait for the current thread while this function is being
342 * called with `wait_complete` true.
343 *
344 * \param callback the callback to call on the main thread.
345 * \param userdata a pointer that is passed to `callback`.
346 * \param wait_complete true to wait for the callback to complete, false to
347 * return immediately.
348 * \returns true on success or false on failure; call SDL_GetError() for more
349 * information.
350 *
351 * \threadsafety It is safe to call this function from any thread.
352 *
353 * \since This function is available since SDL 3.2.0.
354 *
355 * \sa SDL_IsMainThread
356 */
357extern SDL_DECLSPEC bool SDLCALL SDL_RunOnMainThread(SDL_MainThreadCallback callback, void *userdata, bool wait_complete);
358
359/**
360 * Specify basic metadata about your app.
361 *
362 * You can optionally provide metadata about your app to SDL. This is not
363 * required, but strongly encouraged.
364 *
365 * There are several locations where SDL can make use of metadata (an "About"
366 * box in the macOS menu bar, the name of the app can be shown on some audio
367 * mixers, etc). Any piece of metadata can be left as NULL, if a specific
368 * detail doesn't make sense for the app.
369 *
370 * This function should be called as early as possible, before SDL_Init.
371 * Multiple calls to this function are allowed, but various state might not
372 * change once it has been set up with a previous call to this function.
373 *
374 * Passing a NULL removes any previous metadata.
375 *
376 * This is a simplified interface for the most important information. You can
377 * supply significantly more detailed metadata with
378 * SDL_SetAppMetadataProperty().
379 *
380 * \param appname The name of the application ("My Game 2: Bad Guy's
381 * Revenge!").
382 * \param appversion The version of the application ("1.0.0beta5" or a git
383 * hash, or whatever makes sense).
384 * \param appidentifier A unique string in reverse-domain format that
385 * identifies this app ("com.example.mygame2").
386 * \returns true on success or false on failure; call SDL_GetError() for more
387 * information.
388 *
389 * \threadsafety It is safe to call this function from any thread.
390 *
391 * \since This function is available since SDL 3.2.0.
392 *
393 * \sa SDL_SetAppMetadataProperty
394 */
395extern SDL_DECLSPEC bool SDLCALL SDL_SetAppMetadata(const char *appname, const char *appversion, const char *appidentifier);
396
397/**
398 * Specify metadata about your app through a set of properties.
399 *
400 * You can optionally provide metadata about your app to SDL. This is not
401 * required, but strongly encouraged.
402 *
403 * There are several locations where SDL can make use of metadata (an "About"
404 * box in the macOS menu bar, the name of the app can be shown on some audio
405 * mixers, etc). Any piece of metadata can be left out, if a specific detail
406 * doesn't make sense for the app.
407 *
408 * This function should be called as early as possible, before SDL_Init.
409 * Multiple calls to this function are allowed, but various state might not
410 * change once it has been set up with a previous call to this function.
411 *
412 * Once set, this metadata can be read using SDL_GetAppMetadataProperty().
413 *
414 * These are the supported properties:
415 *
416 * - `SDL_PROP_APP_METADATA_NAME_STRING`: The human-readable name of the
417 * application, like "My Game 2: Bad Guy's Revenge!". This will show up
418 * anywhere the OS shows the name of the application separately from window
419 * titles, such as volume control applets, etc. This defaults to "SDL
420 * Application".
421 * - `SDL_PROP_APP_METADATA_VERSION_STRING`: The version of the app that is
422 * running; there are no rules on format, so "1.0.3beta2" and "April 22nd,
423 * 2024" and a git hash are all valid options. This has no default.
424 * - `SDL_PROP_APP_METADATA_IDENTIFIER_STRING`: A unique string that
425 * identifies this app. This must be in reverse-domain format, like
426 * "com.example.mygame2". This string is used by desktop compositors to
427 * identify and group windows together, as well as match applications with
428 * associated desktop settings and icons. If you plan to package your
429 * application in a container such as Flatpak, the app ID should match the
430 * name of your Flatpak container as well. This has no default.
431 * - `SDL_PROP_APP_METADATA_CREATOR_STRING`: The human-readable name of the
432 * creator/developer/maker of this app, like "MojoWorkshop, LLC"
433 * - `SDL_PROP_APP_METADATA_COPYRIGHT_STRING`: The human-readable copyright
434 * notice, like "Copyright (c) 2024 MojoWorkshop, LLC" or whatnot. Keep this
435 * to one line, don't paste a copy of a whole software license in here. This
436 * has no default.
437 * - `SDL_PROP_APP_METADATA_URL_STRING`: A URL to the app on the web. Maybe a
438 * product page, or a storefront, or even a GitHub repository, for user's
439 * further information This has no default.
440 * - `SDL_PROP_APP_METADATA_TYPE_STRING`: The type of application this is.
441 * Currently this string can be "game" for a video game, "mediaplayer" for a
442 * media player, or generically "application" if nothing else applies.
443 * Future versions of SDL might add new types. This defaults to
444 * "application".
445 *
446 * \param name the name of the metadata property to set.
447 * \param value the value of the property, or NULL to remove that property.
448 * \returns true on success or false on failure; call SDL_GetError() for more
449 * information.
450 *
451 * \threadsafety It is safe to call this function from any thread.
452 *
453 * \since This function is available since SDL 3.2.0.
454 *
455 * \sa SDL_GetAppMetadataProperty
456 * \sa SDL_SetAppMetadata
457 */
458extern SDL_DECLSPEC bool SDLCALL SDL_SetAppMetadataProperty(const char *name, const char *value);
459
460#define SDL_PROP_APP_METADATA_NAME_STRING "SDL.app.metadata.name"
461#define SDL_PROP_APP_METADATA_VERSION_STRING "SDL.app.metadata.version"
462#define SDL_PROP_APP_METADATA_IDENTIFIER_STRING "SDL.app.metadata.identifier"
463#define SDL_PROP_APP_METADATA_CREATOR_STRING "SDL.app.metadata.creator"
464#define SDL_PROP_APP_METADATA_COPYRIGHT_STRING "SDL.app.metadata.copyright"
465#define SDL_PROP_APP_METADATA_URL_STRING "SDL.app.metadata.url"
466#define SDL_PROP_APP_METADATA_TYPE_STRING "SDL.app.metadata.type"
467
468/**
469 * Get metadata about your app.
470 *
471 * This returns metadata previously set using SDL_SetAppMetadata() or
472 * SDL_SetAppMetadataProperty(). See SDL_SetAppMetadataProperty() for the list
473 * of available properties and their meanings.
474 *
475 * \param name the name of the metadata property to get.
476 * \returns the current value of the metadata property, or the default if it
477 * is not set, NULL for properties with no default.
478 *
479 * \threadsafety It is safe to call this function from any thread, although
480 * the string returned is not protected and could potentially be
481 * freed if you call SDL_SetAppMetadataProperty() to set that
482 * property from another thread.
483 *
484 * \since This function is available since SDL 3.2.0.
485 *
486 * \sa SDL_SetAppMetadata
487 * \sa SDL_SetAppMetadataProperty
488 */
489extern SDL_DECLSPEC const char * SDLCALL SDL_GetAppMetadataProperty(const char *name);
490
491/* Ends C function definitions when using C++ */
492#ifdef __cplusplus
493}
494#endif
495#include <SDL3/SDL_close_code.h>
496
497#endif /* SDL_init_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_intrin.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_intrin.h
new file mode 100644
index 0000000..bac6d7a
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_intrin.h
@@ -0,0 +1,407 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: Intrinsics */
23
24/**
25 * # CategoryIntrinsics
26 *
27 * SDL does some preprocessor gymnastics to determine if any CPU-specific
28 * compiler intrinsics are available, as this is not necessarily an easy thing
29 * to calculate, and sometimes depends on quirks of a system, versions of
30 * build tools, and other external forces.
31 *
32 * Apps including SDL's headers will be able to check consistent preprocessor
33 * definitions to decide if it's safe to use compiler intrinsics for a
34 * specific CPU architecture. This check only tells you that the compiler is
35 * capable of using those intrinsics; at runtime, you should still check if
36 * they are available on the current system with the
37 * [CPU info functions](https://wiki.libsdl.org/SDL3/CategoryCPUInfo)
38 * , such as SDL_HasSSE() or SDL_HasNEON(). Otherwise, the process might crash
39 * for using an unsupported CPU instruction.
40 *
41 * SDL only sets preprocessor defines for CPU intrinsics if they are
42 * supported, so apps should check with `#ifdef` and not `#if`.
43 *
44 * SDL will also include the appropriate instruction-set-specific support
45 * headers, so if SDL decides to define SDL_SSE2_INTRINSICS, it will also
46 * `#include <emmintrin.h>` as well.
47 */
48
49#ifndef SDL_intrin_h_
50#define SDL_intrin_h_
51
52#include <SDL3/SDL_stdinc.h>
53
54#ifdef SDL_WIKI_DOCUMENTATION_SECTION
55
56/**
57 * Defined if (and only if) the compiler supports Loongarch LSX intrinsics.
58 *
59 * If this macro is defined, SDL will have already included `<lsxintrin.h>`
60 *
61 * \since This macro is available since SDL 3.2.0.
62 *
63 * \sa SDL_LASX_INTRINSICS
64 */
65#define SDL_LSX_INTRINSICS 1
66
67/**
68 * Defined if (and only if) the compiler supports Loongarch LSX intrinsics.
69 *
70 * If this macro is defined, SDL will have already included `<lasxintrin.h>`
71 *
72 * \since This macro is available since SDL 3.2.0.
73 *
74 * \sa SDL_LASX_INTRINSICS
75 */
76#define SDL_LASX_INTRINSICS 1
77
78/**
79 * Defined if (and only if) the compiler supports ARM NEON intrinsics.
80 *
81 * If this macro is defined, SDL will have already included `<armintr.h>`
82 * `<arm_neon.h>`, `<arm64intr.h>`, and `<arm64_neon.h>`, as appropriate.
83 *
84 * \since This macro is available since SDL 3.2.0.
85 */
86#define SDL_NEON_INTRINSICS 1
87
88/**
89 * Defined if (and only if) the compiler supports PowerPC Altivec intrinsics.
90 *
91 * If this macro is defined, SDL will have already included `<altivec.h>`
92 *
93 * \since This macro is available since SDL 3.2.0.
94 */
95#define SDL_ALTIVEC_INTRINSICS 1
96
97/**
98 * Defined if (and only if) the compiler supports Intel MMX intrinsics.
99 *
100 * If this macro is defined, SDL will have already included `<mmintrin.h>`
101 *
102 * \since This macro is available since SDL 3.2.0.
103 *
104 * \sa SDL_SSE_INTRINSICS
105 */
106#define SDL_MMX_INTRINSICS 1
107
108/**
109 * Defined if (and only if) the compiler supports Intel SSE intrinsics.
110 *
111 * If this macro is defined, SDL will have already included `<xmmintrin.h>`
112 *
113 * \since This macro is available since SDL 3.2.0.
114 *
115 * \sa SDL_SSE2_INTRINSICS
116 * \sa SDL_SSE3_INTRINSICS
117 * \sa SDL_SSE4_1_INTRINSICS
118 * \sa SDL_SSE4_2_INTRINSICS
119 */
120#define SDL_SSE_INTRINSICS 1
121
122/**
123 * Defined if (and only if) the compiler supports Intel SSE2 intrinsics.
124 *
125 * If this macro is defined, SDL will have already included `<emmintrin.h>`
126 *
127 * \since This macro is available since SDL 3.2.0.
128 *
129 * \sa SDL_SSE_INTRINSICS
130 * \sa SDL_SSE3_INTRINSICS
131 * \sa SDL_SSE4_1_INTRINSICS
132 * \sa SDL_SSE4_2_INTRINSICS
133 */
134#define SDL_SSE2_INTRINSICS 1
135
136/**
137 * Defined if (and only if) the compiler supports Intel SSE3 intrinsics.
138 *
139 * If this macro is defined, SDL will have already included `<pmmintrin.h>`
140 *
141 * \since This macro is available since SDL 3.2.0.
142 *
143 * \sa SDL_SSE_INTRINSICS
144 * \sa SDL_SSE2_INTRINSICS
145 * \sa SDL_SSE4_1_INTRINSICS
146 * \sa SDL_SSE4_2_INTRINSICS
147 */
148#define SDL_SSE3_INTRINSICS 1
149
150/**
151 * Defined if (and only if) the compiler supports Intel SSE4.1 intrinsics.
152 *
153 * If this macro is defined, SDL will have already included `<smmintrin.h>`
154 *
155 * \since This macro is available since SDL 3.2.0.
156 *
157 * \sa SDL_SSE_INTRINSICS
158 * \sa SDL_SSE2_INTRINSICS
159 * \sa SDL_SSE3_INTRINSICS
160 * \sa SDL_SSE4_2_INTRINSICS
161 */
162#define SDL_SSE4_1_INTRINSICS 1
163
164/**
165 * Defined if (and only if) the compiler supports Intel SSE4.2 intrinsics.
166 *
167 * If this macro is defined, SDL will have already included `<nmmintrin.h>`
168 *
169 * \since This macro is available since SDL 3.2.0.
170 *
171 * \sa SDL_SSE_INTRINSICS
172 * \sa SDL_SSE2_INTRINSICS
173 * \sa SDL_SSE3_INTRINSICS
174 * \sa SDL_SSE4_1_INTRINSICS
175 */
176#define SDL_SSE4_2_INTRINSICS 1
177
178/**
179 * Defined if (and only if) the compiler supports Intel AVX intrinsics.
180 *
181 * If this macro is defined, SDL will have already included `<immintrin.h>`
182 *
183 * \since This macro is available since SDL 3.2.0.
184 *
185 * \sa SDL_AVX2_INTRINSICS
186 * \sa SDL_AVX512F_INTRINSICS
187 */
188#define SDL_AVX_INTRINSICS 1
189
190/**
191 * Defined if (and only if) the compiler supports Intel AVX2 intrinsics.
192 *
193 * If this macro is defined, SDL will have already included `<immintrin.h>`
194 *
195 * \since This macro is available since SDL 3.2.0.
196 *
197 * \sa SDL_AVX_INTRINSICS
198 * \sa SDL_AVX512F_INTRINSICS
199 */
200#define SDL_AVX2_INTRINSICS 1
201
202/**
203 * Defined if (and only if) the compiler supports Intel AVX-512F intrinsics.
204 *
205 * AVX-512F is also sometimes referred to as "AVX-512 Foundation."
206 *
207 * If this macro is defined, SDL will have already included `<immintrin.h>`
208 *
209 * \since This macro is available since SDL 3.2.0.
210 *
211 * \sa SDL_AVX_INTRINSICS
212 * \sa SDL_AVX2_INTRINSICS
213 */
214#define SDL_AVX512F_INTRINSICS 1
215#endif
216
217/* Need to do this here because intrin.h has C++ code in it */
218/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
219#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
220#ifdef __clang__
221/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
222 so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
223#ifndef __PRFCHWINTRIN_H
224#define __PRFCHWINTRIN_H
225static __inline__ void __attribute__((__always_inline__, __nodebug__))
226_m_prefetch(void *__P)
227{
228 __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
229}
230#endif /* __PRFCHWINTRIN_H */
231#endif /* __clang__ */
232#include <intrin.h>
233
234#elif defined(__MINGW64_VERSION_MAJOR)
235#include <intrin.h>
236#if defined(__ARM_NEON) && !defined(SDL_DISABLE_NEON)
237# define SDL_NEON_INTRINSICS 1
238# include <arm_neon.h>
239#endif
240
241#else
242/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC to have it included. */
243#if defined(__ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC)
244#define SDL_ALTIVEC_INTRINSICS 1
245#include <altivec.h>
246#endif
247#ifndef SDL_DISABLE_NEON
248# ifdef __ARM_NEON
249# define SDL_NEON_INTRINSICS 1
250# include <arm_neon.h>
251# elif defined(SDL_PLATFORM_WINDOWS)
252/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
253# ifdef _M_ARM
254# define SDL_NEON_INTRINSICS 1
255# include <armintr.h>
256# include <arm_neon.h>
257# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
258# endif
259# if defined (_M_ARM64)
260# define SDL_NEON_INTRINSICS 1
261# include <arm64intr.h>
262# include <arm64_neon.h>
263# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
264# define __ARM_ARCH 8
265# endif
266# endif
267#endif
268#endif /* compiler version */
269
270#ifdef SDL_WIKI_DOCUMENTATION_SECTION
271/**
272 * A macro to decide if the compiler supports `__attribute__((target))`.
273 *
274 * Even though this is defined in SDL's public headers, it is generally not
275 * used directly by apps. Apps should probably just use SDL_TARGETING
276 * directly, instead.
277 *
278 * \since This macro is available since SDL 3.2.0.
279 *
280 * \sa SDL_TARGETING
281 */
282#define SDL_HAS_TARGET_ATTRIBS
283
284#elif defined(__clang__) && defined(__has_attribute)
285# if __has_attribute(target)
286# define SDL_HAS_TARGET_ATTRIBS
287# endif
288#elif defined(__GNUC__) && (__GNUC__ + (__GNUC_MINOR__ >= 9) > 4) /* gcc >= 4.9 */
289# define SDL_HAS_TARGET_ATTRIBS
290#elif defined(__ICC) && __ICC >= 1600
291# define SDL_HAS_TARGET_ATTRIBS
292#endif
293
294
295#ifdef SDL_WIKI_DOCUMENTATION_SECTION
296
297/**
298 * A macro to tag a function as targeting a specific CPU architecture.
299 *
300 * This is a hint to the compiler that a function should be built with support
301 * for a CPU instruction set that might be different than the rest of the
302 * program.
303 *
304 * The particulars of this are explained in the GCC documentation:
305 *
306 * https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-target-function-attribute
307 *
308 * An example of using this feature is to turn on SSE2 support for a specific
309 * function, even if the rest of the source code is not compiled to use SSE2
310 * code:
311 *
312 * ```c
313 * #ifdef SDL_SSE2_INTRINSICS
314 * static void SDL_TARGETING("sse2") DoSomethingWithSSE2(char *x) {
315 * ...use SSE2 intrinsic functions, etc...
316 * }
317 * #endif
318 *
319 * // later...
320 * #ifdef SDL_SSE2_INTRINSICS
321 * if (SDL_HasSSE2()) {
322 * DoSomethingWithSSE2(str);
323 * }
324 * #endif
325 * ```
326 *
327 * The application is, on a whole, built without SSE2 instructions, so it will
328 * run on Intel machines that don't support SSE2. But then at runtime, it
329 * checks if the system supports the instructions, and then calls into a
330 * function that uses SSE2 opcodes. The ifdefs make sure that this code isn't
331 * used on platforms that don't have SSE2 at all.
332 *
333 * On compilers without target support, this is defined to nothing.
334 *
335 * This symbol is used by SDL internally, but apps and other libraries are
336 * welcome to use it for their own interfaces as well.
337 *
338 * \since This macro is available since SDL 3.2.0.
339 */
340#define SDL_TARGETING(x) __attribute__((target(x)))
341
342#elif defined(SDL_HAS_TARGET_ATTRIBS)
343# define SDL_TARGETING(x) __attribute__((target(x)))
344#else
345# define SDL_TARGETING(x)
346#endif
347
348#ifdef __loongarch64
349# ifndef SDL_DISABLE_LSX
350# define SDL_LSX_INTRINSICS 1
351# include <lsxintrin.h>
352# endif
353# ifndef SDL_DISABLE_LASX
354# define SDL_LASX_INTRINSICS 1
355# include <lasxintrin.h>
356# endif
357#endif
358
359#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
360# if ((defined(_MSC_VER) && !defined(_M_X64)) || defined(__MMX__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_MMX)
361# define SDL_MMX_INTRINSICS 1
362# include <mmintrin.h>
363# endif
364# if (defined(_MSC_VER) || defined(__SSE__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE)
365# define SDL_SSE_INTRINSICS 1
366# include <xmmintrin.h>
367# endif
368# if (defined(_MSC_VER) || defined(__SSE2__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE2)
369# define SDL_SSE2_INTRINSICS 1
370# include <emmintrin.h>
371# endif
372# if (defined(_MSC_VER) || defined(__SSE3__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE3)
373# define SDL_SSE3_INTRINSICS 1
374# include <pmmintrin.h>
375# endif
376# if (defined(_MSC_VER) || defined(__SSE4_1__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE4_1)
377# define SDL_SSE4_1_INTRINSICS 1
378# include <smmintrin.h>
379# endif
380# if (defined(_MSC_VER) || defined(__SSE4_2__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE4_2)
381# define SDL_SSE4_2_INTRINSICS 1
382# include <nmmintrin.h>
383# endif
384# if defined(__clang__) && (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX__) && !defined(SDL_DISABLE_AVX)
385# define SDL_DISABLE_AVX /* see https://reviews.llvm.org/D20291 and https://reviews.llvm.org/D79194 */
386# endif
387# if (defined(_MSC_VER) || defined(__AVX__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(_M_ARM64EC) && !defined(SDL_DISABLE_AVX)
388# define SDL_AVX_INTRINSICS 1
389# include <immintrin.h>
390# endif
391# if defined(__clang__) && (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX2__) && !defined(SDL_DISABLE_AVX2)
392# define SDL_DISABLE_AVX2 /* see https://reviews.llvm.org/D20291 and https://reviews.llvm.org/D79194 */
393# endif
394# if (defined(_MSC_VER) || defined(__AVX2__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(_M_ARM64EC) && !defined(SDL_DISABLE_AVX2)
395# define SDL_AVX2_INTRINSICS 1
396# include <immintrin.h>
397# endif
398# if defined(__clang__) && (defined(_MSC_VER) || defined(__SCE__)) && !defined(__AVX512F__) && !defined(SDL_DISABLE_AVX512F)
399# define SDL_DISABLE_AVX512F /* see https://reviews.llvm.org/D20291 and https://reviews.llvm.org/D79194 */
400# endif
401# if (defined(_MSC_VER) || defined(__AVX512F__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(_M_ARM64EC) && !defined(SDL_DISABLE_AVX512F)
402# define SDL_AVX512F_INTRINSICS 1
403# include <immintrin.h>
404# endif
405#endif /* defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86) */
406
407#endif /* SDL_intrin_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_iostream.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_iostream.h
new file mode 100644
index 0000000..4ca1609
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_iostream.h
@@ -0,0 +1,1354 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: IOStream */
23
24/**
25 * # CategoryIOStream
26 *
27 * SDL provides an abstract interface for reading and writing data streams. It
28 * offers implementations for files, memory, etc, and the app can provide
29 * their own implementations, too.
30 *
31 * SDL_IOStream is not related to the standard C++ iostream class, other than
32 * both are abstract interfaces to read/write data.
33 */
34
35#ifndef SDL_iostream_h_
36#define SDL_iostream_h_
37
38#include <SDL3/SDL_stdinc.h>
39#include <SDL3/SDL_error.h>
40#include <SDL3/SDL_properties.h>
41
42#include <SDL3/SDL_begin_code.h>
43/* Set up for C function definitions, even when using C++ */
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/**
49 * SDL_IOStream status, set by a read or write operation.
50 *
51 * \since This enum is available since SDL 3.2.0.
52 */
53typedef enum SDL_IOStatus
54{
55 SDL_IO_STATUS_READY, /**< Everything is ready (no errors and not EOF). */
56 SDL_IO_STATUS_ERROR, /**< Read or write I/O error */
57 SDL_IO_STATUS_EOF, /**< End of file */
58 SDL_IO_STATUS_NOT_READY, /**< Non blocking I/O, not ready */
59 SDL_IO_STATUS_READONLY, /**< Tried to write a read-only buffer */
60 SDL_IO_STATUS_WRITEONLY /**< Tried to read a write-only buffer */
61} SDL_IOStatus;
62
63/**
64 * Possible `whence` values for SDL_IOStream seeking.
65 *
66 * These map to the same "whence" concept that `fseek` or `lseek` use in the
67 * standard C runtime.
68 *
69 * \since This enum is available since SDL 3.2.0.
70 */
71typedef enum SDL_IOWhence
72{
73 SDL_IO_SEEK_SET, /**< Seek from the beginning of data */
74 SDL_IO_SEEK_CUR, /**< Seek relative to current read point */
75 SDL_IO_SEEK_END /**< Seek relative to the end of data */
76} SDL_IOWhence;
77
78/**
79 * The function pointers that drive an SDL_IOStream.
80 *
81 * Applications can provide this struct to SDL_OpenIO() to create their own
82 * implementation of SDL_IOStream. This is not necessarily required, as SDL
83 * already offers several common types of I/O streams, via functions like
84 * SDL_IOFromFile() and SDL_IOFromMem().
85 *
86 * This structure should be initialized using SDL_INIT_INTERFACE()
87 *
88 * \since This struct is available since SDL 3.2.0.
89 *
90 * \sa SDL_INIT_INTERFACE
91 */
92typedef struct SDL_IOStreamInterface
93{
94 /* The version of this interface */
95 Uint32 version;
96
97 /**
98 * Return the number of bytes in this SDL_IOStream
99 *
100 * \return the total size of the data stream, or -1 on error.
101 */
102 Sint64 (SDLCALL *size)(void *userdata);
103
104 /**
105 * Seek to `offset` relative to `whence`, one of stdio's whence values:
106 * SDL_IO_SEEK_SET, SDL_IO_SEEK_CUR, SDL_IO_SEEK_END
107 *
108 * \return the final offset in the data stream, or -1 on error.
109 */
110 Sint64 (SDLCALL *seek)(void *userdata, Sint64 offset, SDL_IOWhence whence);
111
112 /**
113 * Read up to `size` bytes from the data stream to the area pointed
114 * at by `ptr`.
115 *
116 * On an incomplete read, you should set `*status` to a value from the
117 * SDL_IOStatus enum. You do not have to explicitly set this on
118 * a complete, successful read.
119 *
120 * \return the number of bytes read
121 */
122 size_t (SDLCALL *read)(void *userdata, void *ptr, size_t size, SDL_IOStatus *status);
123
124 /**
125 * Write exactly `size` bytes from the area pointed at by `ptr`
126 * to data stream.
127 *
128 * On an incomplete write, you should set `*status` to a value from the
129 * SDL_IOStatus enum. You do not have to explicitly set this on
130 * a complete, successful write.
131 *
132 * \return the number of bytes written
133 */
134 size_t (SDLCALL *write)(void *userdata, const void *ptr, size_t size, SDL_IOStatus *status);
135
136 /**
137 * If the stream is buffering, make sure the data is written out.
138 *
139 * On failure, you should set `*status` to a value from the
140 * SDL_IOStatus enum. You do not have to explicitly set this on
141 * a successful flush.
142 *
143 * \return true if successful or false on write error when flushing data.
144 */
145 bool (SDLCALL *flush)(void *userdata, SDL_IOStatus *status);
146
147 /**
148 * Close and free any allocated resources.
149 *
150 * This does not guarantee file writes will sync to physical media; they
151 * can be in the system's file cache, waiting to go to disk.
152 *
153 * The SDL_IOStream is still destroyed even if this fails, so clean up anything
154 * even if flushing buffers, etc, returns an error.
155 *
156 * \return true if successful or false on write error when flushing data.
157 */
158 bool (SDLCALL *close)(void *userdata);
159
160} SDL_IOStreamInterface;
161
162/* Check the size of SDL_IOStreamInterface
163 *
164 * If this assert fails, either the compiler is padding to an unexpected size,
165 * or the interface has been updated and this should be updated to match and
166 * the code using this interface should be updated to handle the old version.
167 */
168SDL_COMPILE_TIME_ASSERT(SDL_IOStreamInterface_SIZE,
169 (sizeof(void *) == 4 && sizeof(SDL_IOStreamInterface) == 28) ||
170 (sizeof(void *) == 8 && sizeof(SDL_IOStreamInterface) == 56));
171
172/**
173 * The read/write operation structure.
174 *
175 * This operates as an opaque handle. There are several APIs to create various
176 * types of I/O streams, or an app can supply an SDL_IOStreamInterface to
177 * SDL_OpenIO() to provide their own stream implementation behind this
178 * struct's abstract interface.
179 *
180 * \since This struct is available since SDL 3.2.0.
181 */
182typedef struct SDL_IOStream SDL_IOStream;
183
184
185/**
186 * \name IOFrom functions
187 *
188 * Functions to create SDL_IOStream structures from various data streams.
189 */
190/* @{ */
191
192/**
193 * Use this function to create a new SDL_IOStream structure for reading from
194 * and/or writing to a named file.
195 *
196 * The `mode` string is treated roughly the same as in a call to the C
197 * library's fopen(), even if SDL doesn't happen to use fopen() behind the
198 * scenes.
199 *
200 * Available `mode` strings:
201 *
202 * - "r": Open a file for reading. The file must exist.
203 * - "w": Create an empty file for writing. If a file with the same name
204 * already exists its content is erased and the file is treated as a new
205 * empty file.
206 * - "a": Append to a file. Writing operations append data at the end of the
207 * file. The file is created if it does not exist.
208 * - "r+": Open a file for update both reading and writing. The file must
209 * exist.
210 * - "w+": Create an empty file for both reading and writing. If a file with
211 * the same name already exists its content is erased and the file is
212 * treated as a new empty file.
213 * - "a+": Open a file for reading and appending. All writing operations are
214 * performed at the end of the file, protecting the previous content to be
215 * overwritten. You can reposition (fseek, rewind) the internal pointer to
216 * anywhere in the file for reading, but writing operations will move it
217 * back to the end of file. The file is created if it does not exist.
218 *
219 * **NOTE**: In order to open a file as a binary file, a "b" character has to
220 * be included in the `mode` string. This additional "b" character can either
221 * be appended at the end of the string (thus making the following compound
222 * modes: "rb", "wb", "ab", "r+b", "w+b", "a+b") or be inserted between the
223 * letter and the "+" sign for the mixed modes ("rb+", "wb+", "ab+").
224 * Additional characters may follow the sequence, although they should have no
225 * effect. For example, "t" is sometimes appended to make explicit the file is
226 * a text file.
227 *
228 * This function supports Unicode filenames, but they must be encoded in UTF-8
229 * format, regardless of the underlying operating system.
230 *
231 * In Android, SDL_IOFromFile() can be used to open content:// URIs. As a
232 * fallback, SDL_IOFromFile() will transparently open a matching filename in
233 * the app's `assets`.
234 *
235 * Closing the SDL_IOStream will close SDL's internal file handle.
236 *
237 * The following properties may be set at creation time by SDL:
238 *
239 * - `SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER`: a pointer, that can be cast
240 * to a win32 `HANDLE`, that this SDL_IOStream is using to access the
241 * filesystem. If the program isn't running on Windows, or SDL used some
242 * other method to access the filesystem, this property will not be set.
243 * - `SDL_PROP_IOSTREAM_STDIO_FILE_POINTER`: a pointer, that can be cast to a
244 * stdio `FILE *`, that this SDL_IOStream is using to access the filesystem.
245 * If SDL used some other method to access the filesystem, this property
246 * will not be set. PLEASE NOTE that if SDL is using a different C runtime
247 * than your app, trying to use this pointer will almost certainly result in
248 * a crash! This is mostly a problem on Windows; make sure you build SDL and
249 * your app with the same compiler and settings to avoid it.
250 * - `SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER`: a file descriptor that this
251 * SDL_IOStream is using to access the filesystem.
252 * - `SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER`: a pointer, that can be cast
253 * to an Android NDK `AAsset *`, that this SDL_IOStream is using to access
254 * the filesystem. If SDL used some other method to access the filesystem,
255 * this property will not be set.
256 *
257 * \param file a UTF-8 string representing the filename to open.
258 * \param mode an ASCII string representing the mode to be used for opening
259 * the file.
260 * \returns a pointer to the SDL_IOStream structure that is created or NULL on
261 * failure; call SDL_GetError() for more information.
262 *
263 * \threadsafety This function is not thread safe.
264 *
265 * \since This function is available since SDL 3.2.0.
266 *
267 * \sa SDL_CloseIO
268 * \sa SDL_FlushIO
269 * \sa SDL_ReadIO
270 * \sa SDL_SeekIO
271 * \sa SDL_TellIO
272 * \sa SDL_WriteIO
273 */
274extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_IOFromFile(const char *file, const char *mode);
275
276#define SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER "SDL.iostream.windows.handle"
277#define SDL_PROP_IOSTREAM_STDIO_FILE_POINTER "SDL.iostream.stdio.file"
278#define SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER "SDL.iostream.file_descriptor"
279#define SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER "SDL.iostream.android.aasset"
280
281/**
282 * Use this function to prepare a read-write memory buffer for use with
283 * SDL_IOStream.
284 *
285 * This function sets up an SDL_IOStream struct based on a memory area of a
286 * certain size, for both read and write access.
287 *
288 * This memory buffer is not copied by the SDL_IOStream; the pointer you
289 * provide must remain valid until you close the stream. Closing the stream
290 * will not free the original buffer.
291 *
292 * If you need to make sure the SDL_IOStream never writes to the memory
293 * buffer, you should use SDL_IOFromConstMem() with a read-only buffer of
294 * memory instead.
295 *
296 * The following properties will be set at creation time by SDL:
297 *
298 * - `SDL_PROP_IOSTREAM_MEMORY_POINTER`: this will be the `mem` parameter that
299 * was passed to this function.
300 * - `SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER`: this will be the `size` parameter
301 * that was passed to this function.
302 *
303 * \param mem a pointer to a buffer to feed an SDL_IOStream stream.
304 * \param size the buffer size, in bytes.
305 * \returns a pointer to a new SDL_IOStream structure or NULL on failure; call
306 * SDL_GetError() for more information.
307 *
308 * \threadsafety It is safe to call this function from any thread.
309 *
310 * \since This function is available since SDL 3.2.0.
311 *
312 * \sa SDL_IOFromConstMem
313 * \sa SDL_CloseIO
314 * \sa SDL_FlushIO
315 * \sa SDL_ReadIO
316 * \sa SDL_SeekIO
317 * \sa SDL_TellIO
318 * \sa SDL_WriteIO
319 */
320extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_IOFromMem(void *mem, size_t size);
321
322#define SDL_PROP_IOSTREAM_MEMORY_POINTER "SDL.iostream.memory.base"
323#define SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER "SDL.iostream.memory.size"
324
325/**
326 * Use this function to prepare a read-only memory buffer for use with
327 * SDL_IOStream.
328 *
329 * This function sets up an SDL_IOStream struct based on a memory area of a
330 * certain size. It assumes the memory area is not writable.
331 *
332 * Attempting to write to this SDL_IOStream stream will report an error
333 * without writing to the memory buffer.
334 *
335 * This memory buffer is not copied by the SDL_IOStream; the pointer you
336 * provide must remain valid until you close the stream. Closing the stream
337 * will not free the original buffer.
338 *
339 * If you need to write to a memory buffer, you should use SDL_IOFromMem()
340 * with a writable buffer of memory instead.
341 *
342 * The following properties will be set at creation time by SDL:
343 *
344 * - `SDL_PROP_IOSTREAM_MEMORY_POINTER`: this will be the `mem` parameter that
345 * was passed to this function.
346 * - `SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER`: this will be the `size` parameter
347 * that was passed to this function.
348 *
349 * \param mem a pointer to a read-only buffer to feed an SDL_IOStream stream.
350 * \param size the buffer size, in bytes.
351 * \returns a pointer to a new SDL_IOStream structure or NULL on failure; call
352 * SDL_GetError() for more information.
353 *
354 * \threadsafety It is safe to call this function from any thread.
355 *
356 * \since This function is available since SDL 3.2.0.
357 *
358 * \sa SDL_IOFromMem
359 * \sa SDL_CloseIO
360 * \sa SDL_ReadIO
361 * \sa SDL_SeekIO
362 * \sa SDL_TellIO
363 */
364extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_IOFromConstMem(const void *mem, size_t size);
365
366/**
367 * Use this function to create an SDL_IOStream that is backed by dynamically
368 * allocated memory.
369 *
370 * This supports the following properties to provide access to the memory and
371 * control over allocations:
372 *
373 * - `SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER`: a pointer to the internal
374 * memory of the stream. This can be set to NULL to transfer ownership of
375 * the memory to the application, which should free the memory with
376 * SDL_free(). If this is done, the next operation on the stream must be
377 * SDL_CloseIO().
378 * - `SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER`: memory will be allocated in
379 * multiples of this size, defaulting to 1024.
380 *
381 * \returns a pointer to a new SDL_IOStream structure or NULL on failure; call
382 * SDL_GetError() for more information.
383 *
384 * \threadsafety It is safe to call this function from any thread.
385 *
386 * \since This function is available since SDL 3.2.0.
387 *
388 * \sa SDL_CloseIO
389 * \sa SDL_ReadIO
390 * \sa SDL_SeekIO
391 * \sa SDL_TellIO
392 * \sa SDL_WriteIO
393 */
394extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_IOFromDynamicMem(void);
395
396#define SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER "SDL.iostream.dynamic.memory"
397#define SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER "SDL.iostream.dynamic.chunksize"
398
399/* @} *//* IOFrom functions */
400
401
402/**
403 * Create a custom SDL_IOStream.
404 *
405 * Applications do not need to use this function unless they are providing
406 * their own SDL_IOStream implementation. If you just need an SDL_IOStream to
407 * read/write a common data source, you should use the built-in
408 * implementations in SDL, like SDL_IOFromFile() or SDL_IOFromMem(), etc.
409 *
410 * This function makes a copy of `iface` and the caller does not need to keep
411 * it around after this call.
412 *
413 * \param iface the interface that implements this SDL_IOStream, initialized
414 * using SDL_INIT_INTERFACE().
415 * \param userdata the pointer that will be passed to the interface functions.
416 * \returns a pointer to the allocated memory on success or NULL on failure;
417 * call SDL_GetError() for more information.
418 *
419 * \threadsafety It is safe to call this function from any thread.
420 *
421 * \since This function is available since SDL 3.2.0.
422 *
423 * \sa SDL_CloseIO
424 * \sa SDL_INIT_INTERFACE
425 * \sa SDL_IOFromConstMem
426 * \sa SDL_IOFromFile
427 * \sa SDL_IOFromMem
428 */
429extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_OpenIO(const SDL_IOStreamInterface *iface, void *userdata);
430
431/**
432 * Close and free an allocated SDL_IOStream structure.
433 *
434 * SDL_CloseIO() closes and cleans up the SDL_IOStream stream. It releases any
435 * resources used by the stream and frees the SDL_IOStream itself. This
436 * returns true on success, or false if the stream failed to flush to its
437 * output (e.g. to disk).
438 *
439 * Note that if this fails to flush the stream for any reason, this function
440 * reports an error, but the SDL_IOStream is still invalid once this function
441 * returns.
442 *
443 * This call flushes any buffered writes to the operating system, but there
444 * are no guarantees that those writes have gone to physical media; they might
445 * be in the OS's file cache, waiting to go to disk later. If it's absolutely
446 * crucial that writes go to disk immediately, so they are definitely stored
447 * even if the power fails before the file cache would have caught up, one
448 * should call SDL_FlushIO() before closing. Note that flushing takes time and
449 * makes the system and your app operate less efficiently, so do so sparingly.
450 *
451 * \param context SDL_IOStream structure to close.
452 * \returns true on success or false on failure; call SDL_GetError() for more
453 * information.
454 *
455 * \threadsafety This function is not thread safe.
456 *
457 * \since This function is available since SDL 3.2.0.
458 *
459 * \sa SDL_OpenIO
460 */
461extern SDL_DECLSPEC bool SDLCALL SDL_CloseIO(SDL_IOStream *context);
462
463/**
464 * Get the properties associated with an SDL_IOStream.
465 *
466 * \param context a pointer to an SDL_IOStream structure.
467 * \returns a valid property ID on success or 0 on failure; call
468 * SDL_GetError() for more information.
469 *
470 * \threadsafety This function is not thread safe.
471 *
472 * \since This function is available since SDL 3.2.0.
473 */
474extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetIOProperties(SDL_IOStream *context);
475
476/**
477 * Query the stream status of an SDL_IOStream.
478 *
479 * This information can be useful to decide if a short read or write was due
480 * to an error, an EOF, or a non-blocking operation that isn't yet ready to
481 * complete.
482 *
483 * An SDL_IOStream's status is only expected to change after a SDL_ReadIO or
484 * SDL_WriteIO call; don't expect it to change if you just call this query
485 * function in a tight loop.
486 *
487 * \param context the SDL_IOStream to query.
488 * \returns an SDL_IOStatus enum with the current state.
489 *
490 * \threadsafety This function is not thread safe.
491 *
492 * \since This function is available since SDL 3.2.0.
493 */
494extern SDL_DECLSPEC SDL_IOStatus SDLCALL SDL_GetIOStatus(SDL_IOStream *context);
495
496/**
497 * Use this function to get the size of the data stream in an SDL_IOStream.
498 *
499 * \param context the SDL_IOStream to get the size of the data stream from.
500 * \returns the size of the data stream in the SDL_IOStream on success or a
501 * negative error code on failure; call SDL_GetError() for more
502 * information.
503 *
504 * \threadsafety This function is not thread safe.
505 *
506 * \since This function is available since SDL 3.2.0.
507 */
508extern SDL_DECLSPEC Sint64 SDLCALL SDL_GetIOSize(SDL_IOStream *context);
509
510/**
511 * Seek within an SDL_IOStream data stream.
512 *
513 * This function seeks to byte `offset`, relative to `whence`.
514 *
515 * `whence` may be any of the following values:
516 *
517 * - `SDL_IO_SEEK_SET`: seek from the beginning of data
518 * - `SDL_IO_SEEK_CUR`: seek relative to current read point
519 * - `SDL_IO_SEEK_END`: seek relative to the end of data
520 *
521 * If this stream can not seek, it will return -1.
522 *
523 * \param context a pointer to an SDL_IOStream structure.
524 * \param offset an offset in bytes, relative to `whence` location; can be
525 * negative.
526 * \param whence any of `SDL_IO_SEEK_SET`, `SDL_IO_SEEK_CUR`,
527 * `SDL_IO_SEEK_END`.
528 * \returns the final offset in the data stream after the seek or -1 on
529 * failure; call SDL_GetError() for more information.
530 *
531 * \threadsafety This function is not thread safe.
532 *
533 * \since This function is available since SDL 3.2.0.
534 *
535 * \sa SDL_TellIO
536 */
537extern SDL_DECLSPEC Sint64 SDLCALL SDL_SeekIO(SDL_IOStream *context, Sint64 offset, SDL_IOWhence whence);
538
539/**
540 * Determine the current read/write offset in an SDL_IOStream data stream.
541 *
542 * SDL_TellIO is actually a wrapper function that calls the SDL_IOStream's
543 * `seek` method, with an offset of 0 bytes from `SDL_IO_SEEK_CUR`, to
544 * simplify application development.
545 *
546 * \param context an SDL_IOStream data stream object from which to get the
547 * current offset.
548 * \returns the current offset in the stream, or -1 if the information can not
549 * be determined.
550 *
551 * \threadsafety This function is not thread safe.
552 *
553 * \since This function is available since SDL 3.2.0.
554 *
555 * \sa SDL_SeekIO
556 */
557extern SDL_DECLSPEC Sint64 SDLCALL SDL_TellIO(SDL_IOStream *context);
558
559/**
560 * Read from a data source.
561 *
562 * This function reads up `size` bytes from the data source to the area
563 * pointed at by `ptr`. This function may read less bytes than requested.
564 *
565 * This function will return zero when the data stream is completely read, and
566 * SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If zero is returned and
567 * the stream is not at EOF, SDL_GetIOStatus() will return a different error
568 * value and SDL_GetError() will offer a human-readable message.
569 *
570 * \param context a pointer to an SDL_IOStream structure.
571 * \param ptr a pointer to a buffer to read data into.
572 * \param size the number of bytes to read from the data source.
573 * \returns the number of bytes read, or 0 on end of file or other failure;
574 * call SDL_GetError() for more information.
575 *
576 * \threadsafety This function is not thread safe.
577 *
578 * \since This function is available since SDL 3.2.0.
579 *
580 * \sa SDL_WriteIO
581 * \sa SDL_GetIOStatus
582 */
583extern SDL_DECLSPEC size_t SDLCALL SDL_ReadIO(SDL_IOStream *context, void *ptr, size_t size);
584
585/**
586 * Write to an SDL_IOStream data stream.
587 *
588 * This function writes exactly `size` bytes from the area pointed at by `ptr`
589 * to the stream. If this fails for any reason, it'll return less than `size`
590 * to demonstrate how far the write progressed. On success, it returns `size`.
591 *
592 * On error, this function still attempts to write as much as possible, so it
593 * might return a positive value less than the requested write size.
594 *
595 * The caller can use SDL_GetIOStatus() to determine if the problem is
596 * recoverable, such as a non-blocking write that can simply be retried later,
597 * or a fatal error.
598 *
599 * \param context a pointer to an SDL_IOStream structure.
600 * \param ptr a pointer to a buffer containing data to write.
601 * \param size the number of bytes to write.
602 * \returns the number of bytes written, which will be less than `size` on
603 * failure; call SDL_GetError() for more information.
604 *
605 * \threadsafety This function is not thread safe.
606 *
607 * \since This function is available since SDL 3.2.0.
608 *
609 * \sa SDL_IOprintf
610 * \sa SDL_ReadIO
611 * \sa SDL_SeekIO
612 * \sa SDL_FlushIO
613 * \sa SDL_GetIOStatus
614 */
615extern SDL_DECLSPEC size_t SDLCALL SDL_WriteIO(SDL_IOStream *context, const void *ptr, size_t size);
616
617/**
618 * Print to an SDL_IOStream data stream.
619 *
620 * This function does formatted printing to the stream.
621 *
622 * \param context a pointer to an SDL_IOStream structure.
623 * \param fmt a printf() style format string.
624 * \param ... additional parameters matching % tokens in the `fmt` string, if
625 * any.
626 * \returns the number of bytes written or 0 on failure; call SDL_GetError()
627 * for more information.
628 *
629 * \threadsafety This function is not thread safe.
630 *
631 * \since This function is available since SDL 3.2.0.
632 *
633 * \sa SDL_IOvprintf
634 * \sa SDL_WriteIO
635 */
636extern SDL_DECLSPEC size_t SDLCALL SDL_IOprintf(SDL_IOStream *context, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
637
638/**
639 * Print to an SDL_IOStream data stream.
640 *
641 * This function does formatted printing to the stream.
642 *
643 * \param context a pointer to an SDL_IOStream structure.
644 * \param fmt a printf() style format string.
645 * \param ap a variable argument list.
646 * \returns the number of bytes written or 0 on failure; call SDL_GetError()
647 * for more information.
648 *
649 * \threadsafety This function is not thread safe.
650 *
651 * \since This function is available since SDL 3.2.0.
652 *
653 * \sa SDL_IOprintf
654 * \sa SDL_WriteIO
655 */
656extern SDL_DECLSPEC size_t SDLCALL SDL_IOvprintf(SDL_IOStream *context, SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(2);
657
658/**
659 * Flush any buffered data in the stream.
660 *
661 * This function makes sure that any buffered data is written to the stream.
662 * Normally this isn't necessary but if the stream is a pipe or socket it
663 * guarantees that any pending data is sent.
664 *
665 * \param context SDL_IOStream structure to flush.
666 * \returns true on success or false on failure; call SDL_GetError() for more
667 * information.
668 *
669 * \threadsafety This function is not thread safe.
670 *
671 * \since This function is available since SDL 3.2.0.
672 *
673 * \sa SDL_OpenIO
674 * \sa SDL_WriteIO
675 */
676extern SDL_DECLSPEC bool SDLCALL SDL_FlushIO(SDL_IOStream *context);
677
678/**
679 * Load all the data from an SDL data stream.
680 *
681 * The data is allocated with a zero byte at the end (null terminated) for
682 * convenience. This extra byte is not included in the value reported via
683 * `datasize`.
684 *
685 * The data should be freed with SDL_free().
686 *
687 * \param src the SDL_IOStream to read all available data from.
688 * \param datasize a pointer filled in with the number of bytes read, may be
689 * NULL.
690 * \param closeio if true, calls SDL_CloseIO() on `src` before returning, even
691 * in the case of an error.
692 * \returns the data or NULL on failure; call SDL_GetError() for more
693 * information.
694 *
695 * \threadsafety This function is not thread safe.
696 *
697 * \since This function is available since SDL 3.2.0.
698 *
699 * \sa SDL_LoadFile
700 * \sa SDL_SaveFile_IO
701 */
702extern SDL_DECLSPEC void * SDLCALL SDL_LoadFile_IO(SDL_IOStream *src, size_t *datasize, bool closeio);
703
704/**
705 * Load all the data from a file path.
706 *
707 * The data is allocated with a zero byte at the end (null terminated) for
708 * convenience. This extra byte is not included in the value reported via
709 * `datasize`.
710 *
711 * The data should be freed with SDL_free().
712 *
713 * \param file the path to read all available data from.
714 * \param datasize if not NULL, will store the number of bytes read.
715 * \returns the data or NULL on failure; call SDL_GetError() for more
716 * information.
717 *
718 * \threadsafety This function is not thread safe.
719 *
720 * \since This function is available since SDL 3.2.0.
721 *
722 * \sa SDL_LoadFile_IO
723 * \sa SDL_SaveFile
724 */
725extern SDL_DECLSPEC void * SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
726
727/**
728 * Save all the data into an SDL data stream.
729 *
730 * \param src the SDL_IOStream to write all data to.
731 * \param data the data to be written. If datasize is 0, may be NULL or a
732 * invalid pointer.
733 * \param datasize the number of bytes to be written.
734 * \param closeio if true, calls SDL_CloseIO() on `src` before returning, even
735 * in the case of an error.
736 * \returns true on success or false on failure; call SDL_GetError() for more
737 * information.
738 *
739 * \threadsafety This function is not thread safe.
740 *
741 * \since This function is available since SDL 3.2.0.
742 *
743 * \sa SDL_SaveFile
744 * \sa SDL_LoadFile_IO
745 */
746extern SDL_DECLSPEC bool SDLCALL SDL_SaveFile_IO(SDL_IOStream *src, const void *data, size_t datasize, bool closeio);
747
748/**
749 * Save all the data into a file path.
750 *
751 * \param file the path to write all available data into.
752 * \param data the data to be written. If datasize is 0, may be NULL or a
753 * invalid pointer.
754 * \param datasize the number of bytes to be written.
755 * \returns true on success or false on failure; call SDL_GetError() for more
756 * information.
757 *
758 * \threadsafety This function is not thread safe.
759 *
760 * \since This function is available since SDL 3.2.0.
761 *
762 * \sa SDL_SaveFile_IO
763 * \sa SDL_LoadFile
764 */
765extern SDL_DECLSPEC bool SDLCALL SDL_SaveFile(const char *file, const void *data, size_t datasize);
766
767/**
768 * \name Read endian functions
769 *
770 * Read an item of the specified endianness and return in native format.
771 */
772/* @{ */
773
774/**
775 * Use this function to read a byte from an SDL_IOStream.
776 *
777 * This function will return false when the data stream is completely read,
778 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
779 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
780 * error value and SDL_GetError() will offer a human-readable message.
781 *
782 * \param src the SDL_IOStream to read from.
783 * \param value a pointer filled in with the data read.
784 * \returns true on success or false on failure or EOF; call SDL_GetError()
785 * for more information.
786 *
787 * \threadsafety This function is not thread safe.
788 *
789 * \since This function is available since SDL 3.2.0.
790 */
791extern SDL_DECLSPEC bool SDLCALL SDL_ReadU8(SDL_IOStream *src, Uint8 *value);
792
793/**
794 * Use this function to read a signed byte from an SDL_IOStream.
795 *
796 * This function will return false when the data stream is completely read,
797 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
798 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
799 * error value and SDL_GetError() will offer a human-readable message.
800 *
801 * \param src the SDL_IOStream to read from.
802 * \param value a pointer filled in with the data read.
803 * \returns true on success or false on failure; call SDL_GetError() for more
804 * information.
805 *
806 * \threadsafety This function is not thread safe.
807 *
808 * \since This function is available since SDL 3.2.0.
809 */
810extern SDL_DECLSPEC bool SDLCALL SDL_ReadS8(SDL_IOStream *src, Sint8 *value);
811
812/**
813 * Use this function to read 16 bits of little-endian data from an
814 * SDL_IOStream and return in native format.
815 *
816 * SDL byteswaps the data only if necessary, so the data returned will be in
817 * the native byte order.
818 *
819 * This function will return false when the data stream is completely read,
820 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
821 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
822 * error value and SDL_GetError() will offer a human-readable message.
823 *
824 * \param src the stream from which to read data.
825 * \param value a pointer filled in with the data read.
826 * \returns true on successful write or false on failure; call SDL_GetError()
827 * for more information.
828 *
829 * \threadsafety This function is not thread safe.
830 *
831 * \since This function is available since SDL 3.2.0.
832 */
833extern SDL_DECLSPEC bool SDLCALL SDL_ReadU16LE(SDL_IOStream *src, Uint16 *value);
834
835/**
836 * Use this function to read 16 bits of little-endian data from an
837 * SDL_IOStream and return in native format.
838 *
839 * SDL byteswaps the data only if necessary, so the data returned will be in
840 * the native byte order.
841 *
842 * This function will return false when the data stream is completely read,
843 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
844 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
845 * error value and SDL_GetError() will offer a human-readable message.
846 *
847 * \param src the stream from which to read data.
848 * \param value a pointer filled in with the data read.
849 * \returns true on successful write or false on failure; call SDL_GetError()
850 * for more information.
851 *
852 * \threadsafety This function is not thread safe.
853 *
854 * \since This function is available since SDL 3.2.0.
855 */
856extern SDL_DECLSPEC bool SDLCALL SDL_ReadS16LE(SDL_IOStream *src, Sint16 *value);
857
858/**
859 * Use this function to read 16 bits of big-endian data from an SDL_IOStream
860 * and return in native format.
861 *
862 * SDL byteswaps the data only if necessary, so the data returned will be in
863 * the native byte order.
864 *
865 * This function will return false when the data stream is completely read,
866 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
867 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
868 * error value and SDL_GetError() will offer a human-readable message.
869 *
870 * \param src the stream from which to read data.
871 * \param value a pointer filled in with the data read.
872 * \returns true on successful write or false on failure; call SDL_GetError()
873 * for more information.
874 *
875 * \threadsafety This function is not thread safe.
876 *
877 * \since This function is available since SDL 3.2.0.
878 */
879extern SDL_DECLSPEC bool SDLCALL SDL_ReadU16BE(SDL_IOStream *src, Uint16 *value);
880
881/**
882 * Use this function to read 16 bits of big-endian data from an SDL_IOStream
883 * and return in native format.
884 *
885 * SDL byteswaps the data only if necessary, so the data returned will be in
886 * the native byte order.
887 *
888 * This function will return false when the data stream is completely read,
889 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
890 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
891 * error value and SDL_GetError() will offer a human-readable message.
892 *
893 * \param src the stream from which to read data.
894 * \param value a pointer filled in with the data read.
895 * \returns true on successful write or false on failure; call SDL_GetError()
896 * for more information.
897 *
898 * \threadsafety This function is not thread safe.
899 *
900 * \since This function is available since SDL 3.2.0.
901 */
902extern SDL_DECLSPEC bool SDLCALL SDL_ReadS16BE(SDL_IOStream *src, Sint16 *value);
903
904/**
905 * Use this function to read 32 bits of little-endian data from an
906 * SDL_IOStream and return in native format.
907 *
908 * SDL byteswaps the data only if necessary, so the data returned will be in
909 * the native byte order.
910 *
911 * This function will return false when the data stream is completely read,
912 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
913 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
914 * error value and SDL_GetError() will offer a human-readable message.
915 *
916 * \param src the stream from which to read data.
917 * \param value a pointer filled in with the data read.
918 * \returns true on successful write or false on failure; call SDL_GetError()
919 * for more information.
920 *
921 * \threadsafety This function is not thread safe.
922 *
923 * \since This function is available since SDL 3.2.0.
924 */
925extern SDL_DECLSPEC bool SDLCALL SDL_ReadU32LE(SDL_IOStream *src, Uint32 *value);
926
927/**
928 * Use this function to read 32 bits of little-endian data from an
929 * SDL_IOStream and return in native format.
930 *
931 * SDL byteswaps the data only if necessary, so the data returned will be in
932 * the native byte order.
933 *
934 * This function will return false when the data stream is completely read,
935 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
936 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
937 * error value and SDL_GetError() will offer a human-readable message.
938 *
939 * \param src the stream from which to read data.
940 * \param value a pointer filled in with the data read.
941 * \returns true on successful write or false on failure; call SDL_GetError()
942 * for more information.
943 *
944 * \threadsafety This function is not thread safe.
945 *
946 * \since This function is available since SDL 3.2.0.
947 */
948extern SDL_DECLSPEC bool SDLCALL SDL_ReadS32LE(SDL_IOStream *src, Sint32 *value);
949
950/**
951 * Use this function to read 32 bits of big-endian data from an SDL_IOStream
952 * and return in native format.
953 *
954 * SDL byteswaps the data only if necessary, so the data returned will be in
955 * the native byte order.
956 *
957 * This function will return false when the data stream is completely read,
958 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
959 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
960 * error value and SDL_GetError() will offer a human-readable message.
961 *
962 * \param src the stream from which to read data.
963 * \param value a pointer filled in with the data read.
964 * \returns true on successful write or false on failure; call SDL_GetError()
965 * for more information.
966 *
967 * \threadsafety This function is not thread safe.
968 *
969 * \since This function is available since SDL 3.2.0.
970 */
971extern SDL_DECLSPEC bool SDLCALL SDL_ReadU32BE(SDL_IOStream *src, Uint32 *value);
972
973/**
974 * Use this function to read 32 bits of big-endian data from an SDL_IOStream
975 * and return in native format.
976 *
977 * SDL byteswaps the data only if necessary, so the data returned will be in
978 * the native byte order.
979 *
980 * This function will return false when the data stream is completely read,
981 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
982 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
983 * error value and SDL_GetError() will offer a human-readable message.
984 *
985 * \param src the stream from which to read data.
986 * \param value a pointer filled in with the data read.
987 * \returns true on successful write or false on failure; call SDL_GetError()
988 * for more information.
989 *
990 * \threadsafety This function is not thread safe.
991 *
992 * \since This function is available since SDL 3.2.0.
993 */
994extern SDL_DECLSPEC bool SDLCALL SDL_ReadS32BE(SDL_IOStream *src, Sint32 *value);
995
996/**
997 * Use this function to read 64 bits of little-endian data from an
998 * SDL_IOStream and return in native format.
999 *
1000 * SDL byteswaps the data only if necessary, so the data returned will be in
1001 * the native byte order.
1002 *
1003 * This function will return false when the data stream is completely read,
1004 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
1005 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
1006 * error value and SDL_GetError() will offer a human-readable message.
1007 *
1008 * \param src the stream from which to read data.
1009 * \param value a pointer filled in with the data read.
1010 * \returns true on successful write or false on failure; call SDL_GetError()
1011 * for more information.
1012 *
1013 * \threadsafety This function is not thread safe.
1014 *
1015 * \since This function is available since SDL 3.2.0.
1016 */
1017extern SDL_DECLSPEC bool SDLCALL SDL_ReadU64LE(SDL_IOStream *src, Uint64 *value);
1018
1019/**
1020 * Use this function to read 64 bits of little-endian data from an
1021 * SDL_IOStream and return in native format.
1022 *
1023 * SDL byteswaps the data only if necessary, so the data returned will be in
1024 * the native byte order.
1025 *
1026 * This function will return false when the data stream is completely read,
1027 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
1028 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
1029 * error value and SDL_GetError() will offer a human-readable message.
1030 *
1031 * \param src the stream from which to read data.
1032 * \param value a pointer filled in with the data read.
1033 * \returns true on successful write or false on failure; call SDL_GetError()
1034 * for more information.
1035 *
1036 * \threadsafety This function is not thread safe.
1037 *
1038 * \since This function is available since SDL 3.2.0.
1039 */
1040extern SDL_DECLSPEC bool SDLCALL SDL_ReadS64LE(SDL_IOStream *src, Sint64 *value);
1041
1042/**
1043 * Use this function to read 64 bits of big-endian data from an SDL_IOStream
1044 * and return in native format.
1045 *
1046 * SDL byteswaps the data only if necessary, so the data returned will be in
1047 * the native byte order.
1048 *
1049 * This function will return false when the data stream is completely read,
1050 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
1051 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
1052 * error value and SDL_GetError() will offer a human-readable message.
1053 *
1054 * \param src the stream from which to read data.
1055 * \param value a pointer filled in with the data read.
1056 * \returns true on successful write or false on failure; call SDL_GetError()
1057 * for more information.
1058 *
1059 * \threadsafety This function is not thread safe.
1060 *
1061 * \since This function is available since SDL 3.2.0.
1062 */
1063extern SDL_DECLSPEC bool SDLCALL SDL_ReadU64BE(SDL_IOStream *src, Uint64 *value);
1064
1065/**
1066 * Use this function to read 64 bits of big-endian data from an SDL_IOStream
1067 * and return in native format.
1068 *
1069 * SDL byteswaps the data only if necessary, so the data returned will be in
1070 * the native byte order.
1071 *
1072 * This function will return false when the data stream is completely read,
1073 * and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned
1074 * and the stream is not at EOF, SDL_GetIOStatus() will return a different
1075 * error value and SDL_GetError() will offer a human-readable message.
1076 *
1077 * \param src the stream from which to read data.
1078 * \param value a pointer filled in with the data read.
1079 * \returns true on successful write or false on failure; call SDL_GetError()
1080 * for more information.
1081 *
1082 * \threadsafety This function is not thread safe.
1083 *
1084 * \since This function is available since SDL 3.2.0.
1085 */
1086extern SDL_DECLSPEC bool SDLCALL SDL_ReadS64BE(SDL_IOStream *src, Sint64 *value);
1087/* @} *//* Read endian functions */
1088
1089/**
1090 * \name Write endian functions
1091 *
1092 * Write an item of native format to the specified endianness.
1093 */
1094/* @{ */
1095
1096/**
1097 * Use this function to write a byte to an SDL_IOStream.
1098 *
1099 * \param dst the SDL_IOStream to write to.
1100 * \param value the byte value to write.
1101 * \returns true on successful write or false on failure; call SDL_GetError()
1102 * for more information.
1103 *
1104 * \threadsafety This function is not thread safe.
1105 *
1106 * \since This function is available since SDL 3.2.0.
1107 */
1108extern SDL_DECLSPEC bool SDLCALL SDL_WriteU8(SDL_IOStream *dst, Uint8 value);
1109
1110/**
1111 * Use this function to write a signed byte to an SDL_IOStream.
1112 *
1113 * \param dst the SDL_IOStream to write to.
1114 * \param value the byte value to write.
1115 * \returns true on successful write or false on failure; call SDL_GetError()
1116 * for more information.
1117 *
1118 * \threadsafety This function is not thread safe.
1119 *
1120 * \since This function is available since SDL 3.2.0.
1121 */
1122extern SDL_DECLSPEC bool SDLCALL SDL_WriteS8(SDL_IOStream *dst, Sint8 value);
1123
1124/**
1125 * Use this function to write 16 bits in native format to an SDL_IOStream as
1126 * little-endian data.
1127 *
1128 * SDL byteswaps the data only if necessary, so the application always
1129 * specifies native format, and the data written will be in little-endian
1130 * format.
1131 *
1132 * \param dst the stream to which data will be written.
1133 * \param value the data to be written, in native format.
1134 * \returns true on successful write or false on failure; call SDL_GetError()
1135 * for more information.
1136 *
1137 * \threadsafety This function is not thread safe.
1138 *
1139 * \since This function is available since SDL 3.2.0.
1140 */
1141extern SDL_DECLSPEC bool SDLCALL SDL_WriteU16LE(SDL_IOStream *dst, Uint16 value);
1142
1143/**
1144 * Use this function to write 16 bits in native format to an SDL_IOStream as
1145 * little-endian data.
1146 *
1147 * SDL byteswaps the data only if necessary, so the application always
1148 * specifies native format, and the data written will be in little-endian
1149 * format.
1150 *
1151 * \param dst the stream to which data will be written.
1152 * \param value the data to be written, in native format.
1153 * \returns true on successful write or false on failure; call SDL_GetError()
1154 * for more information.
1155 *
1156 * \threadsafety This function is not thread safe.
1157 *
1158 * \since This function is available since SDL 3.2.0.
1159 */
1160extern SDL_DECLSPEC bool SDLCALL SDL_WriteS16LE(SDL_IOStream *dst, Sint16 value);
1161
1162/**
1163 * Use this function to write 16 bits in native format to an SDL_IOStream as
1164 * big-endian data.
1165 *
1166 * SDL byteswaps the data only if necessary, so the application always
1167 * specifies native format, and the data written will be in big-endian format.
1168 *
1169 * \param dst the stream to which data will be written.
1170 * \param value the data to be written, in native format.
1171 * \returns true on successful write or false on failure; call SDL_GetError()
1172 * for more information.
1173 *
1174 * \threadsafety This function is not thread safe.
1175 *
1176 * \since This function is available since SDL 3.2.0.
1177 */
1178extern SDL_DECLSPEC bool SDLCALL SDL_WriteU16BE(SDL_IOStream *dst, Uint16 value);
1179
1180/**
1181 * Use this function to write 16 bits in native format to an SDL_IOStream as
1182 * big-endian data.
1183 *
1184 * SDL byteswaps the data only if necessary, so the application always
1185 * specifies native format, and the data written will be in big-endian format.
1186 *
1187 * \param dst the stream to which data will be written.
1188 * \param value the data to be written, in native format.
1189 * \returns true on successful write or false on failure; call SDL_GetError()
1190 * for more information.
1191 *
1192 * \threadsafety This function is not thread safe.
1193 *
1194 * \since This function is available since SDL 3.2.0.
1195 */
1196extern SDL_DECLSPEC bool SDLCALL SDL_WriteS16BE(SDL_IOStream *dst, Sint16 value);
1197
1198/**
1199 * Use this function to write 32 bits in native format to an SDL_IOStream as
1200 * little-endian data.
1201 *
1202 * SDL byteswaps the data only if necessary, so the application always
1203 * specifies native format, and the data written will be in little-endian
1204 * format.
1205 *
1206 * \param dst the stream to which data will be written.
1207 * \param value the data to be written, in native format.
1208 * \returns true on successful write or false on failure; call SDL_GetError()
1209 * for more information.
1210 *
1211 * \threadsafety This function is not thread safe.
1212 *
1213 * \since This function is available since SDL 3.2.0.
1214 */
1215extern SDL_DECLSPEC bool SDLCALL SDL_WriteU32LE(SDL_IOStream *dst, Uint32 value);
1216
1217/**
1218 * Use this function to write 32 bits in native format to an SDL_IOStream as
1219 * little-endian data.
1220 *
1221 * SDL byteswaps the data only if necessary, so the application always
1222 * specifies native format, and the data written will be in little-endian
1223 * format.
1224 *
1225 * \param dst the stream to which data will be written.
1226 * \param value the data to be written, in native format.
1227 * \returns true on successful write or false on failure; call SDL_GetError()
1228 * for more information.
1229 *
1230 * \threadsafety This function is not thread safe.
1231 *
1232 * \since This function is available since SDL 3.2.0.
1233 */
1234extern SDL_DECLSPEC bool SDLCALL SDL_WriteS32LE(SDL_IOStream *dst, Sint32 value);
1235
1236/**
1237 * Use this function to write 32 bits in native format to an SDL_IOStream as
1238 * big-endian data.
1239 *
1240 * SDL byteswaps the data only if necessary, so the application always
1241 * specifies native format, and the data written will be in big-endian format.
1242 *
1243 * \param dst the stream to which data will be written.
1244 * \param value the data to be written, in native format.
1245 * \returns true on successful write or false on failure; call SDL_GetError()
1246 * for more information.
1247 *
1248 * \threadsafety This function is not thread safe.
1249 *
1250 * \since This function is available since SDL 3.2.0.
1251 */
1252extern SDL_DECLSPEC bool SDLCALL SDL_WriteU32BE(SDL_IOStream *dst, Uint32 value);
1253
1254/**
1255 * Use this function to write 32 bits in native format to an SDL_IOStream as
1256 * big-endian data.
1257 *
1258 * SDL byteswaps the data only if necessary, so the application always
1259 * specifies native format, and the data written will be in big-endian format.
1260 *
1261 * \param dst the stream to which data will be written.
1262 * \param value the data to be written, in native format.
1263 * \returns true on successful write or false on failure; call SDL_GetError()
1264 * for more information.
1265 *
1266 * \threadsafety This function is not thread safe.
1267 *
1268 * \since This function is available since SDL 3.2.0.
1269 */
1270extern SDL_DECLSPEC bool SDLCALL SDL_WriteS32BE(SDL_IOStream *dst, Sint32 value);
1271
1272/**
1273 * Use this function to write 64 bits in native format to an SDL_IOStream as
1274 * little-endian data.
1275 *
1276 * SDL byteswaps the data only if necessary, so the application always
1277 * specifies native format, and the data written will be in little-endian
1278 * format.
1279 *
1280 * \param dst the stream to which data will be written.
1281 * \param value the data to be written, in native format.
1282 * \returns true on successful write or false on failure; call SDL_GetError()
1283 * for more information.
1284 *
1285 * \threadsafety This function is not thread safe.
1286 *
1287 * \since This function is available since SDL 3.2.0.
1288 */
1289extern SDL_DECLSPEC bool SDLCALL SDL_WriteU64LE(SDL_IOStream *dst, Uint64 value);
1290
1291/**
1292 * Use this function to write 64 bits in native format to an SDL_IOStream as
1293 * little-endian data.
1294 *
1295 * SDL byteswaps the data only if necessary, so the application always
1296 * specifies native format, and the data written will be in little-endian
1297 * format.
1298 *
1299 * \param dst the stream to which data will be written.
1300 * \param value the data to be written, in native format.
1301 * \returns true on successful write or false on failure; call SDL_GetError()
1302 * for more information.
1303 *
1304 * \threadsafety This function is not thread safe.
1305 *
1306 * \since This function is available since SDL 3.2.0.
1307 */
1308extern SDL_DECLSPEC bool SDLCALL SDL_WriteS64LE(SDL_IOStream *dst, Sint64 value);
1309
1310/**
1311 * Use this function to write 64 bits in native format to an SDL_IOStream as
1312 * big-endian data.
1313 *
1314 * SDL byteswaps the data only if necessary, so the application always
1315 * specifies native format, and the data written will be in big-endian format.
1316 *
1317 * \param dst the stream to which data will be written.
1318 * \param value the data to be written, in native format.
1319 * \returns true on successful write or false on failure; call SDL_GetError()
1320 * for more information.
1321 *
1322 * \threadsafety This function is not thread safe.
1323 *
1324 * \since This function is available since SDL 3.2.0.
1325 */
1326extern SDL_DECLSPEC bool SDLCALL SDL_WriteU64BE(SDL_IOStream *dst, Uint64 value);
1327
1328/**
1329 * Use this function to write 64 bits in native format to an SDL_IOStream as
1330 * big-endian data.
1331 *
1332 * SDL byteswaps the data only if necessary, so the application always
1333 * specifies native format, and the data written will be in big-endian format.
1334 *
1335 * \param dst the stream to which data will be written.
1336 * \param value the data to be written, in native format.
1337 * \returns true on successful write or false on failure; call SDL_GetError()
1338 * for more information.
1339 *
1340 * \threadsafety This function is not thread safe.
1341 *
1342 * \since This function is available since SDL 3.2.0.
1343 */
1344extern SDL_DECLSPEC bool SDLCALL SDL_WriteS64BE(SDL_IOStream *dst, Sint64 value);
1345
1346/* @} *//* Write endian functions */
1347
1348/* Ends C function definitions when using C++ */
1349#ifdef __cplusplus
1350}
1351#endif
1352#include <SDL3/SDL_close_code.h>
1353
1354#endif /* SDL_iostream_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_joystick.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_joystick.h
new file mode 100644
index 0000000..d15668b
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_joystick.h
@@ -0,0 +1,1202 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryJoystick
24 *
25 * SDL joystick support.
26 *
27 * This is the lower-level joystick handling. If you want the simpler option,
28 * where what each button does is well-defined, you should use the gamepad API
29 * instead.
30 *
31 * The term "instance_id" is the current instantiation of a joystick device in
32 * the system, if the joystick is removed and then re-inserted then it will
33 * get a new instance_id, instance_id's are monotonically increasing
34 * identifiers of a joystick plugged in.
35 *
36 * The term "player_index" is the number assigned to a player on a specific
37 * controller. For XInput controllers this returns the XInput user index. Many
38 * joysticks will not be able to supply this information.
39 *
40 * SDL_GUID is used as a stable 128-bit identifier for a joystick device that
41 * does not change over time. It identifies class of the device (a X360 wired
42 * controller for example). This identifier is platform dependent.
43 *
44 * In order to use these functions, SDL_Init() must have been called with the
45 * SDL_INIT_JOYSTICK flag. This causes SDL to scan the system for joysticks,
46 * and load appropriate drivers.
47 *
48 * If you would like to receive joystick updates while the application is in
49 * the background, you should set the following hint before calling
50 * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
51 */
52
53#ifndef SDL_joystick_h_
54#define SDL_joystick_h_
55
56#include <SDL3/SDL_stdinc.h>
57#include <SDL3/SDL_error.h>
58#include <SDL3/SDL_guid.h>
59#include <SDL3/SDL_mutex.h>
60#include <SDL3/SDL_power.h>
61#include <SDL3/SDL_properties.h>
62#include <SDL3/SDL_sensor.h>
63
64#include <SDL3/SDL_begin_code.h>
65/* Set up for C function definitions, even when using C++ */
66#ifdef __cplusplus
67extern "C" {
68#endif
69
70#ifdef SDL_THREAD_SAFETY_ANALYSIS
71/*
72 * This is not an exported symbol from SDL, this is only in the headers to
73 * help Clang's thread safety analysis tools to function. Do not attempt
74 * to access this symbol from your app, it will not work!
75 */
76extern SDL_Mutex *SDL_joystick_lock;
77#endif
78
79/**
80 * The joystick structure used to identify an SDL joystick.
81 *
82 * This is opaque data.
83 *
84 * \since This struct is available since SDL 3.2.0.
85 */
86typedef struct SDL_Joystick SDL_Joystick;
87
88/**
89 * This is a unique ID for a joystick for the time it is connected to the
90 * system, and is never reused for the lifetime of the application.
91 *
92 * If the joystick is disconnected and reconnected, it will get a new ID.
93 *
94 * The value 0 is an invalid ID.
95 *
96 * \since This datatype is available since SDL 3.2.0.
97 */
98typedef Uint32 SDL_JoystickID;
99
100/**
101 * An enum of some common joystick types.
102 *
103 * In some cases, SDL can identify a low-level joystick as being a certain
104 * type of device, and will report it through SDL_GetJoystickType (or
105 * SDL_GetJoystickTypeForID).
106 *
107 * This is by no means a complete list of everything that can be plugged into
108 * a computer.
109 *
110 * \since This enum is available since SDL 3.2.0.
111 */
112typedef enum SDL_JoystickType
113{
114 SDL_JOYSTICK_TYPE_UNKNOWN,
115 SDL_JOYSTICK_TYPE_GAMEPAD,
116 SDL_JOYSTICK_TYPE_WHEEL,
117 SDL_JOYSTICK_TYPE_ARCADE_STICK,
118 SDL_JOYSTICK_TYPE_FLIGHT_STICK,
119 SDL_JOYSTICK_TYPE_DANCE_PAD,
120 SDL_JOYSTICK_TYPE_GUITAR,
121 SDL_JOYSTICK_TYPE_DRUM_KIT,
122 SDL_JOYSTICK_TYPE_ARCADE_PAD,
123 SDL_JOYSTICK_TYPE_THROTTLE,
124 SDL_JOYSTICK_TYPE_COUNT
125} SDL_JoystickType;
126
127/**
128 * Possible connection states for a joystick device.
129 *
130 * This is used by SDL_GetJoystickConnectionState to report how a device is
131 * connected to the system.
132 *
133 * \since This enum is available since SDL 3.2.0.
134 */
135typedef enum SDL_JoystickConnectionState
136{
137 SDL_JOYSTICK_CONNECTION_INVALID = -1,
138 SDL_JOYSTICK_CONNECTION_UNKNOWN,
139 SDL_JOYSTICK_CONNECTION_WIRED,
140 SDL_JOYSTICK_CONNECTION_WIRELESS
141} SDL_JoystickConnectionState;
142
143/**
144 * The largest value an SDL_Joystick's axis can report.
145 *
146 * \since This macro is available since SDL 3.2.0.
147 *
148 * \sa SDL_JOYSTICK_AXIS_MIN
149 */
150#define SDL_JOYSTICK_AXIS_MAX 32767
151
152/**
153 * The smallest value an SDL_Joystick's axis can report.
154 *
155 * This is a negative number!
156 *
157 * \since This macro is available since SDL 3.2.0.
158 *
159 * \sa SDL_JOYSTICK_AXIS_MAX
160 */
161#define SDL_JOYSTICK_AXIS_MIN -32768
162
163
164/* Function prototypes */
165
166/**
167 * Locking for atomic access to the joystick API.
168 *
169 * The SDL joystick functions are thread-safe, however you can lock the
170 * joysticks while processing to guarantee that the joystick list won't change
171 * and joystick and gamepad events will not be delivered.
172 *
173 * \since This function is available since SDL 3.2.0.
174 */
175extern SDL_DECLSPEC void SDLCALL SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock);
176
177/**
178 * Unlocking for atomic access to the joystick API.
179 *
180 * \since This function is available since SDL 3.2.0.
181 */
182extern SDL_DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock);
183
184/**
185 * Return whether a joystick is currently connected.
186 *
187 * \returns true if a joystick is connected, false otherwise.
188 *
189 * \since This function is available since SDL 3.2.0.
190 *
191 * \sa SDL_GetJoysticks
192 */
193extern SDL_DECLSPEC bool SDLCALL SDL_HasJoystick(void);
194
195/**
196 * Get a list of currently connected joysticks.
197 *
198 * \param count a pointer filled in with the number of joysticks returned, may
199 * be NULL.
200 * \returns a 0 terminated array of joystick instance IDs or NULL on failure;
201 * call SDL_GetError() for more information. This should be freed
202 * with SDL_free() when it is no longer needed.
203 *
204 * \since This function is available since SDL 3.2.0.
205 *
206 * \sa SDL_HasJoystick
207 * \sa SDL_OpenJoystick
208 */
209extern SDL_DECLSPEC SDL_JoystickID * SDLCALL SDL_GetJoysticks(int *count);
210
211/**
212 * Get the implementation dependent name of a joystick.
213 *
214 * This can be called before any joysticks are opened.
215 *
216 * \param instance_id the joystick instance ID.
217 * \returns the name of the selected joystick. If no name can be found, this
218 * function returns NULL; call SDL_GetError() for more information.
219 *
220 * \since This function is available since SDL 3.2.0.
221 *
222 * \sa SDL_GetJoystickName
223 * \sa SDL_GetJoysticks
224 */
225extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickNameForID(SDL_JoystickID instance_id);
226
227/**
228 * Get the implementation dependent path of a joystick.
229 *
230 * This can be called before any joysticks are opened.
231 *
232 * \param instance_id the joystick instance ID.
233 * \returns the path of the selected joystick. If no path can be found, this
234 * function returns NULL; call SDL_GetError() for more information.
235 *
236 * \since This function is available since SDL 3.2.0.
237 *
238 * \sa SDL_GetJoystickPath
239 * \sa SDL_GetJoysticks
240 */
241extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickPathForID(SDL_JoystickID instance_id);
242
243/**
244 * Get the player index of a joystick.
245 *
246 * This can be called before any joysticks are opened.
247 *
248 * \param instance_id the joystick instance ID.
249 * \returns the player index of a joystick, or -1 if it's not available.
250 *
251 * \since This function is available since SDL 3.2.0.
252 *
253 * \sa SDL_GetJoystickPlayerIndex
254 * \sa SDL_GetJoysticks
255 */
256extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id);
257
258/**
259 * Get the implementation-dependent GUID of a joystick.
260 *
261 * This can be called before any joysticks are opened.
262 *
263 * \param instance_id the joystick instance ID.
264 * \returns the GUID of the selected joystick. If called with an invalid
265 * instance_id, this function returns a zero GUID.
266 *
267 * \since This function is available since SDL 3.2.0.
268 *
269 * \sa SDL_GetJoystickGUID
270 * \sa SDL_GUIDToString
271 */
272extern SDL_DECLSPEC SDL_GUID SDLCALL SDL_GetJoystickGUIDForID(SDL_JoystickID instance_id);
273
274/**
275 * Get the USB vendor ID of a joystick, if available.
276 *
277 * This can be called before any joysticks are opened. If the vendor ID isn't
278 * available this function returns 0.
279 *
280 * \param instance_id the joystick instance ID.
281 * \returns the USB vendor ID of the selected joystick. If called with an
282 * invalid instance_id, this function returns 0.
283 *
284 * \since This function is available since SDL 3.2.0.
285 *
286 * \sa SDL_GetJoystickVendor
287 * \sa SDL_GetJoysticks
288 */
289extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendorForID(SDL_JoystickID instance_id);
290
291/**
292 * Get the USB product ID of a joystick, if available.
293 *
294 * This can be called before any joysticks are opened. If the product ID isn't
295 * available this function returns 0.
296 *
297 * \param instance_id the joystick instance ID.
298 * \returns the USB product ID of the selected joystick. If called with an
299 * invalid instance_id, this function returns 0.
300 *
301 * \since This function is available since SDL 3.2.0.
302 *
303 * \sa SDL_GetJoystickProduct
304 * \sa SDL_GetJoysticks
305 */
306extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductForID(SDL_JoystickID instance_id);
307
308/**
309 * Get the product version of a joystick, if available.
310 *
311 * This can be called before any joysticks are opened. If the product version
312 * isn't available this function returns 0.
313 *
314 * \param instance_id the joystick instance ID.
315 * \returns the product version of the selected joystick. If called with an
316 * invalid instance_id, this function returns 0.
317 *
318 * \since This function is available since SDL 3.2.0.
319 *
320 * \sa SDL_GetJoystickProductVersion
321 * \sa SDL_GetJoysticks
322 */
323extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersionForID(SDL_JoystickID instance_id);
324
325/**
326 * Get the type of a joystick, if available.
327 *
328 * This can be called before any joysticks are opened.
329 *
330 * \param instance_id the joystick instance ID.
331 * \returns the SDL_JoystickType of the selected joystick. If called with an
332 * invalid instance_id, this function returns
333 * `SDL_JOYSTICK_TYPE_UNKNOWN`.
334 *
335 * \since This function is available since SDL 3.2.0.
336 *
337 * \sa SDL_GetJoystickType
338 * \sa SDL_GetJoysticks
339 */
340extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickTypeForID(SDL_JoystickID instance_id);
341
342/**
343 * Open a joystick for use.
344 *
345 * The joystick subsystem must be initialized before a joystick can be opened
346 * for use.
347 *
348 * \param instance_id the joystick instance ID.
349 * \returns a joystick identifier or NULL on failure; call SDL_GetError() for
350 * more information.
351 *
352 * \since This function is available since SDL 3.2.0.
353 *
354 * \sa SDL_CloseJoystick
355 */
356extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_OpenJoystick(SDL_JoystickID instance_id);
357
358/**
359 * Get the SDL_Joystick associated with an instance ID, if it has been opened.
360 *
361 * \param instance_id the instance ID to get the SDL_Joystick for.
362 * \returns an SDL_Joystick on success or NULL on failure or if it hasn't been
363 * opened yet; call SDL_GetError() for more information.
364 *
365 * \since This function is available since SDL 3.2.0.
366 */
367extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_GetJoystickFromID(SDL_JoystickID instance_id);
368
369/**
370 * Get the SDL_Joystick associated with a player index.
371 *
372 * \param player_index the player index to get the SDL_Joystick for.
373 * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
374 * for more information.
375 *
376 * \since This function is available since SDL 3.2.0.
377 *
378 * \sa SDL_GetJoystickPlayerIndex
379 * \sa SDL_SetJoystickPlayerIndex
380 */
381extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_GetJoystickFromPlayerIndex(int player_index);
382
383/**
384 * The structure that describes a virtual joystick touchpad.
385 *
386 * \since This struct is available since SDL 3.2.0.
387 *
388 * \sa SDL_VirtualJoystickDesc
389 */
390typedef struct SDL_VirtualJoystickTouchpadDesc
391{
392 Uint16 nfingers; /**< the number of simultaneous fingers on this touchpad */
393 Uint16 padding[3];
394} SDL_VirtualJoystickTouchpadDesc;
395
396/**
397 * The structure that describes a virtual joystick sensor.
398 *
399 * \since This struct is available since SDL 3.2.0.
400 *
401 * \sa SDL_VirtualJoystickDesc
402 */
403typedef struct SDL_VirtualJoystickSensorDesc
404{
405 SDL_SensorType type; /**< the type of this sensor */
406 float rate; /**< the update frequency of this sensor, may be 0.0f */
407} SDL_VirtualJoystickSensorDesc;
408
409/**
410 * The structure that describes a virtual joystick.
411 *
412 * This structure should be initialized using SDL_INIT_INTERFACE(). All
413 * elements of this structure are optional.
414 *
415 * \since This struct is available since SDL 3.2.0.
416 *
417 * \sa SDL_AttachVirtualJoystick
418 * \sa SDL_INIT_INTERFACE
419 * \sa SDL_VirtualJoystickSensorDesc
420 * \sa SDL_VirtualJoystickTouchpadDesc
421 */
422typedef struct SDL_VirtualJoystickDesc
423{
424 Uint32 version; /**< the version of this interface */
425 Uint16 type; /**< `SDL_JoystickType` */
426 Uint16 padding; /**< unused */
427 Uint16 vendor_id; /**< the USB vendor ID of this joystick */
428 Uint16 product_id; /**< the USB product ID of this joystick */
429 Uint16 naxes; /**< the number of axes on this joystick */
430 Uint16 nbuttons; /**< the number of buttons on this joystick */
431 Uint16 nballs; /**< the number of balls on this joystick */
432 Uint16 nhats; /**< the number of hats on this joystick */
433 Uint16 ntouchpads; /**< the number of touchpads on this joystick, requires `touchpads` to point at valid descriptions */
434 Uint16 nsensors; /**< the number of sensors on this joystick, requires `sensors` to point at valid descriptions */
435 Uint16 padding2[2]; /**< unused */
436 Uint32 button_mask; /**< A mask of which buttons are valid for this controller
437 e.g. (1 << SDL_GAMEPAD_BUTTON_SOUTH) */
438 Uint32 axis_mask; /**< A mask of which axes are valid for this controller
439 e.g. (1 << SDL_GAMEPAD_AXIS_LEFTX) */
440 const char *name; /**< the name of the joystick */
441 const SDL_VirtualJoystickTouchpadDesc *touchpads; /**< A pointer to an array of touchpad descriptions, required if `ntouchpads` is > 0 */
442 const SDL_VirtualJoystickSensorDesc *sensors; /**< A pointer to an array of sensor descriptions, required if `nsensors` is > 0 */
443
444 void *userdata; /**< User data pointer passed to callbacks */
445 void (SDLCALL *Update)(void *userdata); /**< Called when the joystick state should be updated */
446 void (SDLCALL *SetPlayerIndex)(void *userdata, int player_index); /**< Called when the player index is set */
447 bool (SDLCALL *Rumble)(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble); /**< Implements SDL_RumbleJoystick() */
448 bool (SDLCALL *RumbleTriggers)(void *userdata, Uint16 left_rumble, Uint16 right_rumble); /**< Implements SDL_RumbleJoystickTriggers() */
449 bool (SDLCALL *SetLED)(void *userdata, Uint8 red, Uint8 green, Uint8 blue); /**< Implements SDL_SetJoystickLED() */
450 bool (SDLCALL *SendEffect)(void *userdata, const void *data, int size); /**< Implements SDL_SendJoystickEffect() */
451 bool (SDLCALL *SetSensorsEnabled)(void *userdata, bool enabled); /**< Implements SDL_SetGamepadSensorEnabled() */
452 void (SDLCALL *Cleanup)(void *userdata); /**< Cleans up the userdata when the joystick is detached */
453} SDL_VirtualJoystickDesc;
454
455/* Check the size of SDL_VirtualJoystickDesc
456 *
457 * If this assert fails, either the compiler is padding to an unexpected size,
458 * or the interface has been updated and this should be updated to match and
459 * the code using this interface should be updated to handle the old version.
460 */
461SDL_COMPILE_TIME_ASSERT(SDL_VirtualJoystickDesc_SIZE,
462 (sizeof(void *) == 4 && sizeof(SDL_VirtualJoystickDesc) == 84) ||
463 (sizeof(void *) == 8 && sizeof(SDL_VirtualJoystickDesc) == 136));
464
465/**
466 * Attach a new virtual joystick.
467 *
468 * \param desc joystick description, initialized using SDL_INIT_INTERFACE().
469 * \returns the joystick instance ID, or 0 on failure; call SDL_GetError() for
470 * more information.
471 *
472 * \since This function is available since SDL 3.2.0.
473 *
474 * \sa SDL_DetachVirtualJoystick
475 */
476extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_AttachVirtualJoystick(const SDL_VirtualJoystickDesc *desc);
477
478/**
479 * Detach a virtual joystick.
480 *
481 * \param instance_id the joystick instance ID, previously returned from
482 * SDL_AttachVirtualJoystick().
483 * \returns true on success or false on failure; call SDL_GetError() for more
484 * information.
485 *
486 * \since This function is available since SDL 3.2.0.
487 *
488 * \sa SDL_AttachVirtualJoystick
489 */
490extern SDL_DECLSPEC bool SDLCALL SDL_DetachVirtualJoystick(SDL_JoystickID instance_id);
491
492/**
493 * Query whether or not a joystick is virtual.
494 *
495 * \param instance_id the joystick instance ID.
496 * \returns true if the joystick is virtual, false otherwise.
497 *
498 * \since This function is available since SDL 3.2.0.
499 */
500extern SDL_DECLSPEC bool SDLCALL SDL_IsJoystickVirtual(SDL_JoystickID instance_id);
501
502/**
503 * Set the state of an axis on an opened virtual joystick.
504 *
505 * Please note that values set here will not be applied until the next call to
506 * SDL_UpdateJoysticks, which can either be called directly, or can be called
507 * indirectly through various other SDL APIs, including, but not limited to
508 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
509 * SDL_WaitEvent.
510 *
511 * Note that when sending trigger axes, you should scale the value to the full
512 * range of Sint16. For example, a trigger at rest would have the value of
513 * `SDL_JOYSTICK_AXIS_MIN`.
514 *
515 * \param joystick the virtual joystick on which to set state.
516 * \param axis the index of the axis on the virtual joystick to update.
517 * \param value the new value for the specified axis.
518 * \returns true on success or false on failure; call SDL_GetError() for more
519 * information.
520 *
521 * \since This function is available since SDL 3.2.0.
522 */
523extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);
524
525/**
526 * Generate ball motion on an opened virtual joystick.
527 *
528 * Please note that values set here will not be applied until the next call to
529 * SDL_UpdateJoysticks, which can either be called directly, or can be called
530 * indirectly through various other SDL APIs, including, but not limited to
531 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
532 * SDL_WaitEvent.
533 *
534 * \param joystick the virtual joystick on which to set state.
535 * \param ball the index of the ball on the virtual joystick to update.
536 * \param xrel the relative motion on the X axis.
537 * \param yrel the relative motion on the Y axis.
538 * \returns true on success or false on failure; call SDL_GetError() for more
539 * information.
540 *
541 * \since This function is available since SDL 3.2.0.
542 */
543extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualBall(SDL_Joystick *joystick, int ball, Sint16 xrel, Sint16 yrel);
544
545/**
546 * Set the state of a button on an opened virtual joystick.
547 *
548 * Please note that values set here will not be applied until the next call to
549 * SDL_UpdateJoysticks, which can either be called directly, or can be called
550 * indirectly through various other SDL APIs, including, but not limited to
551 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
552 * SDL_WaitEvent.
553 *
554 * \param joystick the virtual joystick on which to set state.
555 * \param button the index of the button on the virtual joystick to update.
556 * \param down true if the button is pressed, false otherwise.
557 * \returns true on success or false on failure; call SDL_GetError() for more
558 * information.
559 *
560 * \since This function is available since SDL 3.2.0.
561 */
562extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualButton(SDL_Joystick *joystick, int button, bool down);
563
564/**
565 * Set the state of a hat on an opened virtual joystick.
566 *
567 * Please note that values set here will not be applied until the next call to
568 * SDL_UpdateJoysticks, which can either be called directly, or can be called
569 * indirectly through various other SDL APIs, including, but not limited to
570 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
571 * SDL_WaitEvent.
572 *
573 * \param joystick the virtual joystick on which to set state.
574 * \param hat the index of the hat on the virtual joystick to update.
575 * \param value the new value for the specified hat.
576 * \returns true on success or false on failure; call SDL_GetError() for more
577 * information.
578 *
579 * \since This function is available since SDL 3.2.0.
580 */
581extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
582
583/**
584 * Set touchpad finger state on an opened virtual joystick.
585 *
586 * Please note that values set here will not be applied until the next call to
587 * SDL_UpdateJoysticks, which can either be called directly, or can be called
588 * indirectly through various other SDL APIs, including, but not limited to
589 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
590 * SDL_WaitEvent.
591 *
592 * \param joystick the virtual joystick on which to set state.
593 * \param touchpad the index of the touchpad on the virtual joystick to
594 * update.
595 * \param finger the index of the finger on the touchpad to set.
596 * \param down true if the finger is pressed, false if the finger is released.
597 * \param x the x coordinate of the finger on the touchpad, normalized 0 to 1,
598 * with the origin in the upper left.
599 * \param y the y coordinate of the finger on the touchpad, normalized 0 to 1,
600 * with the origin in the upper left.
601 * \param pressure the pressure of the finger.
602 * \returns true on success or false on failure; call SDL_GetError() for more
603 * information.
604 *
605 * \since This function is available since SDL 3.2.0.
606 */
607extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickVirtualTouchpad(SDL_Joystick *joystick, int touchpad, int finger, bool down, float x, float y, float pressure);
608
609/**
610 * Send a sensor update for an opened virtual joystick.
611 *
612 * Please note that values set here will not be applied until the next call to
613 * SDL_UpdateJoysticks, which can either be called directly, or can be called
614 * indirectly through various other SDL APIs, including, but not limited to
615 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
616 * SDL_WaitEvent.
617 *
618 * \param joystick the virtual joystick on which to set state.
619 * \param type the type of the sensor on the virtual joystick to update.
620 * \param sensor_timestamp a 64-bit timestamp in nanoseconds associated with
621 * the sensor reading.
622 * \param data the data associated with the sensor reading.
623 * \param num_values the number of values pointed to by `data`.
624 * \returns true on success or false on failure; call SDL_GetError() for more
625 * information.
626 *
627 * \since This function is available since SDL 3.2.0.
628 */
629extern SDL_DECLSPEC bool SDLCALL SDL_SendJoystickVirtualSensorData(SDL_Joystick *joystick, SDL_SensorType type, Uint64 sensor_timestamp, const float *data, int num_values);
630
631/**
632 * Get the properties associated with a joystick.
633 *
634 * The following read-only properties are provided by SDL:
635 *
636 * - `SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN`: true if this joystick has an
637 * LED that has adjustable brightness
638 * - `SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN`: true if this joystick has an LED
639 * that has adjustable color
640 * - `SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN`: true if this joystick has a
641 * player LED
642 * - `SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN`: true if this joystick has
643 * left/right rumble
644 * - `SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN`: true if this joystick has
645 * simple trigger rumble
646 *
647 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
648 * \returns a valid property ID on success or 0 on failure; call
649 * SDL_GetError() for more information.
650 *
651 * \since This function is available since SDL 3.2.0.
652 */
653extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetJoystickProperties(SDL_Joystick *joystick);
654
655#define SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN "SDL.joystick.cap.mono_led"
656#define SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN "SDL.joystick.cap.rgb_led"
657#define SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN "SDL.joystick.cap.player_led"
658#define SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN "SDL.joystick.cap.rumble"
659#define SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN "SDL.joystick.cap.trigger_rumble"
660
661/**
662 * Get the implementation dependent name of a joystick.
663 *
664 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
665 * \returns the name of the selected joystick. If no name can be found, this
666 * function returns NULL; call SDL_GetError() for more information.
667 *
668 * \since This function is available since SDL 3.2.0.
669 *
670 * \sa SDL_GetJoystickNameForID
671 */
672extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickName(SDL_Joystick *joystick);
673
674/**
675 * Get the implementation dependent path of a joystick.
676 *
677 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
678 * \returns the path of the selected joystick. If no path can be found, this
679 * function returns NULL; call SDL_GetError() for more information.
680 *
681 * \since This function is available since SDL 3.2.0.
682 *
683 * \sa SDL_GetJoystickPathForID
684 */
685extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickPath(SDL_Joystick *joystick);
686
687/**
688 * Get the player index of an opened joystick.
689 *
690 * For XInput controllers this returns the XInput user index. Many joysticks
691 * will not be able to supply this information.
692 *
693 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
694 * \returns the player index, or -1 if it's not available.
695 *
696 * \since This function is available since SDL 3.2.0.
697 *
698 * \sa SDL_SetJoystickPlayerIndex
699 */
700extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndex(SDL_Joystick *joystick);
701
702/**
703 * Set the player index of an opened joystick.
704 *
705 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
706 * \param player_index player index to assign to this joystick, or -1 to clear
707 * the player index and turn off player LEDs.
708 * \returns true on success or false on failure; call SDL_GetError() for more
709 * information.
710 *
711 * \since This function is available since SDL 3.2.0.
712 *
713 * \sa SDL_GetJoystickPlayerIndex
714 */
715extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickPlayerIndex(SDL_Joystick *joystick, int player_index);
716
717/**
718 * Get the implementation-dependent GUID for the joystick.
719 *
720 * This function requires an open joystick.
721 *
722 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
723 * \returns the GUID of the given joystick. If called on an invalid index,
724 * this function returns a zero GUID; call SDL_GetError() for more
725 * information.
726 *
727 * \since This function is available since SDL 3.2.0.
728 *
729 * \sa SDL_GetJoystickGUIDForID
730 * \sa SDL_GUIDToString
731 */
732extern SDL_DECLSPEC SDL_GUID SDLCALL SDL_GetJoystickGUID(SDL_Joystick *joystick);
733
734/**
735 * Get the USB vendor ID of an opened joystick, if available.
736 *
737 * If the vendor ID isn't available this function returns 0.
738 *
739 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
740 * \returns the USB vendor ID of the selected joystick, or 0 if unavailable.
741 *
742 * \since This function is available since SDL 3.2.0.
743 *
744 * \sa SDL_GetJoystickVendorForID
745 */
746extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendor(SDL_Joystick *joystick);
747
748/**
749 * Get the USB product ID of an opened joystick, if available.
750 *
751 * If the product ID isn't available this function returns 0.
752 *
753 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
754 * \returns the USB product ID of the selected joystick, or 0 if unavailable.
755 *
756 * \since This function is available since SDL 3.2.0.
757 *
758 * \sa SDL_GetJoystickProductForID
759 */
760extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProduct(SDL_Joystick *joystick);
761
762/**
763 * Get the product version of an opened joystick, if available.
764 *
765 * If the product version isn't available this function returns 0.
766 *
767 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
768 * \returns the product version of the selected joystick, or 0 if unavailable.
769 *
770 * \since This function is available since SDL 3.2.0.
771 *
772 * \sa SDL_GetJoystickProductVersionForID
773 */
774extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersion(SDL_Joystick *joystick);
775
776/**
777 * Get the firmware version of an opened joystick, if available.
778 *
779 * If the firmware version isn't available this function returns 0.
780 *
781 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
782 * \returns the firmware version of the selected joystick, or 0 if
783 * unavailable.
784 *
785 * \since This function is available since SDL 3.2.0.
786 */
787extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickFirmwareVersion(SDL_Joystick *joystick);
788
789/**
790 * Get the serial number of an opened joystick, if available.
791 *
792 * Returns the serial number of the joystick, or NULL if it is not available.
793 *
794 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
795 * \returns the serial number of the selected joystick, or NULL if
796 * unavailable.
797 *
798 * \since This function is available since SDL 3.2.0.
799 */
800extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickSerial(SDL_Joystick *joystick);
801
802/**
803 * Get the type of an opened joystick.
804 *
805 * \param joystick the SDL_Joystick obtained from SDL_OpenJoystick().
806 * \returns the SDL_JoystickType of the selected joystick.
807 *
808 * \since This function is available since SDL 3.2.0.
809 *
810 * \sa SDL_GetJoystickTypeForID
811 */
812extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickType(SDL_Joystick *joystick);
813
814/**
815 * Get the device information encoded in a SDL_GUID structure.
816 *
817 * \param guid the SDL_GUID you wish to get info about.
818 * \param vendor a pointer filled in with the device VID, or 0 if not
819 * available.
820 * \param product a pointer filled in with the device PID, or 0 if not
821 * available.
822 * \param version a pointer filled in with the device version, or 0 if not
823 * available.
824 * \param crc16 a pointer filled in with a CRC used to distinguish different
825 * products with the same VID/PID, or 0 if not available.
826 *
827 * \since This function is available since SDL 3.2.0.
828 *
829 * \sa SDL_GetJoystickGUIDForID
830 */
831extern SDL_DECLSPEC void SDLCALL SDL_GetJoystickGUIDInfo(SDL_GUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16);
832
833/**
834 * Get the status of a specified joystick.
835 *
836 * \param joystick the joystick to query.
837 * \returns true if the joystick has been opened, false if it has not; call
838 * SDL_GetError() for more information.
839 *
840 * \since This function is available since SDL 3.2.0.
841 */
842extern SDL_DECLSPEC bool SDLCALL SDL_JoystickConnected(SDL_Joystick *joystick);
843
844/**
845 * Get the instance ID of an opened joystick.
846 *
847 * \param joystick an SDL_Joystick structure containing joystick information.
848 * \returns the instance ID of the specified joystick on success or 0 on
849 * failure; call SDL_GetError() for more information.
850 *
851 * \since This function is available since SDL 3.2.0.
852 */
853extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetJoystickID(SDL_Joystick *joystick);
854
855/**
856 * Get the number of general axis controls on a joystick.
857 *
858 * Often, the directional pad on a game controller will either look like 4
859 * separate buttons or a POV hat, and not axes, but all of this is up to the
860 * device and platform.
861 *
862 * \param joystick an SDL_Joystick structure containing joystick information.
863 * \returns the number of axis controls/number of axes on success or -1 on
864 * failure; call SDL_GetError() for more information.
865 *
866 * \since This function is available since SDL 3.2.0.
867 *
868 * \sa SDL_GetJoystickAxis
869 * \sa SDL_GetNumJoystickBalls
870 * \sa SDL_GetNumJoystickButtons
871 * \sa SDL_GetNumJoystickHats
872 */
873extern SDL_DECLSPEC int SDLCALL SDL_GetNumJoystickAxes(SDL_Joystick *joystick);
874
875/**
876 * Get the number of trackballs on a joystick.
877 *
878 * Joystick trackballs have only relative motion events associated with them
879 * and their state cannot be polled.
880 *
881 * Most joysticks do not have trackballs.
882 *
883 * \param joystick an SDL_Joystick structure containing joystick information.
884 * \returns the number of trackballs on success or -1 on failure; call
885 * SDL_GetError() for more information.
886 *
887 * \since This function is available since SDL 3.2.0.
888 *
889 * \sa SDL_GetJoystickBall
890 * \sa SDL_GetNumJoystickAxes
891 * \sa SDL_GetNumJoystickButtons
892 * \sa SDL_GetNumJoystickHats
893 */
894extern SDL_DECLSPEC int SDLCALL SDL_GetNumJoystickBalls(SDL_Joystick *joystick);
895
896/**
897 * Get the number of POV hats on a joystick.
898 *
899 * \param joystick an SDL_Joystick structure containing joystick information.
900 * \returns the number of POV hats on success or -1 on failure; call
901 * SDL_GetError() for more information.
902 *
903 * \since This function is available since SDL 3.2.0.
904 *
905 * \sa SDL_GetJoystickHat
906 * \sa SDL_GetNumJoystickAxes
907 * \sa SDL_GetNumJoystickBalls
908 * \sa SDL_GetNumJoystickButtons
909 */
910extern SDL_DECLSPEC int SDLCALL SDL_GetNumJoystickHats(SDL_Joystick *joystick);
911
912/**
913 * Get the number of buttons on a joystick.
914 *
915 * \param joystick an SDL_Joystick structure containing joystick information.
916 * \returns the number of buttons on success or -1 on failure; call
917 * SDL_GetError() for more information.
918 *
919 * \since This function is available since SDL 3.2.0.
920 *
921 * \sa SDL_GetJoystickButton
922 * \sa SDL_GetNumJoystickAxes
923 * \sa SDL_GetNumJoystickBalls
924 * \sa SDL_GetNumJoystickHats
925 */
926extern SDL_DECLSPEC int SDLCALL SDL_GetNumJoystickButtons(SDL_Joystick *joystick);
927
928/**
929 * Set the state of joystick event processing.
930 *
931 * If joystick events are disabled, you must call SDL_UpdateJoysticks()
932 * yourself and check the state of the joystick when you want joystick
933 * information.
934 *
935 * \param enabled whether to process joystick events or not.
936 *
937 * \since This function is available since SDL 3.2.0.
938 *
939 * \sa SDL_JoystickEventsEnabled
940 * \sa SDL_UpdateJoysticks
941 */
942extern SDL_DECLSPEC void SDLCALL SDL_SetJoystickEventsEnabled(bool enabled);
943
944/**
945 * Query the state of joystick event processing.
946 *
947 * If joystick events are disabled, you must call SDL_UpdateJoysticks()
948 * yourself and check the state of the joystick when you want joystick
949 * information.
950 *
951 * \returns true if joystick events are being processed, false otherwise.
952 *
953 * \since This function is available since SDL 3.2.0.
954 *
955 * \sa SDL_SetJoystickEventsEnabled
956 */
957extern SDL_DECLSPEC bool SDLCALL SDL_JoystickEventsEnabled(void);
958
959/**
960 * Update the current state of the open joysticks.
961 *
962 * This is called automatically by the event loop if any joystick events are
963 * enabled.
964 *
965 * \since This function is available since SDL 3.2.0.
966 */
967extern SDL_DECLSPEC void SDLCALL SDL_UpdateJoysticks(void);
968
969/**
970 * Get the current state of an axis control on a joystick.
971 *
972 * SDL makes no promises about what part of the joystick any given axis refers
973 * to. Your game should have some sort of configuration UI to let users
974 * specify what each axis should be bound to. Alternately, SDL's higher-level
975 * Game Controller API makes a great effort to apply order to this lower-level
976 * interface, so you know that a specific axis is the "left thumb stick," etc.
977 *
978 * The value returned by SDL_GetJoystickAxis() is a signed integer (-32768 to
979 * 32767) representing the current position of the axis. It may be necessary
980 * to impose certain tolerances on these values to account for jitter.
981 *
982 * \param joystick an SDL_Joystick structure containing joystick information.
983 * \param axis the axis to query; the axis indices start at index 0.
984 * \returns a 16-bit signed integer representing the current position of the
985 * axis or 0 on failure; call SDL_GetError() for more information.
986 *
987 * \since This function is available since SDL 3.2.0.
988 *
989 * \sa SDL_GetNumJoystickAxes
990 */
991extern SDL_DECLSPEC Sint16 SDLCALL SDL_GetJoystickAxis(SDL_Joystick *joystick, int axis);
992
993/**
994 * Get the initial state of an axis control on a joystick.
995 *
996 * The state is a value ranging from -32768 to 32767.
997 *
998 * The axis indices start at index 0.
999 *
1000 * \param joystick an SDL_Joystick structure containing joystick information.
1001 * \param axis the axis to query; the axis indices start at index 0.
1002 * \param state upon return, the initial value is supplied here.
1003 * \returns true if this axis has any initial value, or false if not.
1004 *
1005 * \since This function is available since SDL 3.2.0.
1006 */
1007extern SDL_DECLSPEC bool SDLCALL SDL_GetJoystickAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state);
1008
1009/**
1010 * Get the ball axis change since the last poll.
1011 *
1012 * Trackballs can only return relative motion since the last call to
1013 * SDL_GetJoystickBall(), these motion deltas are placed into `dx` and `dy`.
1014 *
1015 * Most joysticks do not have trackballs.
1016 *
1017 * \param joystick the SDL_Joystick to query.
1018 * \param ball the ball index to query; ball indices start at index 0.
1019 * \param dx stores the difference in the x axis position since the last poll.
1020 * \param dy stores the difference in the y axis position since the last poll.
1021 * \returns true on success or false on failure; call SDL_GetError() for more
1022 * information.
1023 *
1024 * \since This function is available since SDL 3.2.0.
1025 *
1026 * \sa SDL_GetNumJoystickBalls
1027 */
1028extern SDL_DECLSPEC bool SDLCALL SDL_GetJoystickBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);
1029
1030/**
1031 * Get the current state of a POV hat on a joystick.
1032 *
1033 * The returned value will be one of the `SDL_HAT_*` values.
1034 *
1035 * \param joystick an SDL_Joystick structure containing joystick information.
1036 * \param hat the hat index to get the state from; indices start at index 0.
1037 * \returns the current hat position.
1038 *
1039 * \since This function is available since SDL 3.2.0.
1040 *
1041 * \sa SDL_GetNumJoystickHats
1042 */
1043extern SDL_DECLSPEC Uint8 SDLCALL SDL_GetJoystickHat(SDL_Joystick *joystick, int hat);
1044
1045#define SDL_HAT_CENTERED 0x00u
1046#define SDL_HAT_UP 0x01u
1047#define SDL_HAT_RIGHT 0x02u
1048#define SDL_HAT_DOWN 0x04u
1049#define SDL_HAT_LEFT 0x08u
1050#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)
1051#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
1052#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
1053#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
1054
1055/**
1056 * Get the current state of a button on a joystick.
1057 *
1058 * \param joystick an SDL_Joystick structure containing joystick information.
1059 * \param button the button index to get the state from; indices start at
1060 * index 0.
1061 * \returns true if the button is pressed, false otherwise.
1062 *
1063 * \since This function is available since SDL 3.2.0.
1064 *
1065 * \sa SDL_GetNumJoystickButtons
1066 */
1067extern SDL_DECLSPEC bool SDLCALL SDL_GetJoystickButton(SDL_Joystick *joystick, int button);
1068
1069/**
1070 * Start a rumble effect.
1071 *
1072 * Each call to this function cancels any previous rumble effect, and calling
1073 * it with 0 intensity stops any rumbling.
1074 *
1075 * This function requires you to process SDL events or call
1076 * SDL_UpdateJoysticks() to update rumble state.
1077 *
1078 * \param joystick the joystick to vibrate.
1079 * \param low_frequency_rumble the intensity of the low frequency (left)
1080 * rumble motor, from 0 to 0xFFFF.
1081 * \param high_frequency_rumble the intensity of the high frequency (right)
1082 * rumble motor, from 0 to 0xFFFF.
1083 * \param duration_ms the duration of the rumble effect, in milliseconds.
1084 * \returns true, or false if rumble isn't supported on this joystick.
1085 *
1086 * \since This function is available since SDL 3.2.0.
1087 */
1088extern SDL_DECLSPEC bool SDLCALL SDL_RumbleJoystick(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
1089
1090/**
1091 * Start a rumble effect in the joystick's triggers.
1092 *
1093 * Each call to this function cancels any previous trigger rumble effect, and
1094 * calling it with 0 intensity stops any rumbling.
1095 *
1096 * Note that this is rumbling of the _triggers_ and not the game controller as
1097 * a whole. This is currently only supported on Xbox One controllers. If you
1098 * want the (more common) whole-controller rumble, use SDL_RumbleJoystick()
1099 * instead.
1100 *
1101 * This function requires you to process SDL events or call
1102 * SDL_UpdateJoysticks() to update rumble state.
1103 *
1104 * \param joystick the joystick to vibrate.
1105 * \param left_rumble the intensity of the left trigger rumble motor, from 0
1106 * to 0xFFFF.
1107 * \param right_rumble the intensity of the right trigger rumble motor, from 0
1108 * to 0xFFFF.
1109 * \param duration_ms the duration of the rumble effect, in milliseconds.
1110 * \returns true on success or false on failure; call SDL_GetError() for more
1111 * information.
1112 *
1113 * \since This function is available since SDL 3.2.0.
1114 *
1115 * \sa SDL_RumbleJoystick
1116 */
1117extern SDL_DECLSPEC bool SDLCALL SDL_RumbleJoystickTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
1118
1119/**
1120 * Update a joystick's LED color.
1121 *
1122 * An example of a joystick LED is the light on the back of a PlayStation 4's
1123 * DualShock 4 controller.
1124 *
1125 * For joysticks with a single color LED, the maximum of the RGB values will
1126 * be used as the LED brightness.
1127 *
1128 * \param joystick the joystick to update.
1129 * \param red the intensity of the red LED.
1130 * \param green the intensity of the green LED.
1131 * \param blue the intensity of the blue LED.
1132 * \returns true on success or false on failure; call SDL_GetError() for more
1133 * information.
1134 *
1135 * \since This function is available since SDL 3.2.0.
1136 */
1137extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
1138
1139/**
1140 * Send a joystick specific effect packet.
1141 *
1142 * \param joystick the joystick to affect.
1143 * \param data the data to send to the joystick.
1144 * \param size the size of the data to send to the joystick.
1145 * \returns true on success or false on failure; call SDL_GetError() for more
1146 * information.
1147 *
1148 * \since This function is available since SDL 3.2.0.
1149 */
1150extern SDL_DECLSPEC bool SDLCALL SDL_SendJoystickEffect(SDL_Joystick *joystick, const void *data, int size);
1151
1152/**
1153 * Close a joystick previously opened with SDL_OpenJoystick().
1154 *
1155 * \param joystick the joystick device to close.
1156 *
1157 * \since This function is available since SDL 3.2.0.
1158 *
1159 * \sa SDL_OpenJoystick
1160 */
1161extern SDL_DECLSPEC void SDLCALL SDL_CloseJoystick(SDL_Joystick *joystick);
1162
1163/**
1164 * Get the connection state of a joystick.
1165 *
1166 * \param joystick the joystick to query.
1167 * \returns the connection state on success or
1168 * `SDL_JOYSTICK_CONNECTION_INVALID` on failure; call SDL_GetError()
1169 * for more information.
1170 *
1171 * \since This function is available since SDL 3.2.0.
1172 */
1173extern SDL_DECLSPEC SDL_JoystickConnectionState SDLCALL SDL_GetJoystickConnectionState(SDL_Joystick *joystick);
1174
1175/**
1176 * Get the battery state of a joystick.
1177 *
1178 * You should never take a battery status as absolute truth. Batteries
1179 * (especially failing batteries) are delicate hardware, and the values
1180 * reported here are best estimates based on what that hardware reports. It's
1181 * not uncommon for older batteries to lose stored power much faster than it
1182 * reports, or completely drain when reporting it has 20 percent left, etc.
1183 *
1184 * \param joystick the joystick to query.
1185 * \param percent a pointer filled in with the percentage of battery life
1186 * left, between 0 and 100, or NULL to ignore. This will be
1187 * filled in with -1 we can't determine a value or there is no
1188 * battery.
1189 * \returns the current battery state or `SDL_POWERSTATE_ERROR` on failure;
1190 * call SDL_GetError() for more information.
1191 *
1192 * \since This function is available since SDL 3.2.0.
1193 */
1194extern SDL_DECLSPEC SDL_PowerState SDLCALL SDL_GetJoystickPowerInfo(SDL_Joystick *joystick, int *percent);
1195
1196/* Ends C function definitions when using C++ */
1197#ifdef __cplusplus
1198}
1199#endif
1200#include <SDL3/SDL_close_code.h>
1201
1202#endif /* SDL_joystick_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_keyboard.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_keyboard.h
new file mode 100644
index 0000000..afa77b6
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_keyboard.h
@@ -0,0 +1,609 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryKeyboard
24 *
25 * SDL keyboard management.
26 *
27 * Please refer to the Best Keyboard Practices document for details on how
28 * best to accept keyboard input in various types of programs:
29 *
30 * https://wiki.libsdl.org/SDL3/BestKeyboardPractices
31 */
32
33#ifndef SDL_keyboard_h_
34#define SDL_keyboard_h_
35
36#include <SDL3/SDL_stdinc.h>
37#include <SDL3/SDL_error.h>
38#include <SDL3/SDL_keycode.h>
39#include <SDL3/SDL_properties.h>
40#include <SDL3/SDL_rect.h>
41#include <SDL3/SDL_scancode.h>
42#include <SDL3/SDL_video.h>
43
44#include <SDL3/SDL_begin_code.h>
45/* Set up for C function definitions, even when using C++ */
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50/**
51 * This is a unique ID for a keyboard for the time it is connected to the
52 * system, and is never reused for the lifetime of the application.
53 *
54 * If the keyboard is disconnected and reconnected, it will get a new ID.
55 *
56 * The value 0 is an invalid ID.
57 *
58 * \since This datatype is available since SDL 3.2.0.
59 */
60typedef Uint32 SDL_KeyboardID;
61
62/* Function prototypes */
63
64/**
65 * Return whether a keyboard is currently connected.
66 *
67 * \returns true if a keyboard is connected, false otherwise.
68 *
69 * \threadsafety This function should only be called on the main thread.
70 *
71 * \since This function is available since SDL 3.2.0.
72 *
73 * \sa SDL_GetKeyboards
74 */
75extern SDL_DECLSPEC bool SDLCALL SDL_HasKeyboard(void);
76
77/**
78 * Get a list of currently connected keyboards.
79 *
80 * Note that this will include any device or virtual driver that includes
81 * keyboard functionality, including some mice, KVM switches, motherboard
82 * power buttons, etc. You should wait for input from a device before you
83 * consider it actively in use.
84 *
85 * \param count a pointer filled in with the number of keyboards returned, may
86 * be NULL.
87 * \returns a 0 terminated array of keyboards instance IDs or NULL on failure;
88 * call SDL_GetError() for more information. This should be freed
89 * with SDL_free() when it is no longer needed.
90 *
91 * \threadsafety This function should only be called on the main thread.
92 *
93 * \since This function is available since SDL 3.2.0.
94 *
95 * \sa SDL_GetKeyboardNameForID
96 * \sa SDL_HasKeyboard
97 */
98extern SDL_DECLSPEC SDL_KeyboardID * SDLCALL SDL_GetKeyboards(int *count);
99
100/**
101 * Get the name of a keyboard.
102 *
103 * This function returns "" if the keyboard doesn't have a name.
104 *
105 * \param instance_id the keyboard instance ID.
106 * \returns the name of the selected keyboard or NULL on failure; call
107 * SDL_GetError() for more information.
108 *
109 * \threadsafety This function should only be called on the main thread.
110 *
111 * \since This function is available since SDL 3.2.0.
112 *
113 * \sa SDL_GetKeyboards
114 */
115extern SDL_DECLSPEC const char * SDLCALL SDL_GetKeyboardNameForID(SDL_KeyboardID instance_id);
116
117/**
118 * Query the window which currently has keyboard focus.
119 *
120 * \returns the window with keyboard focus.
121 *
122 * \threadsafety This function should only be called on the main thread.
123 *
124 * \since This function is available since SDL 3.2.0.
125 */
126extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
127
128/**
129 * Get a snapshot of the current state of the keyboard.
130 *
131 * The pointer returned is a pointer to an internal SDL array. It will be
132 * valid for the whole lifetime of the application and should not be freed by
133 * the caller.
134 *
135 * A array element with a value of true means that the key is pressed and a
136 * value of false means that it is not. Indexes into this array are obtained
137 * by using SDL_Scancode values.
138 *
139 * Use SDL_PumpEvents() to update the state array.
140 *
141 * This function gives you the current state after all events have been
142 * processed, so if a key or button has been pressed and released before you
143 * process events, then the pressed state will never show up in the
144 * SDL_GetKeyboardState() calls.
145 *
146 * Note: This function doesn't take into account whether shift has been
147 * pressed or not.
148 *
149 * \param numkeys if non-NULL, receives the length of the returned array.
150 * \returns a pointer to an array of key states.
151 *
152 * \threadsafety It is safe to call this function from any thread.
153 *
154 * \since This function is available since SDL 3.2.0.
155 *
156 * \sa SDL_PumpEvents
157 * \sa SDL_ResetKeyboard
158 */
159extern SDL_DECLSPEC const bool * SDLCALL SDL_GetKeyboardState(int *numkeys);
160
161/**
162 * Clear the state of the keyboard.
163 *
164 * This function will generate key up events for all pressed keys.
165 *
166 * \threadsafety This function should only be called on the main thread.
167 *
168 * \since This function is available since SDL 3.2.0.
169 *
170 * \sa SDL_GetKeyboardState
171 */
172extern SDL_DECLSPEC void SDLCALL SDL_ResetKeyboard(void);
173
174/**
175 * Get the current key modifier state for the keyboard.
176 *
177 * \returns an OR'd combination of the modifier keys for the keyboard. See
178 * SDL_Keymod for details.
179 *
180 * \threadsafety It is safe to call this function from any thread.
181 *
182 * \since This function is available since SDL 3.2.0.
183 *
184 * \sa SDL_GetKeyboardState
185 * \sa SDL_SetModState
186 */
187extern SDL_DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
188
189/**
190 * Set the current key modifier state for the keyboard.
191 *
192 * The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose
193 * modifier key states on your application. Simply pass your desired modifier
194 * states into `modstate`. This value may be a bitwise, OR'd combination of
195 * SDL_Keymod values.
196 *
197 * This does not change the keyboard state, only the key modifier flags that
198 * SDL reports.
199 *
200 * \param modstate the desired SDL_Keymod for the keyboard.
201 *
202 * \threadsafety It is safe to call this function from any thread.
203 *
204 * \since This function is available since SDL 3.2.0.
205 *
206 * \sa SDL_GetModState
207 */
208extern SDL_DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
209
210/**
211 * Get the key code corresponding to the given scancode according to the
212 * current keyboard layout.
213 *
214 * If you want to get the keycode as it would be delivered in key events,
215 * including options specified in SDL_HINT_KEYCODE_OPTIONS, then you should
216 * pass `key_event` as true. Otherwise this function simply translates the
217 * scancode based on the given modifier state.
218 *
219 * \param scancode the desired SDL_Scancode to query.
220 * \param modstate the modifier state to use when translating the scancode to
221 * a keycode.
222 * \param key_event true if the keycode will be used in key events.
223 * \returns the SDL_Keycode that corresponds to the given SDL_Scancode.
224 *
225 * \threadsafety This function is not thread safe.
226 *
227 * \since This function is available since SDL 3.2.0.
228 *
229 * \sa SDL_GetKeyName
230 * \sa SDL_GetScancodeFromKey
231 */
232extern SDL_DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, bool key_event);
233
234/**
235 * Get the scancode corresponding to the given key code according to the
236 * current keyboard layout.
237 *
238 * Note that there may be multiple scancode+modifier states that can generate
239 * this keycode, this will just return the first one found.
240 *
241 * \param key the desired SDL_Keycode to query.
242 * \param modstate a pointer to the modifier state that would be used when the
243 * scancode generates this key, may be NULL.
244 * \returns the SDL_Scancode that corresponds to the given SDL_Keycode.
245 *
246 * \threadsafety This function is not thread safe.
247 *
248 * \since This function is available since SDL 3.2.0.
249 *
250 * \sa SDL_GetKeyFromScancode
251 * \sa SDL_GetScancodeName
252 */
253extern SDL_DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key, SDL_Keymod *modstate);
254
255/**
256 * Set a human-readable name for a scancode.
257 *
258 * \param scancode the desired SDL_Scancode.
259 * \param name the name to use for the scancode, encoded as UTF-8. The string
260 * is not copied, so the pointer given to this function must stay
261 * valid while SDL is being used.
262 * \returns true on success or false on failure; call SDL_GetError() for more
263 * information.
264 *
265 * \threadsafety This function is not thread safe.
266 *
267 * \since This function is available since SDL 3.2.0.
268 *
269 * \sa SDL_GetScancodeName
270 */
271extern SDL_DECLSPEC bool SDLCALL SDL_SetScancodeName(SDL_Scancode scancode, const char *name);
272
273/**
274 * Get a human-readable name for a scancode.
275 *
276 * **Warning**: The returned name is by design not stable across platforms,
277 * e.g. the name for `SDL_SCANCODE_LGUI` is "Left GUI" under Linux but "Left
278 * Windows" under Microsoft Windows, and some scancodes like
279 * `SDL_SCANCODE_NONUSBACKSLASH` don't have any name at all. There are even
280 * scancodes that share names, e.g. `SDL_SCANCODE_RETURN` and
281 * `SDL_SCANCODE_RETURN2` (both called "Return"). This function is therefore
282 * unsuitable for creating a stable cross-platform two-way mapping between
283 * strings and scancodes.
284 *
285 * \param scancode the desired SDL_Scancode to query.
286 * \returns a pointer to the name for the scancode. If the scancode doesn't
287 * have a name this function returns an empty string ("").
288 *
289 * \threadsafety This function is not thread safe.
290 *
291 * \since This function is available since SDL 3.2.0.
292 *
293 * \sa SDL_GetScancodeFromKey
294 * \sa SDL_GetScancodeFromName
295 * \sa SDL_SetScancodeName
296 */
297extern SDL_DECLSPEC const char * SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
298
299/**
300 * Get a scancode from a human-readable name.
301 *
302 * \param name the human-readable scancode name.
303 * \returns the SDL_Scancode, or `SDL_SCANCODE_UNKNOWN` if the name wasn't
304 * recognized; call SDL_GetError() for more information.
305 *
306 * \threadsafety This function is not thread safe.
307 *
308 * \since This function is available since SDL 3.2.0.
309 *
310 * \sa SDL_GetKeyFromName
311 * \sa SDL_GetScancodeFromKey
312 * \sa SDL_GetScancodeName
313 */
314extern SDL_DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
315
316/**
317 * Get a human-readable name for a key.
318 *
319 * If the key doesn't have a name, this function returns an empty string ("").
320 *
321 * Letters will be presented in their uppercase form, if applicable.
322 *
323 * \param key the desired SDL_Keycode to query.
324 * \returns a UTF-8 encoded string of the key name.
325 *
326 * \threadsafety This function is not thread safe.
327 *
328 * \since This function is available since SDL 3.2.0.
329 *
330 * \sa SDL_GetKeyFromName
331 * \sa SDL_GetKeyFromScancode
332 * \sa SDL_GetScancodeFromKey
333 */
334extern SDL_DECLSPEC const char * SDLCALL SDL_GetKeyName(SDL_Keycode key);
335
336/**
337 * Get a key code from a human-readable name.
338 *
339 * \param name the human-readable key name.
340 * \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call
341 * SDL_GetError() for more information.
342 *
343 * \threadsafety This function is not thread safe.
344 *
345 * \since This function is available since SDL 3.2.0.
346 *
347 * \sa SDL_GetKeyFromScancode
348 * \sa SDL_GetKeyName
349 * \sa SDL_GetScancodeFromName
350 */
351extern SDL_DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
352
353/**
354 * Start accepting Unicode text input events in a window.
355 *
356 * This function will enable text input (SDL_EVENT_TEXT_INPUT and
357 * SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this
358 * function paired with SDL_StopTextInput().
359 *
360 * Text input events are not received by default.
361 *
362 * On some platforms using this function shows the screen keyboard and/or
363 * activates an IME, which can prevent some key press events from being passed
364 * through.
365 *
366 * \param window the window to enable text input.
367 * \returns true on success or false on failure; call SDL_GetError() for more
368 * information.
369 *
370 * \threadsafety This function should only be called on the main thread.
371 *
372 * \since This function is available since SDL 3.2.0.
373 *
374 * \sa SDL_SetTextInputArea
375 * \sa SDL_StartTextInputWithProperties
376 * \sa SDL_StopTextInput
377 * \sa SDL_TextInputActive
378 */
379extern SDL_DECLSPEC bool SDLCALL SDL_StartTextInput(SDL_Window *window);
380
381/**
382 * Text input type.
383 *
384 * These are the valid values for SDL_PROP_TEXTINPUT_TYPE_NUMBER. Not every
385 * value is valid on every platform, but where a value isn't supported, a
386 * reasonable fallback will be used.
387 *
388 * \since This enum is available since SDL 3.2.0.
389 *
390 * \sa SDL_StartTextInputWithProperties
391 */
392typedef enum SDL_TextInputType
393{
394 SDL_TEXTINPUT_TYPE_TEXT, /**< The input is text */
395 SDL_TEXTINPUT_TYPE_TEXT_NAME, /**< The input is a person's name */
396 SDL_TEXTINPUT_TYPE_TEXT_EMAIL, /**< The input is an e-mail address */
397 SDL_TEXTINPUT_TYPE_TEXT_USERNAME, /**< The input is a username */
398 SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_HIDDEN, /**< The input is a secure password that is hidden */
399 SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_VISIBLE, /**< The input is a secure password that is visible */
400 SDL_TEXTINPUT_TYPE_NUMBER, /**< The input is a number */
401 SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_HIDDEN, /**< The input is a secure PIN that is hidden */
402 SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_VISIBLE /**< The input is a secure PIN that is visible */
403} SDL_TextInputType;
404
405/**
406 * Auto capitalization type.
407 *
408 * These are the valid values for SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER.
409 * Not every value is valid on every platform, but where a value isn't
410 * supported, a reasonable fallback will be used.
411 *
412 * \since This enum is available since SDL 3.2.0.
413 *
414 * \sa SDL_StartTextInputWithProperties
415 */
416typedef enum SDL_Capitalization
417{
418 SDL_CAPITALIZE_NONE, /**< No auto-capitalization will be done */
419 SDL_CAPITALIZE_SENTENCES, /**< The first letter of sentences will be capitalized */
420 SDL_CAPITALIZE_WORDS, /**< The first letter of words will be capitalized */
421 SDL_CAPITALIZE_LETTERS /**< All letters will be capitalized */
422} SDL_Capitalization;
423
424/**
425 * Start accepting Unicode text input events in a window, with properties
426 * describing the input.
427 *
428 * This function will enable text input (SDL_EVENT_TEXT_INPUT and
429 * SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this
430 * function paired with SDL_StopTextInput().
431 *
432 * Text input events are not received by default.
433 *
434 * On some platforms using this function shows the screen keyboard and/or
435 * activates an IME, which can prevent some key press events from being passed
436 * through.
437 *
438 * These are the supported properties:
439 *
440 * - `SDL_PROP_TEXTINPUT_TYPE_NUMBER` - an SDL_TextInputType value that
441 * describes text being input, defaults to SDL_TEXTINPUT_TYPE_TEXT.
442 * - `SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER` - an SDL_Capitalization value
443 * that describes how text should be capitalized, defaults to
444 * SDL_CAPITALIZE_SENTENCES for normal text entry, SDL_CAPITALIZE_WORDS for
445 * SDL_TEXTINPUT_TYPE_TEXT_NAME, and SDL_CAPITALIZE_NONE for e-mail
446 * addresses, usernames, and passwords.
447 * - `SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN` - true to enable auto completion
448 * and auto correction, defaults to true.
449 * - `SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN` - true if multiple lines of text
450 * are allowed. This defaults to true if SDL_HINT_RETURN_KEY_HIDES_IME is
451 * "0" or is not set, and defaults to false if SDL_HINT_RETURN_KEY_HIDES_IME
452 * is "1".
453 *
454 * On Android you can directly specify the input type:
455 *
456 * - `SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER` - the text input type to
457 * use, overriding other properties. This is documented at
458 * https://developer.android.com/reference/android/text/InputType
459 *
460 * \param window the window to enable text input.
461 * \param props the properties to use.
462 * \returns true on success or false on failure; call SDL_GetError() for more
463 * information.
464 *
465 * \threadsafety This function should only be called on the main thread.
466 *
467 * \since This function is available since SDL 3.2.0.
468 *
469 * \sa SDL_SetTextInputArea
470 * \sa SDL_StartTextInput
471 * \sa SDL_StopTextInput
472 * \sa SDL_TextInputActive
473 */
474extern SDL_DECLSPEC bool SDLCALL SDL_StartTextInputWithProperties(SDL_Window *window, SDL_PropertiesID props);
475
476#define SDL_PROP_TEXTINPUT_TYPE_NUMBER "SDL.textinput.type"
477#define SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER "SDL.textinput.capitalization"
478#define SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN "SDL.textinput.autocorrect"
479#define SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN "SDL.textinput.multiline"
480#define SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER "SDL.textinput.android.inputtype"
481
482/**
483 * Check whether or not Unicode text input events are enabled for a window.
484 *
485 * \param window the window to check.
486 * \returns true if text input events are enabled else false.
487 *
488 * \threadsafety This function should only be called on the main thread.
489 *
490 * \since This function is available since SDL 3.2.0.
491 *
492 * \sa SDL_StartTextInput
493 */
494extern SDL_DECLSPEC bool SDLCALL SDL_TextInputActive(SDL_Window *window);
495
496/**
497 * Stop receiving any text input events in a window.
498 *
499 * If SDL_StartTextInput() showed the screen keyboard, this function will hide
500 * it.
501 *
502 * \param window the window to disable text input.
503 * \returns true on success or false on failure; call SDL_GetError() for more
504 * information.
505 *
506 * \threadsafety This function should only be called on the main thread.
507 *
508 * \since This function is available since SDL 3.2.0.
509 *
510 * \sa SDL_StartTextInput
511 */
512extern SDL_DECLSPEC bool SDLCALL SDL_StopTextInput(SDL_Window *window);
513
514/**
515 * Dismiss the composition window/IME without disabling the subsystem.
516 *
517 * \param window the window to affect.
518 * \returns true on success or false on failure; call SDL_GetError() for more
519 * information.
520 *
521 * \threadsafety This function should only be called on the main thread.
522 *
523 * \since This function is available since SDL 3.2.0.
524 *
525 * \sa SDL_StartTextInput
526 * \sa SDL_StopTextInput
527 */
528extern SDL_DECLSPEC bool SDLCALL SDL_ClearComposition(SDL_Window *window);
529
530/**
531 * Set the area used to type Unicode text input.
532 *
533 * Native input methods may place a window with word suggestions near the
534 * cursor, without covering the text being entered.
535 *
536 * \param window the window for which to set the text input area.
537 * \param rect the SDL_Rect representing the text input area, in window
538 * coordinates, or NULL to clear it.
539 * \param cursor the offset of the current cursor location relative to
540 * `rect->x`, in window coordinates.
541 * \returns true on success or false on failure; call SDL_GetError() for more
542 * information.
543 *
544 * \threadsafety This function should only be called on the main thread.
545 *
546 * \since This function is available since SDL 3.2.0.
547 *
548 * \sa SDL_GetTextInputArea
549 * \sa SDL_StartTextInput
550 */
551extern SDL_DECLSPEC bool SDLCALL SDL_SetTextInputArea(SDL_Window *window, const SDL_Rect *rect, int cursor);
552
553/**
554 * Get the area used to type Unicode text input.
555 *
556 * This returns the values previously set by SDL_SetTextInputArea().
557 *
558 * \param window the window for which to query the text input area.
559 * \param rect a pointer to an SDL_Rect filled in with the text input area,
560 * may be NULL.
561 * \param cursor a pointer to the offset of the current cursor location
562 * relative to `rect->x`, may be NULL.
563 * \returns true on success or false on failure; call SDL_GetError() for more
564 * information.
565 *
566 * \threadsafety This function should only be called on the main thread.
567 *
568 * \since This function is available since SDL 3.2.0.
569 *
570 * \sa SDL_SetTextInputArea
571 */
572extern SDL_DECLSPEC bool SDLCALL SDL_GetTextInputArea(SDL_Window *window, SDL_Rect *rect, int *cursor);
573
574/**
575 * Check whether the platform has screen keyboard support.
576 *
577 * \returns true if the platform has some screen keyboard support or false if
578 * not.
579 *
580 * \threadsafety This function should only be called on the main thread.
581 *
582 * \since This function is available since SDL 3.2.0.
583 *
584 * \sa SDL_StartTextInput
585 * \sa SDL_ScreenKeyboardShown
586 */
587extern SDL_DECLSPEC bool SDLCALL SDL_HasScreenKeyboardSupport(void);
588
589/**
590 * Check whether the screen keyboard is shown for given window.
591 *
592 * \param window the window for which screen keyboard should be queried.
593 * \returns true if screen keyboard is shown or false if not.
594 *
595 * \threadsafety This function should only be called on the main thread.
596 *
597 * \since This function is available since SDL 3.2.0.
598 *
599 * \sa SDL_HasScreenKeyboardSupport
600 */
601extern SDL_DECLSPEC bool SDLCALL SDL_ScreenKeyboardShown(SDL_Window *window);
602
603/* Ends C function definitions when using C++ */
604#ifdef __cplusplus
605}
606#endif
607#include <SDL3/SDL_close_code.h>
608
609#endif /* SDL_keyboard_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_keycode.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_keycode.h
new file mode 100644
index 0000000..61b68e7
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_keycode.h
@@ -0,0 +1,343 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryKeycode
24 *
25 * Defines constants which identify keyboard keys and modifiers.
26 *
27 * Please refer to the Best Keyboard Practices document for details on what
28 * this information means and how best to use it.
29 *
30 * https://wiki.libsdl.org/SDL3/BestKeyboardPractices
31 */
32
33#ifndef SDL_keycode_h_
34#define SDL_keycode_h_
35
36#include <SDL3/SDL_stdinc.h>
37#include <SDL3/SDL_scancode.h>
38
39/**
40 * The SDL virtual key representation.
41 *
42 * Values of this type are used to represent keyboard keys using the current
43 * layout of the keyboard. These values include Unicode values representing
44 * the unmodified character that would be generated by pressing the key, or an
45 * `SDLK_*` constant for those keys that do not generate characters.
46 *
47 * A special exception is the number keys at the top of the keyboard which map
48 * to SDLK_0...SDLK_9 on AZERTY layouts.
49 *
50 * Keys with the `SDLK_EXTENDED_MASK` bit set do not map to a scancode or
51 * unicode code point.
52 *
53 * \since This datatype is available since SDL 3.2.0.
54 */
55typedef Uint32 SDL_Keycode;
56
57#define SDLK_EXTENDED_MASK (1u << 29)
58#define SDLK_SCANCODE_MASK (1u << 30)
59#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
60#define SDLK_UNKNOWN 0x00000000u /**< 0 */
61#define SDLK_RETURN 0x0000000du /**< '\r' */
62#define SDLK_ESCAPE 0x0000001bu /**< '\x1B' */
63#define SDLK_BACKSPACE 0x00000008u /**< '\b' */
64#define SDLK_TAB 0x00000009u /**< '\t' */
65#define SDLK_SPACE 0x00000020u /**< ' ' */
66#define SDLK_EXCLAIM 0x00000021u /**< '!' */
67#define SDLK_DBLAPOSTROPHE 0x00000022u /**< '"' */
68#define SDLK_HASH 0x00000023u /**< '#' */
69#define SDLK_DOLLAR 0x00000024u /**< '$' */
70#define SDLK_PERCENT 0x00000025u /**< '%' */
71#define SDLK_AMPERSAND 0x00000026u /**< '&' */
72#define SDLK_APOSTROPHE 0x00000027u /**< '\'' */
73#define SDLK_LEFTPAREN 0x00000028u /**< '(' */
74#define SDLK_RIGHTPAREN 0x00000029u /**< ')' */
75#define SDLK_ASTERISK 0x0000002au /**< '*' */
76#define SDLK_PLUS 0x0000002bu /**< '+' */
77#define SDLK_COMMA 0x0000002cu /**< ',' */
78#define SDLK_MINUS 0x0000002du /**< '-' */
79#define SDLK_PERIOD 0x0000002eu /**< '.' */
80#define SDLK_SLASH 0x0000002fu /**< '/' */
81#define SDLK_0 0x00000030u /**< '0' */
82#define SDLK_1 0x00000031u /**< '1' */
83#define SDLK_2 0x00000032u /**< '2' */
84#define SDLK_3 0x00000033u /**< '3' */
85#define SDLK_4 0x00000034u /**< '4' */
86#define SDLK_5 0x00000035u /**< '5' */
87#define SDLK_6 0x00000036u /**< '6' */
88#define SDLK_7 0x00000037u /**< '7' */
89#define SDLK_8 0x00000038u /**< '8' */
90#define SDLK_9 0x00000039u /**< '9' */
91#define SDLK_COLON 0x0000003au /**< ':' */
92#define SDLK_SEMICOLON 0x0000003bu /**< ';' */
93#define SDLK_LESS 0x0000003cu /**< '<' */
94#define SDLK_EQUALS 0x0000003du /**< '=' */
95#define SDLK_GREATER 0x0000003eu /**< '>' */
96#define SDLK_QUESTION 0x0000003fu /**< '?' */
97#define SDLK_AT 0x00000040u /**< '@' */
98#define SDLK_LEFTBRACKET 0x0000005bu /**< '[' */
99#define SDLK_BACKSLASH 0x0000005cu /**< '\\' */
100#define SDLK_RIGHTBRACKET 0x0000005du /**< ']' */
101#define SDLK_CARET 0x0000005eu /**< '^' */
102#define SDLK_UNDERSCORE 0x0000005fu /**< '_' */
103#define SDLK_GRAVE 0x00000060u /**< '`' */
104#define SDLK_A 0x00000061u /**< 'a' */
105#define SDLK_B 0x00000062u /**< 'b' */
106#define SDLK_C 0x00000063u /**< 'c' */
107#define SDLK_D 0x00000064u /**< 'd' */
108#define SDLK_E 0x00000065u /**< 'e' */
109#define SDLK_F 0x00000066u /**< 'f' */
110#define SDLK_G 0x00000067u /**< 'g' */
111#define SDLK_H 0x00000068u /**< 'h' */
112#define SDLK_I 0x00000069u /**< 'i' */
113#define SDLK_J 0x0000006au /**< 'j' */
114#define SDLK_K 0x0000006bu /**< 'k' */
115#define SDLK_L 0x0000006cu /**< 'l' */
116#define SDLK_M 0x0000006du /**< 'm' */
117#define SDLK_N 0x0000006eu /**< 'n' */
118#define SDLK_O 0x0000006fu /**< 'o' */
119#define SDLK_P 0x00000070u /**< 'p' */
120#define SDLK_Q 0x00000071u /**< 'q' */
121#define SDLK_R 0x00000072u /**< 'r' */
122#define SDLK_S 0x00000073u /**< 's' */
123#define SDLK_T 0x00000074u /**< 't' */
124#define SDLK_U 0x00000075u /**< 'u' */
125#define SDLK_V 0x00000076u /**< 'v' */
126#define SDLK_W 0x00000077u /**< 'w' */
127#define SDLK_X 0x00000078u /**< 'x' */
128#define SDLK_Y 0x00000079u /**< 'y' */
129#define SDLK_Z 0x0000007au /**< 'z' */
130#define SDLK_LEFTBRACE 0x0000007bu /**< '{' */
131#define SDLK_PIPE 0x0000007cu /**< '|' */
132#define SDLK_RIGHTBRACE 0x0000007du /**< '}' */
133#define SDLK_TILDE 0x0000007eu /**< '~' */
134#define SDLK_DELETE 0x0000007fu /**< '\x7F' */
135#define SDLK_PLUSMINUS 0x000000b1u /**< '\xB1' */
136#define SDLK_CAPSLOCK 0x40000039u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK) */
137#define SDLK_F1 0x4000003au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1) */
138#define SDLK_F2 0x4000003bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2) */
139#define SDLK_F3 0x4000003cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3) */
140#define SDLK_F4 0x4000003du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4) */
141#define SDLK_F5 0x4000003eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5) */
142#define SDLK_F6 0x4000003fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6) */
143#define SDLK_F7 0x40000040u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7) */
144#define SDLK_F8 0x40000041u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8) */
145#define SDLK_F9 0x40000042u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9) */
146#define SDLK_F10 0x40000043u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10) */
147#define SDLK_F11 0x40000044u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11) */
148#define SDLK_F12 0x40000045u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12) */
149#define SDLK_PRINTSCREEN 0x40000046u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN) */
150#define SDLK_SCROLLLOCK 0x40000047u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK) */
151#define SDLK_PAUSE 0x40000048u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE) */
152#define SDLK_INSERT 0x40000049u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT) */
153#define SDLK_HOME 0x4000004au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME) */
154#define SDLK_PAGEUP 0x4000004bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP) */
155#define SDLK_END 0x4000004du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END) */
156#define SDLK_PAGEDOWN 0x4000004eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN) */
157#define SDLK_RIGHT 0x4000004fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT) */
158#define SDLK_LEFT 0x40000050u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT) */
159#define SDLK_DOWN 0x40000051u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN) */
160#define SDLK_UP 0x40000052u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP) */
161#define SDLK_NUMLOCKCLEAR 0x40000053u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR) */
162#define SDLK_KP_DIVIDE 0x40000054u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE) */
163#define SDLK_KP_MULTIPLY 0x40000055u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY) */
164#define SDLK_KP_MINUS 0x40000056u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS) */
165#define SDLK_KP_PLUS 0x40000057u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS) */
166#define SDLK_KP_ENTER 0x40000058u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER) */
167#define SDLK_KP_1 0x40000059u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1) */
168#define SDLK_KP_2 0x4000005au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2) */
169#define SDLK_KP_3 0x4000005bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3) */
170#define SDLK_KP_4 0x4000005cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4) */
171#define SDLK_KP_5 0x4000005du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5) */
172#define SDLK_KP_6 0x4000005eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6) */
173#define SDLK_KP_7 0x4000005fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7) */
174#define SDLK_KP_8 0x40000060u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8) */
175#define SDLK_KP_9 0x40000061u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9) */
176#define SDLK_KP_0 0x40000062u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0) */
177#define SDLK_KP_PERIOD 0x40000063u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD) */
178#define SDLK_APPLICATION 0x40000065u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION) */
179#define SDLK_POWER 0x40000066u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER) */
180#define SDLK_KP_EQUALS 0x40000067u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS) */
181#define SDLK_F13 0x40000068u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13) */
182#define SDLK_F14 0x40000069u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14) */
183#define SDLK_F15 0x4000006au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15) */
184#define SDLK_F16 0x4000006bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16) */
185#define SDLK_F17 0x4000006cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17) */
186#define SDLK_F18 0x4000006du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18) */
187#define SDLK_F19 0x4000006eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19) */
188#define SDLK_F20 0x4000006fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20) */
189#define SDLK_F21 0x40000070u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21) */
190#define SDLK_F22 0x40000071u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22) */
191#define SDLK_F23 0x40000072u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23) */
192#define SDLK_F24 0x40000073u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24) */
193#define SDLK_EXECUTE 0x40000074u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE) */
194#define SDLK_HELP 0x40000075u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP) */
195#define SDLK_MENU 0x40000076u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU) */
196#define SDLK_SELECT 0x40000077u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT) */
197#define SDLK_STOP 0x40000078u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP) */
198#define SDLK_AGAIN 0x40000079u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN) */
199#define SDLK_UNDO 0x4000007au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO) */
200#define SDLK_CUT 0x4000007bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT) */
201#define SDLK_COPY 0x4000007cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY) */
202#define SDLK_PASTE 0x4000007du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE) */
203#define SDLK_FIND 0x4000007eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND) */
204#define SDLK_MUTE 0x4000007fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE) */
205#define SDLK_VOLUMEUP 0x40000080u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP) */
206#define SDLK_VOLUMEDOWN 0x40000081u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN) */
207#define SDLK_KP_COMMA 0x40000085u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA) */
208#define SDLK_KP_EQUALSAS400 0x40000086u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400) */
209#define SDLK_ALTERASE 0x40000099u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE) */
210#define SDLK_SYSREQ 0x4000009au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ) */
211#define SDLK_CANCEL 0x4000009bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL) */
212#define SDLK_CLEAR 0x4000009cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR) */
213#define SDLK_PRIOR 0x4000009du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR) */
214#define SDLK_RETURN2 0x4000009eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2) */
215#define SDLK_SEPARATOR 0x4000009fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR) */
216#define SDLK_OUT 0x400000a0u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT) */
217#define SDLK_OPER 0x400000a1u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER) */
218#define SDLK_CLEARAGAIN 0x400000a2u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN) */
219#define SDLK_CRSEL 0x400000a3u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL) */
220#define SDLK_EXSEL 0x400000a4u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL) */
221#define SDLK_KP_00 0x400000b0u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00) */
222#define SDLK_KP_000 0x400000b1u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000) */
223#define SDLK_THOUSANDSSEPARATOR 0x400000b2u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR) */
224#define SDLK_DECIMALSEPARATOR 0x400000b3u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR) */
225#define SDLK_CURRENCYUNIT 0x400000b4u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT) */
226#define SDLK_CURRENCYSUBUNIT 0x400000b5u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT) */
227#define SDLK_KP_LEFTPAREN 0x400000b6u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN) */
228#define SDLK_KP_RIGHTPAREN 0x400000b7u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN) */
229#define SDLK_KP_LEFTBRACE 0x400000b8u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE) */
230#define SDLK_KP_RIGHTBRACE 0x400000b9u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE) */
231#define SDLK_KP_TAB 0x400000bau /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB) */
232#define SDLK_KP_BACKSPACE 0x400000bbu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE) */
233#define SDLK_KP_A 0x400000bcu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A) */
234#define SDLK_KP_B 0x400000bdu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B) */
235#define SDLK_KP_C 0x400000beu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C) */
236#define SDLK_KP_D 0x400000bfu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D) */
237#define SDLK_KP_E 0x400000c0u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E) */
238#define SDLK_KP_F 0x400000c1u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F) */
239#define SDLK_KP_XOR 0x400000c2u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR) */
240#define SDLK_KP_POWER 0x400000c3u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER) */
241#define SDLK_KP_PERCENT 0x400000c4u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT) */
242#define SDLK_KP_LESS 0x400000c5u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS) */
243#define SDLK_KP_GREATER 0x400000c6u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER) */
244#define SDLK_KP_AMPERSAND 0x400000c7u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND) */
245#define SDLK_KP_DBLAMPERSAND 0x400000c8u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND) */
246#define SDLK_KP_VERTICALBAR 0x400000c9u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR) */
247#define SDLK_KP_DBLVERTICALBAR 0x400000cau /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR) */
248#define SDLK_KP_COLON 0x400000cbu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON) */
249#define SDLK_KP_HASH 0x400000ccu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH) */
250#define SDLK_KP_SPACE 0x400000cdu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE) */
251#define SDLK_KP_AT 0x400000ceu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT) */
252#define SDLK_KP_EXCLAM 0x400000cfu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM) */
253#define SDLK_KP_MEMSTORE 0x400000d0u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE) */
254#define SDLK_KP_MEMRECALL 0x400000d1u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL) */
255#define SDLK_KP_MEMCLEAR 0x400000d2u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR) */
256#define SDLK_KP_MEMADD 0x400000d3u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD) */
257#define SDLK_KP_MEMSUBTRACT 0x400000d4u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT) */
258#define SDLK_KP_MEMMULTIPLY 0x400000d5u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY) */
259#define SDLK_KP_MEMDIVIDE 0x400000d6u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE) */
260#define SDLK_KP_PLUSMINUS 0x400000d7u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS) */
261#define SDLK_KP_CLEAR 0x400000d8u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR) */
262#define SDLK_KP_CLEARENTRY 0x400000d9u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY) */
263#define SDLK_KP_BINARY 0x400000dau /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY) */
264#define SDLK_KP_OCTAL 0x400000dbu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL) */
265#define SDLK_KP_DECIMAL 0x400000dcu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL) */
266#define SDLK_KP_HEXADECIMAL 0x400000ddu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL) */
267#define SDLK_LCTRL 0x400000e0u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL) */
268#define SDLK_LSHIFT 0x400000e1u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT) */
269#define SDLK_LALT 0x400000e2u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT) */
270#define SDLK_LGUI 0x400000e3u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI) */
271#define SDLK_RCTRL 0x400000e4u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL) */
272#define SDLK_RSHIFT 0x400000e5u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT) */
273#define SDLK_RALT 0x400000e6u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT) */
274#define SDLK_RGUI 0x400000e7u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI) */
275#define SDLK_MODE 0x40000101u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE) */
276#define SDLK_SLEEP 0x40000102u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP) */
277#define SDLK_WAKE 0x40000103u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WAKE) */
278#define SDLK_CHANNEL_INCREMENT 0x40000104u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CHANNEL_INCREMENT) */
279#define SDLK_CHANNEL_DECREMENT 0x40000105u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CHANNEL_DECREMENT) */
280#define SDLK_MEDIA_PLAY 0x40000106u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PLAY) */
281#define SDLK_MEDIA_PAUSE 0x40000107u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PAUSE) */
282#define SDLK_MEDIA_RECORD 0x40000108u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_RECORD) */
283#define SDLK_MEDIA_FAST_FORWARD 0x40000109u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_FAST_FORWARD) */
284#define SDLK_MEDIA_REWIND 0x4000010au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_REWIND) */
285#define SDLK_MEDIA_NEXT_TRACK 0x4000010bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_NEXT_TRACK) */
286#define SDLK_MEDIA_PREVIOUS_TRACK 0x4000010cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PREVIOUS_TRACK) */
287#define SDLK_MEDIA_STOP 0x4000010du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_STOP) */
288#define SDLK_MEDIA_EJECT 0x4000010eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_EJECT) */
289#define SDLK_MEDIA_PLAY_PAUSE 0x4000010fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PLAY_PAUSE) */
290#define SDLK_MEDIA_SELECT 0x40000110u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_SELECT) */
291#define SDLK_AC_NEW 0x40000111u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_NEW) */
292#define SDLK_AC_OPEN 0x40000112u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_OPEN) */
293#define SDLK_AC_CLOSE 0x40000113u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_CLOSE) */
294#define SDLK_AC_EXIT 0x40000114u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_EXIT) */
295#define SDLK_AC_SAVE 0x40000115u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SAVE) */
296#define SDLK_AC_PRINT 0x40000116u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_PRINT) */
297#define SDLK_AC_PROPERTIES 0x40000117u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_PROPERTIES) */
298#define SDLK_AC_SEARCH 0x40000118u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH) */
299#define SDLK_AC_HOME 0x40000119u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME) */
300#define SDLK_AC_BACK 0x4000011au /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK) */
301#define SDLK_AC_FORWARD 0x4000011bu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD) */
302#define SDLK_AC_STOP 0x4000011cu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP) */
303#define SDLK_AC_REFRESH 0x4000011du /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH) */
304#define SDLK_AC_BOOKMARKS 0x4000011eu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS) */
305#define SDLK_SOFTLEFT 0x4000011fu /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT) */
306#define SDLK_SOFTRIGHT 0x40000120u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT) */
307#define SDLK_CALL 0x40000121u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL) */
308#define SDLK_ENDCALL 0x40000122u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL) */
309#define SDLK_LEFT_TAB 0x20000001u /**< Extended key Left Tab */
310#define SDLK_LEVEL5_SHIFT 0x20000002u /**< Extended key Level 5 Shift */
311#define SDLK_MULTI_KEY_COMPOSE 0x20000003u /**< Extended key Multi-key Compose */
312#define SDLK_LMETA 0x20000004u /**< Extended key Left Meta */
313#define SDLK_RMETA 0x20000005u /**< Extended key Right Meta */
314#define SDLK_LHYPER 0x20000006u /**< Extended key Left Hyper */
315#define SDLK_RHYPER 0x20000007u /**< Extended key Right Hyper */
316
317/**
318 * Valid key modifiers (possibly OR'd together).
319 *
320 * \since This datatype is available since SDL 3.2.0.
321 */
322typedef Uint16 SDL_Keymod;
323
324#define SDL_KMOD_NONE 0x0000u /**< no modifier is applicable. */
325#define SDL_KMOD_LSHIFT 0x0001u /**< the left Shift key is down. */
326#define SDL_KMOD_RSHIFT 0x0002u /**< the right Shift key is down. */
327#define SDL_KMOD_LEVEL5 0x0004u /**< the Level 5 Shift key is down. */
328#define SDL_KMOD_LCTRL 0x0040u /**< the left Ctrl (Control) key is down. */
329#define SDL_KMOD_RCTRL 0x0080u /**< the right Ctrl (Control) key is down. */
330#define SDL_KMOD_LALT 0x0100u /**< the left Alt key is down. */
331#define SDL_KMOD_RALT 0x0200u /**< the right Alt key is down. */
332#define SDL_KMOD_LGUI 0x0400u /**< the left GUI key (often the Windows key) is down. */
333#define SDL_KMOD_RGUI 0x0800u /**< the right GUI key (often the Windows key) is down. */
334#define SDL_KMOD_NUM 0x1000u /**< the Num Lock key (may be located on an extended keypad) is down. */
335#define SDL_KMOD_CAPS 0x2000u /**< the Caps Lock key is down. */
336#define SDL_KMOD_MODE 0x4000u /**< the !AltGr key is down. */
337#define SDL_KMOD_SCROLL 0x8000u /**< the Scroll Lock key is down. */
338#define SDL_KMOD_CTRL (SDL_KMOD_LCTRL | SDL_KMOD_RCTRL) /**< Any Ctrl key is down. */
339#define SDL_KMOD_SHIFT (SDL_KMOD_LSHIFT | SDL_KMOD_RSHIFT) /**< Any Shift key is down. */
340#define SDL_KMOD_ALT (SDL_KMOD_LALT | SDL_KMOD_RALT) /**< Any Alt key is down. */
341#define SDL_KMOD_GUI (SDL_KMOD_LGUI | SDL_KMOD_RGUI) /**< Any GUI key is down. */
342
343#endif /* SDL_keycode_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_loadso.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_loadso.h
new file mode 100644
index 0000000..f8649d7
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_loadso.h
@@ -0,0 +1,145 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: SharedObject */
23
24/**
25 * # CategorySharedObject
26 *
27 * System-dependent library loading routines.
28 *
29 * Shared objects are code that is programmatically loadable at runtime.
30 * Windows calls these "DLLs", Linux calls them "shared libraries", etc.
31 *
32 * To use them, build such a library, then call SDL_LoadObject() on it. Once
33 * loaded, you can use SDL_LoadFunction() on that object to find the address
34 * of its exported symbols. When done with the object, call SDL_UnloadObject()
35 * to dispose of it.
36 *
37 * Some things to keep in mind:
38 *
39 * - These functions only work on C function names. Other languages may have
40 * name mangling and intrinsic language support that varies from compiler to
41 * compiler.
42 * - Make sure you declare your function pointers with the same calling
43 * convention as the actual library function. Your code will crash
44 * mysteriously if you do not do this.
45 * - Avoid namespace collisions. If you load a symbol from the library, it is
46 * not defined whether or not it goes into the global symbol namespace for
47 * the application. If it does and it conflicts with symbols in your code or
48 * other shared libraries, you will not get the results you expect. :)
49 * - Once a library is unloaded, all pointers into it obtained through
50 * SDL_LoadFunction() become invalid, even if the library is later reloaded.
51 * Don't unload a library if you plan to use these pointers in the future.
52 * Notably: beware of giving one of these pointers to atexit(), since it may
53 * call that pointer after the library unloads.
54 */
55
56#ifndef SDL_loadso_h_
57#define SDL_loadso_h_
58
59#include <SDL3/SDL_stdinc.h>
60#include <SDL3/SDL_error.h>
61
62#include <SDL3/SDL_begin_code.h>
63/* Set up for C function definitions, even when using C++ */
64#ifdef __cplusplus
65extern "C" {
66#endif
67
68/**
69 * An opaque datatype that represents a loaded shared object.
70 *
71 * \since This datatype is available since SDL 3.2.0.
72 *
73 * \sa SDL_LoadObject
74 * \sa SDL_LoadFunction
75 * \sa SDL_UnloadObject
76 */
77typedef struct SDL_SharedObject SDL_SharedObject;
78
79/**
80 * Dynamically load a shared object.
81 *
82 * \param sofile a system-dependent name of the object file.
83 * \returns an opaque pointer to the object handle or NULL on failure; call
84 * SDL_GetError() for more information.
85 *
86 * \threadsafety It is safe to call this function from any thread.
87 *
88 * \since This function is available since SDL 3.2.0.
89 *
90 * \sa SDL_LoadFunction
91 * \sa SDL_UnloadObject
92 */
93extern SDL_DECLSPEC SDL_SharedObject * SDLCALL SDL_LoadObject(const char *sofile);
94
95/**
96 * Look up the address of the named function in a shared object.
97 *
98 * This function pointer is no longer valid after calling SDL_UnloadObject().
99 *
100 * This function can only look up C function names. Other languages may have
101 * name mangling and intrinsic language support that varies from compiler to
102 * compiler.
103 *
104 * Make sure you declare your function pointers with the same calling
105 * convention as the actual library function. Your code will crash
106 * mysteriously if you do not do this.
107 *
108 * If the requested function doesn't exist, NULL is returned.
109 *
110 * \param handle a valid shared object handle returned by SDL_LoadObject().
111 * \param name the name of the function to look up.
112 * \returns a pointer to the function or NULL on failure; call SDL_GetError()
113 * for more information.
114 *
115 * \threadsafety It is safe to call this function from any thread.
116 *
117 * \since This function is available since SDL 3.2.0.
118 *
119 * \sa SDL_LoadObject
120 */
121extern SDL_DECLSPEC SDL_FunctionPointer SDLCALL SDL_LoadFunction(SDL_SharedObject *handle, const char *name);
122
123/**
124 * Unload a shared object from memory.
125 *
126 * Note that any pointers from this object looked up through
127 * SDL_LoadFunction() will no longer be valid.
128 *
129 * \param handle a valid shared object handle returned by SDL_LoadObject().
130 *
131 * \threadsafety It is safe to call this function from any thread.
132 *
133 * \since This function is available since SDL 3.2.0.
134 *
135 * \sa SDL_LoadObject
136 */
137extern SDL_DECLSPEC void SDLCALL SDL_UnloadObject(SDL_SharedObject *handle);
138
139/* Ends C function definitions when using C++ */
140#ifdef __cplusplus
141}
142#endif
143#include <SDL3/SDL_close_code.h>
144
145#endif /* SDL_loadso_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_locale.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_locale.h
new file mode 100644
index 0000000..902843e
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_locale.h
@@ -0,0 +1,117 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryLocale
24 *
25 * SDL locale services.
26 *
27 * This provides a way to get a list of preferred locales (language plus
28 * country) for the user. There is exactly one function:
29 * SDL_GetPreferredLocales(), which handles all the heavy lifting, and offers
30 * documentation on all the strange ways humans might have configured their
31 * language settings.
32 */
33
34#ifndef SDL_locale_h
35#define SDL_locale_h
36
37#include <SDL3/SDL_stdinc.h>
38#include <SDL3/SDL_error.h>
39
40#include <SDL3/SDL_begin_code.h>
41/* Set up for C function definitions, even when using C++ */
42#ifdef __cplusplus
43/* *INDENT-OFF* */
44extern "C" {
45/* *INDENT-ON* */
46#endif
47
48/**
49 * A struct to provide locale data.
50 *
51 * Locale data is split into a spoken language, like English, and an optional
52 * country, like Canada. The language will be in ISO-639 format (so English
53 * would be "en"), and the country, if not NULL, will be an ISO-3166 country
54 * code (so Canada would be "CA").
55 *
56 * \since This function is available since SDL 3.2.0.
57 *
58 * \sa SDL_GetPreferredLocales
59 */
60typedef struct SDL_Locale
61{
62 const char *language; /**< A language name, like "en" for English. */
63 const char *country; /**< A country, like "US" for America. Can be NULL. */
64} SDL_Locale;
65
66/**
67 * Report the user's preferred locale.
68 *
69 * Returned language strings are in the format xx, where 'xx' is an ISO-639
70 * language specifier (such as "en" for English, "de" for German, etc).
71 * Country strings are in the format YY, where "YY" is an ISO-3166 country
72 * code (such as "US" for the United States, "CA" for Canada, etc). Country
73 * might be NULL if there's no specific guidance on them (so you might get {
74 * "en", "US" } for American English, but { "en", NULL } means "English
75 * language, generically"). Language strings are never NULL, except to
76 * terminate the array.
77 *
78 * Please note that not all of these strings are 2 characters; some are three
79 * or more.
80 *
81 * The returned list of locales are in the order of the user's preference. For
82 * example, a German citizen that is fluent in US English and knows enough
83 * Japanese to navigate around Tokyo might have a list like: { "de", "en_US",
84 * "jp", NULL }. Someone from England might prefer British English (where
85 * "color" is spelled "colour", etc), but will settle for anything like it: {
86 * "en_GB", "en", NULL }.
87 *
88 * This function returns NULL on error, including when the platform does not
89 * supply this information at all.
90 *
91 * This might be a "slow" call that has to query the operating system. It's
92 * best to ask for this once and save the results. However, this list can
93 * change, usually because the user has changed a system preference outside of
94 * your program; SDL will send an SDL_EVENT_LOCALE_CHANGED event in this case,
95 * if possible, and you can call this function again to get an updated copy of
96 * preferred locales.
97 *
98 * \param count a pointer filled in with the number of locales returned, may
99 * be NULL.
100 * \returns a NULL terminated array of locale pointers, or NULL on failure;
101 * call SDL_GetError() for more information. This is a single
102 * allocation that should be freed with SDL_free() when it is no
103 * longer needed.
104 *
105 * \since This function is available since SDL 3.2.0.
106 */
107extern SDL_DECLSPEC SDL_Locale ** SDLCALL SDL_GetPreferredLocales(int *count);
108
109/* Ends C function definitions when using C++ */
110#ifdef __cplusplus
111/* *INDENT-OFF* */
112}
113/* *INDENT-ON* */
114#endif
115#include <SDL3/SDL_close_code.h>
116
117#endif /* SDL_locale_h */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_log.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_log.h
new file mode 100644
index 0000000..3fd7ec2
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_log.h
@@ -0,0 +1,538 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryLog
24 *
25 * Simple log messages with priorities and categories. A message's
26 * SDL_LogPriority signifies how important the message is. A message's
27 * SDL_LogCategory signifies from what domain it belongs to. Every category
28 * has a minimum priority specified: when a message belongs to that category,
29 * it will only be sent out if it has that minimum priority or higher.
30 *
31 * SDL's own logs are sent below the default priority threshold, so they are
32 * quiet by default.
33 *
34 * You can change the log verbosity programmatically using
35 * SDL_SetLogPriority() or with SDL_SetHint(SDL_HINT_LOGGING, ...), or with
36 * the "SDL_LOGGING" environment variable. This variable is a comma separated
37 * set of category=level tokens that define the default logging levels for SDL
38 * applications.
39 *
40 * The category can be a numeric category, one of "app", "error", "assert",
41 * "system", "audio", "video", "render", "input", "test", or `*` for any
42 * unspecified category.
43 *
44 * The level can be a numeric level, one of "trace", "verbose", "debug",
45 * "info", "warn", "error", "critical", or "quiet" to disable that category.
46 *
47 * You can omit the category if you want to set the logging level for all
48 * categories.
49 *
50 * If this hint isn't set, the default log levels are equivalent to:
51 *
52 * `app=info,assert=warn,test=verbose,*=error`
53 *
54 * Here's where the messages go on different platforms:
55 *
56 * - Windows: debug output stream
57 * - Android: log output
58 * - Others: standard error output (stderr)
59 *
60 * You don't need to have a newline (`\n`) on the end of messages, the
61 * functions will do that for you. For consistent behavior cross-platform, you
62 * shouldn't have any newlines in messages, such as to log multiple lines in
63 * one call; unusual platform-specific behavior can be observed in such usage.
64 * Do one log call per line instead, with no newlines in messages.
65 *
66 * Each log call is atomic, so you won't see log messages cut off one another
67 * when logging from multiple threads.
68 */
69
70#ifndef SDL_log_h_
71#define SDL_log_h_
72
73#include <SDL3/SDL_stdinc.h>
74
75#include <SDL3/SDL_begin_code.h>
76/* Set up for C function definitions, even when using C++ */
77#ifdef __cplusplus
78extern "C" {
79#endif
80
81/**
82 * The predefined log categories
83 *
84 * By default the application and gpu categories are enabled at the INFO
85 * level, the assert category is enabled at the WARN level, test is enabled at
86 * the VERBOSE level and all other categories are enabled at the ERROR level.
87 *
88 * \since This enum is available since SDL 3.2.0.
89 */
90typedef enum SDL_LogCategory
91{
92 SDL_LOG_CATEGORY_APPLICATION,
93 SDL_LOG_CATEGORY_ERROR,
94 SDL_LOG_CATEGORY_ASSERT,
95 SDL_LOG_CATEGORY_SYSTEM,
96 SDL_LOG_CATEGORY_AUDIO,
97 SDL_LOG_CATEGORY_VIDEO,
98 SDL_LOG_CATEGORY_RENDER,
99 SDL_LOG_CATEGORY_INPUT,
100 SDL_LOG_CATEGORY_TEST,
101 SDL_LOG_CATEGORY_GPU,
102
103 /* Reserved for future SDL library use */
104 SDL_LOG_CATEGORY_RESERVED2,
105 SDL_LOG_CATEGORY_RESERVED3,
106 SDL_LOG_CATEGORY_RESERVED4,
107 SDL_LOG_CATEGORY_RESERVED5,
108 SDL_LOG_CATEGORY_RESERVED6,
109 SDL_LOG_CATEGORY_RESERVED7,
110 SDL_LOG_CATEGORY_RESERVED8,
111 SDL_LOG_CATEGORY_RESERVED9,
112 SDL_LOG_CATEGORY_RESERVED10,
113
114 /* Beyond this point is reserved for application use, e.g.
115 enum {
116 MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,
117 MYAPP_CATEGORY_AWESOME2,
118 MYAPP_CATEGORY_AWESOME3,
119 ...
120 };
121 */
122 SDL_LOG_CATEGORY_CUSTOM
123} SDL_LogCategory;
124
125/**
126 * The predefined log priorities
127 *
128 * \since This enum is available since SDL 3.2.0.
129 */
130typedef enum SDL_LogPriority
131{
132 SDL_LOG_PRIORITY_INVALID,
133 SDL_LOG_PRIORITY_TRACE,
134 SDL_LOG_PRIORITY_VERBOSE,
135 SDL_LOG_PRIORITY_DEBUG,
136 SDL_LOG_PRIORITY_INFO,
137 SDL_LOG_PRIORITY_WARN,
138 SDL_LOG_PRIORITY_ERROR,
139 SDL_LOG_PRIORITY_CRITICAL,
140 SDL_LOG_PRIORITY_COUNT
141} SDL_LogPriority;
142
143
144/**
145 * Set the priority of all log categories.
146 *
147 * \param priority the SDL_LogPriority to assign.
148 *
149 * \threadsafety It is safe to call this function from any thread.
150 *
151 * \since This function is available since SDL 3.2.0.
152 *
153 * \sa SDL_ResetLogPriorities
154 * \sa SDL_SetLogPriority
155 */
156extern SDL_DECLSPEC void SDLCALL SDL_SetLogPriorities(SDL_LogPriority priority);
157
158/**
159 * Set the priority of a particular log category.
160 *
161 * \param category the category to assign a priority to.
162 * \param priority the SDL_LogPriority to assign.
163 *
164 * \threadsafety It is safe to call this function from any thread.
165 *
166 * \since This function is available since SDL 3.2.0.
167 *
168 * \sa SDL_GetLogPriority
169 * \sa SDL_ResetLogPriorities
170 * \sa SDL_SetLogPriorities
171 */
172extern SDL_DECLSPEC void SDLCALL SDL_SetLogPriority(int category, SDL_LogPriority priority);
173
174/**
175 * Get the priority of a particular log category.
176 *
177 * \param category the category to query.
178 * \returns the SDL_LogPriority for the requested category.
179 *
180 * \threadsafety It is safe to call this function from any thread.
181 *
182 * \since This function is available since SDL 3.2.0.
183 *
184 * \sa SDL_SetLogPriority
185 */
186extern SDL_DECLSPEC SDL_LogPriority SDLCALL SDL_GetLogPriority(int category);
187
188/**
189 * Reset all priorities to default.
190 *
191 * This is called by SDL_Quit().
192 *
193 * \threadsafety It is safe to call this function from any thread.
194 *
195 * \since This function is available since SDL 3.2.0.
196 *
197 * \sa SDL_SetLogPriorities
198 * \sa SDL_SetLogPriority
199 */
200extern SDL_DECLSPEC void SDLCALL SDL_ResetLogPriorities(void);
201
202/**
203 * Set the text prepended to log messages of a given priority.
204 *
205 * By default SDL_LOG_PRIORITY_INFO and below have no prefix, and
206 * SDL_LOG_PRIORITY_WARN and higher have a prefix showing their priority, e.g.
207 * "WARNING: ".
208 *
209 * \param priority the SDL_LogPriority to modify.
210 * \param prefix the prefix to use for that log priority, or NULL to use no
211 * prefix.
212 * \returns true on success or false on failure; call SDL_GetError() for more
213 * information.
214 *
215 * \threadsafety It is safe to call this function from any thread.
216 *
217 * \since This function is available since SDL 3.2.0.
218 *
219 * \sa SDL_SetLogPriorities
220 * \sa SDL_SetLogPriority
221 */
222extern SDL_DECLSPEC bool SDLCALL SDL_SetLogPriorityPrefix(SDL_LogPriority priority, const char *prefix);
223
224/**
225 * Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.
226 *
227 * \param fmt a printf() style message format string.
228 * \param ... additional parameters matching % tokens in the `fmt` string, if
229 * any.
230 *
231 * \threadsafety It is safe to call this function from any thread.
232 *
233 * \since This function is available since SDL 3.2.0.
234 *
235 * \sa SDL_LogCritical
236 * \sa SDL_LogDebug
237 * \sa SDL_LogError
238 * \sa SDL_LogInfo
239 * \sa SDL_LogMessage
240 * \sa SDL_LogMessageV
241 * \sa SDL_LogTrace
242 * \sa SDL_LogVerbose
243 * \sa SDL_LogWarn
244 */
245extern SDL_DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
246
247/**
248 * Log a message with SDL_LOG_PRIORITY_TRACE.
249 *
250 * \param category the category of the message.
251 * \param fmt a printf() style message format string.
252 * \param ... additional parameters matching % tokens in the **fmt** string,
253 * if any.
254 *
255 * \threadsafety It is safe to call this function from any thread.
256 *
257 * \since This function is available since SDL 3.2.0.
258 *
259 * \sa SDL_Log
260 * \sa SDL_LogCritical
261 * \sa SDL_LogDebug
262 * \sa SDL_LogError
263 * \sa SDL_LogInfo
264 * \sa SDL_LogMessage
265 * \sa SDL_LogMessageV
266 * \sa SDL_LogTrace
267 * \sa SDL_LogVerbose
268 * \sa SDL_LogWarn
269 */
270extern SDL_DECLSPEC void SDLCALL SDL_LogTrace(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
271
272/**
273 * Log a message with SDL_LOG_PRIORITY_VERBOSE.
274 *
275 * \param category the category of the message.
276 * \param fmt a printf() style message format string.
277 * \param ... additional parameters matching % tokens in the **fmt** string,
278 * if any.
279 *
280 * \threadsafety It is safe to call this function from any thread.
281 *
282 * \since This function is available since SDL 3.2.0.
283 *
284 * \sa SDL_Log
285 * \sa SDL_LogCritical
286 * \sa SDL_LogDebug
287 * \sa SDL_LogError
288 * \sa SDL_LogInfo
289 * \sa SDL_LogMessage
290 * \sa SDL_LogMessageV
291 * \sa SDL_LogWarn
292 */
293extern SDL_DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
294
295/**
296 * Log a message with SDL_LOG_PRIORITY_DEBUG.
297 *
298 * \param category the category of the message.
299 * \param fmt a printf() style message format string.
300 * \param ... additional parameters matching % tokens in the **fmt** string,
301 * if any.
302 *
303 * \threadsafety It is safe to call this function from any thread.
304 *
305 * \since This function is available since SDL 3.2.0.
306 *
307 * \sa SDL_Log
308 * \sa SDL_LogCritical
309 * \sa SDL_LogError
310 * \sa SDL_LogInfo
311 * \sa SDL_LogMessage
312 * \sa SDL_LogMessageV
313 * \sa SDL_LogTrace
314 * \sa SDL_LogVerbose
315 * \sa SDL_LogWarn
316 */
317extern SDL_DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
318
319/**
320 * Log a message with SDL_LOG_PRIORITY_INFO.
321 *
322 * \param category the category of the message.
323 * \param fmt a printf() style message format string.
324 * \param ... additional parameters matching % tokens in the **fmt** string,
325 * if any.
326 *
327 * \threadsafety It is safe to call this function from any thread.
328 *
329 * \since This function is available since SDL 3.2.0.
330 *
331 * \sa SDL_Log
332 * \sa SDL_LogCritical
333 * \sa SDL_LogDebug
334 * \sa SDL_LogError
335 * \sa SDL_LogMessage
336 * \sa SDL_LogMessageV
337 * \sa SDL_LogTrace
338 * \sa SDL_LogVerbose
339 * \sa SDL_LogWarn
340 */
341extern SDL_DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
342
343/**
344 * Log a message with SDL_LOG_PRIORITY_WARN.
345 *
346 * \param category the category of the message.
347 * \param fmt a printf() style message format string.
348 * \param ... additional parameters matching % tokens in the **fmt** string,
349 * if any.
350 *
351 * \threadsafety It is safe to call this function from any thread.
352 *
353 * \since This function is available since SDL 3.2.0.
354 *
355 * \sa SDL_Log
356 * \sa SDL_LogCritical
357 * \sa SDL_LogDebug
358 * \sa SDL_LogError
359 * \sa SDL_LogInfo
360 * \sa SDL_LogMessage
361 * \sa SDL_LogMessageV
362 * \sa SDL_LogTrace
363 * \sa SDL_LogVerbose
364 */
365extern SDL_DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
366
367/**
368 * Log a message with SDL_LOG_PRIORITY_ERROR.
369 *
370 * \param category the category of the message.
371 * \param fmt a printf() style message format string.
372 * \param ... additional parameters matching % tokens in the **fmt** string,
373 * if any.
374 *
375 * \threadsafety It is safe to call this function from any thread.
376 *
377 * \since This function is available since SDL 3.2.0.
378 *
379 * \sa SDL_Log
380 * \sa SDL_LogCritical
381 * \sa SDL_LogDebug
382 * \sa SDL_LogInfo
383 * \sa SDL_LogMessage
384 * \sa SDL_LogMessageV
385 * \sa SDL_LogTrace
386 * \sa SDL_LogVerbose
387 * \sa SDL_LogWarn
388 */
389extern SDL_DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
390
391/**
392 * Log a message with SDL_LOG_PRIORITY_CRITICAL.
393 *
394 * \param category the category of the message.
395 * \param fmt a printf() style message format string.
396 * \param ... additional parameters matching % tokens in the **fmt** string,
397 * if any.
398 *
399 * \threadsafety It is safe to call this function from any thread.
400 *
401 * \since This function is available since SDL 3.2.0.
402 *
403 * \sa SDL_Log
404 * \sa SDL_LogDebug
405 * \sa SDL_LogError
406 * \sa SDL_LogInfo
407 * \sa SDL_LogMessage
408 * \sa SDL_LogMessageV
409 * \sa SDL_LogTrace
410 * \sa SDL_LogVerbose
411 * \sa SDL_LogWarn
412 */
413extern SDL_DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
414
415/**
416 * Log a message with the specified category and priority.
417 *
418 * \param category the category of the message.
419 * \param priority the priority of the message.
420 * \param fmt a printf() style message format string.
421 * \param ... additional parameters matching % tokens in the **fmt** string,
422 * if any.
423 *
424 * \threadsafety It is safe to call this function from any thread.
425 *
426 * \since This function is available since SDL 3.2.0.
427 *
428 * \sa SDL_Log
429 * \sa SDL_LogCritical
430 * \sa SDL_LogDebug
431 * \sa SDL_LogError
432 * \sa SDL_LogInfo
433 * \sa SDL_LogMessageV
434 * \sa SDL_LogTrace
435 * \sa SDL_LogVerbose
436 * \sa SDL_LogWarn
437 */
438extern SDL_DECLSPEC void SDLCALL SDL_LogMessage(int category,
439 SDL_LogPriority priority,
440 SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);
441
442/**
443 * Log a message with the specified category and priority.
444 *
445 * \param category the category of the message.
446 * \param priority the priority of the message.
447 * \param fmt a printf() style message format string.
448 * \param ap a variable argument list.
449 *
450 * \threadsafety It is safe to call this function from any thread.
451 *
452 * \since This function is available since SDL 3.2.0.
453 *
454 * \sa SDL_Log
455 * \sa SDL_LogCritical
456 * \sa SDL_LogDebug
457 * \sa SDL_LogError
458 * \sa SDL_LogInfo
459 * \sa SDL_LogMessage
460 * \sa SDL_LogTrace
461 * \sa SDL_LogVerbose
462 * \sa SDL_LogWarn
463 */
464extern SDL_DECLSPEC void SDLCALL SDL_LogMessageV(int category,
465 SDL_LogPriority priority,
466 SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(3);
467
468/**
469 * The prototype for the log output callback function.
470 *
471 * This function is called by SDL when there is new text to be logged. A mutex
472 * is held so that this function is never called by more than one thread at
473 * once.
474 *
475 * \param userdata what was passed as `userdata` to
476 * SDL_SetLogOutputFunction().
477 * \param category the category of the message.
478 * \param priority the priority of the message.
479 * \param message the message being output.
480 *
481 * \since This datatype is available since SDL 3.2.0.
482 */
483typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
484
485/**
486 * Get the default log output function.
487 *
488 * \returns the default log output callback.
489 *
490 * \threadsafety It is safe to call this function from any thread.
491 *
492 * \since This function is available since SDL 3.2.0.
493 *
494 * \sa SDL_SetLogOutputFunction
495 * \sa SDL_GetLogOutputFunction
496 */
497extern SDL_DECLSPEC SDL_LogOutputFunction SDLCALL SDL_GetDefaultLogOutputFunction(void);
498
499/**
500 * Get the current log output function.
501 *
502 * \param callback an SDL_LogOutputFunction filled in with the current log
503 * callback.
504 * \param userdata a pointer filled in with the pointer that is passed to
505 * `callback`.
506 *
507 * \threadsafety It is safe to call this function from any thread.
508 *
509 * \since This function is available since SDL 3.2.0.
510 *
511 * \sa SDL_GetDefaultLogOutputFunction
512 * \sa SDL_SetLogOutputFunction
513 */
514extern SDL_DECLSPEC void SDLCALL SDL_GetLogOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
515
516/**
517 * Replace the default log output function with one of your own.
518 *
519 * \param callback an SDL_LogOutputFunction to call instead of the default.
520 * \param userdata a pointer that is passed to `callback`.
521 *
522 * \threadsafety It is safe to call this function from any thread.
523 *
524 * \since This function is available since SDL 3.2.0.
525 *
526 * \sa SDL_GetDefaultLogOutputFunction
527 * \sa SDL_GetLogOutputFunction
528 */
529extern SDL_DECLSPEC void SDLCALL SDL_SetLogOutputFunction(SDL_LogOutputFunction callback, void *userdata);
530
531
532/* Ends C function definitions when using C++ */
533#ifdef __cplusplus
534}
535#endif
536#include <SDL3/SDL_close_code.h>
537
538#endif /* SDL_log_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_main.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_main.h
new file mode 100644
index 0000000..905d78e
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_main.h
@@ -0,0 +1,675 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryMain
24 *
25 * Redefine main() if necessary so that it is called by SDL.
26 *
27 * In order to make this consistent on all platforms, the application's main()
28 * should look like this:
29 *
30 * ```c
31 * #include <SDL3/SDL.h>
32 * #include <SDL3/SDL_main.h>
33 *
34 * int main(int argc, char *argv[])
35 * {
36 * }
37 * ```
38 *
39 * SDL will take care of platform specific details on how it gets called.
40 *
41 * This is also where an app can be configured to use the main callbacks, via
42 * the SDL_MAIN_USE_CALLBACKS macro.
43 *
44 * SDL_main.h is a "single-header library," which is to say that including
45 * this header inserts code into your program, and you should only include it
46 * once in most cases. SDL.h does not include this header automatically.
47 *
48 * For more information, see:
49 *
50 * https://wiki.libsdl.org/SDL3/README/main-functions
51 */
52
53#ifndef SDL_main_h_
54#define SDL_main_h_
55
56#include <SDL3/SDL_platform_defines.h>
57#include <SDL3/SDL_stdinc.h>
58#include <SDL3/SDL_error.h>
59#include <SDL3/SDL_events.h>
60
61#ifdef SDL_WIKI_DOCUMENTATION_SECTION
62
63/**
64 * Inform SDL that the app is providing an entry point instead of SDL.
65 *
66 * SDL does not define this macro, but will check if it is defined when
67 * including `SDL_main.h`. If defined, SDL will expect the app to provide the
68 * proper entry point for the platform, and all the other magic details
69 * needed, like manually calling SDL_SetMainReady.
70 *
71 * Please see [README/main-functions](README/main-functions), (or
72 * docs/README-main-functions.md in the source tree) for a more detailed
73 * explanation.
74 *
75 * \since This macro is used by the headers since SDL 3.2.0.
76 */
77#define SDL_MAIN_HANDLED 1
78
79/**
80 * Inform SDL to use the main callbacks instead of main.
81 *
82 * SDL does not define this macro, but will check if it is defined when
83 * including `SDL_main.h`. If defined, SDL will expect the app to provide
84 * several functions: SDL_AppInit, SDL_AppEvent, SDL_AppIterate, and
85 * SDL_AppQuit. The app should not provide a `main` function in this case, and
86 * doing so will likely cause the build to fail.
87 *
88 * Please see [README/main-functions](README/main-functions), (or
89 * docs/README-main-functions.md in the source tree) for a more detailed
90 * explanation.
91 *
92 * \since This macro is used by the headers since SDL 3.2.0.
93 *
94 * \sa SDL_AppInit
95 * \sa SDL_AppEvent
96 * \sa SDL_AppIterate
97 * \sa SDL_AppQuit
98 */
99#define SDL_MAIN_USE_CALLBACKS 1
100
101/**
102 * Defined if the target platform offers a special mainline through SDL.
103 *
104 * This won't be defined otherwise. If defined, SDL's headers will redefine
105 * `main` to `SDL_main`.
106 *
107 * This macro is defined by `SDL_main.h`, which is not automatically included
108 * by `SDL.h`.
109 *
110 * Even if available, an app can define SDL_MAIN_HANDLED and provide their
111 * own, if they know what they're doing.
112 *
113 * This macro is used internally by SDL, and apps probably shouldn't rely on it.
114 *
115 * \since This macro is available since SDL 3.2.0.
116 */
117#define SDL_MAIN_AVAILABLE
118
119/**
120 * Defined if the target platform _requires_ a special mainline through SDL.
121 *
122 * This won't be defined otherwise. If defined, SDL's headers will redefine
123 * `main` to `SDL_main`.
124 *
125 * This macro is defined by `SDL_main.h`, which is not automatically included
126 * by `SDL.h`.
127 *
128 * Even if required, an app can define SDL_MAIN_HANDLED and provide their
129 * own, if they know what they're doing.
130 *
131 * This macro is used internally by SDL, and apps probably shouldn't rely on it.
132 *
133 * \since This macro is available since SDL 3.2.0.
134 */
135#define SDL_MAIN_NEEDED
136
137#endif
138
139#if defined(__has_include)
140 #if __has_include("SDL_main_private.h") && __has_include("SDL_main_impl_private.h")
141 #define SDL_PLATFORM_PRIVATE_MAIN
142 #endif
143#endif
144
145#ifndef SDL_MAIN_HANDLED
146 #if defined(SDL_PLATFORM_PRIVATE_MAIN)
147 /* Private platforms may have their own ideas about entry points. */
148 #include "SDL_main_private.h"
149
150 #elif defined(SDL_PLATFORM_WIN32)
151 /* On Windows SDL provides WinMain(), which parses the command line and passes
152 the arguments to your main function.
153
154 If you provide your own WinMain(), you may define SDL_MAIN_HANDLED
155 */
156 #define SDL_MAIN_AVAILABLE
157
158 #elif defined(SDL_PLATFORM_GDK)
159 /* On GDK, SDL provides a main function that initializes the game runtime.
160
161 If you prefer to write your own WinMain-function instead of having SDL
162 provide one that calls your main() function,
163 #define SDL_MAIN_HANDLED before #include'ing SDL_main.h
164 and call the SDL_RunApp function from your entry point.
165 */
166 #define SDL_MAIN_NEEDED
167
168 #elif defined(SDL_PLATFORM_IOS)
169 /* On iOS SDL provides a main function that creates an application delegate
170 and starts the iOS application run loop.
171
172 To use it, just #include SDL_main.h in the source file that contains your
173 main() function.
174
175 See src/video/uikit/SDL_uikitappdelegate.m for more details.
176 */
177 #define SDL_MAIN_NEEDED
178
179 #elif defined(SDL_PLATFORM_ANDROID)
180 /* On Android SDL provides a Java class in SDLActivity.java that is the
181 main activity entry point.
182
183 See docs/README-android.md for more details on extending that class.
184 */
185 #define SDL_MAIN_NEEDED
186
187 /* As this is launched from Java, the real entry point (main() function)
188 is outside of the the binary built from this code.
189 This define makes sure that, unlike on other platforms, SDL_main.h
190 and SDL_main_impl.h export an `SDL_main()` function (to be called
191 from Java), but don't implement a native `int main(int argc, char* argv[])`
192 or similar.
193 */
194 #define SDL_MAIN_EXPORTED
195
196 #elif defined(SDL_PLATFORM_EMSCRIPTEN)
197 /* On Emscripten, SDL provides a main function that converts URL
198 parameters that start with "SDL_" to environment variables, so
199 they can be used as SDL hints, etc.
200
201 This is 100% optional, so if you don't want this to happen, you may
202 define SDL_MAIN_HANDLED
203 */
204 #define SDL_MAIN_AVAILABLE
205
206 #elif defined(SDL_PLATFORM_PSP)
207 /* On PSP SDL provides a main function that sets the module info,
208 activates the GPU and starts the thread required to be able to exit
209 the software.
210
211 If you provide this yourself, you may define SDL_MAIN_HANDLED
212 */
213 #define SDL_MAIN_AVAILABLE
214
215 #elif defined(SDL_PLATFORM_PS2)
216 #define SDL_MAIN_AVAILABLE
217
218 #define SDL_PS2_SKIP_IOP_RESET() \
219 void reset_IOP(); \
220 void reset_IOP() {}
221
222 #elif defined(SDL_PLATFORM_3DS)
223 /*
224 On N3DS, SDL provides a main function that sets up the screens
225 and storage.
226
227 If you provide this yourself, you may define SDL_MAIN_HANDLED
228 */
229 #define SDL_MAIN_AVAILABLE
230
231 #endif
232#endif /* SDL_MAIN_HANDLED */
233
234
235#ifdef SDL_WIKI_DOCUMENTATION_SECTION
236
237/**
238 * A macro to tag a main entry point function as exported.
239 *
240 * Most platforms don't need this, and the macro will be defined to nothing.
241 * Some, like Android, keep the entry points in a shared library and need to
242 * explicitly export the symbols.
243 *
244 * External code rarely needs this, and if it needs something, it's almost
245 * always SDL_DECLSPEC instead.
246 *
247 * \since This macro is available since SDL 3.2.0.
248 *
249 * \sa SDL_DECLSPEC
250 */
251#define SDLMAIN_DECLSPEC
252
253#elif defined(SDL_MAIN_EXPORTED)
254/* We need to export SDL_main so it can be launched from external code,
255 like SDLActivity.java on Android */
256#define SDLMAIN_DECLSPEC SDL_DECLSPEC
257#else
258/* usually this is empty */
259#define SDLMAIN_DECLSPEC
260#endif /* SDL_MAIN_EXPORTED */
261
262#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) || defined(SDL_MAIN_USE_CALLBACKS)
263#define main SDL_main
264#endif
265
266#include <SDL3/SDL_init.h>
267#include <SDL3/SDL_begin_code.h>
268#ifdef __cplusplus
269extern "C" {
270#endif
271
272/*
273 * You can (optionally!) define SDL_MAIN_USE_CALLBACKS before including
274 * SDL_main.h, and then your application will _not_ have a standard
275 * "main" entry point. Instead, it will operate as a collection of
276 * functions that are called as necessary by the system. On some
277 * platforms, this is just a layer where SDL drives your program
278 * instead of your program driving SDL, on other platforms this might
279 * hook into the OS to manage the lifecycle. Programs on most platforms
280 * can use whichever approach they prefer, but the decision boils down
281 * to:
282 *
283 * - Using a standard "main" function: this works like it always has for
284 * the past 50+ years in C programming, and your app is in control.
285 * - Using the callback functions: this might clean up some code,
286 * avoid some #ifdef blocks in your program for some platforms, be more
287 * resource-friendly to the system, and possibly be the primary way to
288 * access some future platforms (but none require this at the moment).
289 *
290 * This is up to the app; both approaches are considered valid and supported
291 * ways to write SDL apps.
292 *
293 * If using the callbacks, don't define a "main" function. Instead, implement
294 * the functions listed below in your program.
295 */
296#ifdef SDL_MAIN_USE_CALLBACKS
297
298/**
299 * App-implemented initial entry point for SDL_MAIN_USE_CALLBACKS apps.
300 *
301 * Apps implement this function when using SDL_MAIN_USE_CALLBACKS. If using a
302 * standard "main" function, you should not supply this.
303 *
304 * This function is called by SDL once, at startup. The function should
305 * initialize whatever is necessary, possibly create windows and open audio
306 * devices, etc. The `argc` and `argv` parameters work like they would with a
307 * standard "main" function.
308 *
309 * This function should not go into an infinite mainloop; it should do any
310 * one-time setup it requires and then return.
311 *
312 * The app may optionally assign a pointer to `*appstate`. This pointer will
313 * be provided on every future call to the other entry points, to allow
314 * application state to be preserved between functions without the app needing
315 * to use a global variable. If this isn't set, the pointer will be NULL in
316 * future entry points.
317 *
318 * If this function returns SDL_APP_CONTINUE, the app will proceed to normal
319 * operation, and will begin receiving repeated calls to SDL_AppIterate and
320 * SDL_AppEvent for the life of the program. If this function returns
321 * SDL_APP_FAILURE, SDL will call SDL_AppQuit and terminate the process with
322 * an exit code that reports an error to the platform. If it returns
323 * SDL_APP_SUCCESS, SDL calls SDL_AppQuit and terminates with an exit code
324 * that reports success to the platform.
325 *
326 * This function is called by SDL on the main thread.
327 *
328 * \param appstate a place where the app can optionally store a pointer for
329 * future use.
330 * \param argc the standard ANSI C main's argc; number of elements in `argv`.
331 * \param argv the standard ANSI C main's argv; array of command line
332 * arguments.
333 * \returns SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to
334 * terminate with success, SDL_APP_CONTINUE to continue.
335 *
336 * \since This function is available since SDL 3.2.0.
337 *
338 * \sa SDL_AppIterate
339 * \sa SDL_AppEvent
340 * \sa SDL_AppQuit
341 */
342extern SDLMAIN_DECLSPEC SDL_AppResult SDLCALL SDL_AppInit(void **appstate, int argc, char *argv[]);
343
344/**
345 * App-implemented iteration entry point for SDL_MAIN_USE_CALLBACKS apps.
346 *
347 * Apps implement this function when using SDL_MAIN_USE_CALLBACKS. If using a
348 * standard "main" function, you should not supply this.
349 *
350 * This function is called repeatedly by SDL after SDL_AppInit returns 0. The
351 * function should operate as a single iteration the program's primary loop;
352 * it should update whatever state it needs and draw a new frame of video,
353 * usually.
354 *
355 * On some platforms, this function will be called at the refresh rate of the
356 * display (which might change during the life of your app!). There are no
357 * promises made about what frequency this function might run at. You should
358 * use SDL's timer functions if you need to see how much time has passed since
359 * the last iteration.
360 *
361 * There is no need to process the SDL event queue during this function; SDL
362 * will send events as they arrive in SDL_AppEvent, and in most cases the
363 * event queue will be empty when this function runs anyhow.
364 *
365 * This function should not go into an infinite mainloop; it should do one
366 * iteration of whatever the program does and return.
367 *
368 * The `appstate` parameter is an optional pointer provided by the app during
369 * SDL_AppInit(). If the app never provided a pointer, this will be NULL.
370 *
371 * If this function returns SDL_APP_CONTINUE, the app will continue normal
372 * operation, receiving repeated calls to SDL_AppIterate and SDL_AppEvent for
373 * the life of the program. If this function returns SDL_APP_FAILURE, SDL will
374 * call SDL_AppQuit and terminate the process with an exit code that reports
375 * an error to the platform. If it returns SDL_APP_SUCCESS, SDL calls
376 * SDL_AppQuit and terminates with an exit code that reports success to the
377 * platform.
378 *
379 * This function is called by SDL on the main thread.
380 *
381 * \param appstate an optional pointer, provided by the app in SDL_AppInit.
382 * \returns SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to
383 * terminate with success, SDL_APP_CONTINUE to continue.
384 *
385 * \threadsafety This function may get called concurrently with SDL_AppEvent()
386 * for events not pushed on the main thread.
387 *
388 * \since This function is available since SDL 3.2.0.
389 *
390 * \sa SDL_AppInit
391 * \sa SDL_AppEvent
392 */
393extern SDLMAIN_DECLSPEC SDL_AppResult SDLCALL SDL_AppIterate(void *appstate);
394
395/**
396 * App-implemented event entry point for SDL_MAIN_USE_CALLBACKS apps.
397 *
398 * Apps implement this function when using SDL_MAIN_USE_CALLBACKS. If using a
399 * standard "main" function, you should not supply this.
400 *
401 * This function is called as needed by SDL after SDL_AppInit returns
402 * SDL_APP_CONTINUE. It is called once for each new event.
403 *
404 * There is (currently) no guarantee about what thread this will be called
405 * from; whatever thread pushes an event onto SDL's queue will trigger this
406 * function. SDL is responsible for pumping the event queue between each call
407 * to SDL_AppIterate, so in normal operation one should only get events in a
408 * serial fashion, but be careful if you have a thread that explicitly calls
409 * SDL_PushEvent. SDL itself will push events to the queue on the main thread.
410 *
411 * Events sent to this function are not owned by the app; if you need to save
412 * the data, you should copy it.
413 *
414 * This function should not go into an infinite mainloop; it should handle the
415 * provided event appropriately and return.
416 *
417 * The `appstate` parameter is an optional pointer provided by the app during
418 * SDL_AppInit(). If the app never provided a pointer, this will be NULL.
419 *
420 * If this function returns SDL_APP_CONTINUE, the app will continue normal
421 * operation, receiving repeated calls to SDL_AppIterate and SDL_AppEvent for
422 * the life of the program. If this function returns SDL_APP_FAILURE, SDL will
423 * call SDL_AppQuit and terminate the process with an exit code that reports
424 * an error to the platform. If it returns SDL_APP_SUCCESS, SDL calls
425 * SDL_AppQuit and terminates with an exit code that reports success to the
426 * platform.
427 *
428 * \param appstate an optional pointer, provided by the app in SDL_AppInit.
429 * \param event the new event for the app to examine.
430 * \returns SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to
431 * terminate with success, SDL_APP_CONTINUE to continue.
432 *
433 * \threadsafety This function may get called concurrently with
434 * SDL_AppIterate() or SDL_AppQuit() for events not pushed from
435 * the main thread.
436 *
437 * \since This function is available since SDL 3.2.0.
438 *
439 * \sa SDL_AppInit
440 * \sa SDL_AppIterate
441 */
442extern SDLMAIN_DECLSPEC SDL_AppResult SDLCALL SDL_AppEvent(void *appstate, SDL_Event *event);
443
444/**
445 * App-implemented deinit entry point for SDL_MAIN_USE_CALLBACKS apps.
446 *
447 * Apps implement this function when using SDL_MAIN_USE_CALLBACKS. If using a
448 * standard "main" function, you should not supply this.
449 *
450 * This function is called once by SDL before terminating the program.
451 *
452 * This function will be called no matter what, even if SDL_AppInit requests
453 * termination.
454 *
455 * This function should not go into an infinite mainloop; it should
456 * deinitialize any resources necessary, perform whatever shutdown activities,
457 * and return.
458 *
459 * You do not need to call SDL_Quit() in this function, as SDL will call it
460 * after this function returns and before the process terminates, but it is
461 * safe to do so.
462 *
463 * The `appstate` parameter is an optional pointer provided by the app during
464 * SDL_AppInit(). If the app never provided a pointer, this will be NULL. This
465 * function call is the last time this pointer will be provided, so any
466 * resources to it should be cleaned up here.
467 *
468 * This function is called by SDL on the main thread.
469 *
470 * \param appstate an optional pointer, provided by the app in SDL_AppInit.
471 * \param result the result code that terminated the app (success or failure).
472 *
473 * \threadsafety SDL_AppEvent() may get called concurrently with this function
474 * if other threads that push events are still active.
475 *
476 * \since This function is available since SDL 3.2.0.
477 *
478 * \sa SDL_AppInit
479 */
480extern SDLMAIN_DECLSPEC void SDLCALL SDL_AppQuit(void *appstate, SDL_AppResult result);
481
482#endif /* SDL_MAIN_USE_CALLBACKS */
483
484
485/**
486 * The prototype for the application's main() function
487 *
488 * \param argc an ANSI-C style main function's argc.
489 * \param argv an ANSI-C style main function's argv.
490 * \returns an ANSI-C main return code; generally 0 is considered successful
491 * program completion, and small non-zero values are considered
492 * errors.
493 *
494 * \since This datatype is available since SDL 3.2.0.
495 */
496typedef int (SDLCALL *SDL_main_func)(int argc, char *argv[]);
497
498/**
499 * An app-supplied function for program entry.
500 *
501 * Apps do not directly create this function; they should create a standard
502 * ANSI-C `main` function instead. If SDL needs to insert some startup code
503 * before `main` runs, or the platform doesn't actually _use_ a function
504 * called "main", SDL will do some macro magic to redefine `main` to
505 * `SDL_main` and provide its own `main`.
506 *
507 * Apps should include `SDL_main.h` in the same file as their `main` function,
508 * and they should not use that symbol for anything else in that file, as it
509 * might get redefined.
510 *
511 * This function is only provided by the app if it isn't using
512 * SDL_MAIN_USE_CALLBACKS.
513 *
514 * Program startup is a surprisingly complex topic. Please see
515 * [README/main-functions](README/main-functions), (or
516 * docs/README-main-functions.md in the source tree) for a more detailed
517 * explanation.
518 *
519 * \param argc an ANSI-C style main function's argc.
520 * \param argv an ANSI-C style main function's argv.
521 * \returns an ANSI-C main return code; generally 0 is considered successful
522 * program completion, and small non-zero values are considered
523 * errors.
524 *
525 * \threadsafety This is the program entry point.
526 *
527 * \since This function is available since SDL 3.2.0.
528 */
529extern SDLMAIN_DECLSPEC int SDLCALL SDL_main(int argc, char *argv[]);
530
531/**
532 * Circumvent failure of SDL_Init() when not using SDL_main() as an entry
533 * point.
534 *
535 * This function is defined in SDL_main.h, along with the preprocessor rule to
536 * redefine main() as SDL_main(). Thus to ensure that your main() function
537 * will not be changed it is necessary to define SDL_MAIN_HANDLED before
538 * including SDL.h.
539 *
540 * \since This function is available since SDL 3.2.0.
541 *
542 * \sa SDL_Init
543 */
544extern SDL_DECLSPEC void SDLCALL SDL_SetMainReady(void);
545
546/**
547 * Initializes and launches an SDL application, by doing platform-specific
548 * initialization before calling your mainFunction and cleanups after it
549 * returns, if that is needed for a specific platform, otherwise it just calls
550 * mainFunction.
551 *
552 * You can use this if you want to use your own main() implementation without
553 * using SDL_main (like when using SDL_MAIN_HANDLED). When using this, you do
554 * *not* need SDL_SetMainReady().
555 *
556 * \param argc the argc parameter from the application's main() function, or 0
557 * if the platform's main-equivalent has no argc.
558 * \param argv the argv parameter from the application's main() function, or
559 * NULL if the platform's main-equivalent has no argv.
560 * \param mainFunction your SDL app's C-style main(). NOT the function you're
561 * calling this from! Its name doesn't matter; it doesn't
562 * literally have to be `main`.
563 * \param reserved should be NULL (reserved for future use, will probably be
564 * platform-specific then).
565 * \returns the return value from mainFunction: 0 on success, otherwise
566 * failure; SDL_GetError() might have more information on the
567 * failure.
568 *
569 * \threadsafety Generally this is called once, near startup, from the
570 * process's initial thread.
571 *
572 * \since This function is available since SDL 3.2.0.
573 */
574extern SDL_DECLSPEC int SDLCALL SDL_RunApp(int argc, char *argv[], SDL_main_func mainFunction, void *reserved);
575
576/**
577 * An entry point for SDL's use in SDL_MAIN_USE_CALLBACKS.
578 *
579 * Generally, you should not call this function directly. This only exists to
580 * hand off work into SDL as soon as possible, where it has a lot more control
581 * and functionality available, and make the inline code in SDL_main.h as
582 * small as possible.
583 *
584 * Not all platforms use this, it's actual use is hidden in a magic
585 * header-only library, and you should not call this directly unless you
586 * _really_ know what you're doing.
587 *
588 * \param argc standard Unix main argc.
589 * \param argv standard Unix main argv.
590 * \param appinit the application's SDL_AppInit function.
591 * \param appiter the application's SDL_AppIterate function.
592 * \param appevent the application's SDL_AppEvent function.
593 * \param appquit the application's SDL_AppQuit function.
594 * \returns standard Unix main return value.
595 *
596 * \threadsafety It is not safe to call this anywhere except as the only
597 * function call in SDL_main.
598 *
599 * \since This function is available since SDL 3.2.0.
600 */
601extern SDL_DECLSPEC int SDLCALL SDL_EnterAppMainCallbacks(int argc, char *argv[], SDL_AppInit_func appinit, SDL_AppIterate_func appiter, SDL_AppEvent_func appevent, SDL_AppQuit_func appquit);
602
603
604#if defined(SDL_PLATFORM_WINDOWS)
605
606/**
607 * Register a win32 window class for SDL's use.
608 *
609 * This can be called to set the application window class at startup. It is
610 * safe to call this multiple times, as long as every call is eventually
611 * paired with a call to SDL_UnregisterApp, but a second registration attempt
612 * while a previous registration is still active will be ignored, other than
613 * to increment a counter.
614 *
615 * Most applications do not need to, and should not, call this directly; SDL
616 * will call it when initializing the video subsystem.
617 *
618 * \param name the window class name, in UTF-8 encoding. If NULL, SDL
619 * currently uses "SDL_app" but this isn't guaranteed.
620 * \param style the value to use in WNDCLASSEX::style. If `name` is NULL, SDL
621 * currently uses `(CS_BYTEALIGNCLIENT | CS_OWNDC)` regardless of
622 * what is specified here.
623 * \param hInst the HINSTANCE to use in WNDCLASSEX::hInstance. If zero, SDL
624 * will use `GetModuleHandle(NULL)` instead.
625 * \returns true on success or false on failure; call SDL_GetError() for more
626 * information.
627 *
628 * \since This function is available since SDL 3.2.0.
629 */
630extern SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
631
632/**
633 * Deregister the win32 window class from an SDL_RegisterApp call.
634 *
635 * This can be called to undo the effects of SDL_RegisterApp.
636 *
637 * Most applications do not need to, and should not, call this directly; SDL
638 * will call it when deinitializing the video subsystem.
639 *
640 * It is safe to call this multiple times, as long as every call is eventually
641 * paired with a prior call to SDL_RegisterApp. The window class will only be
642 * deregistered when the registration counter in SDL_RegisterApp decrements to
643 * zero through calls to this function.
644 *
645 * \since This function is available since SDL 3.2.0.
646 */
647extern SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
648
649#endif /* defined(SDL_PLATFORM_WINDOWS) */
650
651/**
652 * Callback from the application to let the suspend continue.
653 *
654 * This function is only needed for Xbox GDK support; all other platforms will
655 * do nothing and set an "unsupported" error message.
656 *
657 * \since This function is available since SDL 3.2.0.
658 */
659extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
660
661#ifdef __cplusplus
662}
663#endif
664
665#include <SDL3/SDL_close_code.h>
666
667#if !defined(SDL_MAIN_HANDLED) && !defined(SDL_MAIN_NOIMPL)
668 /* include header-only SDL_main implementations */
669 #if defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE)
670 /* platforms which main (-equivalent) can be implemented in plain C */
671 #include <SDL3/SDL_main_impl.h>
672 #endif
673#endif
674
675#endif /* SDL_main_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_main_impl.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_main_impl.h
new file mode 100644
index 0000000..14ebb42
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_main_impl.h
@@ -0,0 +1,151 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: Main */
23
24#ifndef SDL_main_impl_h_
25#define SDL_main_impl_h_
26
27#ifndef SDL_main_h_
28#error "This header should not be included directly, but only via SDL_main.h!"
29#endif
30
31/* if someone wants to include SDL_main.h but doesn't want the main handing magic,
32 (maybe to call SDL_RegisterApp()) they can #define SDL_MAIN_HANDLED first.
33 SDL_MAIN_NOIMPL is for SDL-internal usage (only affects implementation,
34 not definition of SDL_MAIN_AVAILABLE etc in SDL_main.h) and if the user wants
35 to have the SDL_main implementation (from this header) in another source file
36 than their main() function, for example if SDL_main requires C++
37 and main() is implemented in plain C */
38#if !defined(SDL_MAIN_HANDLED) && !defined(SDL_MAIN_NOIMPL)
39
40 /* the implementations below must be able to use the implement real main(), nothing renamed
41 (the user's main() will be renamed to SDL_main so it can be called from here) */
42 #ifdef main
43 #undef main
44 #endif
45
46 #ifdef SDL_MAIN_USE_CALLBACKS
47
48 #if 0
49 /* currently there are no platforms that _need_ a magic entry point here
50 for callbacks, but if one shows up, implement it here. */
51
52 #else /* use a standard SDL_main, which the app SHOULD NOT ALSO SUPPLY. */
53
54 /* this define makes the normal SDL_main entry point stuff work...we just provide SDL_main() instead of the app. */
55 #define SDL_MAIN_CALLBACK_STANDARD 1
56
57 int SDL_main(int argc, char **argv)
58 {
59 return SDL_EnterAppMainCallbacks(argc, argv, SDL_AppInit, SDL_AppIterate, SDL_AppEvent, SDL_AppQuit);
60 }
61
62 #endif /* platform-specific tests */
63
64 #endif /* SDL_MAIN_USE_CALLBACKS */
65
66
67 /* set up the usual SDL_main stuff if we're not using callbacks or if we are but need the normal entry point,
68 unless the real entry point needs to be somewhere else entirely, like Android where it's in Java code */
69 #if (!defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD)) && !defined(SDL_MAIN_EXPORTED)
70
71 #if defined(SDL_PLATFORM_PRIVATE_MAIN)
72 /* Private platforms may have their own ideas about entry points. */
73 #include "SDL_main_impl_private.h"
74
75 #elif defined(SDL_PLATFORM_WINDOWS)
76
77 /* these defines/typedefs are needed for the WinMain() definition */
78 #ifndef WINAPI
79 #define WINAPI __stdcall
80 #endif
81
82 typedef struct HINSTANCE__ * HINSTANCE;
83 typedef char *LPSTR;
84 typedef wchar_t *PWSTR;
85
86 /* The VC++ compiler needs main/wmain defined, but not for GDK */
87 #if defined(_MSC_VER) && !defined(SDL_PLATFORM_GDK)
88
89 /* This is where execution begins [console apps] */
90 #if defined(UNICODE) && UNICODE
91 int wmain(int argc, wchar_t *wargv[], wchar_t *wenvp)
92 {
93 (void)argc;
94 (void)wargv;
95 (void)wenvp;
96 return SDL_RunApp(0, NULL, SDL_main, NULL);
97 }
98 #else /* ANSI */
99 int main(int argc, char *argv[])
100 {
101 (void)argc;
102 (void)argv;
103 return SDL_RunApp(0, NULL, SDL_main, NULL);
104 }
105 #endif /* UNICODE */
106
107 #endif /* _MSC_VER && ! SDL_PLATFORM_GDK */
108
109 /* This is where execution begins [windowed apps and GDK] */
110
111 #ifdef __cplusplus
112 extern "C" {
113 #endif
114
115 #if defined(UNICODE) && UNICODE
116 int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrev, PWSTR szCmdLine, int sw)
117 #else /* ANSI */
118 int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
119 #endif
120 {
121 (void)hInst;
122 (void)hPrev;
123 (void)szCmdLine;
124 (void)sw;
125 return SDL_RunApp(0, NULL, SDL_main, NULL);
126 }
127
128 #ifdef __cplusplus
129 } /* extern "C" */
130 #endif
131
132 /* end of SDL_PLATFORM_WINDOWS impls */
133
134 #else /* platforms that use a standard main() and just call SDL_RunApp(), like iOS and 3DS */
135 int main(int argc, char *argv[])
136 {
137 return SDL_RunApp(argc, argv, SDL_main, NULL);
138 }
139
140 /* end of impls for standard-conforming platforms */
141
142 #endif /* SDL_PLATFORM_WIN32 etc */
143
144 #endif /* !defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD) */
145
146 /* rename users main() function to SDL_main() so it can be called from the wrappers above */
147 #define main SDL_main
148
149#endif /* SDL_MAIN_HANDLED */
150
151#endif /* SDL_main_impl_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_messagebox.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_messagebox.h
new file mode 100644
index 0000000..365ae36
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_messagebox.h
@@ -0,0 +1,226 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryMessagebox
24 *
25 * SDL offers a simple message box API, which is useful for simple alerts,
26 * such as informing the user when something fatal happens at startup without
27 * the need to build a UI for it (or informing the user _before_ your UI is
28 * ready).
29 *
30 * These message boxes are native system dialogs where possible.
31 *
32 * There is both a customizable function (SDL_ShowMessageBox()) that offers
33 * lots of options for what to display and reports on what choice the user
34 * made, and also a much-simplified version (SDL_ShowSimpleMessageBox()),
35 * merely takes a text message and title, and waits until the user presses a
36 * single "OK" UI button. Often, this is all that is necessary.
37 */
38
39#ifndef SDL_messagebox_h_
40#define SDL_messagebox_h_
41
42#include <SDL3/SDL_stdinc.h>
43#include <SDL3/SDL_error.h>
44#include <SDL3/SDL_video.h> /* For SDL_Window */
45
46#include <SDL3/SDL_begin_code.h>
47/* Set up for C function definitions, even when using C++ */
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52/**
53 * Message box flags.
54 *
55 * If supported will display warning icon, etc.
56 *
57 * \since This datatype is available since SDL 3.2.0.
58 */
59typedef Uint32 SDL_MessageBoxFlags;
60
61#define SDL_MESSAGEBOX_ERROR 0x00000010u /**< error dialog */
62#define SDL_MESSAGEBOX_WARNING 0x00000020u /**< warning dialog */
63#define SDL_MESSAGEBOX_INFORMATION 0x00000040u /**< informational dialog */
64#define SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT 0x00000080u /**< buttons placed left to right */
65#define SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT 0x00000100u /**< buttons placed right to left */
66
67/**
68 * SDL_MessageBoxButtonData flags.
69 *
70 * \since This datatype is available since SDL 3.2.0.
71 */
72typedef Uint32 SDL_MessageBoxButtonFlags;
73
74#define SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT 0x00000001u /**< Marks the default button when return is hit */
75#define SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT 0x00000002u /**< Marks the default button when escape is hit */
76
77/**
78 * Individual button data.
79 *
80 * \since This struct is available since SDL 3.2.0.
81 */
82typedef struct SDL_MessageBoxButtonData
83{
84 SDL_MessageBoxButtonFlags flags;
85 int buttonID; /**< User defined button id (value returned via SDL_ShowMessageBox) */
86 const char *text; /**< The UTF-8 button text */
87} SDL_MessageBoxButtonData;
88
89/**
90 * RGB value used in a message box color scheme
91 *
92 * \since This struct is available since SDL 3.2.0.
93 */
94typedef struct SDL_MessageBoxColor
95{
96 Uint8 r, g, b;
97} SDL_MessageBoxColor;
98
99/**
100 * An enumeration of indices inside the colors array of
101 * SDL_MessageBoxColorScheme.
102 */
103typedef enum SDL_MessageBoxColorType
104{
105 SDL_MESSAGEBOX_COLOR_BACKGROUND,
106 SDL_MESSAGEBOX_COLOR_TEXT,
107 SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
108 SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
109 SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
110 SDL_MESSAGEBOX_COLOR_COUNT /**< Size of the colors array of SDL_MessageBoxColorScheme. */
111} SDL_MessageBoxColorType;
112
113/**
114 * A set of colors to use for message box dialogs
115 *
116 * \since This struct is available since SDL 3.2.0.
117 */
118typedef struct SDL_MessageBoxColorScheme
119{
120 SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_COUNT];
121} SDL_MessageBoxColorScheme;
122
123/**
124 * MessageBox structure containing title, text, window, etc.
125 *
126 * \since This struct is available since SDL 3.2.0.
127 */
128typedef struct SDL_MessageBoxData
129{
130 SDL_MessageBoxFlags flags;
131 SDL_Window *window; /**< Parent window, can be NULL */
132 const char *title; /**< UTF-8 title */
133 const char *message; /**< UTF-8 message text */
134
135 int numbuttons;
136 const SDL_MessageBoxButtonData *buttons;
137
138 const SDL_MessageBoxColorScheme *colorScheme; /**< SDL_MessageBoxColorScheme, can be NULL to use system settings */
139} SDL_MessageBoxData;
140
141/**
142 * Create a modal message box.
143 *
144 * If your needs aren't complex, it might be easier to use
145 * SDL_ShowSimpleMessageBox.
146 *
147 * This function should be called on the thread that created the parent
148 * window, or on the main thread if the messagebox has no parent. It will
149 * block execution of that thread until the user clicks a button or closes the
150 * messagebox.
151 *
152 * This function may be called at any time, even before SDL_Init(). This makes
153 * it useful for reporting errors like a failure to create a renderer or
154 * OpenGL context.
155 *
156 * On X11, SDL rolls its own dialog box with X11 primitives instead of a
157 * formal toolkit like GTK+ or Qt.
158 *
159 * Note that if SDL_Init() would fail because there isn't any available video
160 * target, this function is likely to fail for the same reasons. If this is a
161 * concern, check the return value from this function and fall back to writing
162 * to stderr if you can.
163 *
164 * \param messageboxdata the SDL_MessageBoxData structure with title, text and
165 * other options.
166 * \param buttonid the pointer to which user id of hit button should be
167 * copied.
168 * \returns true on success or false on failure; call SDL_GetError() for more
169 * information.
170 *
171 * \since This function is available since SDL 3.2.0.
172 *
173 * \sa SDL_ShowSimpleMessageBox
174 */
175extern SDL_DECLSPEC bool SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
176
177/**
178 * Display a simple modal message box.
179 *
180 * If your needs aren't complex, this function is preferred over
181 * SDL_ShowMessageBox.
182 *
183 * `flags` may be any of the following:
184 *
185 * - `SDL_MESSAGEBOX_ERROR`: error dialog
186 * - `SDL_MESSAGEBOX_WARNING`: warning dialog
187 * - `SDL_MESSAGEBOX_INFORMATION`: informational dialog
188 *
189 * This function should be called on the thread that created the parent
190 * window, or on the main thread if the messagebox has no parent. It will
191 * block execution of that thread until the user clicks a button or closes the
192 * messagebox.
193 *
194 * This function may be called at any time, even before SDL_Init(). This makes
195 * it useful for reporting errors like a failure to create a renderer or
196 * OpenGL context.
197 *
198 * On X11, SDL rolls its own dialog box with X11 primitives instead of a
199 * formal toolkit like GTK+ or Qt.
200 *
201 * Note that if SDL_Init() would fail because there isn't any available video
202 * target, this function is likely to fail for the same reasons. If this is a
203 * concern, check the return value from this function and fall back to writing
204 * to stderr if you can.
205 *
206 * \param flags an SDL_MessageBoxFlags value.
207 * \param title UTF-8 title text.
208 * \param message UTF-8 message text.
209 * \param window the parent window, or NULL for no parent.
210 * \returns true on success or false on failure; call SDL_GetError() for more
211 * information.
212 *
213 * \since This function is available since SDL 3.2.0.
214 *
215 * \sa SDL_ShowMessageBox
216 */
217extern SDL_DECLSPEC bool SDLCALL SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, const char *title, const char *message, SDL_Window *window);
218
219
220/* Ends C function definitions when using C++ */
221#ifdef __cplusplus
222}
223#endif
224#include <SDL3/SDL_close_code.h>
225
226#endif /* SDL_messagebox_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_metal.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_metal.h
new file mode 100644
index 0000000..14b1bc8
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_metal.h
@@ -0,0 +1,107 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryMetal
24 *
25 * Functions to creating Metal layers and views on SDL windows.
26 *
27 * This provides some platform-specific glue for Apple platforms. Most macOS
28 * and iOS apps can use SDL without these functions, but this API they can be
29 * useful for specific OS-level integration tasks.
30 */
31
32#ifndef SDL_metal_h_
33#define SDL_metal_h_
34
35#include <SDL3/SDL_video.h>
36
37#include <SDL3/SDL_begin_code.h>
38/* Set up for C function definitions, even when using C++ */
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/**
44 * A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
45 *
46 * \since This datatype is available since SDL 3.2.0.
47 */
48typedef void *SDL_MetalView;
49
50/**
51 * \name Metal support functions
52 */
53/* @{ */
54
55/**
56 * Create a CAMetalLayer-backed NSView/UIView and attach it to the specified
57 * window.
58 *
59 * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on
60 * its own. It is up to user code to do that.
61 *
62 * The returned handle can be casted directly to a NSView or UIView. To access
63 * the backing CAMetalLayer, call SDL_Metal_GetLayer().
64 *
65 * \param window the window.
66 * \returns handle NSView or UIView.
67 *
68 * \since This function is available since SDL 3.2.0.
69 *
70 * \sa SDL_Metal_DestroyView
71 * \sa SDL_Metal_GetLayer
72 */
73extern SDL_DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window *window);
74
75/**
76 * Destroy an existing SDL_MetalView object.
77 *
78 * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
79 * called after SDL_CreateWindow.
80 *
81 * \param view the SDL_MetalView object.
82 *
83 * \since This function is available since SDL 3.2.0.
84 *
85 * \sa SDL_Metal_CreateView
86 */
87extern SDL_DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
88
89/**
90 * Get a pointer to the backing CAMetalLayer for the given view.
91 *
92 * \param view the SDL_MetalView object.
93 * \returns a pointer.
94 *
95 * \since This function is available since SDL 3.2.0.
96 */
97extern SDL_DECLSPEC void * SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
98
99/* @} *//* Metal support functions */
100
101/* Ends C function definitions when using C++ */
102#ifdef __cplusplus
103}
104#endif
105#include <SDL3/SDL_close_code.h>
106
107#endif /* SDL_metal_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_misc.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_misc.h
new file mode 100644
index 0000000..3dd6fcd
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_misc.h
@@ -0,0 +1,78 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryMisc
24 *
25 * SDL API functions that don't fit elsewhere.
26 */
27
28#ifndef SDL_misc_h_
29#define SDL_misc_h_
30
31#include <SDL3/SDL_stdinc.h>
32#include <SDL3/SDL_error.h>
33
34#include <SDL3/SDL_begin_code.h>
35
36/* Set up for C function definitions, even when using C++ */
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/**
42 * Open a URL/URI in the browser or other appropriate external application.
43 *
44 * Open a URL in a separate, system-provided application. How this works will
45 * vary wildly depending on the platform. This will likely launch what makes
46 * sense to handle a specific URL's protocol (a web browser for `http://`,
47 * etc), but it might also be able to launch file managers for directories and
48 * other things.
49 *
50 * What happens when you open a URL varies wildly as well: your game window
51 * may lose focus (and may or may not lose focus if your game was fullscreen
52 * or grabbing input at the time). On mobile devices, your app will likely
53 * move to the background or your process might be paused. Any given platform
54 * may or may not handle a given URL.
55 *
56 * If this is unimplemented (or simply unavailable) for a platform, this will
57 * fail with an error. A successful result does not mean the URL loaded, just
58 * that we launched _something_ to handle it (or at least believe we did).
59 *
60 * All this to say: this function can be useful, but you should definitely
61 * test it on every platform you target.
62 *
63 * \param url a valid URL/URI to open. Use `file:///full/path/to/file` for
64 * local files, if supported.
65 * \returns true on success or false on failure; call SDL_GetError() for more
66 * information.
67 *
68 * \since This function is available since SDL 3.2.0.
69 */
70extern SDL_DECLSPEC bool SDLCALL SDL_OpenURL(const char *url);
71
72/* Ends C function definitions when using C++ */
73#ifdef __cplusplus
74}
75#endif
76#include <SDL3/SDL_close_code.h>
77
78#endif /* SDL_misc_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_mouse.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_mouse.h
new file mode 100644
index 0000000..864135d
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_mouse.h
@@ -0,0 +1,689 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryMouse
24 *
25 * Any GUI application has to deal with the mouse, and SDL provides functions
26 * to manage mouse input and the displayed cursor.
27 *
28 * Most interactions with the mouse will come through the event subsystem.
29 * Moving a mouse generates an SDL_EVENT_MOUSE_MOTION event, pushing a button
30 * generates SDL_EVENT_MOUSE_BUTTON_DOWN, etc, but one can also query the
31 * current state of the mouse at any time with SDL_GetMouseState().
32 *
33 * For certain games, it's useful to disassociate the mouse cursor from mouse
34 * input. An FPS, for example, would not want the player's motion to stop as
35 * the mouse hits the edge of the window. For these scenarios, use
36 * SDL_SetWindowRelativeMouseMode(), which hides the cursor, grabs mouse input
37 * to the window, and reads mouse input no matter how far it moves.
38 *
39 * Games that want the system to track the mouse but want to draw their own
40 * cursor can use SDL_HideCursor() and SDL_ShowCursor(). It might be more
41 * efficient to let the system manage the cursor, if possible, using
42 * SDL_SetCursor() with a custom image made through SDL_CreateColorCursor(),
43 * or perhaps just a specific system cursor from SDL_CreateSystemCursor().
44 *
45 * SDL can, on many platforms, differentiate between multiple connected mice,
46 * allowing for interesting input scenarios and multiplayer games. They can be
47 * enumerated with SDL_GetMice(), and SDL will send SDL_EVENT_MOUSE_ADDED and
48 * SDL_EVENT_MOUSE_REMOVED events as they are connected and unplugged.
49 *
50 * Since many apps only care about basic mouse input, SDL offers a virtual
51 * mouse device for touch and pen input, which often can make a desktop
52 * application work on a touchscreen phone without any code changes. Apps that
53 * care about touch/pen separately from mouse input should filter out events
54 * with a `which` field of SDL_TOUCH_MOUSEID/SDL_PEN_MOUSEID.
55 */
56
57#ifndef SDL_mouse_h_
58#define SDL_mouse_h_
59
60#include <SDL3/SDL_stdinc.h>
61#include <SDL3/SDL_error.h>
62#include <SDL3/SDL_surface.h>
63#include <SDL3/SDL_video.h>
64
65#include <SDL3/SDL_begin_code.h>
66/* Set up for C function definitions, even when using C++ */
67#ifdef __cplusplus
68extern "C" {
69#endif
70
71/**
72 * This is a unique ID for a mouse for the time it is connected to the system,
73 * and is never reused for the lifetime of the application.
74 *
75 * If the mouse is disconnected and reconnected, it will get a new ID.
76 *
77 * The value 0 is an invalid ID.
78 *
79 * \since This datatype is available since SDL 3.2.0.
80 */
81typedef Uint32 SDL_MouseID;
82
83/**
84 * The structure used to identify an SDL cursor.
85 *
86 * This is opaque data.
87 *
88 * \since This struct is available since SDL 3.2.0.
89 */
90typedef struct SDL_Cursor SDL_Cursor;
91
92/**
93 * Cursor types for SDL_CreateSystemCursor().
94 *
95 * \since This enum is available since SDL 3.2.0.
96 */
97typedef enum SDL_SystemCursor
98{
99 SDL_SYSTEM_CURSOR_DEFAULT, /**< Default cursor. Usually an arrow. */
100 SDL_SYSTEM_CURSOR_TEXT, /**< Text selection. Usually an I-beam. */
101 SDL_SYSTEM_CURSOR_WAIT, /**< Wait. Usually an hourglass or watch or spinning ball. */
102 SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair. */
103 SDL_SYSTEM_CURSOR_PROGRESS, /**< Program is busy but still interactive. Usually it's WAIT with an arrow. */
104 SDL_SYSTEM_CURSOR_NWSE_RESIZE, /**< Double arrow pointing northwest and southeast. */
105 SDL_SYSTEM_CURSOR_NESW_RESIZE, /**< Double arrow pointing northeast and southwest. */
106 SDL_SYSTEM_CURSOR_EW_RESIZE, /**< Double arrow pointing west and east. */
107 SDL_SYSTEM_CURSOR_NS_RESIZE, /**< Double arrow pointing north and south. */
108 SDL_SYSTEM_CURSOR_MOVE, /**< Four pointed arrow pointing north, south, east, and west. */
109 SDL_SYSTEM_CURSOR_NOT_ALLOWED, /**< Not permitted. Usually a slashed circle or crossbones. */
110 SDL_SYSTEM_CURSOR_POINTER, /**< Pointer that indicates a link. Usually a pointing hand. */
111 SDL_SYSTEM_CURSOR_NW_RESIZE, /**< Window resize top-left. This may be a single arrow or a double arrow like NWSE_RESIZE. */
112 SDL_SYSTEM_CURSOR_N_RESIZE, /**< Window resize top. May be NS_RESIZE. */
113 SDL_SYSTEM_CURSOR_NE_RESIZE, /**< Window resize top-right. May be NESW_RESIZE. */
114 SDL_SYSTEM_CURSOR_E_RESIZE, /**< Window resize right. May be EW_RESIZE. */
115 SDL_SYSTEM_CURSOR_SE_RESIZE, /**< Window resize bottom-right. May be NWSE_RESIZE. */
116 SDL_SYSTEM_CURSOR_S_RESIZE, /**< Window resize bottom. May be NS_RESIZE. */
117 SDL_SYSTEM_CURSOR_SW_RESIZE, /**< Window resize bottom-left. May be NESW_RESIZE. */
118 SDL_SYSTEM_CURSOR_W_RESIZE, /**< Window resize left. May be EW_RESIZE. */
119 SDL_SYSTEM_CURSOR_COUNT
120} SDL_SystemCursor;
121
122/**
123 * Scroll direction types for the Scroll event
124 *
125 * \since This enum is available since SDL 3.2.0.
126 */
127typedef enum SDL_MouseWheelDirection
128{
129 SDL_MOUSEWHEEL_NORMAL, /**< The scroll direction is normal */
130 SDL_MOUSEWHEEL_FLIPPED /**< The scroll direction is flipped / natural */
131} SDL_MouseWheelDirection;
132
133/**
134 * A bitmask of pressed mouse buttons, as reported by SDL_GetMouseState, etc.
135 *
136 * - Button 1: Left mouse button
137 * - Button 2: Middle mouse button
138 * - Button 3: Right mouse button
139 * - Button 4: Side mouse button 1
140 * - Button 5: Side mouse button 2
141 *
142 * \since This datatype is available since SDL 3.2.0.
143 *
144 * \sa SDL_GetMouseState
145 * \sa SDL_GetGlobalMouseState
146 * \sa SDL_GetRelativeMouseState
147 */
148typedef Uint32 SDL_MouseButtonFlags;
149
150#define SDL_BUTTON_LEFT 1
151#define SDL_BUTTON_MIDDLE 2
152#define SDL_BUTTON_RIGHT 3
153#define SDL_BUTTON_X1 4
154#define SDL_BUTTON_X2 5
155
156#define SDL_BUTTON_MASK(X) (1u << ((X)-1))
157#define SDL_BUTTON_LMASK SDL_BUTTON_MASK(SDL_BUTTON_LEFT)
158#define SDL_BUTTON_MMASK SDL_BUTTON_MASK(SDL_BUTTON_MIDDLE)
159#define SDL_BUTTON_RMASK SDL_BUTTON_MASK(SDL_BUTTON_RIGHT)
160#define SDL_BUTTON_X1MASK SDL_BUTTON_MASK(SDL_BUTTON_X1)
161#define SDL_BUTTON_X2MASK SDL_BUTTON_MASK(SDL_BUTTON_X2)
162
163
164/* Function prototypes */
165
166/**
167 * Return whether a mouse is currently connected.
168 *
169 * \returns true if a mouse is connected, false otherwise.
170 *
171 * \threadsafety This function should only be called on the main thread.
172 *
173 * \since This function is available since SDL 3.2.0.
174 *
175 * \sa SDL_GetMice
176 */
177extern SDL_DECLSPEC bool SDLCALL SDL_HasMouse(void);
178
179/**
180 * Get a list of currently connected mice.
181 *
182 * Note that this will include any device or virtual driver that includes
183 * mouse functionality, including some game controllers, KVM switches, etc.
184 * You should wait for input from a device before you consider it actively in
185 * use.
186 *
187 * \param count a pointer filled in with the number of mice returned, may be
188 * NULL.
189 * \returns a 0 terminated array of mouse instance IDs or NULL on failure;
190 * call SDL_GetError() for more information. This should be freed
191 * with SDL_free() when it is no longer needed.
192 *
193 * \threadsafety This function should only be called on the main thread.
194 *
195 * \since This function is available since SDL 3.2.0.
196 *
197 * \sa SDL_GetMouseNameForID
198 * \sa SDL_HasMouse
199 */
200extern SDL_DECLSPEC SDL_MouseID * SDLCALL SDL_GetMice(int *count);
201
202/**
203 * Get the name of a mouse.
204 *
205 * This function returns "" if the mouse doesn't have a name.
206 *
207 * \param instance_id the mouse instance ID.
208 * \returns the name of the selected mouse, or NULL on failure; call
209 * SDL_GetError() for more information.
210 *
211 * \threadsafety This function should only be called on the main thread.
212 *
213 * \since This function is available since SDL 3.2.0.
214 *
215 * \sa SDL_GetMice
216 */
217extern SDL_DECLSPEC const char * SDLCALL SDL_GetMouseNameForID(SDL_MouseID instance_id);
218
219/**
220 * Get the window which currently has mouse focus.
221 *
222 * \returns the window with mouse focus.
223 *
224 * \threadsafety This function should only be called on the main thread.
225 *
226 * \since This function is available since SDL 3.2.0.
227 */
228extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
229
230/**
231 * Query SDL's cache for the synchronous mouse button state and the
232 * window-relative SDL-cursor position.
233 *
234 * This function returns the cached synchronous state as SDL understands it
235 * from the last pump of the event queue.
236 *
237 * To query the platform for immediate asynchronous state, use
238 * SDL_GetGlobalMouseState.
239 *
240 * Passing non-NULL pointers to `x` or `y` will write the destination with
241 * respective x or y coordinates relative to the focused window.
242 *
243 * In Relative Mode, the SDL-cursor's position usually contradicts the
244 * platform-cursor's position as manually calculated from
245 * SDL_GetGlobalMouseState() and SDL_GetWindowPosition.
246 *
247 * \param x a pointer to receive the SDL-cursor's x-position from the focused
248 * window's top left corner, can be NULL if unused.
249 * \param y a pointer to receive the SDL-cursor's y-position from the focused
250 * window's top left corner, can be NULL if unused.
251 * \returns a 32-bit bitmask of the button state that can be bitwise-compared
252 * against the SDL_BUTTON_MASK(X) macro.
253 *
254 * \threadsafety This function should only be called on the main thread.
255 *
256 * \since This function is available since SDL 3.2.0.
257 *
258 * \sa SDL_GetGlobalMouseState
259 * \sa SDL_GetRelativeMouseState
260 */
261extern SDL_DECLSPEC SDL_MouseButtonFlags SDLCALL SDL_GetMouseState(float *x, float *y);
262
263/**
264 * Query the platform for the asynchronous mouse button state and the
265 * desktop-relative platform-cursor position.
266 *
267 * This function immediately queries the platform for the most recent
268 * asynchronous state, more costly than retrieving SDL's cached state in
269 * SDL_GetMouseState().
270 *
271 * Passing non-NULL pointers to `x` or `y` will write the destination with
272 * respective x or y coordinates relative to the desktop.
273 *
274 * In Relative Mode, the platform-cursor's position usually contradicts the
275 * SDL-cursor's position as manually calculated from SDL_GetMouseState() and
276 * SDL_GetWindowPosition.
277 *
278 * This function can be useful if you need to track the mouse outside of a
279 * specific window and SDL_CaptureMouse() doesn't fit your needs. For example,
280 * it could be useful if you need to track the mouse while dragging a window,
281 * where coordinates relative to a window might not be in sync at all times.
282 *
283 * \param x a pointer to receive the platform-cursor's x-position from the
284 * desktop's top left corner, can be NULL if unused.
285 * \param y a pointer to receive the platform-cursor's y-position from the
286 * desktop's top left corner, can be NULL if unused.
287 * \returns a 32-bit bitmask of the button state that can be bitwise-compared
288 * against the SDL_BUTTON_MASK(X) macro.
289 *
290 * \threadsafety This function should only be called on the main thread.
291 *
292 * \since This function is available since SDL 3.2.0.
293 *
294 * \sa SDL_CaptureMouse
295 * \sa SDL_GetMouseState
296 * \sa SDL_GetGlobalMouseState
297 */
298extern SDL_DECLSPEC SDL_MouseButtonFlags SDLCALL SDL_GetGlobalMouseState(float *x, float *y);
299
300/**
301 * Query SDL's cache for the synchronous mouse button state and accumulated
302 * mouse delta since last call.
303 *
304 * This function returns the cached synchronous state as SDL understands it
305 * from the last pump of the event queue.
306 *
307 * To query the platform for immediate asynchronous state, use
308 * SDL_GetGlobalMouseState.
309 *
310 * Passing non-NULL pointers to `x` or `y` will write the destination with
311 * respective x or y deltas accumulated since the last call to this function
312 * (or since event initialization).
313 *
314 * This function is useful for reducing overhead by processing relative mouse
315 * inputs in one go per-frame instead of individually per-event, at the
316 * expense of losing the order between events within the frame (e.g. quickly
317 * pressing and releasing a button within the same frame).
318 *
319 * \param x a pointer to receive the x mouse delta accumulated since last
320 * call, can be NULL if unused.
321 * \param y a pointer to receive the y mouse delta accumulated since last
322 * call, can be NULL if unused.
323 * \returns a 32-bit bitmask of the button state that can be bitwise-compared
324 * against the SDL_BUTTON_MASK(X) macro.
325 *
326 * \threadsafety This function should only be called on the main thread.
327 *
328 * \since This function is available since SDL 3.2.0.
329 *
330 * \sa SDL_GetMouseState
331 * \sa SDL_GetGlobalMouseState
332 */
333extern SDL_DECLSPEC SDL_MouseButtonFlags SDLCALL SDL_GetRelativeMouseState(float *x, float *y);
334
335/**
336 * Move the mouse cursor to the given position within the window.
337 *
338 * This function generates a mouse motion event if relative mode is not
339 * enabled. If relative mode is enabled, you can force mouse events for the
340 * warp by setting the SDL_HINT_MOUSE_RELATIVE_WARP_MOTION hint.
341 *
342 * Note that this function will appear to succeed, but not actually move the
343 * mouse when used over Microsoft Remote Desktop.
344 *
345 * \param window the window to move the mouse into, or NULL for the current
346 * mouse focus.
347 * \param x the x coordinate within the window.
348 * \param y the y coordinate within the window.
349 *
350 * \threadsafety This function should only be called on the main thread.
351 *
352 * \since This function is available since SDL 3.2.0.
353 *
354 * \sa SDL_WarpMouseGlobal
355 */
356extern SDL_DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window *window,
357 float x, float y);
358
359/**
360 * Move the mouse to the given position in global screen space.
361 *
362 * This function generates a mouse motion event.
363 *
364 * A failure of this function usually means that it is unsupported by a
365 * platform.
366 *
367 * Note that this function will appear to succeed, but not actually move the
368 * mouse when used over Microsoft Remote Desktop.
369 *
370 * \param x the x coordinate.
371 * \param y the y coordinate.
372 * \returns true on success or false on failure; call SDL_GetError() for more
373 * information.
374 *
375 * \threadsafety This function should only be called on the main thread.
376 *
377 * \since This function is available since SDL 3.2.0.
378 *
379 * \sa SDL_WarpMouseInWindow
380 */
381extern SDL_DECLSPEC bool SDLCALL SDL_WarpMouseGlobal(float x, float y);
382
383/**
384 * Set relative mouse mode for a window.
385 *
386 * While the window has focus and relative mouse mode is enabled, the cursor
387 * is hidden, the mouse position is constrained to the window, and SDL will
388 * report continuous relative mouse motion even if the mouse is at the edge of
389 * the window.
390 *
391 * If you'd like to keep the mouse position fixed while in relative mode you
392 * can use SDL_SetWindowMouseRect(). If you'd like the cursor to be at a
393 * specific location when relative mode ends, you should use
394 * SDL_WarpMouseInWindow() before disabling relative mode.
395 *
396 * This function will flush any pending mouse motion for this window.
397 *
398 * \param window the window to change.
399 * \param enabled true to enable relative mode, false to disable.
400 * \returns true on success or false on failure; call SDL_GetError() for more
401 * information.
402 *
403 * \threadsafety This function should only be called on the main thread.
404 *
405 * \since This function is available since SDL 3.2.0.
406 *
407 * \sa SDL_GetWindowRelativeMouseMode
408 */
409extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowRelativeMouseMode(SDL_Window *window, bool enabled);
410
411/**
412 * Query whether relative mouse mode is enabled for a window.
413 *
414 * \param window the window to query.
415 * \returns true if relative mode is enabled for a window or false otherwise.
416 *
417 * \threadsafety This function should only be called on the main thread.
418 *
419 * \since This function is available since SDL 3.2.0.
420 *
421 * \sa SDL_SetWindowRelativeMouseMode
422 */
423extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowRelativeMouseMode(SDL_Window *window);
424
425/**
426 * Capture the mouse and to track input outside an SDL window.
427 *
428 * Capturing enables your app to obtain mouse events globally, instead of just
429 * within your window. Not all video targets support this function. When
430 * capturing is enabled, the current window will get all mouse events, but
431 * unlike relative mode, no change is made to the cursor and it is not
432 * restrained to your window.
433 *
434 * This function may also deny mouse input to other windows--both those in
435 * your application and others on the system--so you should use this function
436 * sparingly, and in small bursts. For example, you might want to track the
437 * mouse while the user is dragging something, until the user releases a mouse
438 * button. It is not recommended that you capture the mouse for long periods
439 * of time, such as the entire time your app is running. For that, you should
440 * probably use SDL_SetWindowRelativeMouseMode() or SDL_SetWindowMouseGrab(),
441 * depending on your goals.
442 *
443 * While captured, mouse events still report coordinates relative to the
444 * current (foreground) window, but those coordinates may be outside the
445 * bounds of the window (including negative values). Capturing is only allowed
446 * for the foreground window. If the window loses focus while capturing, the
447 * capture will be disabled automatically.
448 *
449 * While capturing is enabled, the current window will have the
450 * `SDL_WINDOW_MOUSE_CAPTURE` flag set.
451 *
452 * Please note that SDL will attempt to "auto capture" the mouse while the
453 * user is pressing a button; this is to try and make mouse behavior more
454 * consistent between platforms, and deal with the common case of a user
455 * dragging the mouse outside of the window. This means that if you are
456 * calling SDL_CaptureMouse() only to deal with this situation, you do not
457 * have to (although it is safe to do so). If this causes problems for your
458 * app, you can disable auto capture by setting the
459 * `SDL_HINT_MOUSE_AUTO_CAPTURE` hint to zero.
460 *
461 * \param enabled true to enable capturing, false to disable.
462 * \returns true on success or false on failure; call SDL_GetError() for more
463 * information.
464 *
465 * \threadsafety This function should only be called on the main thread.
466 *
467 * \since This function is available since SDL 3.2.0.
468 *
469 * \sa SDL_GetGlobalMouseState
470 */
471extern SDL_DECLSPEC bool SDLCALL SDL_CaptureMouse(bool enabled);
472
473/**
474 * Create a cursor using the specified bitmap data and mask (in MSB format).
475 *
476 * `mask` has to be in MSB (Most Significant Bit) format.
477 *
478 * The cursor width (`w`) must be a multiple of 8 bits.
479 *
480 * The cursor is created in black and white according to the following:
481 *
482 * - data=0, mask=1: white
483 * - data=1, mask=1: black
484 * - data=0, mask=0: transparent
485 * - data=1, mask=0: inverted color if possible, black if not.
486 *
487 * Cursors created with this function must be freed with SDL_DestroyCursor().
488 *
489 * If you want to have a color cursor, or create your cursor from an
490 * SDL_Surface, you should use SDL_CreateColorCursor(). Alternately, you can
491 * hide the cursor and draw your own as part of your game's rendering, but it
492 * will be bound to the framerate.
493 *
494 * Also, SDL_CreateSystemCursor() is available, which provides several
495 * readily-available system cursors to pick from.
496 *
497 * \param data the color value for each pixel of the cursor.
498 * \param mask the mask value for each pixel of the cursor.
499 * \param w the width of the cursor.
500 * \param h the height of the cursor.
501 * \param hot_x the x-axis offset from the left of the cursor image to the
502 * mouse x position, in the range of 0 to `w` - 1.
503 * \param hot_y the y-axis offset from the top of the cursor image to the
504 * mouse y position, in the range of 0 to `h` - 1.
505 * \returns a new cursor with the specified parameters on success or NULL on
506 * failure; call SDL_GetError() for more information.
507 *
508 * \threadsafety This function should only be called on the main thread.
509 *
510 * \since This function is available since SDL 3.2.0.
511 *
512 * \sa SDL_CreateColorCursor
513 * \sa SDL_CreateSystemCursor
514 * \sa SDL_DestroyCursor
515 * \sa SDL_SetCursor
516 */
517extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_CreateCursor(const Uint8 *data,
518 const Uint8 *mask,
519 int w, int h, int hot_x,
520 int hot_y);
521
522/**
523 * Create a color cursor.
524 *
525 * If this function is passed a surface with alternate representations, the
526 * surface will be interpreted as the content to be used for 100% display
527 * scale, and the alternate representations will be used for high DPI
528 * situations. For example, if the original surface is 32x32, then on a 2x
529 * macOS display or 200% display scale on Windows, a 64x64 version of the
530 * image will be used, if available. If a matching version of the image isn't
531 * available, the closest larger size image will be downscaled to the
532 * appropriate size and be used instead, if available. Otherwise, the closest
533 * smaller image will be upscaled and be used instead.
534 *
535 * \param surface an SDL_Surface structure representing the cursor image.
536 * \param hot_x the x position of the cursor hot spot.
537 * \param hot_y the y position of the cursor hot spot.
538 * \returns the new cursor on success or NULL on failure; call SDL_GetError()
539 * for more information.
540 *
541 * \threadsafety This function should only be called on the main thread.
542 *
543 * \since This function is available since SDL 3.2.0.
544 *
545 * \sa SDL_CreateCursor
546 * \sa SDL_CreateSystemCursor
547 * \sa SDL_DestroyCursor
548 * \sa SDL_SetCursor
549 */
550extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
551 int hot_x,
552 int hot_y);
553
554/**
555 * Create a system cursor.
556 *
557 * \param id an SDL_SystemCursor enum value.
558 * \returns a cursor on success or NULL on failure; call SDL_GetError() for
559 * more information.
560 *
561 * \threadsafety This function should only be called on the main thread.
562 *
563 * \since This function is available since SDL 3.2.0.
564 *
565 * \sa SDL_DestroyCursor
566 */
567extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);
568
569/**
570 * Set the active cursor.
571 *
572 * This function sets the currently active cursor to the specified one. If the
573 * cursor is currently visible, the change will be immediately represented on
574 * the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if
575 * this is desired for any reason.
576 *
577 * \param cursor a cursor to make active.
578 * \returns true on success or false on failure; call SDL_GetError() for more
579 * information.
580 *
581 * \threadsafety This function should only be called on the main thread.
582 *
583 * \since This function is available since SDL 3.2.0.
584 *
585 * \sa SDL_GetCursor
586 */
587extern SDL_DECLSPEC bool SDLCALL SDL_SetCursor(SDL_Cursor *cursor);
588
589/**
590 * Get the active cursor.
591 *
592 * This function returns a pointer to the current cursor which is owned by the
593 * library. It is not necessary to free the cursor with SDL_DestroyCursor().
594 *
595 * \returns the active cursor or NULL if there is no mouse.
596 *
597 * \threadsafety This function should only be called on the main thread.
598 *
599 * \since This function is available since SDL 3.2.0.
600 *
601 * \sa SDL_SetCursor
602 */
603extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_GetCursor(void);
604
605/**
606 * Get the default cursor.
607 *
608 * You do not have to call SDL_DestroyCursor() on the return value, but it is
609 * safe to do so.
610 *
611 * \returns the default cursor on success or NULL on failuree; call
612 * SDL_GetError() for more information.
613 *
614 * \threadsafety This function should only be called on the main thread.
615 *
616 * \since This function is available since SDL 3.2.0.
617 */
618extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_GetDefaultCursor(void);
619
620/**
621 * Free a previously-created cursor.
622 *
623 * Use this function to free cursor resources created with SDL_CreateCursor(),
624 * SDL_CreateColorCursor() or SDL_CreateSystemCursor().
625 *
626 * \param cursor the cursor to free.
627 *
628 * \threadsafety This function should only be called on the main thread.
629 *
630 * \since This function is available since SDL 3.2.0.
631 *
632 * \sa SDL_CreateColorCursor
633 * \sa SDL_CreateCursor
634 * \sa SDL_CreateSystemCursor
635 */
636extern SDL_DECLSPEC void SDLCALL SDL_DestroyCursor(SDL_Cursor *cursor);
637
638/**
639 * Show the cursor.
640 *
641 * \returns true on success or false on failure; call SDL_GetError() for more
642 * information.
643 *
644 * \threadsafety This function should only be called on the main thread.
645 *
646 * \since This function is available since SDL 3.2.0.
647 *
648 * \sa SDL_CursorVisible
649 * \sa SDL_HideCursor
650 */
651extern SDL_DECLSPEC bool SDLCALL SDL_ShowCursor(void);
652
653/**
654 * Hide the cursor.
655 *
656 * \returns true on success or false on failure; call SDL_GetError() for more
657 * information.
658 *
659 * \threadsafety This function should only be called on the main thread.
660 *
661 * \since This function is available since SDL 3.2.0.
662 *
663 * \sa SDL_CursorVisible
664 * \sa SDL_ShowCursor
665 */
666extern SDL_DECLSPEC bool SDLCALL SDL_HideCursor(void);
667
668/**
669 * Return whether the cursor is currently being shown.
670 *
671 * \returns `true` if the cursor is being shown, or `false` if the cursor is
672 * hidden.
673 *
674 * \threadsafety This function should only be called on the main thread.
675 *
676 * \since This function is available since SDL 3.2.0.
677 *
678 * \sa SDL_HideCursor
679 * \sa SDL_ShowCursor
680 */
681extern SDL_DECLSPEC bool SDLCALL SDL_CursorVisible(void);
682
683/* Ends C function definitions when using C++ */
684#ifdef __cplusplus
685}
686#endif
687#include <SDL3/SDL_close_code.h>
688
689#endif /* SDL_mouse_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_mutex.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_mutex.h
new file mode 100644
index 0000000..c88ec15
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_mutex.h
@@ -0,0 +1,1073 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#ifndef SDL_mutex_h_
23#define SDL_mutex_h_
24
25/**
26 * # CategoryMutex
27 *
28 * SDL offers several thread synchronization primitives. This document can't
29 * cover the complicated topic of thread safety, but reading up on what each
30 * of these primitives are, why they are useful, and how to correctly use them
31 * is vital to writing correct and safe multithreaded programs.
32 *
33 * - Mutexes: SDL_CreateMutex()
34 * - Read/Write locks: SDL_CreateRWLock()
35 * - Semaphores: SDL_CreateSemaphore()
36 * - Condition variables: SDL_CreateCondition()
37 *
38 * SDL also offers a datatype, SDL_InitState, which can be used to make sure
39 * only one thread initializes/deinitializes some resource that several
40 * threads might try to use for the first time simultaneously.
41 */
42
43#include <SDL3/SDL_stdinc.h>
44#include <SDL3/SDL_atomic.h>
45#include <SDL3/SDL_error.h>
46#include <SDL3/SDL_thread.h>
47
48#ifdef SDL_WIKI_DOCUMENTATION_SECTION
49
50/**
51 * Enable thread safety attributes, only with clang.
52 *
53 * The attributes can be safely erased when compiling with other compilers.
54 *
55 * To enable analysis, set these environment variables before running cmake:
56 *
57 * ```bash
58 * export CC=clang
59 * export CFLAGS="-DSDL_THREAD_SAFETY_ANALYSIS -Wthread-safety"
60 * ```
61 */
62#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
63
64#elif defined(SDL_THREAD_SAFETY_ANALYSIS) && defined(__clang__) && (!defined(SWIG))
65#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
66#else
67#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) /* no-op */
68#endif
69
70/**
71 * Wrapper around Clang thread safety analysis annotations.
72 *
73 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
74 *
75 * \since This macro is available since SDL 3.2.0.
76 */
77#define SDL_CAPABILITY(x) \
78 SDL_THREAD_ANNOTATION_ATTRIBUTE__(capability(x))
79
80/**
81 * Wrapper around Clang thread safety analysis annotations.
82 *
83 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
84 *
85 * \since This macro is available since SDL 3.2.0.
86 */
87#define SDL_SCOPED_CAPABILITY \
88 SDL_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable)
89
90/**
91 * Wrapper around Clang thread safety analysis annotations.
92 *
93 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
94 *
95 * \since This macro is available since SDL 3.2.0.
96 */
97#define SDL_GUARDED_BY(x) \
98 SDL_THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))
99
100/**
101 * Wrapper around Clang thread safety analysis annotations.
102 *
103 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
104 *
105 * \since This macro is available since SDL 3.2.0.
106 */
107#define SDL_PT_GUARDED_BY(x) \
108 SDL_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x))
109
110/**
111 * Wrapper around Clang thread safety analysis annotations.
112 *
113 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
114 *
115 * \since This macro is available since SDL 3.2.0.
116 */
117#define SDL_ACQUIRED_BEFORE(x) \
118 SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(x))
119
120/**
121 * Wrapper around Clang thread safety analysis annotations.
122 *
123 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
124 *
125 * \since This macro is available since SDL 3.2.0.
126 */
127#define SDL_ACQUIRED_AFTER(x) \
128 SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(x))
129
130/**
131 * Wrapper around Clang thread safety analysis annotations.
132 *
133 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
134 *
135 * \since This macro is available since SDL 3.2.0.
136 */
137#define SDL_REQUIRES(x) \
138 SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(x))
139
140/**
141 * Wrapper around Clang thread safety analysis annotations.
142 *
143 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
144 *
145 * \since This macro is available since SDL 3.2.0.
146 */
147#define SDL_REQUIRES_SHARED(x) \
148 SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(x))
149
150/**
151 * Wrapper around Clang thread safety analysis annotations.
152 *
153 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
154 *
155 * \since This macro is available since SDL 3.2.0.
156 */
157#define SDL_ACQUIRE(x) \
158 SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(x))
159
160/**
161 * Wrapper around Clang thread safety analysis annotations.
162 *
163 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
164 *
165 * \since This macro is available since SDL 3.2.0.
166 */
167#define SDL_ACQUIRE_SHARED(x) \
168 SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(x))
169
170/**
171 * Wrapper around Clang thread safety analysis annotations.
172 *
173 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
174 *
175 * \since This macro is available since SDL 3.2.0.
176 */
177#define SDL_RELEASE(x) \
178 SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_capability(x))
179
180/**
181 * Wrapper around Clang thread safety analysis annotations.
182 *
183 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
184 *
185 * \since This macro is available since SDL 3.2.0.
186 */
187#define SDL_RELEASE_SHARED(x) \
188 SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(x))
189
190/**
191 * Wrapper around Clang thread safety analysis annotations.
192 *
193 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
194 *
195 * \since This macro is available since SDL 3.2.0.
196 */
197#define SDL_RELEASE_GENERIC(x) \
198 SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_generic_capability(x))
199
200/**
201 * Wrapper around Clang thread safety analysis annotations.
202 *
203 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
204 *
205 * \since This macro is available since SDL 3.2.0.
206 */
207#define SDL_TRY_ACQUIRE(x, y) \
208 SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(x, y))
209
210/**
211 * Wrapper around Clang thread safety analysis annotations.
212 *
213 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
214 *
215 * \since This macro is available since SDL 3.2.0.
216 */
217#define SDL_TRY_ACQUIRE_SHARED(x, y) \
218 SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(x, y))
219
220/**
221 * Wrapper around Clang thread safety analysis annotations.
222 *
223 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
224 *
225 * \since This macro is available since SDL 3.2.0.
226 */
227#define SDL_EXCLUDES(x) \
228 SDL_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(x))
229
230/**
231 * Wrapper around Clang thread safety analysis annotations.
232 *
233 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
234 *
235 * \since This macro is available since SDL 3.2.0.
236 */
237#define SDL_ASSERT_CAPABILITY(x) \
238 SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x))
239
240/**
241 * Wrapper around Clang thread safety analysis annotations.
242 *
243 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
244 *
245 * \since This macro is available since SDL 3.2.0.
246 */
247#define SDL_ASSERT_SHARED_CAPABILITY(x) \
248 SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x))
249
250/**
251 * Wrapper around Clang thread safety analysis annotations.
252 *
253 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
254 *
255 * \since This macro is available since SDL 3.2.0.
256 */
257#define SDL_RETURN_CAPABILITY(x) \
258 SDL_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x))
259
260/**
261 * Wrapper around Clang thread safety analysis annotations.
262 *
263 * Please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
264 *
265 * \since This macro is available since SDL 3.2.0.
266 */
267#define SDL_NO_THREAD_SAFETY_ANALYSIS \
268 SDL_THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis)
269
270/******************************************************************************/
271
272
273#include <SDL3/SDL_begin_code.h>
274/* Set up for C function definitions, even when using C++ */
275#ifdef __cplusplus
276extern "C" {
277#endif
278
279/**
280 * \name Mutex functions
281 */
282/* @{ */
283
284/**
285 * A means to serialize access to a resource between threads.
286 *
287 * Mutexes (short for "mutual exclusion") are a synchronization primitive that
288 * allows exactly one thread to proceed at a time.
289 *
290 * Wikipedia has a thorough explanation of the concept:
291 *
292 * https://en.wikipedia.org/wiki/Mutex
293 *
294 * \since This struct is available since SDL 3.2.0.
295 */
296typedef struct SDL_Mutex SDL_Mutex;
297
298/**
299 * Create a new mutex.
300 *
301 * All newly-created mutexes begin in the _unlocked_ state.
302 *
303 * Calls to SDL_LockMutex() will not return while the mutex is locked by
304 * another thread. See SDL_TryLockMutex() to attempt to lock without blocking.
305 *
306 * SDL mutexes are reentrant.
307 *
308 * \returns the initialized and unlocked mutex or NULL on failure; call
309 * SDL_GetError() for more information.
310 *
311 * \since This function is available since SDL 3.2.0.
312 *
313 * \sa SDL_DestroyMutex
314 * \sa SDL_LockMutex
315 * \sa SDL_TryLockMutex
316 * \sa SDL_UnlockMutex
317 */
318extern SDL_DECLSPEC SDL_Mutex * SDLCALL SDL_CreateMutex(void);
319
320/**
321 * Lock the mutex.
322 *
323 * This will block until the mutex is available, which is to say it is in the
324 * unlocked state and the OS has chosen the caller as the next thread to lock
325 * it. Of all threads waiting to lock the mutex, only one may do so at a time.
326 *
327 * It is legal for the owning thread to lock an already-locked mutex. It must
328 * unlock it the same number of times before it is actually made available for
329 * other threads in the system (this is known as a "recursive mutex").
330 *
331 * This function does not fail; if mutex is NULL, it will return immediately
332 * having locked nothing. If the mutex is valid, this function will always
333 * block until it can lock the mutex, and return with it locked.
334 *
335 * \param mutex the mutex to lock.
336 *
337 * \since This function is available since SDL 3.2.0.
338 *
339 * \sa SDL_TryLockMutex
340 * \sa SDL_UnlockMutex
341 */
342extern SDL_DECLSPEC void SDLCALL SDL_LockMutex(SDL_Mutex *mutex) SDL_ACQUIRE(mutex);
343
344/**
345 * Try to lock a mutex without blocking.
346 *
347 * This works just like SDL_LockMutex(), but if the mutex is not available,
348 * this function returns false immediately.
349 *
350 * This technique is useful if you need exclusive access to a resource but
351 * don't want to wait for it, and will return to it to try again later.
352 *
353 * This function returns true if passed a NULL mutex.
354 *
355 * \param mutex the mutex to try to lock.
356 * \returns true on success, false if the mutex would block.
357 *
358 * \since This function is available since SDL 3.2.0.
359 *
360 * \sa SDL_LockMutex
361 * \sa SDL_UnlockMutex
362 */
363extern SDL_DECLSPEC bool SDLCALL SDL_TryLockMutex(SDL_Mutex *mutex) SDL_TRY_ACQUIRE(0, mutex);
364
365/**
366 * Unlock the mutex.
367 *
368 * It is legal for the owning thread to lock an already-locked mutex. It must
369 * unlock it the same number of times before it is actually made available for
370 * other threads in the system (this is known as a "recursive mutex").
371 *
372 * It is illegal to unlock a mutex that has not been locked by the current
373 * thread, and doing so results in undefined behavior.
374 *
375 * \param mutex the mutex to unlock.
376 *
377 * \since This function is available since SDL 3.2.0.
378 *
379 * \sa SDL_LockMutex
380 * \sa SDL_TryLockMutex
381 */
382extern SDL_DECLSPEC void SDLCALL SDL_UnlockMutex(SDL_Mutex *mutex) SDL_RELEASE(mutex);
383
384/**
385 * Destroy a mutex created with SDL_CreateMutex().
386 *
387 * This function must be called on any mutex that is no longer needed. Failure
388 * to destroy a mutex will result in a system memory or resource leak. While
389 * it is safe to destroy a mutex that is _unlocked_, it is not safe to attempt
390 * to destroy a locked mutex, and may result in undefined behavior depending
391 * on the platform.
392 *
393 * \param mutex the mutex to destroy.
394 *
395 * \since This function is available since SDL 3.2.0.
396 *
397 * \sa SDL_CreateMutex
398 */
399extern SDL_DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_Mutex *mutex);
400
401/* @} *//* Mutex functions */
402
403
404/**
405 * \name Read/write lock functions
406 */
407/* @{ */
408
409/**
410 * A mutex that allows read-only threads to run in parallel.
411 *
412 * A rwlock is roughly the same concept as SDL_Mutex, but allows threads that
413 * request read-only access to all hold the lock at the same time. If a thread
414 * requests write access, it will block until all read-only threads have
415 * released the lock, and no one else can hold the thread (for reading or
416 * writing) at the same time as the writing thread.
417 *
418 * This can be more efficient in cases where several threads need to access
419 * data frequently, but changes to that data are rare.
420 *
421 * There are other rules that apply to rwlocks that don't apply to mutexes,
422 * about how threads are scheduled and when they can be recursively locked.
423 * These are documented in the other rwlock functions.
424 *
425 * \since This struct is available since SDL 3.2.0.
426 */
427typedef struct SDL_RWLock SDL_RWLock;
428
429/**
430 * Create a new read/write lock.
431 *
432 * A read/write lock is useful for situations where you have multiple threads
433 * trying to access a resource that is rarely updated. All threads requesting
434 * a read-only lock will be allowed to run in parallel; if a thread requests a
435 * write lock, it will be provided exclusive access. This makes it safe for
436 * multiple threads to use a resource at the same time if they promise not to
437 * change it, and when it has to be changed, the rwlock will serve as a
438 * gateway to make sure those changes can be made safely.
439 *
440 * In the right situation, a rwlock can be more efficient than a mutex, which
441 * only lets a single thread proceed at a time, even if it won't be modifying
442 * the data.
443 *
444 * All newly-created read/write locks begin in the _unlocked_ state.
445 *
446 * Calls to SDL_LockRWLockForReading() and SDL_LockRWLockForWriting will not
447 * return while the rwlock is locked _for writing_ by another thread. See
448 * SDL_TryLockRWLockForReading() and SDL_TryLockRWLockForWriting() to attempt
449 * to lock without blocking.
450 *
451 * SDL read/write locks are only recursive for read-only locks! They are not
452 * guaranteed to be fair, or provide access in a FIFO manner! They are not
453 * guaranteed to favor writers. You may not lock a rwlock for both read-only
454 * and write access at the same time from the same thread (so you can't
455 * promote your read-only lock to a write lock without unlocking first).
456 *
457 * \returns the initialized and unlocked read/write lock or NULL on failure;
458 * call SDL_GetError() for more information.
459 *
460 * \since This function is available since SDL 3.2.0.
461 *
462 * \sa SDL_DestroyRWLock
463 * \sa SDL_LockRWLockForReading
464 * \sa SDL_LockRWLockForWriting
465 * \sa SDL_TryLockRWLockForReading
466 * \sa SDL_TryLockRWLockForWriting
467 * \sa SDL_UnlockRWLock
468 */
469extern SDL_DECLSPEC SDL_RWLock * SDLCALL SDL_CreateRWLock(void);
470
471/**
472 * Lock the read/write lock for _read only_ operations.
473 *
474 * This will block until the rwlock is available, which is to say it is not
475 * locked for writing by any other thread. Of all threads waiting to lock the
476 * rwlock, all may do so at the same time as long as they are requesting
477 * read-only access; if a thread wants to lock for writing, only one may do so
478 * at a time, and no other threads, read-only or not, may hold the lock at the
479 * same time.
480 *
481 * It is legal for the owning thread to lock an already-locked rwlock for
482 * reading. It must unlock it the same number of times before it is actually
483 * made available for other threads in the system (this is known as a
484 * "recursive rwlock").
485 *
486 * Note that locking for writing is not recursive (this is only available to
487 * read-only locks).
488 *
489 * It is illegal to request a read-only lock from a thread that already holds
490 * the write lock. Doing so results in undefined behavior. Unlock the write
491 * lock before requesting a read-only lock. (But, of course, if you have the
492 * write lock, you don't need further locks to read in any case.)
493 *
494 * This function does not fail; if rwlock is NULL, it will return immediately
495 * having locked nothing. If the rwlock is valid, this function will always
496 * block until it can lock the mutex, and return with it locked.
497 *
498 * \param rwlock the read/write lock to lock.
499 *
500 * \since This function is available since SDL 3.2.0.
501 *
502 * \sa SDL_LockRWLockForWriting
503 * \sa SDL_TryLockRWLockForReading
504 * \sa SDL_UnlockRWLock
505 */
506extern SDL_DECLSPEC void SDLCALL SDL_LockRWLockForReading(SDL_RWLock *rwlock) SDL_ACQUIRE_SHARED(rwlock);
507
508/**
509 * Lock the read/write lock for _write_ operations.
510 *
511 * This will block until the rwlock is available, which is to say it is not
512 * locked for reading or writing by any other thread. Only one thread may hold
513 * the lock when it requests write access; all other threads, whether they
514 * also want to write or only want read-only access, must wait until the
515 * writer thread has released the lock.
516 *
517 * It is illegal for the owning thread to lock an already-locked rwlock for
518 * writing (read-only may be locked recursively, writing can not). Doing so
519 * results in undefined behavior.
520 *
521 * It is illegal to request a write lock from a thread that already holds a
522 * read-only lock. Doing so results in undefined behavior. Unlock the
523 * read-only lock before requesting a write lock.
524 *
525 * This function does not fail; if rwlock is NULL, it will return immediately
526 * having locked nothing. If the rwlock is valid, this function will always
527 * block until it can lock the mutex, and return with it locked.
528 *
529 * \param rwlock the read/write lock to lock.
530 *
531 * \since This function is available since SDL 3.2.0.
532 *
533 * \sa SDL_LockRWLockForReading
534 * \sa SDL_TryLockRWLockForWriting
535 * \sa SDL_UnlockRWLock
536 */
537extern SDL_DECLSPEC void SDLCALL SDL_LockRWLockForWriting(SDL_RWLock *rwlock) SDL_ACQUIRE(rwlock);
538
539/**
540 * Try to lock a read/write lock _for reading_ without blocking.
541 *
542 * This works just like SDL_LockRWLockForReading(), but if the rwlock is not
543 * available, then this function returns false immediately.
544 *
545 * This technique is useful if you need access to a resource but don't want to
546 * wait for it, and will return to it to try again later.
547 *
548 * Trying to lock for read-only access can succeed if other threads are
549 * holding read-only locks, as this won't prevent access.
550 *
551 * This function returns true if passed a NULL rwlock.
552 *
553 * \param rwlock the rwlock to try to lock.
554 * \returns true on success, false if the lock would block.
555 *
556 * \since This function is available since SDL 3.2.0.
557 *
558 * \sa SDL_LockRWLockForReading
559 * \sa SDL_TryLockRWLockForWriting
560 * \sa SDL_UnlockRWLock
561 */
562extern SDL_DECLSPEC bool SDLCALL SDL_TryLockRWLockForReading(SDL_RWLock *rwlock) SDL_TRY_ACQUIRE_SHARED(0, rwlock);
563
564/**
565 * Try to lock a read/write lock _for writing_ without blocking.
566 *
567 * This works just like SDL_LockRWLockForWriting(), but if the rwlock is not
568 * available, then this function returns false immediately.
569 *
570 * This technique is useful if you need exclusive access to a resource but
571 * don't want to wait for it, and will return to it to try again later.
572 *
573 * It is illegal for the owning thread to lock an already-locked rwlock for
574 * writing (read-only may be locked recursively, writing can not). Doing so
575 * results in undefined behavior.
576 *
577 * It is illegal to request a write lock from a thread that already holds a
578 * read-only lock. Doing so results in undefined behavior. Unlock the
579 * read-only lock before requesting a write lock.
580 *
581 * This function returns true if passed a NULL rwlock.
582 *
583 * \param rwlock the rwlock to try to lock.
584 * \returns true on success, false if the lock would block.
585 *
586 * \since This function is available since SDL 3.2.0.
587 *
588 * \sa SDL_LockRWLockForWriting
589 * \sa SDL_TryLockRWLockForReading
590 * \sa SDL_UnlockRWLock
591 */
592extern SDL_DECLSPEC bool SDLCALL SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock) SDL_TRY_ACQUIRE(0, rwlock);
593
594/**
595 * Unlock the read/write lock.
596 *
597 * Use this function to unlock the rwlock, whether it was locked for read-only
598 * or write operations.
599 *
600 * It is legal for the owning thread to lock an already-locked read-only lock.
601 * It must unlock it the same number of times before it is actually made
602 * available for other threads in the system (this is known as a "recursive
603 * rwlock").
604 *
605 * It is illegal to unlock a rwlock that has not been locked by the current
606 * thread, and doing so results in undefined behavior.
607 *
608 * \param rwlock the rwlock to unlock.
609 *
610 * \since This function is available since SDL 3.2.0.
611 *
612 * \sa SDL_LockRWLockForReading
613 * \sa SDL_LockRWLockForWriting
614 * \sa SDL_TryLockRWLockForReading
615 * \sa SDL_TryLockRWLockForWriting
616 */
617extern SDL_DECLSPEC void SDLCALL SDL_UnlockRWLock(SDL_RWLock *rwlock) SDL_RELEASE_GENERIC(rwlock);
618
619/**
620 * Destroy a read/write lock created with SDL_CreateRWLock().
621 *
622 * This function must be called on any read/write lock that is no longer
623 * needed. Failure to destroy a rwlock will result in a system memory or
624 * resource leak. While it is safe to destroy a rwlock that is _unlocked_, it
625 * is not safe to attempt to destroy a locked rwlock, and may result in
626 * undefined behavior depending on the platform.
627 *
628 * \param rwlock the rwlock to destroy.
629 *
630 * \since This function is available since SDL 3.2.0.
631 *
632 * \sa SDL_CreateRWLock
633 */
634extern SDL_DECLSPEC void SDLCALL SDL_DestroyRWLock(SDL_RWLock *rwlock);
635
636/* @} *//* Read/write lock functions */
637
638
639/**
640 * \name Semaphore functions
641 */
642/* @{ */
643
644/**
645 * A means to manage access to a resource, by count, between threads.
646 *
647 * Semaphores (specifically, "counting semaphores"), let X number of threads
648 * request access at the same time, each thread granted access decrementing a
649 * counter. When the counter reaches zero, future requests block until a prior
650 * thread releases their request, incrementing the counter again.
651 *
652 * Wikipedia has a thorough explanation of the concept:
653 *
654 * https://en.wikipedia.org/wiki/Semaphore_(programming)
655 *
656 * \since This struct is available since SDL 3.2.0.
657 */
658typedef struct SDL_Semaphore SDL_Semaphore;
659
660/**
661 * Create a semaphore.
662 *
663 * This function creates a new semaphore and initializes it with the value
664 * `initial_value`. Each wait operation on the semaphore will atomically
665 * decrement the semaphore value and potentially block if the semaphore value
666 * is 0. Each post operation will atomically increment the semaphore value and
667 * wake waiting threads and allow them to retry the wait operation.
668 *
669 * \param initial_value the starting value of the semaphore.
670 * \returns a new semaphore or NULL on failure; call SDL_GetError() for more
671 * information.
672 *
673 * \since This function is available since SDL 3.2.0.
674 *
675 * \sa SDL_DestroySemaphore
676 * \sa SDL_SignalSemaphore
677 * \sa SDL_TryWaitSemaphore
678 * \sa SDL_GetSemaphoreValue
679 * \sa SDL_WaitSemaphore
680 * \sa SDL_WaitSemaphoreTimeout
681 */
682extern SDL_DECLSPEC SDL_Semaphore * SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
683
684/**
685 * Destroy a semaphore.
686 *
687 * It is not safe to destroy a semaphore if there are threads currently
688 * waiting on it.
689 *
690 * \param sem the semaphore to destroy.
691 *
692 * \since This function is available since SDL 3.2.0.
693 *
694 * \sa SDL_CreateSemaphore
695 */
696extern SDL_DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_Semaphore *sem);
697
698/**
699 * Wait until a semaphore has a positive value and then decrements it.
700 *
701 * This function suspends the calling thread until the semaphore pointed to by
702 * `sem` has a positive value, and then atomically decrement the semaphore
703 * value.
704 *
705 * This function is the equivalent of calling SDL_WaitSemaphoreTimeout() with
706 * a time length of -1.
707 *
708 * \param sem the semaphore wait on.
709 *
710 * \since This function is available since SDL 3.2.0.
711 *
712 * \sa SDL_SignalSemaphore
713 * \sa SDL_TryWaitSemaphore
714 * \sa SDL_WaitSemaphoreTimeout
715 */
716extern SDL_DECLSPEC void SDLCALL SDL_WaitSemaphore(SDL_Semaphore *sem);
717
718/**
719 * See if a semaphore has a positive value and decrement it if it does.
720 *
721 * This function checks to see if the semaphore pointed to by `sem` has a
722 * positive value and atomically decrements the semaphore value if it does. If
723 * the semaphore doesn't have a positive value, the function immediately
724 * returns false.
725 *
726 * \param sem the semaphore to wait on.
727 * \returns true if the wait succeeds, false if the wait would block.
728 *
729 * \since This function is available since SDL 3.2.0.
730 *
731 * \sa SDL_SignalSemaphore
732 * \sa SDL_WaitSemaphore
733 * \sa SDL_WaitSemaphoreTimeout
734 */
735extern SDL_DECLSPEC bool SDLCALL SDL_TryWaitSemaphore(SDL_Semaphore *sem);
736
737/**
738 * Wait until a semaphore has a positive value and then decrements it.
739 *
740 * This function suspends the calling thread until either the semaphore
741 * pointed to by `sem` has a positive value or the specified time has elapsed.
742 * If the call is successful it will atomically decrement the semaphore value.
743 *
744 * \param sem the semaphore to wait on.
745 * \param timeoutMS the length of the timeout, in milliseconds, or -1 to wait
746 * indefinitely.
747 * \returns true if the wait succeeds or false if the wait times out.
748 *
749 * \since This function is available since SDL 3.2.0.
750 *
751 * \sa SDL_SignalSemaphore
752 * \sa SDL_TryWaitSemaphore
753 * \sa SDL_WaitSemaphore
754 */
755extern SDL_DECLSPEC bool SDLCALL SDL_WaitSemaphoreTimeout(SDL_Semaphore *sem, Sint32 timeoutMS);
756
757/**
758 * Atomically increment a semaphore's value and wake waiting threads.
759 *
760 * \param sem the semaphore to increment.
761 *
762 * \since This function is available since SDL 3.2.0.
763 *
764 * \sa SDL_TryWaitSemaphore
765 * \sa SDL_WaitSemaphore
766 * \sa SDL_WaitSemaphoreTimeout
767 */
768extern SDL_DECLSPEC void SDLCALL SDL_SignalSemaphore(SDL_Semaphore *sem);
769
770/**
771 * Get the current value of a semaphore.
772 *
773 * \param sem the semaphore to query.
774 * \returns the current value of the semaphore.
775 *
776 * \since This function is available since SDL 3.2.0.
777 */
778extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetSemaphoreValue(SDL_Semaphore *sem);
779
780/* @} *//* Semaphore functions */
781
782
783/**
784 * \name Condition variable functions
785 */
786/* @{ */
787
788/**
789 * A means to block multiple threads until a condition is satisfied.
790 *
791 * Condition variables, paired with an SDL_Mutex, let an app halt multiple
792 * threads until a condition has occurred, at which time the app can release
793 * one or all waiting threads.
794 *
795 * Wikipedia has a thorough explanation of the concept:
796 *
797 * https://en.wikipedia.org/wiki/Condition_variable
798 *
799 * \since This struct is available since SDL 3.2.0.
800 */
801typedef struct SDL_Condition SDL_Condition;
802
803/**
804 * Create a condition variable.
805 *
806 * \returns a new condition variable or NULL on failure; call SDL_GetError()
807 * for more information.
808 *
809 * \since This function is available since SDL 3.2.0.
810 *
811 * \sa SDL_BroadcastCondition
812 * \sa SDL_SignalCondition
813 * \sa SDL_WaitCondition
814 * \sa SDL_WaitConditionTimeout
815 * \sa SDL_DestroyCondition
816 */
817extern SDL_DECLSPEC SDL_Condition * SDLCALL SDL_CreateCondition(void);
818
819/**
820 * Destroy a condition variable.
821 *
822 * \param cond the condition variable to destroy.
823 *
824 * \since This function is available since SDL 3.2.0.
825 *
826 * \sa SDL_CreateCondition
827 */
828extern SDL_DECLSPEC void SDLCALL SDL_DestroyCondition(SDL_Condition *cond);
829
830/**
831 * Restart one of the threads that are waiting on the condition variable.
832 *
833 * \param cond the condition variable to signal.
834 *
835 * \threadsafety It is safe to call this function from any thread.
836 *
837 * \since This function is available since SDL 3.2.0.
838 *
839 * \sa SDL_BroadcastCondition
840 * \sa SDL_WaitCondition
841 * \sa SDL_WaitConditionTimeout
842 */
843extern SDL_DECLSPEC void SDLCALL SDL_SignalCondition(SDL_Condition *cond);
844
845/**
846 * Restart all threads that are waiting on the condition variable.
847 *
848 * \param cond the condition variable to signal.
849 *
850 * \threadsafety It is safe to call this function from any thread.
851 *
852 * \since This function is available since SDL 3.2.0.
853 *
854 * \sa SDL_SignalCondition
855 * \sa SDL_WaitCondition
856 * \sa SDL_WaitConditionTimeout
857 */
858extern SDL_DECLSPEC void SDLCALL SDL_BroadcastCondition(SDL_Condition *cond);
859
860/**
861 * Wait until a condition variable is signaled.
862 *
863 * This function unlocks the specified `mutex` and waits for another thread to
864 * call SDL_SignalCondition() or SDL_BroadcastCondition() on the condition
865 * variable `cond`. Once the condition variable is signaled, the mutex is
866 * re-locked and the function returns.
867 *
868 * The mutex must be locked before calling this function. Locking the mutex
869 * recursively (more than once) is not supported and leads to undefined
870 * behavior.
871 *
872 * This function is the equivalent of calling SDL_WaitConditionTimeout() with
873 * a time length of -1.
874 *
875 * \param cond the condition variable to wait on.
876 * \param mutex the mutex used to coordinate thread access.
877 *
878 * \threadsafety It is safe to call this function from any thread.
879 *
880 * \since This function is available since SDL 3.2.0.
881 *
882 * \sa SDL_BroadcastCondition
883 * \sa SDL_SignalCondition
884 * \sa SDL_WaitConditionTimeout
885 */
886extern SDL_DECLSPEC void SDLCALL SDL_WaitCondition(SDL_Condition *cond, SDL_Mutex *mutex);
887
888/**
889 * Wait until a condition variable is signaled or a certain time has passed.
890 *
891 * This function unlocks the specified `mutex` and waits for another thread to
892 * call SDL_SignalCondition() or SDL_BroadcastCondition() on the condition
893 * variable `cond`, or for the specified time to elapse. Once the condition
894 * variable is signaled or the time elapsed, the mutex is re-locked and the
895 * function returns.
896 *
897 * The mutex must be locked before calling this function. Locking the mutex
898 * recursively (more than once) is not supported and leads to undefined
899 * behavior.
900 *
901 * \param cond the condition variable to wait on.
902 * \param mutex the mutex used to coordinate thread access.
903 * \param timeoutMS the maximum time to wait, in milliseconds, or -1 to wait
904 * indefinitely.
905 * \returns true if the condition variable is signaled, false if the condition
906 * is not signaled in the allotted time.
907 *
908 * \threadsafety It is safe to call this function from any thread.
909 *
910 * \since This function is available since SDL 3.2.0.
911 *
912 * \sa SDL_BroadcastCondition
913 * \sa SDL_SignalCondition
914 * \sa SDL_WaitCondition
915 */
916extern SDL_DECLSPEC bool SDLCALL SDL_WaitConditionTimeout(SDL_Condition *cond,
917 SDL_Mutex *mutex, Sint32 timeoutMS);
918
919/* @} *//* Condition variable functions */
920
921/**
922 * \name Thread-safe initialization state functions
923 */
924/* @{ */
925
926/**
927 * The current status of an SDL_InitState structure.
928 *
929 * \since This enum is available since SDL 3.2.0.
930 */
931typedef enum SDL_InitStatus
932{
933 SDL_INIT_STATUS_UNINITIALIZED,
934 SDL_INIT_STATUS_INITIALIZING,
935 SDL_INIT_STATUS_INITIALIZED,
936 SDL_INIT_STATUS_UNINITIALIZING
937} SDL_InitStatus;
938
939/**
940 * A structure used for thread-safe initialization and shutdown.
941 *
942 * Here is an example of using this:
943 *
944 * ```c
945 * static SDL_AtomicInitState init;
946 *
947 * bool InitSystem(void)
948 * {
949 * if (!SDL_ShouldInit(&init)) {
950 * // The system is initialized
951 * return true;
952 * }
953 *
954 * // At this point, you should not leave this function without calling SDL_SetInitialized()
955 *
956 * bool initialized = DoInitTasks();
957 * SDL_SetInitialized(&init, initialized);
958 * return initialized;
959 * }
960 *
961 * bool UseSubsystem(void)
962 * {
963 * if (SDL_ShouldInit(&init)) {
964 * // Error, the subsystem isn't initialized
965 * SDL_SetInitialized(&init, false);
966 * return false;
967 * }
968 *
969 * // Do work using the initialized subsystem
970 *
971 * return true;
972 * }
973 *
974 * void QuitSystem(void)
975 * {
976 * if (!SDL_ShouldQuit(&init)) {
977 * // The system is not initialized
978 * return;
979 * }
980 *
981 * // At this point, you should not leave this function without calling SDL_SetInitialized()
982 *
983 * DoQuitTasks();
984 * SDL_SetInitialized(&init, false);
985 * }
986 * ```
987 *
988 * Note that this doesn't protect any resources created during initialization,
989 * or guarantee that nobody is using those resources during cleanup. You
990 * should use other mechanisms to protect those, if that's a concern for your
991 * code.
992 *
993 * \since This struct is available since SDL 3.2.0.
994 */
995typedef struct SDL_InitState
996{
997 SDL_AtomicInt status;
998 SDL_ThreadID thread;
999 void *reserved;
1000} SDL_InitState;
1001
1002/**
1003 * Return whether initialization should be done.
1004 *
1005 * This function checks the passed in state and if initialization should be
1006 * done, sets the status to `SDL_INIT_STATUS_INITIALIZING` and returns true.
1007 * If another thread is already modifying this state, it will wait until
1008 * that's done before returning.
1009 *
1010 * If this function returns true, the calling code must call
1011 * SDL_SetInitialized() to complete the initialization.
1012 *
1013 * \param state the initialization state to check.
1014 * \returns true if initialization needs to be done, false otherwise.
1015 *
1016 * \threadsafety It is safe to call this function from any thread.
1017 *
1018 * \since This function is available since SDL 3.2.0.
1019 *
1020 * \sa SDL_SetInitialized
1021 * \sa SDL_ShouldQuit
1022 */
1023extern SDL_DECLSPEC bool SDLCALL SDL_ShouldInit(SDL_InitState *state);
1024
1025/**
1026 * Return whether cleanup should be done.
1027 *
1028 * This function checks the passed in state and if cleanup should be done,
1029 * sets the status to `SDL_INIT_STATUS_UNINITIALIZING` and returns true.
1030 *
1031 * If this function returns true, the calling code must call
1032 * SDL_SetInitialized() to complete the cleanup.
1033 *
1034 * \param state the initialization state to check.
1035 * \returns true if cleanup needs to be done, false otherwise.
1036 *
1037 * \threadsafety It is safe to call this function from any thread.
1038 *
1039 * \since This function is available since SDL 3.2.0.
1040 *
1041 * \sa SDL_SetInitialized
1042 * \sa SDL_ShouldInit
1043 */
1044extern SDL_DECLSPEC bool SDLCALL SDL_ShouldQuit(SDL_InitState *state);
1045
1046/**
1047 * Finish an initialization state transition.
1048 *
1049 * This function sets the status of the passed in state to
1050 * `SDL_INIT_STATUS_INITIALIZED` or `SDL_INIT_STATUS_UNINITIALIZED` and allows
1051 * any threads waiting for the status to proceed.
1052 *
1053 * \param state the initialization state to check.
1054 * \param initialized the new initialization state.
1055 *
1056 * \threadsafety It is safe to call this function from any thread.
1057 *
1058 * \since This function is available since SDL 3.2.0.
1059 *
1060 * \sa SDL_ShouldInit
1061 * \sa SDL_ShouldQuit
1062 */
1063extern SDL_DECLSPEC void SDLCALL SDL_SetInitialized(SDL_InitState *state, bool initialized);
1064
1065/* @} *//* Thread-safe initialization state functions */
1066
1067/* Ends C function definitions when using C++ */
1068#ifdef __cplusplus
1069}
1070#endif
1071#include <SDL3/SDL_close_code.h>
1072
1073#endif /* SDL_mutex_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_oldnames.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_oldnames.h
new file mode 100644
index 0000000..c93607e
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_oldnames.h
@@ -0,0 +1,1327 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/*
23 * Definitions to ease transition from SDL2 code
24 */
25
26#ifndef SDL_oldnames_h_
27#define SDL_oldnames_h_
28
29#include <SDL3/SDL_platform_defines.h>
30
31/* The new function names are recommended, but if you want to have the
32 * old names available while you are in the process of migrating code
33 * to SDL3, you can define `SDL_ENABLE_OLD_NAMES` in your project.
34 *
35 * You can use https://github.com/libsdl-org/SDL/blob/main/build-scripts/rename_symbols.py to mass rename the symbols defined here in your codebase:
36 * rename_symbols.py --all-symbols source_code_path
37 */
38#ifdef SDL_ENABLE_OLD_NAMES
39
40/* ##SDL_atomic.h */
41#define SDL_AtomicAdd SDL_AddAtomicInt
42#define SDL_AtomicCAS SDL_CompareAndSwapAtomicInt
43#define SDL_AtomicCASPtr SDL_CompareAndSwapAtomicPointer
44#define SDL_AtomicGet SDL_GetAtomicInt
45#define SDL_AtomicGetPtr SDL_GetAtomicPointer
46#define SDL_AtomicLock SDL_LockSpinlock
47#define SDL_AtomicSet SDL_SetAtomicInt
48#define SDL_AtomicSetPtr SDL_SetAtomicPointer
49#define SDL_AtomicTryLock SDL_TryLockSpinlock
50#define SDL_AtomicUnlock SDL_UnlockSpinlock
51#define SDL_atomic_t SDL_AtomicInt
52
53/* ##SDL_audio.h */
54#define AUDIO_F32 SDL_AUDIO_F32LE
55#define AUDIO_F32LSB SDL_AUDIO_F32LE
56#define AUDIO_F32MSB SDL_AUDIO_F32BE
57#define AUDIO_F32SYS SDL_AUDIO_F32
58#define AUDIO_S16 SDL_AUDIO_S16LE
59#define AUDIO_S16LSB SDL_AUDIO_S16LE
60#define AUDIO_S16MSB SDL_AUDIO_S16BE
61#define AUDIO_S16SYS SDL_AUDIO_S16
62#define AUDIO_S32 SDL_AUDIO_S32LE
63#define AUDIO_S32LSB SDL_AUDIO_S32LE
64#define AUDIO_S32MSB SDL_AUDIO_S32BE
65#define AUDIO_S32SYS SDL_AUDIO_S32
66#define AUDIO_S8 SDL_AUDIO_S8
67#define AUDIO_U8 SDL_AUDIO_U8
68#define SDL_AudioStreamAvailable SDL_GetAudioStreamAvailable
69#define SDL_AudioStreamClear SDL_ClearAudioStream
70#define SDL_AudioStreamFlush SDL_FlushAudioStream
71#define SDL_AudioStreamGet SDL_GetAudioStreamData
72#define SDL_AudioStreamPut SDL_PutAudioStreamData
73#define SDL_FreeAudioStream SDL_DestroyAudioStream
74#define SDL_FreeWAV SDL_free
75#define SDL_LoadWAV_RW SDL_LoadWAV_IO
76#define SDL_MixAudioFormat SDL_MixAudio
77#define SDL_NewAudioStream SDL_CreateAudioStream
78
79/* ##SDL_cpuinfo.h */
80#define SDL_GetCPUCount SDL_GetNumLogicalCPUCores
81#define SDL_SIMDGetAlignment SDL_GetSIMDAlignment
82
83/* ##SDL_endian.h */
84#define SDL_SwapBE16 SDL_Swap16BE
85#define SDL_SwapBE32 SDL_Swap32BE
86#define SDL_SwapBE64 SDL_Swap64BE
87#define SDL_SwapLE16 SDL_Swap16LE
88#define SDL_SwapLE32 SDL_Swap32LE
89#define SDL_SwapLE64 SDL_Swap64LE
90
91/* ##SDL_events.h */
92#define SDL_APP_DIDENTERBACKGROUND SDL_EVENT_DID_ENTER_BACKGROUND
93#define SDL_APP_DIDENTERFOREGROUND SDL_EVENT_DID_ENTER_FOREGROUND
94#define SDL_APP_LOWMEMORY SDL_EVENT_LOW_MEMORY
95#define SDL_APP_TERMINATING SDL_EVENT_TERMINATING
96#define SDL_APP_WILLENTERBACKGROUND SDL_EVENT_WILL_ENTER_BACKGROUND
97#define SDL_APP_WILLENTERFOREGROUND SDL_EVENT_WILL_ENTER_FOREGROUND
98#define SDL_AUDIODEVICEADDED SDL_EVENT_AUDIO_DEVICE_ADDED
99#define SDL_AUDIODEVICEREMOVED SDL_EVENT_AUDIO_DEVICE_REMOVED
100#define SDL_CLIPBOARDUPDATE SDL_EVENT_CLIPBOARD_UPDATE
101#define SDL_CONTROLLERAXISMOTION SDL_EVENT_GAMEPAD_AXIS_MOTION
102#define SDL_CONTROLLERBUTTONDOWN SDL_EVENT_GAMEPAD_BUTTON_DOWN
103#define SDL_CONTROLLERBUTTONUP SDL_EVENT_GAMEPAD_BUTTON_UP
104#define SDL_CONTROLLERDEVICEADDED SDL_EVENT_GAMEPAD_ADDED
105#define SDL_CONTROLLERDEVICEREMAPPED SDL_EVENT_GAMEPAD_REMAPPED
106#define SDL_CONTROLLERDEVICEREMOVED SDL_EVENT_GAMEPAD_REMOVED
107#define SDL_CONTROLLERSENSORUPDATE SDL_EVENT_GAMEPAD_SENSOR_UPDATE
108#define SDL_CONTROLLERSTEAMHANDLEUPDATED SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED
109#define SDL_CONTROLLERTOUCHPADDOWN SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN
110#define SDL_CONTROLLERTOUCHPADMOTION SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION
111#define SDL_CONTROLLERTOUCHPADUP SDL_EVENT_GAMEPAD_TOUCHPAD_UP
112#define SDL_ControllerAxisEvent SDL_GamepadAxisEvent
113#define SDL_ControllerButtonEvent SDL_GamepadButtonEvent
114#define SDL_ControllerDeviceEvent SDL_GamepadDeviceEvent
115#define SDL_ControllerSensorEvent SDL_GamepadSensorEvent
116#define SDL_ControllerTouchpadEvent SDL_GamepadTouchpadEvent
117#define SDL_DISPLAYEVENT_CONNECTED SDL_EVENT_DISPLAY_ADDED
118#define SDL_DISPLAYEVENT_DISCONNECTED SDL_EVENT_DISPLAY_REMOVED
119#define SDL_DISPLAYEVENT_MOVED SDL_EVENT_DISPLAY_MOVED
120#define SDL_DISPLAYEVENT_ORIENTATION SDL_EVENT_DISPLAY_ORIENTATION
121#define SDL_DROPBEGIN SDL_EVENT_DROP_BEGIN
122#define SDL_DROPCOMPLETE SDL_EVENT_DROP_COMPLETE
123#define SDL_DROPFILE SDL_EVENT_DROP_FILE
124#define SDL_DROPTEXT SDL_EVENT_DROP_TEXT
125#define SDL_DelEventWatch SDL_RemoveEventWatch
126#define SDL_FINGERDOWN SDL_EVENT_FINGER_DOWN
127#define SDL_FINGERMOTION SDL_EVENT_FINGER_MOTION
128#define SDL_FINGERUP SDL_EVENT_FINGER_UP
129#define SDL_FIRSTEVENT SDL_EVENT_FIRST
130#define SDL_JOYAXISMOTION SDL_EVENT_JOYSTICK_AXIS_MOTION
131#define SDL_JOYBATTERYUPDATED SDL_EVENT_JOYSTICK_BATTERY_UPDATED
132#define SDL_JOYBUTTONDOWN SDL_EVENT_JOYSTICK_BUTTON_DOWN
133#define SDL_JOYBUTTONUP SDL_EVENT_JOYSTICK_BUTTON_UP
134#define SDL_JOYDEVICEADDED SDL_EVENT_JOYSTICK_ADDED
135#define SDL_JOYDEVICEREMOVED SDL_EVENT_JOYSTICK_REMOVED
136#define SDL_JOYBALLMOTION SDL_EVENT_JOYSTICK_BALL_MOTION
137#define SDL_JOYHATMOTION SDL_EVENT_JOYSTICK_HAT_MOTION
138#define SDL_KEYDOWN SDL_EVENT_KEY_DOWN
139#define SDL_KEYMAPCHANGED SDL_EVENT_KEYMAP_CHANGED
140#define SDL_KEYUP SDL_EVENT_KEY_UP
141#define SDL_LASTEVENT SDL_EVENT_LAST
142#define SDL_LOCALECHANGED SDL_EVENT_LOCALE_CHANGED
143#define SDL_MOUSEBUTTONDOWN SDL_EVENT_MOUSE_BUTTON_DOWN
144#define SDL_MOUSEBUTTONUP SDL_EVENT_MOUSE_BUTTON_UP
145#define SDL_MOUSEMOTION SDL_EVENT_MOUSE_MOTION
146#define SDL_MOUSEWHEEL SDL_EVENT_MOUSE_WHEEL
147#define SDL_POLLSENTINEL SDL_EVENT_POLL_SENTINEL
148#define SDL_QUIT SDL_EVENT_QUIT
149#define SDL_RENDER_DEVICE_RESET SDL_EVENT_RENDER_DEVICE_RESET
150#define SDL_RENDER_TARGETS_RESET SDL_EVENT_RENDER_TARGETS_RESET
151#define SDL_SENSORUPDATE SDL_EVENT_SENSOR_UPDATE
152#define SDL_TEXTEDITING SDL_EVENT_TEXT_EDITING
153#define SDL_TEXTEDITING_EXT SDL_EVENT_TEXT_EDITING_EXT
154#define SDL_TEXTINPUT SDL_EVENT_TEXT_INPUT
155#define SDL_USEREVENT SDL_EVENT_USER
156#define SDL_WINDOWEVENT_CLOSE SDL_EVENT_WINDOW_CLOSE_REQUESTED
157#define SDL_WINDOWEVENT_DISPLAY_CHANGED SDL_EVENT_WINDOW_DISPLAY_CHANGED
158#define SDL_WINDOWEVENT_ENTER SDL_EVENT_WINDOW_MOUSE_ENTER
159#define SDL_WINDOWEVENT_EXPOSED SDL_EVENT_WINDOW_EXPOSED
160#define SDL_WINDOWEVENT_FOCUS_GAINED SDL_EVENT_WINDOW_FOCUS_GAINED
161#define SDL_WINDOWEVENT_FOCUS_LOST SDL_EVENT_WINDOW_FOCUS_LOST
162#define SDL_WINDOWEVENT_HIDDEN SDL_EVENT_WINDOW_HIDDEN
163#define SDL_WINDOWEVENT_HIT_TEST SDL_EVENT_WINDOW_HIT_TEST
164#define SDL_WINDOWEVENT_ICCPROF_CHANGED SDL_EVENT_WINDOW_ICCPROF_CHANGED
165#define SDL_WINDOWEVENT_LEAVE SDL_EVENT_WINDOW_MOUSE_LEAVE
166#define SDL_WINDOWEVENT_MAXIMIZED SDL_EVENT_WINDOW_MAXIMIZED
167#define SDL_WINDOWEVENT_MINIMIZED SDL_EVENT_WINDOW_MINIMIZED
168#define SDL_WINDOWEVENT_MOVED SDL_EVENT_WINDOW_MOVED
169#define SDL_WINDOWEVENT_RESIZED SDL_EVENT_WINDOW_RESIZED
170#define SDL_WINDOWEVENT_RESTORED SDL_EVENT_WINDOW_RESTORED
171#define SDL_WINDOWEVENT_SHOWN SDL_EVENT_WINDOW_SHOWN
172#define SDL_WINDOWEVENT_SIZE_CHANGED SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED
173#define SDL_eventaction SDL_EventAction
174
175/* ##SDL_gamecontroller.h */
176#define SDL_CONTROLLER_AXIS_INVALID SDL_GAMEPAD_AXIS_INVALID
177#define SDL_CONTROLLER_AXIS_LEFTX SDL_GAMEPAD_AXIS_LEFTX
178#define SDL_CONTROLLER_AXIS_LEFTY SDL_GAMEPAD_AXIS_LEFTY
179#define SDL_CONTROLLER_AXIS_MAX SDL_GAMEPAD_AXIS_COUNT
180#define SDL_CONTROLLER_AXIS_RIGHTX SDL_GAMEPAD_AXIS_RIGHTX
181#define SDL_CONTROLLER_AXIS_RIGHTY SDL_GAMEPAD_AXIS_RIGHTY
182#define SDL_CONTROLLER_AXIS_TRIGGERLEFT SDL_GAMEPAD_AXIS_LEFT_TRIGGER
183#define SDL_CONTROLLER_AXIS_TRIGGERRIGHT SDL_GAMEPAD_AXIS_RIGHT_TRIGGER
184#define SDL_CONTROLLER_BINDTYPE_AXIS SDL_GAMEPAD_BINDTYPE_AXIS
185#define SDL_CONTROLLER_BINDTYPE_BUTTON SDL_GAMEPAD_BINDTYPE_BUTTON
186#define SDL_CONTROLLER_BINDTYPE_HAT SDL_GAMEPAD_BINDTYPE_HAT
187#define SDL_CONTROLLER_BINDTYPE_NONE SDL_GAMEPAD_BINDTYPE_NONE
188#define SDL_CONTROLLER_BUTTON_A SDL_GAMEPAD_BUTTON_SOUTH
189#define SDL_CONTROLLER_BUTTON_B SDL_GAMEPAD_BUTTON_EAST
190#define SDL_CONTROLLER_BUTTON_BACK SDL_GAMEPAD_BUTTON_BACK
191#define SDL_CONTROLLER_BUTTON_DPAD_DOWN SDL_GAMEPAD_BUTTON_DPAD_DOWN
192#define SDL_CONTROLLER_BUTTON_DPAD_LEFT SDL_GAMEPAD_BUTTON_DPAD_LEFT
193#define SDL_CONTROLLER_BUTTON_DPAD_RIGHT SDL_GAMEPAD_BUTTON_DPAD_RIGHT
194#define SDL_CONTROLLER_BUTTON_DPAD_UP SDL_GAMEPAD_BUTTON_DPAD_UP
195#define SDL_CONTROLLER_BUTTON_GUIDE SDL_GAMEPAD_BUTTON_GUIDE
196#define SDL_CONTROLLER_BUTTON_INVALID SDL_GAMEPAD_BUTTON_INVALID
197#define SDL_CONTROLLER_BUTTON_LEFTSHOULDER SDL_GAMEPAD_BUTTON_LEFT_SHOULDER
198#define SDL_CONTROLLER_BUTTON_LEFTSTICK SDL_GAMEPAD_BUTTON_LEFT_STICK
199#define SDL_CONTROLLER_BUTTON_MAX SDL_GAMEPAD_BUTTON_COUNT
200#define SDL_CONTROLLER_BUTTON_MISC1 SDL_GAMEPAD_BUTTON_MISC1
201#define SDL_CONTROLLER_BUTTON_PADDLE1 SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1
202#define SDL_CONTROLLER_BUTTON_PADDLE2 SDL_GAMEPAD_BUTTON_LEFT_PADDLE1
203#define SDL_CONTROLLER_BUTTON_PADDLE3 SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2
204#define SDL_CONTROLLER_BUTTON_PADDLE4 SDL_GAMEPAD_BUTTON_LEFT_PADDLE2
205#define SDL_CONTROLLER_BUTTON_RIGHTSHOULDER SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER
206#define SDL_CONTROLLER_BUTTON_RIGHTSTICK SDL_GAMEPAD_BUTTON_RIGHT_STICK
207#define SDL_CONTROLLER_BUTTON_START SDL_GAMEPAD_BUTTON_START
208#define SDL_CONTROLLER_BUTTON_TOUCHPAD SDL_GAMEPAD_BUTTON_TOUCHPAD
209#define SDL_CONTROLLER_BUTTON_X SDL_GAMEPAD_BUTTON_WEST
210#define SDL_CONTROLLER_BUTTON_Y SDL_GAMEPAD_BUTTON_NORTH
211#define SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT
212#define SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR
213#define SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT
214#define SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO
215#define SDL_CONTROLLER_TYPE_PS3 SDL_GAMEPAD_TYPE_PS3
216#define SDL_CONTROLLER_TYPE_PS4 SDL_GAMEPAD_TYPE_PS4
217#define SDL_CONTROLLER_TYPE_PS5 SDL_GAMEPAD_TYPE_PS5
218#define SDL_CONTROLLER_TYPE_UNKNOWN SDL_GAMEPAD_TYPE_STANDARD
219#define SDL_CONTROLLER_TYPE_VIRTUAL SDL_GAMEPAD_TYPE_VIRTUAL
220#define SDL_CONTROLLER_TYPE_XBOX360 SDL_GAMEPAD_TYPE_XBOX360
221#define SDL_CONTROLLER_TYPE_XBOXONE SDL_GAMEPAD_TYPE_XBOXONE
222#define SDL_GameController SDL_Gamepad
223#define SDL_GameControllerAddMapping SDL_AddGamepadMapping
224#define SDL_GameControllerAddMappingsFromFile SDL_AddGamepadMappingsFromFile
225#define SDL_GameControllerAddMappingsFromRW SDL_AddGamepadMappingsFromIO
226#define SDL_GameControllerAxis SDL_GamepadAxis
227#define SDL_GameControllerBindType SDL_GamepadBindingType
228#define SDL_GameControllerButton SDL_GamepadButton
229#define SDL_GameControllerClose SDL_CloseGamepad
230#define SDL_GameControllerFromInstanceID SDL_GetGamepadFromID
231#define SDL_GameControllerFromPlayerIndex SDL_GetGamepadFromPlayerIndex
232#define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GetGamepadAppleSFSymbolsNameForAxis
233#define SDL_GameControllerGetAppleSFSymbolsNameForButton SDL_GetGamepadAppleSFSymbolsNameForButton
234#define SDL_GameControllerGetAttached SDL_GamepadConnected
235#define SDL_GameControllerGetAxis SDL_GetGamepadAxis
236#define SDL_GameControllerGetAxisFromString SDL_GetGamepadAxisFromString
237#define SDL_GameControllerGetButton SDL_GetGamepadButton
238#define SDL_GameControllerGetButtonFromString SDL_GetGamepadButtonFromString
239#define SDL_GameControllerGetFirmwareVersion SDL_GetGamepadFirmwareVersion
240#define SDL_GameControllerGetJoystick SDL_GetGamepadJoystick
241#define SDL_GameControllerGetNumTouchpadFingers SDL_GetNumGamepadTouchpadFingers
242#define SDL_GameControllerGetNumTouchpads SDL_GetNumGamepadTouchpads
243#define SDL_GameControllerGetPlayerIndex SDL_GetGamepadPlayerIndex
244#define SDL_GameControllerGetProduct SDL_GetGamepadProduct
245#define SDL_GameControllerGetProductVersion SDL_GetGamepadProductVersion
246#define SDL_GameControllerGetSensorData SDL_GetGamepadSensorData
247#define SDL_GameControllerGetSensorDataRate SDL_GetGamepadSensorDataRate
248#define SDL_GameControllerGetSerial SDL_GetGamepadSerial
249#define SDL_GameControllerGetSteamHandle SDL_GetGamepadSteamHandle
250#define SDL_GameControllerGetStringForAxis SDL_GetGamepadStringForAxis
251#define SDL_GameControllerGetStringForButton SDL_GetGamepadStringForButton
252#define SDL_GameControllerGetTouchpadFinger SDL_GetGamepadTouchpadFinger
253#define SDL_GameControllerGetType SDL_GetGamepadType
254#define SDL_GameControllerGetVendor SDL_GetGamepadVendor
255#define SDL_GameControllerHasAxis SDL_GamepadHasAxis
256#define SDL_GameControllerHasButton SDL_GamepadHasButton
257#define SDL_GameControllerHasSensor SDL_GamepadHasSensor
258#define SDL_GameControllerIsSensorEnabled SDL_GamepadSensorEnabled
259#define SDL_GameControllerMapping SDL_GetGamepadMapping
260#define SDL_GameControllerMappingForGUID SDL_GetGamepadMappingForGUID
261#define SDL_GameControllerName SDL_GetGamepadName
262#define SDL_GameControllerOpen SDL_OpenGamepad
263#define SDL_GameControllerPath SDL_GetGamepadPath
264#define SDL_GameControllerRumble SDL_RumbleGamepad
265#define SDL_GameControllerRumbleTriggers SDL_RumbleGamepadTriggers
266#define SDL_GameControllerSendEffect SDL_SendGamepadEffect
267#define SDL_GameControllerSetLED SDL_SetGamepadLED
268#define SDL_GameControllerSetPlayerIndex SDL_SetGamepadPlayerIndex
269#define SDL_GameControllerSetSensorEnabled SDL_SetGamepadSensorEnabled
270#define SDL_GameControllerType SDL_GamepadType
271#define SDL_GameControllerUpdate SDL_UpdateGamepads
272#define SDL_INIT_GAMECONTROLLER SDL_INIT_GAMEPAD
273#define SDL_IsGameController SDL_IsGamepad
274
275/* ##SDL_guid.h */
276#define SDL_GUIDFromString SDL_StringToGUID
277
278/* ##SDL_haptic.h */
279#define SDL_HapticClose SDL_CloseHaptic
280#define SDL_HapticDestroyEffect SDL_DestroyHapticEffect
281#define SDL_HapticGetEffectStatus SDL_GetHapticEffectStatus
282#define SDL_HapticNewEffect SDL_CreateHapticEffect
283#define SDL_HapticNumAxes SDL_GetNumHapticAxes
284#define SDL_HapticNumEffects SDL_GetMaxHapticEffects
285#define SDL_HapticNumEffectsPlaying SDL_GetMaxHapticEffectsPlaying
286#define SDL_HapticOpen SDL_OpenHaptic
287#define SDL_HapticOpenFromJoystick SDL_OpenHapticFromJoystick
288#define SDL_HapticOpenFromMouse SDL_OpenHapticFromMouse
289#define SDL_HapticPause SDL_PauseHaptic
290#define SDL_HapticQuery SDL_GetHapticFeatures
291#define SDL_HapticRumbleInit SDL_InitHapticRumble
292#define SDL_HapticRumblePlay SDL_PlayHapticRumble
293#define SDL_HapticRumbleStop SDL_StopHapticRumble
294#define SDL_HapticRunEffect SDL_RunHapticEffect
295#define SDL_HapticSetAutocenter SDL_SetHapticAutocenter
296#define SDL_HapticSetGain SDL_SetHapticGain
297#define SDL_HapticStopAll SDL_StopHapticEffects
298#define SDL_HapticStopEffect SDL_StopHapticEffect
299#define SDL_HapticUnpause SDL_ResumeHaptic
300#define SDL_HapticUpdateEffect SDL_UpdateHapticEffect
301#define SDL_JoystickIsHaptic SDL_IsJoystickHaptic
302#define SDL_MouseIsHaptic SDL_IsMouseHaptic
303
304/* ##SDL_hints.h */
305#define SDL_DelHintCallback SDL_RemoveHintCallback
306#define SDL_HINT_ALLOW_TOPMOST SDL_HINT_WINDOW_ALLOW_TOPMOST
307#define SDL_HINT_DIRECTINPUT_ENABLED SDL_HINT_JOYSTICK_DIRECTINPUT
308#define SDL_HINT_GDK_TEXTINPUT_DEFAULT SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT
309#define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE
310#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE SDL_HINT_JOYSTICK_ENHANCED_REPORTS
311#define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE SDL_HINT_JOYSTICK_ENHANCED_REPORTS
312#define SDL_HINT_LINUX_DIGITAL_HATS SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS
313#define SDL_HINT_LINUX_HAT_DEADZONES SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES
314#define SDL_HINT_LINUX_JOYSTICK_CLASSIC SDL_HINT_JOYSTICK_LINUX_CLASSIC
315#define SDL_HINT_LINUX_JOYSTICK_DEADZONES SDL_HINT_JOYSTICK_LINUX_DEADZONES
316
317/* ##SDL_joystick.h */
318#define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMEPAD
319#define SDL_JoystickAttachVirtualEx SDL_AttachVirtualJoystick
320#define SDL_JoystickClose SDL_CloseJoystick
321#define SDL_JoystickDetachVirtual SDL_DetachVirtualJoystick
322#define SDL_JoystickFromInstanceID SDL_GetJoystickFromID
323#define SDL_JoystickFromPlayerIndex SDL_GetJoystickFromPlayerIndex
324#define SDL_JoystickGUID SDL_GUID
325#define SDL_JoystickGetAttached SDL_JoystickConnected
326#define SDL_JoystickGetAxis SDL_GetJoystickAxis
327#define SDL_JoystickGetAxisInitialState SDL_GetJoystickAxisInitialState
328#define SDL_JoystickGetBall SDL_GetJoystickBall
329#define SDL_JoystickGetButton SDL_GetJoystickButton
330#define SDL_JoystickGetFirmwareVersion SDL_GetJoystickFirmwareVersion
331#define SDL_JoystickGetGUID SDL_GetJoystickGUID
332#define SDL_JoystickGetGUIDFromString SDL_StringToGUID
333#define SDL_JoystickGetHat SDL_GetJoystickHat
334#define SDL_JoystickGetPlayerIndex SDL_GetJoystickPlayerIndex
335#define SDL_JoystickGetProduct SDL_GetJoystickProduct
336#define SDL_JoystickGetProductVersion SDL_GetJoystickProductVersion
337#define SDL_JoystickGetSerial SDL_GetJoystickSerial
338#define SDL_JoystickGetType SDL_GetJoystickType
339#define SDL_JoystickGetVendor SDL_GetJoystickVendor
340#define SDL_JoystickInstanceID SDL_GetJoystickID
341#define SDL_JoystickIsVirtual SDL_IsJoystickVirtual
342#define SDL_JoystickName SDL_GetJoystickName
343#define SDL_JoystickNumAxes SDL_GetNumJoystickAxes
344#define SDL_JoystickNumBalls SDL_GetNumJoystickBalls
345#define SDL_JoystickNumButtons SDL_GetNumJoystickButtons
346#define SDL_JoystickNumHats SDL_GetNumJoystickHats
347#define SDL_JoystickOpen SDL_OpenJoystick
348#define SDL_JoystickPath SDL_GetJoystickPath
349#define SDL_JoystickRumble SDL_RumbleJoystick
350#define SDL_JoystickRumbleTriggers SDL_RumbleJoystickTriggers
351#define SDL_JoystickSendEffect SDL_SendJoystickEffect
352#define SDL_JoystickSetLED SDL_SetJoystickLED
353#define SDL_JoystickSetPlayerIndex SDL_SetJoystickPlayerIndex
354#define SDL_JoystickSetVirtualAxis SDL_SetJoystickVirtualAxis
355#define SDL_JoystickSetVirtualButton SDL_SetJoystickVirtualButton
356#define SDL_JoystickSetVirtualHat SDL_SetJoystickVirtualHat
357#define SDL_JoystickUpdate SDL_UpdateJoysticks
358
359/* ##SDL_keyboard.h */
360#define SDL_IsScreenKeyboardShown SDL_ScreenKeyboardShown
361#define SDL_IsTextInputActive SDL_TextInputActive
362
363/* ##SDL_keycode.h */
364#define KMOD_ALT SDL_KMOD_ALT
365#define KMOD_CAPS SDL_KMOD_CAPS
366#define KMOD_CTRL SDL_KMOD_CTRL
367#define KMOD_GUI SDL_KMOD_GUI
368#define KMOD_LALT SDL_KMOD_LALT
369#define KMOD_LCTRL SDL_KMOD_LCTRL
370#define KMOD_LGUI SDL_KMOD_LGUI
371#define KMOD_LSHIFT SDL_KMOD_LSHIFT
372#define KMOD_MODE SDL_KMOD_MODE
373#define KMOD_NONE SDL_KMOD_NONE
374#define KMOD_NUM SDL_KMOD_NUM
375#define KMOD_RALT SDL_KMOD_RALT
376#define KMOD_RCTRL SDL_KMOD_RCTRL
377#define KMOD_RGUI SDL_KMOD_RGUI
378#define KMOD_RSHIFT SDL_KMOD_RSHIFT
379#define KMOD_SCROLL SDL_KMOD_SCROLL
380#define KMOD_SHIFT SDL_KMOD_SHIFT
381#define SDLK_AUDIOFASTFORWARD SDLK_MEDIA_FAST_FORWARD
382#define SDLK_AUDIOMUTE SDLK_MUTE
383#define SDLK_AUDIONEXT SDLK_MEDIA_NEXT_TRACK
384#define SDLK_AUDIOPLAY SDLK_MEDIA_PLAY
385#define SDLK_AUDIOPREV SDLK_MEDIA_PREVIOUS_TRACK
386#define SDLK_AUDIOREWIND SDLK_MEDIA_REWIND
387#define SDLK_AUDIOSTOP SDLK_MEDIA_STOP
388#define SDLK_BACKQUOTE SDLK_GRAVE
389#define SDLK_EJECT SDLK_MEDIA_EJECT
390#define SDLK_MEDIASELECT SDLK_MEDIA_SELECT
391#define SDLK_QUOTE SDLK_APOSTROPHE
392#define SDLK_QUOTEDBL SDLK_DBLAPOSTROPHE
393#define SDLK_a SDLK_A
394#define SDLK_b SDLK_B
395#define SDLK_c SDLK_C
396#define SDLK_d SDLK_D
397#define SDLK_e SDLK_E
398#define SDLK_f SDLK_F
399#define SDLK_g SDLK_G
400#define SDLK_h SDLK_H
401#define SDLK_i SDLK_I
402#define SDLK_j SDLK_J
403#define SDLK_k SDLK_K
404#define SDLK_l SDLK_L
405#define SDLK_m SDLK_M
406#define SDLK_n SDLK_N
407#define SDLK_o SDLK_O
408#define SDLK_p SDLK_P
409#define SDLK_q SDLK_Q
410#define SDLK_r SDLK_R
411#define SDLK_s SDLK_S
412#define SDLK_t SDLK_T
413#define SDLK_u SDLK_U
414#define SDLK_v SDLK_V
415#define SDLK_w SDLK_W
416#define SDLK_x SDLK_X
417#define SDLK_y SDLK_Y
418#define SDLK_z SDLK_Z
419
420/* ##SDL_log.h */
421#define SDL_LogGetOutputFunction SDL_GetLogOutputFunction
422#define SDL_LogGetPriority SDL_GetLogPriority
423#define SDL_LogResetPriorities SDL_ResetLogPriorities
424#define SDL_LogSetAllPriority SDL_SetLogPriorities
425#define SDL_LogSetOutputFunction SDL_SetLogOutputFunction
426#define SDL_LogSetPriority SDL_SetLogPriority
427#define SDL_NUM_LOG_PRIORITIES SDL_LOG_PRIORITY_COUNT
428
429/* ##SDL_messagebox.h */
430#define SDL_MESSAGEBOX_COLOR_MAX SDL_MESSAGEBOX_COLOR_COUNT
431
432/* ##SDL_mouse.h */
433#define SDL_BUTTON SDL_BUTTON_MASK
434#define SDL_FreeCursor SDL_DestroyCursor
435#define SDL_NUM_SYSTEM_CURSORS SDL_SYSTEM_CURSOR_COUNT
436#define SDL_SYSTEM_CURSOR_ARROW SDL_SYSTEM_CURSOR_DEFAULT
437#define SDL_SYSTEM_CURSOR_HAND SDL_SYSTEM_CURSOR_POINTER
438#define SDL_SYSTEM_CURSOR_IBEAM SDL_SYSTEM_CURSOR_TEXT
439#define SDL_SYSTEM_CURSOR_NO SDL_SYSTEM_CURSOR_NOT_ALLOWED
440#define SDL_SYSTEM_CURSOR_SIZEALL SDL_SYSTEM_CURSOR_MOVE
441#define SDL_SYSTEM_CURSOR_SIZENESW SDL_SYSTEM_CURSOR_NESW_RESIZE
442#define SDL_SYSTEM_CURSOR_SIZENS SDL_SYSTEM_CURSOR_NS_RESIZE
443#define SDL_SYSTEM_CURSOR_SIZENWSE SDL_SYSTEM_CURSOR_NWSE_RESIZE
444#define SDL_SYSTEM_CURSOR_SIZEWE SDL_SYSTEM_CURSOR_EW_RESIZE
445#define SDL_SYSTEM_CURSOR_WAITARROW SDL_SYSTEM_CURSOR_PROGRESS
446#define SDL_SYSTEM_CURSOR_WINDOW_BOTTOM SDL_SYSTEM_CURSOR_S_RESIZE
447#define SDL_SYSTEM_CURSOR_WINDOW_BOTTOMLEFT SDL_SYSTEM_CURSOR_SW_RESIZE
448#define SDL_SYSTEM_CURSOR_WINDOW_BOTTOMRIGHT SDL_SYSTEM_CURSOR_SE_RESIZE
449#define SDL_SYSTEM_CURSOR_WINDOW_LEFT SDL_SYSTEM_CURSOR_W_RESIZE
450#define SDL_SYSTEM_CURSOR_WINDOW_RIGHT SDL_SYSTEM_CURSOR_E_RESIZE
451#define SDL_SYSTEM_CURSOR_WINDOW_TOP SDL_SYSTEM_CURSOR_N_RESIZE
452#define SDL_SYSTEM_CURSOR_WINDOW_TOPLEFT SDL_SYSTEM_CURSOR_NW_RESIZE
453#define SDL_SYSTEM_CURSOR_WINDOW_TOPRIGHT SDL_SYSTEM_CURSOR_NE_RESIZE
454
455/* ##SDL_mutex.h */
456#define SDL_CondBroadcast SDL_BroadcastCondition
457#define SDL_CondSignal SDL_SignalCondition
458#define SDL_CondWait SDL_WaitCondition
459#define SDL_CondWaitTimeout SDL_WaitConditionTimeout
460#define SDL_CreateCond SDL_CreateCondition
461#define SDL_DestroyCond SDL_DestroyCondition
462#define SDL_SemPost SDL_SignalSemaphore
463#define SDL_SemTryWait SDL_TryWaitSemaphore
464#define SDL_SemValue SDL_GetSemaphoreValue
465#define SDL_SemWait SDL_WaitSemaphore
466#define SDL_SemWaitTimeout SDL_WaitSemaphoreTimeout
467
468/* ##SDL_mutex.h */
469#define SDL_cond SDL_Condition
470#define SDL_mutex SDL_Mutex
471#define SDL_sem SDL_Semaphore
472
473/* ##SDL_pixels.h */
474#define SDL_AllocFormat SDL_GetPixelFormatDetails
475#define SDL_AllocPalette SDL_CreatePalette
476#define SDL_Colour SDL_Color
477#define SDL_FreePalette SDL_DestroyPalette
478#define SDL_MasksToPixelFormatEnum SDL_GetPixelFormatForMasks
479#define SDL_PIXELFORMAT_BGR444 SDL_PIXELFORMAT_XBGR4444
480#define SDL_PIXELFORMAT_BGR555 SDL_PIXELFORMAT_XBGR1555
481#define SDL_PIXELFORMAT_BGR888 SDL_PIXELFORMAT_XBGR8888
482#define SDL_PIXELFORMAT_RGB444 SDL_PIXELFORMAT_XRGB4444
483#define SDL_PIXELFORMAT_RGB555 SDL_PIXELFORMAT_XRGB1555
484#define SDL_PIXELFORMAT_RGB888 SDL_PIXELFORMAT_XRGB8888
485#define SDL_PixelFormatEnumToMasks SDL_GetMasksForPixelFormat
486
487/* ##SDL_rect.h */
488#define SDL_EncloseFPoints SDL_GetRectEnclosingPointsFloat
489#define SDL_EnclosePoints SDL_GetRectEnclosingPoints
490#define SDL_FRectEmpty SDL_RectEmptyFloat
491#define SDL_FRectEquals SDL_RectsEqualFloat
492#define SDL_FRectEqualsEpsilon SDL_RectsEqualEpsilon
493#define SDL_HasIntersection SDL_HasRectIntersection
494#define SDL_HasIntersectionF SDL_HasRectIntersectionFloat
495#define SDL_IntersectFRect SDL_GetRectIntersectionFloat
496#define SDL_IntersectFRectAndLine SDL_GetRectAndLineIntersectionFloat
497#define SDL_IntersectRect SDL_GetRectIntersection
498#define SDL_IntersectRectAndLine SDL_GetRectAndLineIntersection
499#define SDL_PointInFRect SDL_PointInRectFloat
500#define SDL_RectEquals SDL_RectsEqual
501#define SDL_UnionFRect SDL_GetRectUnionFloat
502#define SDL_UnionRect SDL_GetRectUnion
503
504/* ##SDL_render.h */
505#define SDL_GetRendererOutputSize SDL_GetCurrentRenderOutputSize
506#define SDL_RenderCopy SDL_RenderTexture
507#define SDL_RenderCopyEx SDL_RenderTextureRotated
508#define SDL_RenderCopyExF SDL_RenderTextureRotated
509#define SDL_RenderCopyF SDL_RenderTexture
510#define SDL_RenderDrawLine SDL_RenderLine
511#define SDL_RenderDrawLineF SDL_RenderLine
512#define SDL_RenderDrawLines SDL_RenderLines
513#define SDL_RenderDrawLinesF SDL_RenderLines
514#define SDL_RenderDrawPoint SDL_RenderPoint
515#define SDL_RenderDrawPointF SDL_RenderPoint
516#define SDL_RenderDrawPoints SDL_RenderPoints
517#define SDL_RenderDrawPointsF SDL_RenderPoints
518#define SDL_RenderDrawRect SDL_RenderRect
519#define SDL_RenderDrawRectF SDL_RenderRect
520#define SDL_RenderDrawRects SDL_RenderRects
521#define SDL_RenderDrawRectsF SDL_RenderRects
522#define SDL_RenderFillRectF SDL_RenderFillRect
523#define SDL_RenderFillRectsF SDL_RenderFillRects
524#define SDL_RendererFlip SDL_FlipMode
525#define SDL_RenderFlush SDL_FlushRenderer
526#define SDL_RenderGetClipRect SDL_GetRenderClipRect
527#define SDL_RenderGetLogicalSize SDL_GetRenderLogicalPresentation
528#define SDL_RenderGetMetalCommandEncoder SDL_GetRenderMetalCommandEncoder
529#define SDL_RenderGetMetalLayer SDL_GetRenderMetalLayer
530#define SDL_RenderGetScale SDL_GetRenderScale
531#define SDL_RenderGetViewport SDL_GetRenderViewport
532#define SDL_RenderGetWindow SDL_GetRenderWindow
533#define SDL_RenderIsClipEnabled SDL_RenderClipEnabled
534#define SDL_RenderLogicalToWindow SDL_RenderCoordinatesToWindow
535#define SDL_RenderSetClipRect SDL_SetRenderClipRect
536#define SDL_RenderSetLogicalSize SDL_SetRenderLogicalPresentation
537#define SDL_RenderSetScale SDL_SetRenderScale
538#define SDL_RenderSetVSync SDL_SetRenderVSync
539#define SDL_RenderSetViewport SDL_SetRenderViewport
540#define SDL_RenderWindowToLogical SDL_RenderCoordinatesFromWindow
541#define SDL_ScaleModeLinear SDL_SCALEMODE_LINEAR
542#define SDL_ScaleModeNearest SDL_SCALEMODE_NEAREST
543
544/* ##SDL_rwops.h */
545#define RW_SEEK_CUR SDL_IO_SEEK_CUR
546#define RW_SEEK_END SDL_IO_SEEK_END
547#define RW_SEEK_SET SDL_IO_SEEK_SET
548#define SDL_RWFromConstMem SDL_IOFromConstMem
549#define SDL_RWFromFile SDL_IOFromFile
550#define SDL_RWFromMem SDL_IOFromMem
551#define SDL_RWclose SDL_CloseIO
552#define SDL_RWops SDL_IOStream
553#define SDL_RWread SDL_ReadIO
554#define SDL_RWseek SDL_SeekIO
555#define SDL_RWsize SDL_GetIOSize
556#define SDL_RWtell SDL_TellIO
557#define SDL_RWwrite SDL_WriteIO
558#define SDL_ReadBE16 SDL_ReadU16BE
559#define SDL_ReadBE32 SDL_ReadU32BE
560#define SDL_ReadBE64 SDL_ReadU64BE
561#define SDL_ReadLE16 SDL_ReadU16LE
562#define SDL_ReadLE32 SDL_ReadU32LE
563#define SDL_ReadLE64 SDL_ReadU64LE
564#define SDL_WriteBE16 SDL_WriteU16BE
565#define SDL_WriteBE32 SDL_WriteU32BE
566#define SDL_WriteBE64 SDL_WriteU64BE
567#define SDL_WriteLE16 SDL_WriteU16LE
568#define SDL_WriteLE32 SDL_WriteU32LE
569#define SDL_WriteLE64 SDL_WriteU64LE
570
571/* ##SDL_scancode.h */
572#define SDL_NUM_SCANCODES SDL_SCANCODE_COUNT
573#define SDL_SCANCODE_AUDIOFASTFORWARD SDL_SCANCODE_MEDIA_FAST_FORWARD
574#define SDL_SCANCODE_AUDIOMUTE SDL_SCANCODE_MUTE
575#define SDL_SCANCODE_AUDIONEXT SDL_SCANCODE_MEDIA_NEXT_TRACK
576#define SDL_SCANCODE_AUDIOPLAY SDL_SCANCODE_MEDIA_PLAY
577#define SDL_SCANCODE_AUDIOPREV SDL_SCANCODE_MEDIA_PREVIOUS_TRACK
578#define SDL_SCANCODE_AUDIOREWIND SDL_SCANCODE_MEDIA_REWIND
579#define SDL_SCANCODE_AUDIOSTOP SDL_SCANCODE_MEDIA_STOP
580#define SDL_SCANCODE_EJECT SDL_SCANCODE_MEDIA_EJECT
581#define SDL_SCANCODE_MEDIASELECT SDL_SCANCODE_MEDIA_SELECT
582
583/* ##SDL_sensor.h */
584#define SDL_SensorClose SDL_CloseSensor
585#define SDL_SensorFromInstanceID SDL_GetSensorFromID
586#define SDL_SensorGetData SDL_GetSensorData
587#define SDL_SensorGetInstanceID SDL_GetSensorID
588#define SDL_SensorGetName SDL_GetSensorName
589#define SDL_SensorGetNonPortableType SDL_GetSensorNonPortableType
590#define SDL_SensorGetType SDL_GetSensorType
591#define SDL_SensorOpen SDL_OpenSensor
592#define SDL_SensorUpdate SDL_UpdateSensors
593
594/* ##SDL_stdinc.h */
595#define SDL_FALSE false
596#define SDL_TABLESIZE SDL_arraysize
597#define SDL_TRUE true
598#define SDL_bool bool
599#define SDL_size_add_overflow SDL_size_add_check_overflow
600#define SDL_size_mul_overflow SDL_size_mul_check_overflow
601#define SDL_strtokr SDL_strtok_r
602
603/* ##SDL_surface.h */
604#define SDL_BlitScaled SDL_BlitSurfaceScaled
605#define SDL_ConvertSurfaceFormat SDL_ConvertSurface
606#define SDL_FillRect SDL_FillSurfaceRect
607#define SDL_FillRects SDL_FillSurfaceRects
608#define SDL_FreeSurface SDL_DestroySurface
609#define SDL_GetClipRect SDL_GetSurfaceClipRect
610#define SDL_GetColorKey SDL_GetSurfaceColorKey
611#define SDL_HasColorKey SDL_SurfaceHasColorKey
612#define SDL_HasSurfaceRLE SDL_SurfaceHasRLE
613#define SDL_LoadBMP_RW SDL_LoadBMP_IO
614#define SDL_LowerBlit SDL_BlitSurfaceUnchecked
615#define SDL_LowerBlitScaled SDL_BlitSurfaceUncheckedScaled
616#define SDL_PREALLOC SDL_SURFACE_PREALLOCATED
617#define SDL_SIMD_ALIGNED SDL_SURFACE_SIMD_ALIGNED
618#define SDL_SaveBMP_RW SDL_SaveBMP_IO
619#define SDL_SetClipRect SDL_SetSurfaceClipRect
620#define SDL_SetColorKey SDL_SetSurfaceColorKey
621#define SDL_UpperBlit SDL_BlitSurface
622#define SDL_UpperBlitScaled SDL_BlitSurfaceScaled
623
624/* ##SDL_system.h */
625#define SDL_AndroidBackButton SDL_SendAndroidBackButton
626#define SDL_AndroidGetActivity SDL_GetAndroidActivity
627#define SDL_AndroidGetExternalStoragePath SDL_GetAndroidExternalStoragePath
628#define SDL_AndroidGetExternalStorageState SDL_GetAndroidExternalStorageState
629#define SDL_AndroidGetInternalStoragePath SDL_GetAndroidInternalStoragePath
630#define SDL_AndroidGetJNIEnv SDL_GetAndroidJNIEnv
631#define SDL_AndroidRequestPermission SDL_RequestAndroidPermission
632#define SDL_AndroidRequestPermissionCallback SDL_RequestAndroidPermissionCallback
633#define SDL_AndroidSendMessage SDL_SendAndroidMessage
634#define SDL_AndroidShowToast SDL_ShowAndroidToast
635#define SDL_DXGIGetOutputInfo SDL_GetDXGIOutputInfo
636#define SDL_Direct3D9GetAdapterIndex SDL_GetDirect3D9AdapterIndex
637#define SDL_GDKGetDefaultUser SDL_GetGDKDefaultUser
638#define SDL_GDKGetTaskQueue SDL_GetGDKTaskQueue
639#define SDL_LinuxSetThreadPriority SDL_SetLinuxThreadPriority
640#define SDL_LinuxSetThreadPriorityAndPolicy SDL_SetLinuxThreadPriorityAndPolicy
641#define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidEnterForeground
642#define SDL_OnApplicationWillResignActive SDL_OnApplicationWillEnterBackground
643#define SDL_iOSSetAnimationCallback SDL_SetiOSAnimationCallback
644#define SDL_iOSSetEventPump SDL_SetiOSEventPump
645#define SDL_iPhoneSetAnimationCallback SDL_SetiOSAnimationCallback
646#define SDL_iPhoneSetEventPump SDL_SetiOSEventPump
647
648/* ##SDL_thread.h */
649#define SDL_SetThreadPriority SDL_SetCurrentThreadPriority
650#define SDL_TLSCleanup SDL_CleanupTLS
651#define SDL_TLSGet SDL_GetTLS
652#define SDL_TLSSet SDL_SetTLS
653#define SDL_threadID SDL_ThreadID
654
655/* ##SDL_timer.h */
656#define SDL_GetTicks64 SDL_GetTicks
657
658/* ##SDL_version.h */
659#define SDL_COMPILEDVERSION SDL_VERSION
660#define SDL_PATCHLEVEL SDL_MICRO_VERSION
661
662/* ##SDL_video.h */
663#define SDL_GL_DeleteContext SDL_GL_DestroyContext
664#define SDL_GLattr SDL_GLAttr
665#define SDL_GLcontextFlag SDL_GLContextFlag
666#define SDL_GLcontextReleaseFlag SDL_GLContextReleaseFlag
667#define SDL_GLprofile SDL_GLProfile
668#define SDL_GetClosestDisplayMode SDL_GetClosestFullscreenDisplayMode
669#define SDL_GetDisplayOrientation SDL_GetCurrentDisplayOrientation
670#define SDL_GetPointDisplayIndex SDL_GetDisplayForPoint
671#define SDL_GetRectDisplayIndex SDL_GetDisplayForRect
672#define SDL_GetWindowDisplayIndex SDL_GetDisplayForWindow
673#define SDL_GetWindowDisplayMode SDL_GetWindowFullscreenMode
674#define SDL_HasWindowSurface SDL_WindowHasSurface
675#define SDL_IsScreenSaverEnabled SDL_ScreenSaverEnabled
676#define SDL_SetWindowDisplayMode SDL_SetWindowFullscreenMode
677#define SDL_WINDOW_ALLOW_HIGHDPI SDL_WINDOW_HIGH_PIXEL_DENSITY
678#define SDL_WINDOW_INPUT_GRABBED SDL_WINDOW_MOUSE_GRABBED
679#define SDL_WINDOW_SKIP_TASKBAR SDL_WINDOW_UTILITY
680
681#elif !defined(SDL_DISABLE_OLD_NAMES)
682
683/* ##SDL_atomic.h */
684#define SDL_AtomicAdd SDL_AtomicAdd_renamed_SDL_AddAtomicInt
685#define SDL_AtomicCAS SDL_AtomicCAS_renamed_SDL_CompareAndSwapAtomicInt
686#define SDL_AtomicCASPtr SDL_AtomicCASPtr_renamed_SDL_CompareAndSwapAtomicPointer
687#define SDL_AtomicGet SDL_AtomicGet_renamed_SDL_GetAtomicInt
688#define SDL_AtomicGetPtr SDL_AtomicGetPtr_renamed_SDL_GetAtomicPointer
689#define SDL_AtomicLock SDL_AtomicLock_renamed_SDL_LockSpinlock
690#define SDL_AtomicSet SDL_AtomicSet_renamed_SDL_SetAtomicInt
691#define SDL_AtomicSetPtr SDL_AtomicSetPtr_renamed_SDL_SetAtomicPointer
692#define SDL_AtomicTryLock SDL_AtomicTryLock_renamed_SDL_TryLockSpinlock
693#define SDL_AtomicUnlock SDL_AtomicUnlock_renamed_SDL_UnlockSpinlock
694#define SDL_atomic_t SDL_atomic_t_renamed_SDL_AtomicInt
695
696/* ##SDL_audio.h */
697#define AUDIO_F32 AUDIO_F32_renamed_SDL_AUDIO_F32LE
698#define AUDIO_F32LSB AUDIO_F32LSB_renamed_SDL_AUDIO_F32LE
699#define AUDIO_F32MSB AUDIO_F32MSB_renamed_SDL_AUDIO_F32BE
700#define AUDIO_F32SYS AUDIO_F32SYS_renamed_SDL_AUDIO_F32
701#define AUDIO_S16 AUDIO_S16_renamed_SDL_AUDIO_S16LE
702#define AUDIO_S16LSB AUDIO_S16LSB_renamed_SDL_AUDIO_S16LE
703#define AUDIO_S16MSB AUDIO_S16MSB_renamed_SDL_AUDIO_S16BE
704#define AUDIO_S16SYS AUDIO_S16SYS_renamed_SDL_AUDIO_S16
705#define AUDIO_S32 AUDIO_S32_renamed_SDL_AUDIO_S32LE
706#define AUDIO_S32LSB AUDIO_S32LSB_renamed_SDL_AUDIO_S32LE
707#define AUDIO_S32MSB AUDIO_S32MSB_renamed_SDL_AUDIO_S32BE
708#define AUDIO_S32SYS AUDIO_S32SYS_renamed_SDL_AUDIO_S32
709#define AUDIO_S8 AUDIO_S8_renamed_SDL_AUDIO_S8
710#define AUDIO_U8 AUDIO_U8_renamed_SDL_AUDIO_U8
711#define SDL_AudioStreamAvailable SDL_AudioStreamAvailable_renamed_SDL_GetAudioStreamAvailable
712#define SDL_AudioStreamClear SDL_AudioStreamClear_renamed_SDL_ClearAudioStream
713#define SDL_AudioStreamFlush SDL_AudioStreamFlush_renamed_SDL_FlushAudioStream
714#define SDL_AudioStreamGet SDL_AudioStreamGet_renamed_SDL_GetAudioStreamData
715#define SDL_AudioStreamPut SDL_AudioStreamPut_renamed_SDL_PutAudioStreamData
716#define SDL_FreeAudioStream SDL_FreeAudioStream_renamed_SDL_DestroyAudioStream
717#define SDL_FreeWAV SDL_FreeWAV_renamed_SDL_free
718#define SDL_LoadWAV_RW SDL_LoadWAV_RW_renamed_SDL_LoadWAV_IO
719#define SDL_MixAudioFormat SDL_MixAudioFormat_renamed_SDL_MixAudio
720#define SDL_NewAudioStream SDL_NewAudioStream_renamed_SDL_CreateAudioStream
721
722/* ##SDL_cpuinfo.h */
723#define SDL_GetCPUCount SDL_GetCPUCount_renamed_SDL_GetNumLogicalCPUCores
724#define SDL_SIMDGetAlignment SDL_SIMDGetAlignment_renamed_SDL_GetSIMDAlignment
725
726/* ##SDL_endian.h */
727#define SDL_SwapBE16 SDL_SwapBE16_renamed_SDL_Swap16BE
728#define SDL_SwapBE32 SDL_SwapBE32_renamed_SDL_Swap32BE
729#define SDL_SwapBE64 SDL_SwapBE64_renamed_SDL_Swap64BE
730#define SDL_SwapLE16 SDL_SwapLE16_renamed_SDL_Swap16LE
731#define SDL_SwapLE32 SDL_SwapLE32_renamed_SDL_Swap32LE
732#define SDL_SwapLE64 SDL_SwapLE64_renamed_SDL_Swap64LE
733
734/* ##SDL_events.h */
735#define SDL_APP_DIDENTERBACKGROUND SDL_APP_DIDENTERBACKGROUND_renamed_SDL_EVENT_DID_ENTER_BACKGROUND
736#define SDL_APP_DIDENTERFOREGROUND SDL_APP_DIDENTERFOREGROUND_renamed_SDL_EVENT_DID_ENTER_FOREGROUND
737#define SDL_APP_LOWMEMORY SDL_APP_LOWMEMORY_renamed_SDL_EVENT_LOW_MEMORY
738#define SDL_APP_TERMINATING SDL_APP_TERMINATING_renamed_SDL_EVENT_TERMINATING
739#define SDL_APP_WILLENTERBACKGROUND SDL_APP_WILLENTERBACKGROUND_renamed_SDL_EVENT_WILL_ENTER_BACKGROUND
740#define SDL_APP_WILLENTERFOREGROUND SDL_APP_WILLENTERFOREGROUND_renamed_SDL_EVENT_WILL_ENTER_FOREGROUND
741#define SDL_AUDIODEVICEADDED SDL_AUDIODEVICEADDED_renamed_SDL_EVENT_AUDIO_DEVICE_ADDED
742#define SDL_AUDIODEVICEREMOVED SDL_AUDIODEVICEREMOVED_renamed_SDL_EVENT_AUDIO_DEVICE_REMOVED
743#define SDL_CLIPBOARDUPDATE SDL_CLIPBOARDUPDATE_renamed_SDL_EVENT_CLIPBOARD_UPDATE
744#define SDL_CONTROLLERAXISMOTION SDL_CONTROLLERAXISMOTION_renamed_SDL_EVENT_GAMEPAD_AXIS_MOTION
745#define SDL_CONTROLLERBUTTONDOWN SDL_CONTROLLERBUTTONDOWN_renamed_SDL_EVENT_GAMEPAD_BUTTON_DOWN
746#define SDL_CONTROLLERBUTTONUP SDL_CONTROLLERBUTTONUP_renamed_SDL_EVENT_GAMEPAD_BUTTON_UP
747#define SDL_CONTROLLERDEVICEADDED SDL_CONTROLLERDEVICEADDED_renamed_SDL_EVENT_GAMEPAD_ADDED
748#define SDL_CONTROLLERDEVICEREMAPPED SDL_CONTROLLERDEVICEREMAPPED_renamed_SDL_EVENT_GAMEPAD_REMAPPED
749#define SDL_CONTROLLERDEVICEREMOVED SDL_CONTROLLERDEVICEREMOVED_renamed_SDL_EVENT_GAMEPAD_REMOVED
750#define SDL_CONTROLLERSENSORUPDATE SDL_CONTROLLERSENSORUPDATE_renamed_SDL_EVENT_GAMEPAD_SENSOR_UPDATE
751#define SDL_CONTROLLERSTEAMHANDLEUPDATED SDL_CONTROLLERSTEAMHANDLEUPDATED_renamed_SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED
752#define SDL_CONTROLLERTOUCHPADDOWN SDL_CONTROLLERTOUCHPADDOWN_renamed_SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN
753#define SDL_CONTROLLERTOUCHPADMOTION SDL_CONTROLLERTOUCHPADMOTION_renamed_SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION
754#define SDL_CONTROLLERTOUCHPADUP SDL_CONTROLLERTOUCHPADUP_renamed_SDL_EVENT_GAMEPAD_TOUCHPAD_UP
755#define SDL_ControllerAxisEvent SDL_ControllerAxisEvent_renamed_SDL_GamepadAxisEvent
756#define SDL_ControllerButtonEvent SDL_ControllerButtonEvent_renamed_SDL_GamepadButtonEvent
757#define SDL_ControllerDeviceEvent SDL_ControllerDeviceEvent_renamed_SDL_GamepadDeviceEvent
758#define SDL_ControllerSensorEvent SDL_ControllerSensorEvent_renamed_SDL_GamepadSensorEvent
759#define SDL_ControllerTouchpadEvent SDL_ControllerTouchpadEvent_renamed_SDL_GamepadTouchpadEvent
760#define SDL_DISPLAYEVENT_CONNECTED SDL_DISPLAYEVENT_CONNECTED_renamed_SDL_EVENT_DISPLAY_ADDED
761#define SDL_DISPLAYEVENT_DISCONNECTED SDL_DISPLAYEVENT_DISCONNECTED_renamed_SDL_EVENT_DISPLAY_REMOVED
762#define SDL_DISPLAYEVENT_MOVED SDL_DISPLAYEVENT_MOVED_renamed_SDL_EVENT_DISPLAY_MOVED
763#define SDL_DISPLAYEVENT_ORIENTATION SDL_DISPLAYEVENT_ORIENTATION_renamed_SDL_EVENT_DISPLAY_ORIENTATION
764#define SDL_DROPBEGIN SDL_DROPBEGIN_renamed_SDL_EVENT_DROP_BEGIN
765#define SDL_DROPCOMPLETE SDL_DROPCOMPLETE_renamed_SDL_EVENT_DROP_COMPLETE
766#define SDL_DROPFILE SDL_DROPFILE_renamed_SDL_EVENT_DROP_FILE
767#define SDL_DROPTEXT SDL_DROPTEXT_renamed_SDL_EVENT_DROP_TEXT
768#define SDL_DelEventWatch SDL_DelEventWatch_renamed_SDL_RemoveEventWatch
769#define SDL_FINGERDOWN SDL_FINGERDOWN_renamed_SDL_EVENT_FINGER_DOWN
770#define SDL_FINGERMOTION SDL_FINGERMOTION_renamed_SDL_EVENT_FINGER_MOTION
771#define SDL_FINGERUP SDL_FINGERUP_renamed_SDL_EVENT_FINGER_UP
772#define SDL_FIRSTEVENT SDL_FIRSTEVENT_renamed_SDL_EVENT_FIRST
773#define SDL_JOYAXISMOTION SDL_JOYAXISMOTION_renamed_SDL_EVENT_JOYSTICK_AXIS_MOTION
774#define SDL_JOYBATTERYUPDATED SDL_JOYBATTERYUPDATED_renamed_SDL_EVENT_JOYSTICK_BATTERY_UPDATED
775#define SDL_JOYBUTTONDOWN SDL_JOYBUTTONDOWN_renamed_SDL_EVENT_JOYSTICK_BUTTON_DOWN
776#define SDL_JOYBUTTONUP SDL_JOYBUTTONUP_renamed_SDL_EVENT_JOYSTICK_BUTTON_UP
777#define SDL_JOYDEVICEADDED SDL_JOYDEVICEADDED_renamed_SDL_EVENT_JOYSTICK_ADDED
778#define SDL_JOYDEVICEREMOVED SDL_JOYDEVICEREMOVED_renamed_SDL_EVENT_JOYSTICK_REMOVED
779#define SDL_JOYBALLMOTION SDL_JOYBALLMOTION_renamed_SDL_EVENT_JOYSTICK_BALL_MOTION
780#define SDL_JOYHATMOTION SDL_JOYHATMOTION_renamed_SDL_EVENT_JOYSTICK_HAT_MOTION
781#define SDL_KEYDOWN SDL_KEYDOWN_renamed_SDL_EVENT_KEY_DOWN
782#define SDL_KEYMAPCHANGED SDL_KEYMAPCHANGED_renamed_SDL_EVENT_KEYMAP_CHANGED
783#define SDL_KEYUP SDL_KEYUP_renamed_SDL_EVENT_KEY_UP
784#define SDL_LASTEVENT SDL_LASTEVENT_renamed_SDL_EVENT_LAST
785#define SDL_LOCALECHANGED SDL_LOCALECHANGED_renamed_SDL_EVENT_LOCALE_CHANGED
786#define SDL_MOUSEBUTTONDOWN SDL_MOUSEBUTTONDOWN_renamed_SDL_EVENT_MOUSE_BUTTON_DOWN
787#define SDL_MOUSEBUTTONUP SDL_MOUSEBUTTONUP_renamed_SDL_EVENT_MOUSE_BUTTON_UP
788#define SDL_MOUSEMOTION SDL_MOUSEMOTION_renamed_SDL_EVENT_MOUSE_MOTION
789#define SDL_MOUSEWHEEL SDL_MOUSEWHEEL_renamed_SDL_EVENT_MOUSE_WHEEL
790#define SDL_POLLSENTINEL SDL_POLLSENTINEL_renamed_SDL_EVENT_POLL_SENTINEL
791#define SDL_QUIT SDL_QUIT_renamed_SDL_EVENT_QUIT
792#define SDL_RENDER_DEVICE_RESET SDL_RENDER_DEVICE_RESET_renamed_SDL_EVENT_RENDER_DEVICE_RESET
793#define SDL_RENDER_TARGETS_RESET SDL_RENDER_TARGETS_RESET_renamed_SDL_EVENT_RENDER_TARGETS_RESET
794#define SDL_SENSORUPDATE SDL_SENSORUPDATE_renamed_SDL_EVENT_SENSOR_UPDATE
795#define SDL_TEXTEDITING SDL_TEXTEDITING_renamed_SDL_EVENT_TEXT_EDITING
796#define SDL_TEXTEDITING_EXT SDL_TEXTEDITING_EXT_renamed_SDL_EVENT_TEXT_EDITING_EXT
797#define SDL_TEXTINPUT SDL_TEXTINPUT_renamed_SDL_EVENT_TEXT_INPUT
798#define SDL_USEREVENT SDL_USEREVENT_renamed_SDL_EVENT_USER
799#define SDL_WINDOWEVENT_CLOSE SDL_WINDOWEVENT_CLOSE_renamed_SDL_EVENT_WINDOW_CLOSE_REQUESTED
800#define SDL_WINDOWEVENT_DISPLAY_CHANGED SDL_WINDOWEVENT_DISPLAY_CHANGED_renamed_SDL_EVENT_WINDOW_DISPLAY_CHANGED
801#define SDL_WINDOWEVENT_ENTER SDL_WINDOWEVENT_ENTER_renamed_SDL_EVENT_WINDOW_MOUSE_ENTER
802#define SDL_WINDOWEVENT_EXPOSED SDL_WINDOWEVENT_EXPOSED_renamed_SDL_EVENT_WINDOW_EXPOSED
803#define SDL_WINDOWEVENT_FOCUS_GAINED SDL_WINDOWEVENT_FOCUS_GAINED_renamed_SDL_EVENT_WINDOW_FOCUS_GAINED
804#define SDL_WINDOWEVENT_FOCUS_LOST SDL_WINDOWEVENT_FOCUS_LOST_renamed_SDL_EVENT_WINDOW_FOCUS_LOST
805#define SDL_WINDOWEVENT_HIDDEN SDL_WINDOWEVENT_HIDDEN_renamed_SDL_EVENT_WINDOW_HIDDEN
806#define SDL_WINDOWEVENT_HIT_TEST SDL_WINDOWEVENT_HIT_TEST_renamed_SDL_EVENT_WINDOW_HIT_TEST
807#define SDL_WINDOWEVENT_ICCPROF_CHANGED SDL_WINDOWEVENT_ICCPROF_CHANGED_renamed_SDL_EVENT_WINDOW_ICCPROF_CHANGED
808#define SDL_WINDOWEVENT_LEAVE SDL_WINDOWEVENT_LEAVE_renamed_SDL_EVENT_WINDOW_MOUSE_LEAVE
809#define SDL_WINDOWEVENT_MAXIMIZED SDL_WINDOWEVENT_MAXIMIZED_renamed_SDL_EVENT_WINDOW_MAXIMIZED
810#define SDL_WINDOWEVENT_MINIMIZED SDL_WINDOWEVENT_MINIMIZED_renamed_SDL_EVENT_WINDOW_MINIMIZED
811#define SDL_WINDOWEVENT_MOVED SDL_WINDOWEVENT_MOVED_renamed_SDL_EVENT_WINDOW_MOVED
812#define SDL_WINDOWEVENT_RESIZED SDL_WINDOWEVENT_RESIZED_renamed_SDL_EVENT_WINDOW_RESIZED
813#define SDL_WINDOWEVENT_RESTORED SDL_WINDOWEVENT_RESTORED_renamed_SDL_EVENT_WINDOW_RESTORED
814#define SDL_WINDOWEVENT_SHOWN SDL_WINDOWEVENT_SHOWN_renamed_SDL_EVENT_WINDOW_SHOWN
815#define SDL_WINDOWEVENT_SIZE_CHANGED SDL_WINDOWEVENT_SIZE_CHANGED_renamed_SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED
816#define SDL_eventaction SDL_eventaction_renamed_SDL_EventAction
817
818/* ##SDL_gamecontroller.h */
819#define SDL_CONTROLLER_AXIS_INVALID SDL_CONTROLLER_AXIS_INVALID_renamed_SDL_GAMEPAD_AXIS_INVALID
820#define SDL_CONTROLLER_AXIS_LEFTX SDL_CONTROLLER_AXIS_LEFTX_renamed_SDL_GAMEPAD_AXIS_LEFTX
821#define SDL_CONTROLLER_AXIS_LEFTY SDL_CONTROLLER_AXIS_LEFTY_renamed_SDL_GAMEPAD_AXIS_LEFTY
822#define SDL_CONTROLLER_AXIS_MAX SDL_CONTROLLER_AXIS_MAX_renamed_SDL_GAMEPAD_AXIS_COUNT
823#define SDL_CONTROLLER_AXIS_RIGHTX SDL_CONTROLLER_AXIS_RIGHTX_renamed_SDL_GAMEPAD_AXIS_RIGHTX
824#define SDL_CONTROLLER_AXIS_RIGHTY SDL_CONTROLLER_AXIS_RIGHTY_renamed_SDL_GAMEPAD_AXIS_RIGHTY
825#define SDL_CONTROLLER_AXIS_TRIGGERLEFT SDL_CONTROLLER_AXIS_TRIGGERLEFT_renamed_SDL_GAMEPAD_AXIS_LEFT_TRIGGER
826#define SDL_CONTROLLER_AXIS_TRIGGERRIGHT SDL_CONTROLLER_AXIS_TRIGGERRIGHT_renamed_SDL_GAMEPAD_AXIS_RIGHT_TRIGGER
827#define SDL_CONTROLLER_BINDTYPE_AXIS SDL_CONTROLLER_BINDTYPE_AXIS_renamed_SDL_GAMEPAD_BINDTYPE_AXIS
828#define SDL_CONTROLLER_BINDTYPE_BUTTON SDL_CONTROLLER_BINDTYPE_BUTTON_renamed_SDL_GAMEPAD_BINDTYPE_BUTTON
829#define SDL_CONTROLLER_BINDTYPE_HAT SDL_CONTROLLER_BINDTYPE_HAT_renamed_SDL_GAMEPAD_BINDTYPE_HAT
830#define SDL_CONTROLLER_BINDTYPE_NONE SDL_CONTROLLER_BINDTYPE_NONE_renamed_SDL_GAMEPAD_BINDTYPE_NONE
831#define SDL_CONTROLLER_BUTTON_A SDL_CONTROLLER_BUTTON_A_renamed_SDL_GAMEPAD_BUTTON_SOUTH
832#define SDL_CONTROLLER_BUTTON_B SDL_CONTROLLER_BUTTON_B_renamed_SDL_GAMEPAD_BUTTON_EAST
833#define SDL_CONTROLLER_BUTTON_BACK SDL_CONTROLLER_BUTTON_BACK_renamed_SDL_GAMEPAD_BUTTON_BACK
834#define SDL_CONTROLLER_BUTTON_DPAD_DOWN SDL_CONTROLLER_BUTTON_DPAD_DOWN_renamed_SDL_GAMEPAD_BUTTON_DPAD_DOWN
835#define SDL_CONTROLLER_BUTTON_DPAD_LEFT SDL_CONTROLLER_BUTTON_DPAD_LEFT_renamed_SDL_GAMEPAD_BUTTON_DPAD_LEFT
836#define SDL_CONTROLLER_BUTTON_DPAD_RIGHT SDL_CONTROLLER_BUTTON_DPAD_RIGHT_renamed_SDL_GAMEPAD_BUTTON_DPAD_RIGHT
837#define SDL_CONTROLLER_BUTTON_DPAD_UP SDL_CONTROLLER_BUTTON_DPAD_UP_renamed_SDL_GAMEPAD_BUTTON_DPAD_UP
838#define SDL_CONTROLLER_BUTTON_GUIDE SDL_CONTROLLER_BUTTON_GUIDE_renamed_SDL_GAMEPAD_BUTTON_GUIDE
839#define SDL_CONTROLLER_BUTTON_INVALID SDL_CONTROLLER_BUTTON_INVALID_renamed_SDL_GAMEPAD_BUTTON_INVALID
840#define SDL_CONTROLLER_BUTTON_LEFTSHOULDER SDL_CONTROLLER_BUTTON_LEFTSHOULDER_renamed_SDL_GAMEPAD_BUTTON_LEFT_SHOULDER
841#define SDL_CONTROLLER_BUTTON_LEFTSTICK SDL_CONTROLLER_BUTTON_LEFTSTICK_renamed_SDL_GAMEPAD_BUTTON_LEFT_STICK
842#define SDL_CONTROLLER_BUTTON_MAX SDL_CONTROLLER_BUTTON_MAX_renamed_SDL_GAMEPAD_BUTTON_COUNT
843#define SDL_CONTROLLER_BUTTON_MISC1 SDL_CONTROLLER_BUTTON_MISC1_renamed_SDL_GAMEPAD_BUTTON_MISC1
844#define SDL_CONTROLLER_BUTTON_PADDLE1 SDL_CONTROLLER_BUTTON_PADDLE1_renamed_SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1
845#define SDL_CONTROLLER_BUTTON_PADDLE2 SDL_CONTROLLER_BUTTON_PADDLE2_renamed_SDL_GAMEPAD_BUTTON_LEFT_PADDLE1
846#define SDL_CONTROLLER_BUTTON_PADDLE3 SDL_CONTROLLER_BUTTON_PADDLE3_renamed_SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2
847#define SDL_CONTROLLER_BUTTON_PADDLE4 SDL_CONTROLLER_BUTTON_PADDLE4_renamed_SDL_GAMEPAD_BUTTON_LEFT_PADDLE2
848#define SDL_CONTROLLER_BUTTON_RIGHTSHOULDER SDL_CONTROLLER_BUTTON_RIGHTSHOULDER_renamed_SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER
849#define SDL_CONTROLLER_BUTTON_RIGHTSTICK SDL_CONTROLLER_BUTTON_RIGHTSTICK_renamed_SDL_GAMEPAD_BUTTON_RIGHT_STICK
850#define SDL_CONTROLLER_BUTTON_START SDL_CONTROLLER_BUTTON_START_renamed_SDL_GAMEPAD_BUTTON_START
851#define SDL_CONTROLLER_BUTTON_TOUCHPAD SDL_CONTROLLER_BUTTON_TOUCHPAD_renamed_SDL_GAMEPAD_BUTTON_TOUCHPAD
852#define SDL_CONTROLLER_BUTTON_X SDL_CONTROLLER_BUTTON_X_renamed_SDL_GAMEPAD_BUTTON_WEST
853#define SDL_CONTROLLER_BUTTON_Y SDL_CONTROLLER_BUTTON_Y_renamed_SDL_GAMEPAD_BUTTON_NORTH
854#define SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT_renamed_SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT
855#define SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR_renamed_SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR
856#define SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT_renamed_SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT
857#define SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO_renamed_SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO
858#define SDL_CONTROLLER_TYPE_PS3 SDL_CONTROLLER_TYPE_PS3_renamed_SDL_GAMEPAD_TYPE_PS3
859#define SDL_CONTROLLER_TYPE_PS4 SDL_CONTROLLER_TYPE_PS4_renamed_SDL_GAMEPAD_TYPE_PS4
860#define SDL_CONTROLLER_TYPE_PS5 SDL_CONTROLLER_TYPE_PS5_renamed_SDL_GAMEPAD_TYPE_PS5
861#define SDL_CONTROLLER_TYPE_UNKNOWN SDL_CONTROLLER_TYPE_UNKNOWN_renamed_SDL_GAMEPAD_TYPE_STANDARD
862#define SDL_CONTROLLER_TYPE_VIRTUAL SDL_CONTROLLER_TYPE_VIRTUAL_renamed_SDL_GAMEPAD_TYPE_VIRTUAL
863#define SDL_CONTROLLER_TYPE_XBOX360 SDL_CONTROLLER_TYPE_XBOX360_renamed_SDL_GAMEPAD_TYPE_XBOX360
864#define SDL_CONTROLLER_TYPE_XBOXONE SDL_CONTROLLER_TYPE_XBOXONE_renamed_SDL_GAMEPAD_TYPE_XBOXONE
865#define SDL_GameController SDL_GameController_renamed_SDL_Gamepad
866#define SDL_GameControllerAddMapping SDL_GameControllerAddMapping_renamed_SDL_AddGamepadMapping
867#define SDL_GameControllerAddMappingsFromFile SDL_GameControllerAddMappingsFromFile_renamed_SDL_AddGamepadMappingsFromFile
868#define SDL_GameControllerAddMappingsFromRW SDL_GameControllerAddMappingsFromRW_renamed_SDL_AddGamepadMappingsFromIO
869#define SDL_GameControllerAxis SDL_GameControllerAxis_renamed_SDL_GamepadAxis
870#define SDL_GameControllerBindType SDL_GameControllerBindType_renamed_SDL_GamepadBindingType
871#define SDL_GameControllerButton SDL_GameControllerButton_renamed_SDL_GamepadButton
872#define SDL_GameControllerClose SDL_GameControllerClose_renamed_SDL_CloseGamepad
873#define SDL_GameControllerFromInstanceID SDL_GameControllerFromInstanceID_renamed_SDL_GetGamepadFromID
874#define SDL_GameControllerFromPlayerIndex SDL_GameControllerFromPlayerIndex_renamed_SDL_GetGamepadFromPlayerIndex
875#define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GameControllerGetAppleSFSymbolsNameForAxis_renamed_SDL_GetGamepadAppleSFSymbolsNameForAxis
876#define SDL_GameControllerGetAppleSFSymbolsNameForButton SDL_GameControllerGetAppleSFSymbolsNameForButton_renamed_SDL_GetGamepadAppleSFSymbolsNameForButton
877#define SDL_GameControllerGetAttached SDL_GameControllerGetAttached_renamed_SDL_GamepadConnected
878#define SDL_GameControllerGetAxis SDL_GameControllerGetAxis_renamed_SDL_GetGamepadAxis
879#define SDL_GameControllerGetAxisFromString SDL_GameControllerGetAxisFromString_renamed_SDL_GetGamepadAxisFromString
880#define SDL_GameControllerGetButton SDL_GameControllerGetButton_renamed_SDL_GetGamepadButton
881#define SDL_GameControllerGetButtonFromString SDL_GameControllerGetButtonFromString_renamed_SDL_GetGamepadButtonFromString
882#define SDL_GameControllerGetFirmwareVersion SDL_GameControllerGetFirmwareVersion_renamed_SDL_GetGamepadFirmwareVersion
883#define SDL_GameControllerGetJoystick SDL_GameControllerGetJoystick_renamed_SDL_GetGamepadJoystick
884#define SDL_GameControllerGetNumTouchpadFingers SDL_GameControllerGetNumTouchpadFingers_renamed_SDL_GetNumGamepadTouchpadFingers
885#define SDL_GameControllerGetNumTouchpads SDL_GameControllerGetNumTouchpads_renamed_SDL_GetNumGamepadTouchpads
886#define SDL_GameControllerGetPlayerIndex SDL_GameControllerGetPlayerIndex_renamed_SDL_GetGamepadPlayerIndex
887#define SDL_GameControllerGetProduct SDL_GameControllerGetProduct_renamed_SDL_GetGamepadProduct
888#define SDL_GameControllerGetProductVersion SDL_GameControllerGetProductVersion_renamed_SDL_GetGamepadProductVersion
889#define SDL_GameControllerGetSensorData SDL_GameControllerGetSensorData_renamed_SDL_GetGamepadSensorData
890#define SDL_GameControllerGetSensorDataRate SDL_GameControllerGetSensorDataRate_renamed_SDL_GetGamepadSensorDataRate
891#define SDL_GameControllerGetSerial SDL_GameControllerGetSerial_renamed_SDL_GetGamepadSerial
892#define SDL_GameControllerGetSteamHandle SDL_GameControllerGetSteamHandle_renamed_SDL_GetGamepadSteamHandle
893#define SDL_GameControllerGetStringForAxis SDL_GameControllerGetStringForAxis_renamed_SDL_GetGamepadStringForAxis
894#define SDL_GameControllerGetStringForButton SDL_GameControllerGetStringForButton_renamed_SDL_GetGamepadStringForButton
895#define SDL_GameControllerGetTouchpadFinger SDL_GameControllerGetTouchpadFinger_renamed_SDL_GetGamepadTouchpadFinger
896#define SDL_GameControllerGetType SDL_GameControllerGetType_renamed_SDL_GetGamepadType
897#define SDL_GameControllerGetVendor SDL_GameControllerGetVendor_renamed_SDL_GetGamepadVendor
898#define SDL_GameControllerHasAxis SDL_GameControllerHasAxis_renamed_SDL_GamepadHasAxis
899#define SDL_GameControllerHasButton SDL_GameControllerHasButton_renamed_SDL_GamepadHasButton
900#define SDL_GameControllerHasSensor SDL_GameControllerHasSensor_renamed_SDL_GamepadHasSensor
901#define SDL_GameControllerIsSensorEnabled SDL_GameControllerIsSensorEnabled_renamed_SDL_GamepadSensorEnabled
902#define SDL_GameControllerMapping SDL_GameControllerMapping_renamed_SDL_GetGamepadMapping
903#define SDL_GameControllerMappingForDeviceIndex SDL_GameControllerMappingForDeviceIndex_renamed_SDL_GetGamepadMappingForDeviceIndex
904#define SDL_GameControllerMappingForGUID SDL_GameControllerMappingForGUID_renamed_SDL_GetGamepadMappingForGUID
905#define SDL_GameControllerName SDL_GameControllerName_renamed_SDL_GetGamepadName
906#define SDL_GameControllerOpen SDL_GameControllerOpen_renamed_SDL_OpenGamepad
907#define SDL_GameControllerPath SDL_GameControllerPath_renamed_SDL_GetGamepadPath
908#define SDL_GameControllerRumble SDL_GameControllerRumble_renamed_SDL_RumbleGamepad
909#define SDL_GameControllerRumbleTriggers SDL_GameControllerRumbleTriggers_renamed_SDL_RumbleGamepadTriggers
910#define SDL_GameControllerSendEffect SDL_GameControllerSendEffect_renamed_SDL_SendGamepadEffect
911#define SDL_GameControllerSetLED SDL_GameControllerSetLED_renamed_SDL_SetGamepadLED
912#define SDL_GameControllerSetPlayerIndex SDL_GameControllerSetPlayerIndex_renamed_SDL_SetGamepadPlayerIndex
913#define SDL_GameControllerSetSensorEnabled SDL_GameControllerSetSensorEnabled_renamed_SDL_SetGamepadSensorEnabled
914#define SDL_GameControllerType SDL_GameControllerType_renamed_SDL_GamepadType
915#define SDL_GameControllerUpdate SDL_GameControllerUpdate_renamed_SDL_UpdateGamepads
916#define SDL_INIT_GAMECONTROLLER SDL_INIT_GAMECONTROLLER_renamed_SDL_INIT_GAMEPAD
917#define SDL_IsGameController SDL_IsGameController_renamed_SDL_IsGamepad
918
919/* ##SDL_guid.h */
920#define SDL_GUIDFromString SDL_GUIDFromString_renamed_SDL_StringToGUID
921
922/* ##SDL_haptic.h */
923#define SDL_HapticClose SDL_HapticClose_renamed_SDL_CloseHaptic
924#define SDL_HapticDestroyEffect SDL_HapticDestroyEffect_renamed_SDL_DestroyHapticEffect
925#define SDL_HapticGetEffectStatus SDL_HapticGetEffectStatus_renamed_SDL_GetHapticEffectStatus
926#define SDL_HapticNewEffect SDL_HapticNewEffect_renamed_SDL_CreateHapticEffect
927#define SDL_HapticNumAxes SDL_HapticNumAxes_renamed_SDL_GetNumHapticAxes
928#define SDL_HapticNumEffects SDL_HapticNumEffects_renamed_SDL_GetMaxHapticEffects
929#define SDL_HapticNumEffectsPlaying SDL_HapticNumEffectsPlaying_renamed_SDL_GetMaxHapticEffectsPlaying
930#define SDL_HapticOpen SDL_HapticOpen_renamed_SDL_OpenHaptic
931#define SDL_HapticOpenFromJoystick SDL_HapticOpenFromJoystick_renamed_SDL_OpenHapticFromJoystick
932#define SDL_HapticOpenFromMouse SDL_HapticOpenFromMouse_renamed_SDL_OpenHapticFromMouse
933#define SDL_HapticPause SDL_HapticPause_renamed_SDL_PauseHaptic
934#define SDL_HapticQuery SDL_HapticQuery_renamed_SDL_GetHapticFeatures
935#define SDL_HapticRumbleInit SDL_HapticRumbleInit_renamed_SDL_InitHapticRumble
936#define SDL_HapticRumblePlay SDL_HapticRumblePlay_renamed_SDL_PlayHapticRumble
937#define SDL_HapticRumbleStop SDL_HapticRumbleStop_renamed_SDL_StopHapticRumble
938#define SDL_HapticRunEffect SDL_HapticRunEffect_renamed_SDL_RunHapticEffect
939#define SDL_HapticSetAutocenter SDL_HapticSetAutocenter_renamed_SDL_SetHapticAutocenter
940#define SDL_HapticSetGain SDL_HapticSetGain_renamed_SDL_SetHapticGain
941#define SDL_HapticStopAll SDL_HapticStopAll_renamed_SDL_StopHapticEffects
942#define SDL_HapticStopEffect SDL_HapticStopEffect_renamed_SDL_StopHapticEffect
943#define SDL_HapticUnpause SDL_HapticUnpause_renamed_SDL_ResumeHaptic
944#define SDL_HapticUpdateEffect SDL_HapticUpdateEffect_renamed_SDL_UpdateHapticEffect
945#define SDL_JoystickIsHaptic SDL_JoystickIsHaptic_renamed_SDL_IsJoystickHaptic
946#define SDL_MouseIsHaptic SDL_MouseIsHaptic_renamed_SDL_IsMouseHaptic
947
948/* ##SDL_hints.h */
949#define SDL_DelHintCallback SDL_DelHintCallback_renamed_SDL_RemoveHintCallback
950#define SDL_HINT_ALLOW_TOPMOST SDL_HINT_ALLOW_TOPMOST_renamed_SDL_HINT_WINDOW_ALLOW_TOPMOST
951#define SDL_HINT_DIRECTINPUT_ENABLED SDL_HINT_DIRECTINPUT_ENABLED_renamed_SDL_HINT_JOYSTICK_DIRECTINPUT
952#define SDL_HINT_GDK_TEXTINPUT_DEFAULT SDL_HINT_GDK_TEXTINPUT_DEFAULT_renamed_SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT
953#define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE_renamed_SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE
954#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE_renamed_SDL_HINT_JOYSTICK_ENHANCED_REPORTS
955#define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE_renamed_SDL_HINT_JOYSTICK_ENHANCED_REPORTS
956#define SDL_HINT_LINUX_DIGITAL_HATS SDL_HINT_LINUX_DIGITAL_HATS_renamed_SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS
957#define SDL_HINT_LINUX_HAT_DEADZONES SDL_HINT_LINUX_HAT_DEADZONES_renamed_SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES
958#define SDL_HINT_LINUX_JOYSTICK_CLASSIC SDL_HINT_LINUX_JOYSTICK_CLASSIC_renamed_SDL_HINT_JOYSTICK_LINUX_CLASSIC
959#define SDL_HINT_LINUX_JOYSTICK_DEADZONES SDL_HINT_LINUX_JOYSTICK_DEADZONES_renamed_SDL_HINT_JOYSTICK_LINUX_DEADZONES
960
961/* ##SDL_joystick.h */
962#define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMECONTROLLER_renamed_SDL_JOYSTICK_TYPE_GAMEPAD
963#define SDL_JoystickAttachVirtualEx SDL_JoystickAttachVirtualEx_renamed_SDL_AttachVirtualJoystick
964#define SDL_JoystickClose SDL_JoystickClose_renamed_SDL_CloseJoystick
965#define SDL_JoystickDetachVirtual SDL_JoystickDetachVirtual_renamed_SDL_DetachVirtualJoystick
966#define SDL_JoystickFromInstanceID SDL_JoystickFromInstanceID_renamed_SDL_GetJoystickFromID
967#define SDL_JoystickFromPlayerIndex SDL_JoystickFromPlayerIndex_renamed_SDL_GetJoystickFromPlayerIndex
968#define SDL_JoystickGUID SDL_JoystickGUID_renamed_SDL_GUID
969#define SDL_JoystickGetAttached SDL_JoystickGetAttached_renamed_SDL_JoystickConnected
970#define SDL_JoystickGetAxis SDL_JoystickGetAxis_renamed_SDL_GetJoystickAxis
971#define SDL_JoystickGetAxisInitialState SDL_JoystickGetAxisInitialState_renamed_SDL_GetJoystickAxisInitialState
972#define SDL_JoystickGetBall SDL_JoystickGetBall_renamed_SDL_GetJoystickBall
973#define SDL_JoystickGetButton SDL_JoystickGetButton_renamed_SDL_GetJoystickButton
974#define SDL_JoystickGetFirmwareVersion SDL_JoystickGetFirmwareVersion_renamed_SDL_GetJoystickFirmwareVersion
975#define SDL_JoystickGetGUID SDL_JoystickGetGUID_renamed_SDL_GetJoystickGUID
976#define SDL_JoystickGetGUIDFromString SDL_JoystickGetGUIDFromString_renamed_SDL_GUIDFromString
977#define SDL_JoystickGetHat SDL_JoystickGetHat_renamed_SDL_GetJoystickHat
978#define SDL_JoystickGetPlayerIndex SDL_JoystickGetPlayerIndex_renamed_SDL_GetJoystickPlayerIndex
979#define SDL_JoystickGetProduct SDL_JoystickGetProduct_renamed_SDL_GetJoystickProduct
980#define SDL_JoystickGetProductVersion SDL_JoystickGetProductVersion_renamed_SDL_GetJoystickProductVersion
981#define SDL_JoystickGetSerial SDL_JoystickGetSerial_renamed_SDL_GetJoystickSerial
982#define SDL_JoystickGetType SDL_JoystickGetType_renamed_SDL_GetJoystickType
983#define SDL_JoystickGetVendor SDL_JoystickGetVendor_renamed_SDL_GetJoystickVendor
984#define SDL_JoystickInstanceID SDL_JoystickInstanceID_renamed_SDL_GetJoystickID
985#define SDL_JoystickIsVirtual SDL_JoystickIsVirtual_renamed_SDL_IsJoystickVirtual
986#define SDL_JoystickName SDL_JoystickName_renamed_SDL_GetJoystickName
987#define SDL_JoystickNumAxes SDL_JoystickNumAxes_renamed_SDL_GetNumJoystickAxes
988#define SDL_JoystickNumBalls SDL_JoystickNumBalls_renamed_SDL_GetNumJoystickBalls
989#define SDL_JoystickNumButtons SDL_JoystickNumButtons_renamed_SDL_GetNumJoystickButtons
990#define SDL_JoystickNumHats SDL_JoystickNumHats_renamed_SDL_GetNumJoystickHats
991#define SDL_JoystickOpen SDL_JoystickOpen_renamed_SDL_OpenJoystick
992#define SDL_JoystickPath SDL_JoystickPath_renamed_SDL_GetJoystickPath
993#define SDL_JoystickRumble SDL_JoystickRumble_renamed_SDL_RumbleJoystick
994#define SDL_JoystickRumbleTriggers SDL_JoystickRumbleTriggers_renamed_SDL_RumbleJoystickTriggers
995#define SDL_JoystickSendEffect SDL_JoystickSendEffect_renamed_SDL_SendJoystickEffect
996#define SDL_JoystickSetLED SDL_JoystickSetLED_renamed_SDL_SetJoystickLED
997#define SDL_JoystickSetPlayerIndex SDL_JoystickSetPlayerIndex_renamed_SDL_SetJoystickPlayerIndex
998#define SDL_JoystickSetVirtualAxis SDL_JoystickSetVirtualAxis_renamed_SDL_SetJoystickVirtualAxis
999#define SDL_JoystickSetVirtualButton SDL_JoystickSetVirtualButton_renamed_SDL_SetJoystickVirtualButton
1000#define SDL_JoystickSetVirtualHat SDL_JoystickSetVirtualHat_renamed_SDL_SetJoystickVirtualHat
1001#define SDL_JoystickUpdate SDL_JoystickUpdate_renamed_SDL_UpdateJoysticks
1002
1003/* ##SDL_keyboard.h */
1004#define SDL_IsScreenKeyboardShown SDL_IsScreenKeyboardShown_renamed_SDL_ScreenKeyboardShown
1005#define SDL_IsTextInputActive SDL_IsTextInputActive_renamed_SDL_TextInputActive
1006
1007/* ##SDL_keycode.h */
1008#define KMOD_ALT KMOD_ALT_renamed_SDL_KMOD_ALT
1009#define KMOD_CAPS KMOD_CAPS_renamed_SDL_KMOD_CAPS
1010#define KMOD_CTRL KMOD_CTRL_renamed_SDL_KMOD_CTRL
1011#define KMOD_GUI KMOD_GUI_renamed_SDL_KMOD_GUI
1012#define KMOD_LALT KMOD_LALT_renamed_SDL_KMOD_LALT
1013#define KMOD_LCTRL KMOD_LCTRL_renamed_SDL_KMOD_LCTRL
1014#define KMOD_LGUI KMOD_LGUI_renamed_SDL_KMOD_LGUI
1015#define KMOD_LSHIFT KMOD_LSHIFT_renamed_SDL_KMOD_LSHIFT
1016#define KMOD_MODE KMOD_MODE_renamed_SDL_KMOD_MODE
1017#define KMOD_NONE KMOD_NONE_renamed_SDL_KMOD_NONE
1018#define KMOD_NUM KMOD_NUM_renamed_SDL_KMOD_NUM
1019#define KMOD_RALT KMOD_RALT_renamed_SDL_KMOD_RALT
1020#define KMOD_RCTRL KMOD_RCTRL_renamed_SDL_KMOD_RCTRL
1021#define KMOD_RGUI KMOD_RGUI_renamed_SDL_KMOD_RGUI
1022#define KMOD_RSHIFT KMOD_RSHIFT_renamed_SDL_KMOD_RSHIFT
1023#define KMOD_SCROLL KMOD_SCROLL_renamed_SDL_KMOD_SCROLL
1024#define KMOD_SHIFT KMOD_SHIFT_renamed_SDL_KMOD_SHIFT
1025#define SDLK_AUDIOFASTFORWARD SDLK_AUDIOFASTFORWARD_renamed_SDLK_MEDIA_FAST_FORWARD
1026#define SDLK_AUDIOMUTE SDLK_AUDIOMUTE_renamed_SDLK_MUTE
1027#define SDLK_AUDIONEXT SDLK_AUDIONEXT_renamed_SDLK_MEDIA_NEXT_TRACK
1028#define SDLK_AUDIOPLAY SDLK_AUDIOPLAY_renamed_SDLK_MEDIA_PLAY
1029#define SDLK_AUDIOPREV SDLK_AUDIOPREV_renamed_SDLK_MEDIA_PREVIOUS_TRACK
1030#define SDLK_AUDIOREWIND SDLK_AUDIOREWIND_renamed_SDLK_MEDIA_REWIND
1031#define SDLK_AUDIOSTOP SDLK_AUDIOSTOP_renamed_SDLK_MEDIA_STOP
1032#define SDLK_BACKQUOTE SDLK_BACKQUOTE_renamed_SDLK_GRAVE
1033#define SDLK_EJECT SDLK_EJECT_renamed_SDLK_MEDIA_EJECT
1034#define SDLK_MEDIASELECT SDLK_MEDIASELECT_renamed_SDLK_MEDIA_SELECT
1035#define SDLK_QUOTE SDLK_QUOTE_renamed_SDLK_APOSTROPHE
1036#define SDLK_QUOTEDBL SDLK_QUOTEDBL_renamed_SDLK_DBLAPOSTROPHE
1037#define SDLK_a SDLK_a_renamed_SDLK_A
1038#define SDLK_b SDLK_b_renamed_SDLK_B
1039#define SDLK_c SDLK_c_renamed_SDLK_C
1040#define SDLK_d SDLK_d_renamed_SDLK_D
1041#define SDLK_e SDLK_e_renamed_SDLK_E
1042#define SDLK_f SDLK_f_renamed_SDLK_F
1043#define SDLK_g SDLK_g_renamed_SDLK_G
1044#define SDLK_h SDLK_h_renamed_SDLK_H
1045#define SDLK_i SDLK_i_renamed_SDLK_I
1046#define SDLK_j SDLK_j_renamed_SDLK_J
1047#define SDLK_k SDLK_k_renamed_SDLK_K
1048#define SDLK_l SDLK_l_renamed_SDLK_L
1049#define SDLK_m SDLK_m_renamed_SDLK_M
1050#define SDLK_n SDLK_n_renamed_SDLK_N
1051#define SDLK_o SDLK_o_renamed_SDLK_O
1052#define SDLK_p SDLK_p_renamed_SDLK_P
1053#define SDLK_q SDLK_q_renamed_SDLK_Q
1054#define SDLK_r SDLK_r_renamed_SDLK_R
1055#define SDLK_s SDLK_s_renamed_SDLK_S
1056#define SDLK_t SDLK_t_renamed_SDLK_T
1057#define SDLK_u SDLK_u_renamed_SDLK_U
1058#define SDLK_v SDLK_v_renamed_SDLK_V
1059#define SDLK_w SDLK_w_renamed_SDLK_W
1060#define SDLK_x SDLK_x_renamed_SDLK_X
1061#define SDLK_y SDLK_y_renamed_SDLK_Y
1062#define SDLK_z SDLK_z_renamed_SDLK_Z
1063
1064/* ##SDL_log.h */
1065#define SDL_LogGetOutputFunction SDL_LogGetOutputFunction_renamed_SDL_GetLogOutputFunction
1066#define SDL_LogGetPriority SDL_LogGetPriority_renamed_SDL_GetLogPriority
1067#define SDL_LogResetPriorities SDL_LogResetPriorities_renamed_SDL_ResetLogPriorities
1068#define SDL_LogSetAllPriority SDL_LogSetAllPriority_renamed_SDL_SetLogPriorities
1069#define SDL_LogSetOutputFunction SDL_LogSetOutputFunction_renamed_SDL_SetLogOutputFunction
1070#define SDL_LogSetPriority SDL_LogSetPriority_renamed_SDL_SetLogPriority
1071#define SDL_NUM_LOG_PRIORITIES SDL_NUM_LOG_PRIORITIES_renamed_SDL_LOG_PRIORITY_COUNT
1072
1073/* ##SDL_messagebox.h */
1074#define SDL_MESSAGEBOX_COLOR_MAX SDL_MESSAGEBOX_COLOR_MAX_renamed_SDL_MESSAGEBOX_COLOR_COUNT
1075
1076/* ##SDL_mouse.h */
1077#define SDL_BUTTON SDL_BUTTON_renamed_SDL_BUTTON_MASK
1078#define SDL_FreeCursor SDL_FreeCursor_renamed_SDL_DestroyCursor
1079#define SDL_NUM_SYSTEM_CURSORS SDL_NUM_SYSTEM_CURSORS_renamed_SDL_SYSTEM_CURSOR_COUNT
1080#define SDL_SYSTEM_CURSOR_ARROW SDL_SYSTEM_CURSOR_ARROW_renamed_SDL_SYSTEM_CURSOR_DEFAULT
1081#define SDL_SYSTEM_CURSOR_HAND SDL_SYSTEM_CURSOR_HAND_renamed_SDL_SYSTEM_CURSOR_POINTER
1082#define SDL_SYSTEM_CURSOR_IBEAM SDL_SYSTEM_CURSOR_IBEAM_renamed_SDL_SYSTEM_CURSOR_TEXT
1083#define SDL_SYSTEM_CURSOR_NO SDL_SYSTEM_CURSOR_NO_renamed_SDL_SYSTEM_CURSOR_NOT_ALLOWED
1084#define SDL_SYSTEM_CURSOR_SIZEALL SDL_SYSTEM_CURSOR_SIZEALL_renamed_SDL_SYSTEM_CURSOR_MOVE
1085#define SDL_SYSTEM_CURSOR_SIZENESW SDL_SYSTEM_CURSOR_SIZENESW_renamed_SDL_SYSTEM_CURSOR_NESW_RESIZE
1086#define SDL_SYSTEM_CURSOR_SIZENS SDL_SYSTEM_CURSOR_SIZENS_renamed_SDL_SYSTEM_CURSOR_NS_RESIZE
1087#define SDL_SYSTEM_CURSOR_SIZENWSE SDL_SYSTEM_CURSOR_SIZENWSE_renamed_SDL_SYSTEM_CURSOR_NWSE_RESIZE
1088#define SDL_SYSTEM_CURSOR_SIZEWE SDL_SYSTEM_CURSOR_SIZEWE_renamed_SDL_SYSTEM_CURSOR_EW_RESIZE
1089#define SDL_SYSTEM_CURSOR_WAITARROW SDL_SYSTEM_CURSOR_WAITARROW_renamed_SDL_SYSTEM_CURSOR_PROGRESS
1090#define SDL_SYSTEM_CURSOR_WINDOW_BOTTOM SDL_SYSTEM_CURSOR_WINDOW_BOTTOM_renamed_SDL_SYSTEM_CURSOR_S_RESIZE
1091#define SDL_SYSTEM_CURSOR_WINDOW_BOTTOMLEFT SDL_SYSTEM_CURSOR_WINDOW_BOTTOMLEFT_renamed_SDL_SYSTEM_CURSOR_SW_RESIZE
1092#define SDL_SYSTEM_CURSOR_WINDOW_BOTTOMRIGHT SDL_SYSTEM_CURSOR_WINDOW_BOTTOMRIGHT_renamed_SDL_SYSTEM_CURSOR_SE_RESIZE
1093#define SDL_SYSTEM_CURSOR_WINDOW_LEFT SDL_SYSTEM_CURSOR_WINDOW_LEFT_renamed_SDL_SYSTEM_CURSOR_W_RESIZE
1094#define SDL_SYSTEM_CURSOR_WINDOW_RIGHT SDL_SYSTEM_CURSOR_WINDOW_RIGHT_renamed_SDL_SYSTEM_CURSOR_E_RESIZE
1095#define SDL_SYSTEM_CURSOR_WINDOW_TOP SDL_SYSTEM_CURSOR_WINDOW_TOP_renamed_SDL_SYSTEM_CURSOR_N_RESIZE
1096#define SDL_SYSTEM_CURSOR_WINDOW_TOPLEFT SDL_SYSTEM_CURSOR_WINDOW_TOPLEFT_renamed_SDL_SYSTEM_CURSOR_NW_RESIZE
1097#define SDL_SYSTEM_CURSOR_WINDOW_TOPRIGHT SDL_SYSTEM_CURSOR_WINDOW_TOPRIGHT_renamed_SDL_SYSTEM_CURSOR_NE_RESIZE
1098
1099/* ##SDL_mutex.h */
1100#define SDL_CondBroadcast SDL_CondBroadcast_renamed_SDL_BroadcastCondition
1101#define SDL_CondSignal SDL_CondSignal_renamed_SDL_SignalCondition
1102#define SDL_CondWait SDL_CondWait_renamed_SDL_WaitCondition
1103#define SDL_CondWaitTimeout SDL_CondWaitTimeout_renamed_SDL_WaitConditionTimeout
1104#define SDL_CreateCond SDL_CreateCond_renamed_SDL_CreateCondition
1105#define SDL_DestroyCond SDL_DestroyCond_renamed_SDL_DestroyCondition
1106#define SDL_SemPost SDL_SemPost_renamed_SDL_SignalSemaphore
1107#define SDL_SemTryWait SDL_SemTryWait_renamed_SDL_TryWaitSemaphore
1108#define SDL_SemValue SDL_SemValue_renamed_SDL_GetSemaphoreValue
1109#define SDL_SemWait SDL_SemWait_renamed_SDL_WaitSemaphore
1110#define SDL_SemWaitTimeout SDL_SemWaitTimeout_renamed_SDL_WaitSemaphoreTimeout
1111
1112/* ##SDL_mutex.h */
1113#define SDL_cond SDL_cond_renamed_SDL_Condition
1114#define SDL_mutex SDL_mutex_renamed_SDL_Mutex
1115#define SDL_sem SDL_sem_renamed_SDL_Semaphore
1116
1117/* ##SDL_pixels.h */
1118#define SDL_AllocFormat SDL_AllocFormat_renamed_SDL_GetPixelFormatDetails
1119#define SDL_AllocPalette SDL_AllocPalette_renamed_SDL_CreatePalette
1120#define SDL_Colour SDL_Colour_renamed_SDL_Color
1121#define SDL_FreePalette SDL_FreePalette_renamed_SDL_DestroyPalette
1122#define SDL_MasksToPixelFormatEnum SDL_MasksToPixelFormatEnum_renamed_SDL_GetPixelFormatForMasks
1123#define SDL_PIXELFORMAT_BGR444 SDL_PIXELFORMAT_BGR444_renamed_SDL_PIXELFORMAT_XBGR4444
1124#define SDL_PIXELFORMAT_BGR555 SDL_PIXELFORMAT_BGR555_renamed_SDL_PIXELFORMAT_XBGR1555
1125#define SDL_PIXELFORMAT_BGR888 SDL_PIXELFORMAT_BGR888_renamed_SDL_PIXELFORMAT_XBGR8888
1126#define SDL_PIXELFORMAT_RGB444 SDL_PIXELFORMAT_RGB444_renamed_SDL_PIXELFORMAT_XRGB4444
1127#define SDL_PIXELFORMAT_RGB555 SDL_PIXELFORMAT_RGB555_renamed_SDL_PIXELFORMAT_XRGB1555
1128#define SDL_PIXELFORMAT_RGB888 SDL_PIXELFORMAT_RGB888_renamed_SDL_PIXELFORMAT_XRGB8888
1129#define SDL_PixelFormatEnumToMasks SDL_PixelFormatEnumToMasks_renamed_SDL_GetMasksForPixelFormat
1130
1131/* ##SDL_rect.h */
1132#define SDL_EncloseFPoints SDL_EncloseFPoints_renamed_SDL_GetRectEnclosingPointsFloat
1133#define SDL_EnclosePoints SDL_EnclosePoints_renamed_SDL_GetRectEnclosingPoints
1134#define SDL_FRectEmpty SDL_FRectEmpty_renamed_SDL_RectEmptyFloat
1135#define SDL_FRectEquals SDL_FRectEquals_renamed_SDL_RectsEqualFloat
1136#define SDL_FRectEqualsEpsilon SDL_FRectEqualsEpsilon_renamed_SDL_RectsEqualEpsilon
1137#define SDL_HasIntersection SDL_HasIntersection_renamed_SDL_HasRectIntersection
1138#define SDL_HasIntersectionF SDL_HasIntersectionF_renamed_SDL_HasRectIntersectionFloat
1139#define SDL_IntersectFRect SDL_IntersectFRect_renamed_SDL_GetRectIntersectionFloat
1140#define SDL_IntersectFRectAndLine SDL_IntersectFRectAndLine_renamed_SDL_GetRectAndLineIntersectionFloat
1141#define SDL_IntersectRect SDL_IntersectRect_renamed_SDL_GetRectIntersection
1142#define SDL_IntersectRectAndLine SDL_IntersectRectAndLine_renamed_SDL_GetRectAndLineIntersection
1143#define SDL_PointInFRect SDL_PointInFRect_renamed_SDL_PointInRectFloat
1144#define SDL_RectEquals SDL_RectEquals_renamed_SDL_RectsEqual
1145#define SDL_UnionFRect SDL_UnionFRect_renamed_SDL_GetRectUnionFloat
1146#define SDL_UnionRect SDL_UnionRect_renamed_SDL_GetRectUnion
1147
1148/* ##SDL_render.h */
1149#define SDL_GetRendererOutputSize SDL_GetRendererOutputSize_renamed_SDL_GetCurrentRenderOutputSize
1150#define SDL_RenderCopy SDL_RenderCopy_renamed_SDL_RenderTexture
1151#define SDL_RenderCopyEx SDL_RenderCopyEx_renamed_SDL_RenderTextureRotated
1152#define SDL_RenderCopyExF SDL_RenderCopyExF_renamed_SDL_RenderTextureRotated
1153#define SDL_RenderCopyF SDL_RenderCopyF_renamed_SDL_RenderTexture
1154#define SDL_RenderDrawLine SDL_RenderDrawLine_renamed_SDL_RenderLine
1155#define SDL_RenderDrawLineF SDL_RenderDrawLineF_renamed_SDL_RenderLine
1156#define SDL_RenderDrawLines SDL_RenderDrawLines_renamed_SDL_RenderLines
1157#define SDL_RenderDrawLinesF SDL_RenderDrawLinesF_renamed_SDL_RenderLines
1158#define SDL_RenderDrawPoint SDL_RenderDrawPoint_renamed_SDL_RenderPoint
1159#define SDL_RenderDrawPointF SDL_RenderDrawPointF_renamed_SDL_RenderPoint
1160#define SDL_RenderDrawPoints SDL_RenderDrawPoints_renamed_SDL_RenderPoints
1161#define SDL_RenderDrawPointsF SDL_RenderDrawPointsF_renamed_SDL_RenderPoints
1162#define SDL_RenderDrawRect SDL_RenderDrawRect_renamed_SDL_RenderRect
1163#define SDL_RenderDrawRectF SDL_RenderDrawRectF_renamed_SDL_RenderRect
1164#define SDL_RenderDrawRects SDL_RenderDrawRects_renamed_SDL_RenderRects
1165#define SDL_RenderDrawRectsF SDL_RenderDrawRectsF_renamed_SDL_RenderRects
1166#define SDL_RenderFillRectF SDL_RenderFillRectF_renamed_SDL_RenderFillRect
1167#define SDL_RenderFillRectsF SDL_RenderFillRectsF_renamed_SDL_RenderFillRects
1168#define SDL_RendererFlip SDL_RendererFlip_renamed_SDL_FlipMode
1169#define SDL_RenderFlush SDL_RenderFlush_renamed_SDL_FlushRenderer
1170#define SDL_RenderGetClipRect SDL_RenderGetClipRect_renamed_SDL_GetRenderClipRect
1171#define SDL_RenderGetLogicalSize SDL_RenderGetLogicalSize_renamed_SDL_GetRenderLogicalPresentation
1172#define SDL_RenderGetMetalCommandEncoder SDL_RenderGetMetalCommandEncoder_renamed_SDL_GetRenderMetalCommandEncoder
1173#define SDL_RenderGetMetalLayer SDL_RenderGetMetalLayer_renamed_SDL_GetRenderMetalLayer
1174#define SDL_RenderGetScale SDL_RenderGetScale_renamed_SDL_GetRenderScale
1175#define SDL_RenderGetViewport SDL_RenderGetViewport_renamed_SDL_GetRenderViewport
1176#define SDL_RenderGetWindow SDL_RenderGetWindow_renamed_SDL_GetRenderWindow
1177#define SDL_RenderIsClipEnabled SDL_RenderIsClipEnabled_renamed_SDL_RenderClipEnabled
1178#define SDL_RenderLogicalToWindow SDL_RenderLogicalToWindow_renamed_SDL_RenderCoordinatesToWindow
1179#define SDL_RenderSetClipRect SDL_RenderSetClipRect_renamed_SDL_SetRenderClipRect
1180#define SDL_RenderSetLogicalSize SDL_RenderSetLogicalSize_renamed_SDL_SetRenderLogicalPresentation
1181#define SDL_RenderSetScale SDL_RenderSetScale_renamed_SDL_SetRenderScale
1182#define SDL_RenderSetVSync SDL_RenderSetVSync_renamed_SDL_SetRenderVSync
1183#define SDL_RenderSetViewport SDL_RenderSetViewport_renamed_SDL_SetRenderViewport
1184#define SDL_RenderWindowToLogical SDL_RenderWindowToLogical_renamed_SDL_RenderCoordinatesFromWindow
1185#define SDL_ScaleModeLinear SDL_ScaleModeLinear_renamed_SDL_SCALEMODE_LINEAR
1186#define SDL_ScaleModeNearest SDL_ScaleModeNearest_renamed_SDL_SCALEMODE_NEAREST
1187
1188/* ##SDL_rwops.h */
1189#define RW_SEEK_CUR RW_SEEK_CUR_renamed_SDL_IO_SEEK_CUR
1190#define RW_SEEK_END RW_SEEK_END_renamed_SDL_IO_SEEK_END
1191#define RW_SEEK_SET RW_SEEK_SET_renamed_SDL_IO_SEEK_SET
1192#define SDL_RWFromConstMem SDL_RWFromConstMem_renamed_SDL_IOFromConstMem
1193#define SDL_RWFromFile SDL_RWFromFile_renamed_SDL_IOFromFile
1194#define SDL_RWFromMem SDL_RWFromMem_renamed_SDL_IOFromMem
1195#define SDL_RWclose SDL_RWclose_renamed_SDL_CloseIO
1196#define SDL_RWops SDL_RWops_renamed_SDL_IOStream
1197#define SDL_RWread SDL_RWread_renamed_SDL_ReadIO
1198#define SDL_RWseek SDL_RWseek_renamed_SDL_SeekIO
1199#define SDL_RWsize SDL_RWsize_renamed_SDL_GetIOSize
1200#define SDL_RWtell SDL_RWtell_renamed_SDL_TellIO
1201#define SDL_RWwrite SDL_RWwrite_renamed_SDL_WriteIO
1202#define SDL_ReadBE16 SDL_ReadBE16_renamed_SDL_ReadU16BE
1203#define SDL_ReadBE32 SDL_ReadBE32_renamed_SDL_ReadU32BE
1204#define SDL_ReadBE64 SDL_ReadBE64_renamed_SDL_ReadU64BE
1205#define SDL_ReadLE16 SDL_ReadLE16_renamed_SDL_ReadU16LE
1206#define SDL_ReadLE32 SDL_ReadLE32_renamed_SDL_ReadU32LE
1207#define SDL_ReadLE64 SDL_ReadLE64_renamed_SDL_ReadU64LE
1208#define SDL_WriteBE16 SDL_WriteBE16_renamed_SDL_WriteU16BE
1209#define SDL_WriteBE32 SDL_WriteBE32_renamed_SDL_WriteU32BE
1210#define SDL_WriteBE64 SDL_WriteBE64_renamed_SDL_WriteU64BE
1211#define SDL_WriteLE16 SDL_WriteLE16_renamed_SDL_WriteU16LE
1212#define SDL_WriteLE32 SDL_WriteLE32_renamed_SDL_WriteU32LE
1213#define SDL_WriteLE64 SDL_WriteLE64_renamed_SDL_WriteU64LE
1214
1215/* ##SDL_scancode.h */
1216#define SDL_NUM_SCANCODES SDL_NUM_SCANCODES_renamed_SDL_SCANCODE_COUNT
1217#define SDL_SCANCODE_AUDIOFASTFORWARD SDL_SCANCODE_AUDIOFASTFORWARD_renamed_SDL_SCANCODE_MEDIA_FAST_FORWARD
1218#define SDL_SCANCODE_AUDIOMUTE SDL_SCANCODE_AUDIOMUTE_renamed_SDL_SCANCODE_MUTE
1219#define SDL_SCANCODE_AUDIONEXT SDL_SCANCODE_AUDIONEXT_renamed_SDL_SCANCODE_MEDIA_NEXT_TRACK
1220#define SDL_SCANCODE_AUDIOPLAY SDL_SCANCODE_AUDIOPLAY_renamed_SDL_SCANCODE_MEDIA_PLAY
1221#define SDL_SCANCODE_AUDIOPREV SDL_SCANCODE_AUDIOPREV_renamed_SDL_SCANCODE_MEDIA_PREVIOUS_TRACK
1222#define SDL_SCANCODE_AUDIOREWIND SDL_SCANCODE_AUDIOREWIND_renamed_SDL_SCANCODE_MEDIA_REWIND
1223#define SDL_SCANCODE_AUDIOSTOP SDL_SCANCODE_AUDIOSTOP_renamed_SDL_SCANCODE_MEDIA_STOP
1224#define SDL_SCANCODE_EJECT SDL_SCANCODE_EJECT_renamed_SDL_SCANCODE_MEDIA_EJECT
1225#define SDL_SCANCODE_MEDIASELECT SDL_SCANCODE_MEDIASELECT_renamed_SDL_SCANCODE_MEDIA_SELECT
1226
1227/* ##SDL_sensor.h */
1228#define SDL_SensorClose SDL_SensorClose_renamed_SDL_CloseSensor
1229#define SDL_SensorFromInstanceID SDL_SensorFromInstanceID_renamed_SDL_GetSensorFromID
1230#define SDL_SensorGetData SDL_SensorGetData_renamed_SDL_GetSensorData
1231#define SDL_SensorGetInstanceID SDL_SensorGetInstanceID_renamed_SDL_GetSensorID
1232#define SDL_SensorGetName SDL_SensorGetName_renamed_SDL_GetSensorName
1233#define SDL_SensorGetNonPortableType SDL_SensorGetNonPortableType_renamed_SDL_GetSensorNonPortableType
1234#define SDL_SensorGetType SDL_SensorGetType_renamed_SDL_GetSensorType
1235#define SDL_SensorOpen SDL_SensorOpen_renamed_SDL_OpenSensor
1236#define SDL_SensorUpdate SDL_SensorUpdate_renamed_SDL_UpdateSensors
1237
1238/* ##SDL_stdinc.h */
1239#define SDL_FALSE SDL_FALSE_renamed_false
1240#define SDL_TABLESIZE SDL_TABLESIZE_renamed_SDL_arraysize
1241#define SDL_TRUE SDL_TRUE_renamed_true
1242#define SDL_bool SDL_bool_renamed_bool
1243#define SDL_size_add_overflow SDL_size_add_overflow_renamed_SDL_size_add_check_overflow
1244#define SDL_size_mul_overflow SDL_size_mul_overflow_renamed_SDL_size_mul_check_overflow
1245#define SDL_strtokr SDL_strtokr_renamed_SDL_strtok_r
1246
1247/* ##SDL_surface.h */
1248#define SDL_BlitScaled SDL_BlitScaled_renamed_SDL_BlitSurfaceScaled
1249#define SDL_ConvertSurfaceFormat SDL_ConvertSurfaceFormat_renamed_SDL_ConvertSurface
1250#define SDL_FillRect SDL_FillRect_renamed_SDL_FillSurfaceRect
1251#define SDL_FillRects SDL_FillRects_renamed_SDL_FillSurfaceRects
1252#define SDL_FreeSurface SDL_FreeSurface_renamed_SDL_DestroySurface
1253#define SDL_GetClipRect SDL_GetClipRect_renamed_SDL_GetSurfaceClipRect
1254#define SDL_GetColorKey SDL_GetColorKey_renamed_SDL_GetSurfaceColorKey
1255#define SDL_HasColorKey SDL_HasColorKey_renamed_SDL_SurfaceHasColorKey
1256#define SDL_HasSurfaceRLE SDL_HasSurfaceRLE_renamed_SDL_SurfaceHasRLE
1257#define SDL_LoadBMP_RW SDL_LoadBMP_RW_renamed_SDL_LoadBMP_IO
1258#define SDL_LowerBlit SDL_LowerBlit_renamed_SDL_BlitSurfaceUnchecked
1259#define SDL_LowerBlitScaled SDL_LowerBlitScaled_renamed_SDL_BlitSurfaceUncheckedScaled
1260#define SDL_PREALLOC SDL_PREALLOC_renamed_SDL_SURFACE_PREALLOCATED
1261#define SDL_SIMD_ALIGNED SDL_SIMD_ALIGNED_renamed_SDL_SURFACE_SIMD_ALIGNED
1262#define SDL_SaveBMP_RW SDL_SaveBMP_RW_renamed_SDL_SaveBMP_IO
1263#define SDL_SetClipRect SDL_SetClipRect_renamed_SDL_SetSurfaceClipRect
1264#define SDL_SetColorKey SDL_SetColorKey_renamed_SDL_SetSurfaceColorKey
1265#define SDL_UpperBlit SDL_UpperBlit_renamed_SDL_BlitSurface
1266#define SDL_UpperBlitScaled SDL_UpperBlitScaled_renamed_SDL_BlitSurfaceScaled
1267
1268/* ##SDL_system.h */
1269#define SDL_AndroidBackButton SDL_AndroidBackButton_renamed_SDL_SendAndroidBackButton
1270#define SDL_AndroidGetActivity SDL_AndroidGetActivity_renamed_SDL_GetAndroidActivity
1271#define SDL_AndroidGetExternalStoragePath SDL_AndroidGetExternalStoragePath_renamed_SDL_GetAndroidExternalStoragePath
1272#define SDL_AndroidGetExternalStorageState SDL_AndroidGetExternalStorageState_renamed_SDL_GetAndroidExternalStorageState
1273#define SDL_AndroidGetInternalStoragePath SDL_AndroidGetInternalStoragePath_renamed_SDL_GetAndroidInternalStoragePath
1274#define SDL_AndroidGetJNIEnv SDL_AndroidGetJNIEnv_renamed_SDL_GetAndroidJNIEnv
1275#define SDL_AndroidRequestPermission SDL_AndroidRequestPermission_renamed_SDL_RequestAndroidPermission
1276#define SDL_AndroidRequestPermissionCallback SDL_AndroidRequestPermissionCallback_renamed_SDL_RequestAndroidPermissionCallback
1277#define SDL_AndroidSendMessage SDL_AndroidSendMessage_renamed_SDL_SendAndroidMessage
1278#define SDL_AndroidShowToast SDL_AndroidShowToast_renamed_SDL_ShowAndroidToast
1279#define SDL_DXGIGetOutputInfo SDL_DXGIGetOutputInfo_renamed_SDL_GetDXGIOutputInfo
1280#define SDL_Direct3D9GetAdapterIndex SDL_Direct3D9GetAdapterIndex_renamed_SDL_GetDirect3D9AdapterIndex
1281#define SDL_GDKGetDefaultUser SDL_GDKGetDefaultUser_renamed_SDL_GetGDKDefaultUser
1282#define SDL_GDKGetTaskQueue SDL_GDKGetTaskQueue_renamed_SDL_GetGDKTaskQueue
1283#define SDL_LinuxSetThreadPriority SDL_LinuxSetThreadPriority_renamed_SDL_SetLinuxThreadPriority
1284#define SDL_LinuxSetThreadPriorityAndPolicy SDL_LinuxSetThreadPriorityAndPolicy_renamed_SDL_SetLinuxThreadPriorityAndPolicy
1285#define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidBecomeActive_renamed_SDL_OnApplicationDidEnterForeground
1286#define SDL_OnApplicationWillResignActive SDL_OnApplicationWillResignActive_renamed_SDL_OnApplicationWillEnterBackground
1287#define SDL_iOSSetAnimationCallback SDL_iOSSetAnimationCallback_renamed_SDL_SetiOSAnimationCallback
1288#define SDL_iOSSetEventPump SDL_iOSSetEventPump_renamed_SDL_SetiOSEventPump
1289#define SDL_iPhoneSetAnimationCallback SDL_iPhoneSetAnimationCallback_renamed_SDL_iOSSetAnimationCallback
1290#define SDL_iPhoneSetEventPump SDL_iPhoneSetEventPump_renamed_SDL_iOSSetEventPump
1291
1292/* ##SDL_thread.h */
1293#define SDL_SetThreadPriority SDL_SetThreadPriority_renamed_SDL_SetCurrentThreadPriority
1294#define SDL_TLSCleanup SDL_TLSCleanup_renamed_SDL_CleanupTLS
1295#define SDL_TLSGet SDL_TLSGet_renamed_SDL_GetTLS
1296#define SDL_TLSSet SDL_TLSSet_renamed_SDL_SetTLS
1297#define SDL_threadID SDL_threadID_renamed_SDL_ThreadID
1298
1299/* ##SDL_timer.h */
1300#define SDL_GetTicks64 SDL_GetTicks64_renamed_SDL_GetTicks
1301
1302/* ##SDL_version.h */
1303#define SDL_COMPILEDVERSION SDL_COMPILEDVERSION_renamed_SDL_VERSION
1304#define SDL_PATCHLEVEL SDL_PATCHLEVEL_renamed_SDL_MICRO_VERSION
1305
1306/* ##SDL_video.h */
1307#define SDL_GL_DeleteContext SDL_GL_DeleteContext_renamed_SDL_GL_DestroyContext
1308#define SDL_GLattr SDL_GLattr_renamed_SDL_GLAttr
1309#define SDL_GLcontextFlag SDL_GLcontextFlag_renamed_SDL_GLContextFlag
1310#define SDL_GLcontextReleaseFlag SDL_GLcontextReleaseFlag_renamed_SDL_GLContextReleaseFlag
1311#define SDL_GLprofile SDL_GLprofile_renamed_SDL_GLProfile
1312#define SDL_GetClosestDisplayMode SDL_GetClosestDisplayMode_renamed_SDL_GetClosestFullscreenDisplayMode
1313#define SDL_GetDisplayOrientation SDL_GetDisplayOrientation_renamed_SDL_GetCurrentDisplayOrientation
1314#define SDL_GetPointDisplayIndex SDL_GetPointDisplayIndex_renamed_SDL_GetDisplayForPoint
1315#define SDL_GetRectDisplayIndex SDL_GetRectDisplayIndex_renamed_SDL_GetDisplayForRect
1316#define SDL_GetWindowDisplayIndex SDL_GetWindowDisplayIndex_renamed_SDL_GetDisplayForWindow
1317#define SDL_GetWindowDisplayMode SDL_GetWindowDisplayMode_renamed_SDL_GetWindowFullscreenMode
1318#define SDL_HasWindowSurface SDL_HasWindowSurface_renamed_SDL_WindowHasSurface
1319#define SDL_IsScreenSaverEnabled SDL_IsScreenSaverEnabled_renamed_SDL_ScreenSaverEnabled
1320#define SDL_SetWindowDisplayMode SDL_SetWindowDisplayMode_renamed_SDL_SetWindowFullscreenMode
1321#define SDL_WINDOW_ALLOW_HIGHDPI SDL_WINDOW_ALLOW_HIGHDPI_renamed_SDL_WINDOW_HIGH_PIXEL_DENSITY
1322#define SDL_WINDOW_INPUT_GRABBED SDL_WINDOW_INPUT_GRABBED_renamed_SDL_WINDOW_MOUSE_GRABBED
1323#define SDL_WINDOW_SKIP_TASKBAR SDL_WINDOW_SKIP_TASKBAR_renamed_SDL_WINDOW_UTILITY
1324
1325#endif /* SDL_ENABLE_OLD_NAMES */
1326
1327#endif /* SDL_oldnames_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengl.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengl.h
new file mode 100644
index 0000000..d1b8b02
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengl.h
@@ -0,0 +1,3101 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/*
23 * This is a simple file to encapsulate the OpenGL API headers.
24 *
25 * Define NO_SDL_GLEXT if you have your own version of glext.h and want
26 * to disable the version included in SDL_opengl.h.
27 */
28
29#ifndef SDL_opengl_h_
30#define SDL_opengl_h_
31
32#include <SDL3/SDL_platform.h>
33
34#ifndef SDL_PLATFORM_IOS /* No OpenGL on iOS. */
35
36/*
37 * Mesa 3-D graphics library
38 *
39 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
40 * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
41 *
42 * Permission is hereby granted, free of charge, to any person obtaining a
43 * copy of this software and associated documentation files (the "Software"),
44 * to deal in the Software without restriction, including without limitation
45 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
46 * and/or sell copies of the Software, and to permit persons to whom the
47 * Software is furnished to do so, subject to the following conditions:
48 *
49 * The above copyright notice and this permission notice shall be included
50 * in all copies or substantial portions of the Software.
51 *
52 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
53 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
54 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
55 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
56 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
57 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
58 * OTHER DEALINGS IN THE SOFTWARE.
59 */
60
61
62#ifndef __gl_h_
63#define __gl_h_
64
65#ifdef USE_MGL_NAMESPACE
66#include <SDL3/gl_mangle.h>
67#endif
68
69
70/**********************************************************************
71 * Begin system-specific stuff.
72 */
73
74#if defined(_WIN32) && !defined(__CYGWIN__)
75# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
76# define GLAPI __declspec(dllexport)
77# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
78# define GLAPI __declspec(dllimport)
79# else /* for use with static link lib build of Win32 edition only */
80# define GLAPI extern
81# endif /* _STATIC_MESA support */
82# if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
83# define GLAPIENTRY
84# else
85# define GLAPIENTRY __stdcall
86# endif
87#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
88# define GLAPI extern
89# define GLAPIENTRY __stdcall
90#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
91# define GLAPI __attribute__((visibility("default")))
92# define GLAPIENTRY
93#endif /* WIN32 && !CYGWIN */
94
95/*
96 * WINDOWS: Include windows.h here to define APIENTRY.
97 * It is also useful when applications include this file by
98 * including only glut.h, since glut.h depends on windows.h.
99 * Applications needing to include windows.h with parms other
100 * than "WIN32_LEAN_AND_MEAN" may include windows.h before
101 * glut.h or gl.h.
102 */
103#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
104#ifndef WIN32_LEAN_AND_MEAN
105#define WIN32_LEAN_AND_MEAN 1
106#endif
107#ifndef NOMINMAX /* don't define min() and max(). */
108#define NOMINMAX
109#endif
110#include <windows.h>
111#endif
112
113#ifndef GLAPI
114#define GLAPI extern
115#endif
116
117#ifndef GLAPIENTRY
118#define GLAPIENTRY
119#endif
120
121#ifndef APIENTRY
122#define APIENTRY GLAPIENTRY
123#endif
124
125/* "P" suffix to be used for a pointer to a function */
126#ifndef APIENTRYP
127#define APIENTRYP APIENTRY *
128#endif
129
130#ifndef GLAPIENTRYP
131#define GLAPIENTRYP GLAPIENTRY *
132#endif
133
134#if defined(PRAGMA_EXPORT_SUPPORTED)
135#pragma export on
136#endif
137
138/*
139 * End system-specific stuff.
140 **********************************************************************/
141
142
143
144#ifdef __cplusplus
145extern "C" {
146#endif
147
148
149
150#define GL_VERSION_1_1 1
151#define GL_VERSION_1_2 1
152#define GL_VERSION_1_3 1
153#define GL_ARB_imaging 1
154
155
156/*
157 * Datatypes
158 */
159typedef unsigned int GLenum;
160typedef unsigned char GLboolean;
161typedef unsigned int GLbitfield;
162typedef void GLvoid;
163typedef signed char GLbyte; /* 1-byte signed */
164typedef short GLshort; /* 2-byte signed */
165typedef int GLint; /* 4-byte signed */
166typedef unsigned char GLubyte; /* 1-byte unsigned */
167typedef unsigned short GLushort; /* 2-byte unsigned */
168typedef unsigned int GLuint; /* 4-byte unsigned */
169typedef int GLsizei; /* 4-byte signed */
170typedef float GLfloat; /* single precision float */
171typedef float GLclampf; /* single precision float in [0,1] */
172typedef double GLdouble; /* double precision float */
173typedef double GLclampd; /* double precision float in [0,1] */
174
175
176
177/*
178 * Constants
179 */
180
181/* Boolean values */
182#define GL_FALSE 0
183#define GL_TRUE 1
184
185/* Data types */
186#define GL_BYTE 0x1400
187#define GL_UNSIGNED_BYTE 0x1401
188#define GL_SHORT 0x1402
189#define GL_UNSIGNED_SHORT 0x1403
190#define GL_INT 0x1404
191#define GL_UNSIGNED_INT 0x1405
192#define GL_FLOAT 0x1406
193#define GL_2_BYTES 0x1407
194#define GL_3_BYTES 0x1408
195#define GL_4_BYTES 0x1409
196#define GL_DOUBLE 0x140A
197
198/* Primitives */
199#define GL_POINTS 0x0000
200#define GL_LINES 0x0001
201#define GL_LINE_LOOP 0x0002
202#define GL_LINE_STRIP 0x0003
203#define GL_TRIANGLES 0x0004
204#define GL_TRIANGLE_STRIP 0x0005
205#define GL_TRIANGLE_FAN 0x0006
206#define GL_QUADS 0x0007
207#define GL_QUAD_STRIP 0x0008
208#define GL_POLYGON 0x0009
209
210/* Vertex Arrays */
211#define GL_VERTEX_ARRAY 0x8074
212#define GL_NORMAL_ARRAY 0x8075
213#define GL_COLOR_ARRAY 0x8076
214#define GL_INDEX_ARRAY 0x8077
215#define GL_TEXTURE_COORD_ARRAY 0x8078
216#define GL_EDGE_FLAG_ARRAY 0x8079
217#define GL_VERTEX_ARRAY_SIZE 0x807A
218#define GL_VERTEX_ARRAY_TYPE 0x807B
219#define GL_VERTEX_ARRAY_STRIDE 0x807C
220#define GL_NORMAL_ARRAY_TYPE 0x807E
221#define GL_NORMAL_ARRAY_STRIDE 0x807F
222#define GL_COLOR_ARRAY_SIZE 0x8081
223#define GL_COLOR_ARRAY_TYPE 0x8082
224#define GL_COLOR_ARRAY_STRIDE 0x8083
225#define GL_INDEX_ARRAY_TYPE 0x8085
226#define GL_INDEX_ARRAY_STRIDE 0x8086
227#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
228#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
229#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
230#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
231#define GL_VERTEX_ARRAY_POINTER 0x808E
232#define GL_NORMAL_ARRAY_POINTER 0x808F
233#define GL_COLOR_ARRAY_POINTER 0x8090
234#define GL_INDEX_ARRAY_POINTER 0x8091
235#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
236#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
237#define GL_V2F 0x2A20
238#define GL_V3F 0x2A21
239#define GL_C4UB_V2F 0x2A22
240#define GL_C4UB_V3F 0x2A23
241#define GL_C3F_V3F 0x2A24
242#define GL_N3F_V3F 0x2A25
243#define GL_C4F_N3F_V3F 0x2A26
244#define GL_T2F_V3F 0x2A27
245#define GL_T4F_V4F 0x2A28
246#define GL_T2F_C4UB_V3F 0x2A29
247#define GL_T2F_C3F_V3F 0x2A2A
248#define GL_T2F_N3F_V3F 0x2A2B
249#define GL_T2F_C4F_N3F_V3F 0x2A2C
250#define GL_T4F_C4F_N3F_V4F 0x2A2D
251
252/* Matrix Mode */
253#define GL_MATRIX_MODE 0x0BA0
254#define GL_MODELVIEW 0x1700
255#define GL_PROJECTION 0x1701
256#define GL_TEXTURE 0x1702
257
258/* Points */
259#define GL_POINT_SMOOTH 0x0B10
260#define GL_POINT_SIZE 0x0B11
261#define GL_POINT_SIZE_GRANULARITY 0x0B13
262#define GL_POINT_SIZE_RANGE 0x0B12
263
264/* Lines */
265#define GL_LINE_SMOOTH 0x0B20
266#define GL_LINE_STIPPLE 0x0B24
267#define GL_LINE_STIPPLE_PATTERN 0x0B25
268#define GL_LINE_STIPPLE_REPEAT 0x0B26
269#define GL_LINE_WIDTH 0x0B21
270#define GL_LINE_WIDTH_GRANULARITY 0x0B23
271#define GL_LINE_WIDTH_RANGE 0x0B22
272
273/* Polygons */
274#define GL_POINT 0x1B00
275#define GL_LINE 0x1B01
276#define GL_FILL 0x1B02
277#define GL_CW 0x0900
278#define GL_CCW 0x0901
279#define GL_FRONT 0x0404
280#define GL_BACK 0x0405
281#define GL_POLYGON_MODE 0x0B40
282#define GL_POLYGON_SMOOTH 0x0B41
283#define GL_POLYGON_STIPPLE 0x0B42
284#define GL_EDGE_FLAG 0x0B43
285#define GL_CULL_FACE 0x0B44
286#define GL_CULL_FACE_MODE 0x0B45
287#define GL_FRONT_FACE 0x0B46
288#define GL_POLYGON_OFFSET_FACTOR 0x8038
289#define GL_POLYGON_OFFSET_UNITS 0x2A00
290#define GL_POLYGON_OFFSET_POINT 0x2A01
291#define GL_POLYGON_OFFSET_LINE 0x2A02
292#define GL_POLYGON_OFFSET_FILL 0x8037
293
294/* Display Lists */
295#define GL_COMPILE 0x1300
296#define GL_COMPILE_AND_EXECUTE 0x1301
297#define GL_LIST_BASE 0x0B32
298#define GL_LIST_INDEX 0x0B33
299#define GL_LIST_MODE 0x0B30
300
301/* Depth buffer */
302#define GL_NEVER 0x0200
303#define GL_LESS 0x0201
304#define GL_EQUAL 0x0202
305#define GL_LEQUAL 0x0203
306#define GL_GREATER 0x0204
307#define GL_NOTEQUAL 0x0205
308#define GL_GEQUAL 0x0206
309#define GL_ALWAYS 0x0207
310#define GL_DEPTH_TEST 0x0B71
311#define GL_DEPTH_BITS 0x0D56
312#define GL_DEPTH_CLEAR_VALUE 0x0B73
313#define GL_DEPTH_FUNC 0x0B74
314#define GL_DEPTH_RANGE 0x0B70
315#define GL_DEPTH_WRITEMASK 0x0B72
316#define GL_DEPTH_COMPONENT 0x1902
317
318/* Lighting */
319#define GL_LIGHTING 0x0B50
320#define GL_LIGHT0 0x4000
321#define GL_LIGHT1 0x4001
322#define GL_LIGHT2 0x4002
323#define GL_LIGHT3 0x4003
324#define GL_LIGHT4 0x4004
325#define GL_LIGHT5 0x4005
326#define GL_LIGHT6 0x4006
327#define GL_LIGHT7 0x4007
328#define GL_SPOT_EXPONENT 0x1205
329#define GL_SPOT_CUTOFF 0x1206
330#define GL_CONSTANT_ATTENUATION 0x1207
331#define GL_LINEAR_ATTENUATION 0x1208
332#define GL_QUADRATIC_ATTENUATION 0x1209
333#define GL_AMBIENT 0x1200
334#define GL_DIFFUSE 0x1201
335#define GL_SPECULAR 0x1202
336#define GL_SHININESS 0x1601
337#define GL_EMISSION 0x1600
338#define GL_POSITION 0x1203
339#define GL_SPOT_DIRECTION 0x1204
340#define GL_AMBIENT_AND_DIFFUSE 0x1602
341#define GL_COLOR_INDEXES 0x1603
342#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
343#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
344#define GL_LIGHT_MODEL_AMBIENT 0x0B53
345#define GL_FRONT_AND_BACK 0x0408
346#define GL_SHADE_MODEL 0x0B54
347#define GL_FLAT 0x1D00
348#define GL_SMOOTH 0x1D01
349#define GL_COLOR_MATERIAL 0x0B57
350#define GL_COLOR_MATERIAL_FACE 0x0B55
351#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
352#define GL_NORMALIZE 0x0BA1
353
354/* User clipping planes */
355#define GL_CLIP_PLANE0 0x3000
356#define GL_CLIP_PLANE1 0x3001
357#define GL_CLIP_PLANE2 0x3002
358#define GL_CLIP_PLANE3 0x3003
359#define GL_CLIP_PLANE4 0x3004
360#define GL_CLIP_PLANE5 0x3005
361
362/* Accumulation buffer */
363#define GL_ACCUM_RED_BITS 0x0D58
364#define GL_ACCUM_GREEN_BITS 0x0D59
365#define GL_ACCUM_BLUE_BITS 0x0D5A
366#define GL_ACCUM_ALPHA_BITS 0x0D5B
367#define GL_ACCUM_CLEAR_VALUE 0x0B80
368#define GL_ACCUM 0x0100
369#define GL_ADD 0x0104
370#define GL_LOAD 0x0101
371#define GL_MULT 0x0103
372#define GL_RETURN 0x0102
373
374/* Alpha testing */
375#define GL_ALPHA_TEST 0x0BC0
376#define GL_ALPHA_TEST_REF 0x0BC2
377#define GL_ALPHA_TEST_FUNC 0x0BC1
378
379/* Blending */
380#define GL_BLEND 0x0BE2
381#define GL_BLEND_SRC 0x0BE1
382#define GL_BLEND_DST 0x0BE0
383#define GL_ZERO 0
384#define GL_ONE 1
385#define GL_SRC_COLOR 0x0300
386#define GL_ONE_MINUS_SRC_COLOR 0x0301
387#define GL_SRC_ALPHA 0x0302
388#define GL_ONE_MINUS_SRC_ALPHA 0x0303
389#define GL_DST_ALPHA 0x0304
390#define GL_ONE_MINUS_DST_ALPHA 0x0305
391#define GL_DST_COLOR 0x0306
392#define GL_ONE_MINUS_DST_COLOR 0x0307
393#define GL_SRC_ALPHA_SATURATE 0x0308
394
395/* Render Mode */
396#define GL_FEEDBACK 0x1C01
397#define GL_RENDER 0x1C00
398#define GL_SELECT 0x1C02
399
400/* Feedback */
401#define GL_2D 0x0600
402#define GL_3D 0x0601
403#define GL_3D_COLOR 0x0602
404#define GL_3D_COLOR_TEXTURE 0x0603
405#define GL_4D_COLOR_TEXTURE 0x0604
406#define GL_POINT_TOKEN 0x0701
407#define GL_LINE_TOKEN 0x0702
408#define GL_LINE_RESET_TOKEN 0x0707
409#define GL_POLYGON_TOKEN 0x0703
410#define GL_BITMAP_TOKEN 0x0704
411#define GL_DRAW_PIXEL_TOKEN 0x0705
412#define GL_COPY_PIXEL_TOKEN 0x0706
413#define GL_PASS_THROUGH_TOKEN 0x0700
414#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
415#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
416#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
417
418/* Selection */
419#define GL_SELECTION_BUFFER_POINTER 0x0DF3
420#define GL_SELECTION_BUFFER_SIZE 0x0DF4
421
422/* Fog */
423#define GL_FOG 0x0B60
424#define GL_FOG_MODE 0x0B65
425#define GL_FOG_DENSITY 0x0B62
426#define GL_FOG_COLOR 0x0B66
427#define GL_FOG_INDEX 0x0B61
428#define GL_FOG_START 0x0B63
429#define GL_FOG_END 0x0B64
430#define GL_LINEAR 0x2601
431#define GL_EXP 0x0800
432#define GL_EXP2 0x0801
433
434/* Logic Ops */
435#define GL_LOGIC_OP 0x0BF1
436#define GL_INDEX_LOGIC_OP 0x0BF1
437#define GL_COLOR_LOGIC_OP 0x0BF2
438#define GL_LOGIC_OP_MODE 0x0BF0
439#define GL_CLEAR 0x1500
440#define GL_SET 0x150F
441#define GL_COPY 0x1503
442#define GL_COPY_INVERTED 0x150C
443#define GL_NOOP 0x1505
444#define GL_INVERT 0x150A
445#define GL_AND 0x1501
446#define GL_NAND 0x150E
447#define GL_OR 0x1507
448#define GL_NOR 0x1508
449#define GL_XOR 0x1506
450#define GL_EQUIV 0x1509
451#define GL_AND_REVERSE 0x1502
452#define GL_AND_INVERTED 0x1504
453#define GL_OR_REVERSE 0x150B
454#define GL_OR_INVERTED 0x150D
455
456/* Stencil */
457#define GL_STENCIL_BITS 0x0D57
458#define GL_STENCIL_TEST 0x0B90
459#define GL_STENCIL_CLEAR_VALUE 0x0B91
460#define GL_STENCIL_FUNC 0x0B92
461#define GL_STENCIL_VALUE_MASK 0x0B93
462#define GL_STENCIL_FAIL 0x0B94
463#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
464#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
465#define GL_STENCIL_REF 0x0B97
466#define GL_STENCIL_WRITEMASK 0x0B98
467#define GL_STENCIL_INDEX 0x1901
468#define GL_KEEP 0x1E00
469#define GL_REPLACE 0x1E01
470#define GL_INCR 0x1E02
471#define GL_DECR 0x1E03
472
473/* Buffers, Pixel Drawing/Reading */
474#define GL_NONE 0
475#define GL_LEFT 0x0406
476#define GL_RIGHT 0x0407
477/*GL_FRONT 0x0404 */
478/*GL_BACK 0x0405 */
479/*GL_FRONT_AND_BACK 0x0408 */
480#define GL_FRONT_LEFT 0x0400
481#define GL_FRONT_RIGHT 0x0401
482#define GL_BACK_LEFT 0x0402
483#define GL_BACK_RIGHT 0x0403
484#define GL_AUX0 0x0409
485#define GL_AUX1 0x040A
486#define GL_AUX2 0x040B
487#define GL_AUX3 0x040C
488#define GL_COLOR_INDEX 0x1900
489#define GL_RED 0x1903
490#define GL_GREEN 0x1904
491#define GL_BLUE 0x1905
492#define GL_ALPHA 0x1906
493#define GL_LUMINANCE 0x1909
494#define GL_LUMINANCE_ALPHA 0x190A
495#define GL_ALPHA_BITS 0x0D55
496#define GL_RED_BITS 0x0D52
497#define GL_GREEN_BITS 0x0D53
498#define GL_BLUE_BITS 0x0D54
499#define GL_INDEX_BITS 0x0D51
500#define GL_SUBPIXEL_BITS 0x0D50
501#define GL_AUX_BUFFERS 0x0C00
502#define GL_READ_BUFFER 0x0C02
503#define GL_DRAW_BUFFER 0x0C01
504#define GL_DOUBLEBUFFER 0x0C32
505#define GL_STEREO 0x0C33
506#define GL_BITMAP 0x1A00
507#define GL_COLOR 0x1800
508#define GL_DEPTH 0x1801
509#define GL_STENCIL 0x1802
510#define GL_DITHER 0x0BD0
511#define GL_RGB 0x1907
512#define GL_RGBA 0x1908
513
514/* Implementation limits */
515#define GL_MAX_LIST_NESTING 0x0B31
516#define GL_MAX_EVAL_ORDER 0x0D30
517#define GL_MAX_LIGHTS 0x0D31
518#define GL_MAX_CLIP_PLANES 0x0D32
519#define GL_MAX_TEXTURE_SIZE 0x0D33
520#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
521#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
522#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
523#define GL_MAX_NAME_STACK_DEPTH 0x0D37
524#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
525#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
526#define GL_MAX_VIEWPORT_DIMS 0x0D3A
527#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
528
529/* Gets */
530#define GL_ATTRIB_STACK_DEPTH 0x0BB0
531#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
532#define GL_COLOR_CLEAR_VALUE 0x0C22
533#define GL_COLOR_WRITEMASK 0x0C23
534#define GL_CURRENT_INDEX 0x0B01
535#define GL_CURRENT_COLOR 0x0B00
536#define GL_CURRENT_NORMAL 0x0B02
537#define GL_CURRENT_RASTER_COLOR 0x0B04
538#define GL_CURRENT_RASTER_DISTANCE 0x0B09
539#define GL_CURRENT_RASTER_INDEX 0x0B05
540#define GL_CURRENT_RASTER_POSITION 0x0B07
541#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
542#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
543#define GL_CURRENT_TEXTURE_COORDS 0x0B03
544#define GL_INDEX_CLEAR_VALUE 0x0C20
545#define GL_INDEX_MODE 0x0C30
546#define GL_INDEX_WRITEMASK 0x0C21
547#define GL_MODELVIEW_MATRIX 0x0BA6
548#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
549#define GL_NAME_STACK_DEPTH 0x0D70
550#define GL_PROJECTION_MATRIX 0x0BA7
551#define GL_PROJECTION_STACK_DEPTH 0x0BA4
552#define GL_RENDER_MODE 0x0C40
553#define GL_RGBA_MODE 0x0C31
554#define GL_TEXTURE_MATRIX 0x0BA8
555#define GL_TEXTURE_STACK_DEPTH 0x0BA5
556#define GL_VIEWPORT 0x0BA2
557
558/* Evaluators */
559#define GL_AUTO_NORMAL 0x0D80
560#define GL_MAP1_COLOR_4 0x0D90
561#define GL_MAP1_INDEX 0x0D91
562#define GL_MAP1_NORMAL 0x0D92
563#define GL_MAP1_TEXTURE_COORD_1 0x0D93
564#define GL_MAP1_TEXTURE_COORD_2 0x0D94
565#define GL_MAP1_TEXTURE_COORD_3 0x0D95
566#define GL_MAP1_TEXTURE_COORD_4 0x0D96
567#define GL_MAP1_VERTEX_3 0x0D97
568#define GL_MAP1_VERTEX_4 0x0D98
569#define GL_MAP2_COLOR_4 0x0DB0
570#define GL_MAP2_INDEX 0x0DB1
571#define GL_MAP2_NORMAL 0x0DB2
572#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
573#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
574#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
575#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
576#define GL_MAP2_VERTEX_3 0x0DB7
577#define GL_MAP2_VERTEX_4 0x0DB8
578#define GL_MAP1_GRID_DOMAIN 0x0DD0
579#define GL_MAP1_GRID_SEGMENTS 0x0DD1
580#define GL_MAP2_GRID_DOMAIN 0x0DD2
581#define GL_MAP2_GRID_SEGMENTS 0x0DD3
582#define GL_COEFF 0x0A00
583#define GL_ORDER 0x0A01
584#define GL_DOMAIN 0x0A02
585
586/* Hints */
587#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
588#define GL_POINT_SMOOTH_HINT 0x0C51
589#define GL_LINE_SMOOTH_HINT 0x0C52
590#define GL_POLYGON_SMOOTH_HINT 0x0C53
591#define GL_FOG_HINT 0x0C54
592#define GL_DONT_CARE 0x1100
593#define GL_FASTEST 0x1101
594#define GL_NICEST 0x1102
595
596/* Scissor box */
597#define GL_SCISSOR_BOX 0x0C10
598#define GL_SCISSOR_TEST 0x0C11
599
600/* Pixel Mode / Transfer */
601#define GL_MAP_COLOR 0x0D10
602#define GL_MAP_STENCIL 0x0D11
603#define GL_INDEX_SHIFT 0x0D12
604#define GL_INDEX_OFFSET 0x0D13
605#define GL_RED_SCALE 0x0D14
606#define GL_RED_BIAS 0x0D15
607#define GL_GREEN_SCALE 0x0D18
608#define GL_GREEN_BIAS 0x0D19
609#define GL_BLUE_SCALE 0x0D1A
610#define GL_BLUE_BIAS 0x0D1B
611#define GL_ALPHA_SCALE 0x0D1C
612#define GL_ALPHA_BIAS 0x0D1D
613#define GL_DEPTH_SCALE 0x0D1E
614#define GL_DEPTH_BIAS 0x0D1F
615#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
616#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
617#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
618#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
619#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
620#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
621#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
622#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
623#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
624#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
625#define GL_PIXEL_MAP_S_TO_S 0x0C71
626#define GL_PIXEL_MAP_I_TO_I 0x0C70
627#define GL_PIXEL_MAP_I_TO_R 0x0C72
628#define GL_PIXEL_MAP_I_TO_G 0x0C73
629#define GL_PIXEL_MAP_I_TO_B 0x0C74
630#define GL_PIXEL_MAP_I_TO_A 0x0C75
631#define GL_PIXEL_MAP_R_TO_R 0x0C76
632#define GL_PIXEL_MAP_G_TO_G 0x0C77
633#define GL_PIXEL_MAP_B_TO_B 0x0C78
634#define GL_PIXEL_MAP_A_TO_A 0x0C79
635#define GL_PACK_ALIGNMENT 0x0D05
636#define GL_PACK_LSB_FIRST 0x0D01
637#define GL_PACK_ROW_LENGTH 0x0D02
638#define GL_PACK_SKIP_PIXELS 0x0D04
639#define GL_PACK_SKIP_ROWS 0x0D03
640#define GL_PACK_SWAP_BYTES 0x0D00
641#define GL_UNPACK_ALIGNMENT 0x0CF5
642#define GL_UNPACK_LSB_FIRST 0x0CF1
643#define GL_UNPACK_ROW_LENGTH 0x0CF2
644#define GL_UNPACK_SKIP_PIXELS 0x0CF4
645#define GL_UNPACK_SKIP_ROWS 0x0CF3
646#define GL_UNPACK_SWAP_BYTES 0x0CF0
647#define GL_ZOOM_X 0x0D16
648#define GL_ZOOM_Y 0x0D17
649
650/* Texture mapping */
651#define GL_TEXTURE_ENV 0x2300
652#define GL_TEXTURE_ENV_MODE 0x2200
653#define GL_TEXTURE_1D 0x0DE0
654#define GL_TEXTURE_2D 0x0DE1
655#define GL_TEXTURE_WRAP_S 0x2802
656#define GL_TEXTURE_WRAP_T 0x2803
657#define GL_TEXTURE_MAG_FILTER 0x2800
658#define GL_TEXTURE_MIN_FILTER 0x2801
659#define GL_TEXTURE_ENV_COLOR 0x2201
660#define GL_TEXTURE_GEN_S 0x0C60
661#define GL_TEXTURE_GEN_T 0x0C61
662#define GL_TEXTURE_GEN_R 0x0C62
663#define GL_TEXTURE_GEN_Q 0x0C63
664#define GL_TEXTURE_GEN_MODE 0x2500
665#define GL_TEXTURE_BORDER_COLOR 0x1004
666#define GL_TEXTURE_WIDTH 0x1000
667#define GL_TEXTURE_HEIGHT 0x1001
668#define GL_TEXTURE_BORDER 0x1005
669#define GL_TEXTURE_COMPONENTS 0x1003
670#define GL_TEXTURE_RED_SIZE 0x805C
671#define GL_TEXTURE_GREEN_SIZE 0x805D
672#define GL_TEXTURE_BLUE_SIZE 0x805E
673#define GL_TEXTURE_ALPHA_SIZE 0x805F
674#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
675#define GL_TEXTURE_INTENSITY_SIZE 0x8061
676#define GL_NEAREST_MIPMAP_NEAREST 0x2700
677#define GL_NEAREST_MIPMAP_LINEAR 0x2702
678#define GL_LINEAR_MIPMAP_NEAREST 0x2701
679#define GL_LINEAR_MIPMAP_LINEAR 0x2703
680#define GL_OBJECT_LINEAR 0x2401
681#define GL_OBJECT_PLANE 0x2501
682#define GL_EYE_LINEAR 0x2400
683#define GL_EYE_PLANE 0x2502
684#define GL_SPHERE_MAP 0x2402
685#define GL_DECAL 0x2101
686#define GL_MODULATE 0x2100
687#define GL_NEAREST 0x2600
688#define GL_REPEAT 0x2901
689#define GL_CLAMP 0x2900
690#define GL_S 0x2000
691#define GL_T 0x2001
692#define GL_R 0x2002
693#define GL_Q 0x2003
694
695/* Utility */
696#define GL_VENDOR 0x1F00
697#define GL_RENDERER 0x1F01
698#define GL_VERSION 0x1F02
699#define GL_EXTENSIONS 0x1F03
700
701/* Errors */
702#define GL_NO_ERROR 0
703#define GL_INVALID_ENUM 0x0500
704#define GL_INVALID_VALUE 0x0501
705#define GL_INVALID_OPERATION 0x0502
706#define GL_STACK_OVERFLOW 0x0503
707#define GL_STACK_UNDERFLOW 0x0504
708#define GL_OUT_OF_MEMORY 0x0505
709
710/* glPush/PopAttrib bits */
711#define GL_CURRENT_BIT 0x00000001
712#define GL_POINT_BIT 0x00000002
713#define GL_LINE_BIT 0x00000004
714#define GL_POLYGON_BIT 0x00000008
715#define GL_POLYGON_STIPPLE_BIT 0x00000010
716#define GL_PIXEL_MODE_BIT 0x00000020
717#define GL_LIGHTING_BIT 0x00000040
718#define GL_FOG_BIT 0x00000080
719#define GL_DEPTH_BUFFER_BIT 0x00000100
720#define GL_ACCUM_BUFFER_BIT 0x00000200
721#define GL_STENCIL_BUFFER_BIT 0x00000400
722#define GL_VIEWPORT_BIT 0x00000800
723#define GL_TRANSFORM_BIT 0x00001000
724#define GL_ENABLE_BIT 0x00002000
725#define GL_COLOR_BUFFER_BIT 0x00004000
726#define GL_HINT_BIT 0x00008000
727#define GL_EVAL_BIT 0x00010000
728#define GL_LIST_BIT 0x00020000
729#define GL_TEXTURE_BIT 0x00040000
730#define GL_SCISSOR_BIT 0x00080000
731#define GL_ALL_ATTRIB_BITS 0x000FFFFF
732
733
734/* OpenGL 1.1 */
735#define GL_PROXY_TEXTURE_1D 0x8063
736#define GL_PROXY_TEXTURE_2D 0x8064
737#define GL_TEXTURE_PRIORITY 0x8066
738#define GL_TEXTURE_RESIDENT 0x8067
739#define GL_TEXTURE_BINDING_1D 0x8068
740#define GL_TEXTURE_BINDING_2D 0x8069
741#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
742#define GL_ALPHA4 0x803B
743#define GL_ALPHA8 0x803C
744#define GL_ALPHA12 0x803D
745#define GL_ALPHA16 0x803E
746#define GL_LUMINANCE4 0x803F
747#define GL_LUMINANCE8 0x8040
748#define GL_LUMINANCE12 0x8041
749#define GL_LUMINANCE16 0x8042
750#define GL_LUMINANCE4_ALPHA4 0x8043
751#define GL_LUMINANCE6_ALPHA2 0x8044
752#define GL_LUMINANCE8_ALPHA8 0x8045
753#define GL_LUMINANCE12_ALPHA4 0x8046
754#define GL_LUMINANCE12_ALPHA12 0x8047
755#define GL_LUMINANCE16_ALPHA16 0x8048
756#define GL_INTENSITY 0x8049
757#define GL_INTENSITY4 0x804A
758#define GL_INTENSITY8 0x804B
759#define GL_INTENSITY12 0x804C
760#define GL_INTENSITY16 0x804D
761#define GL_R3_G3_B2 0x2A10
762#define GL_RGB4 0x804F
763#define GL_RGB5 0x8050
764#define GL_RGB8 0x8051
765#define GL_RGB10 0x8052
766#define GL_RGB12 0x8053
767#define GL_RGB16 0x8054
768#define GL_RGBA2 0x8055
769#define GL_RGBA4 0x8056
770#define GL_RGB5_A1 0x8057
771#define GL_RGBA8 0x8058
772#define GL_RGB10_A2 0x8059
773#define GL_RGBA12 0x805A
774#define GL_RGBA16 0x805B
775#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
776#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
777#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
778#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
779
780
781
782/*
783 * Miscellaneous
784 */
785
786#ifndef SDL_OPENGL_1_NO_PROTOTYPES
787GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
788
789GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
790
791GLAPI void GLAPIENTRY glClear( GLbitfield mask );
792
793GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
794
795GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
796
797GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
798
799GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
800
801GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
802
803GLAPI void GLAPIENTRY glCullFace( GLenum mode );
804
805GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
806
807GLAPI void GLAPIENTRY glPointSize( GLfloat size );
808
809GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
810
811GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
812
813GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
814
815GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
816
817GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
818
819GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
820
821GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
822
823GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
824
825GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
826
827GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
828
829GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
830
831GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
832
833GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
834
835GLAPI void GLAPIENTRY glEnable( GLenum cap );
836
837GLAPI void GLAPIENTRY glDisable( GLenum cap );
838
839GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
840
841
842GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
843
844GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
845
846
847GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
848
849GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
850
851GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
852
853GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
854
855
856GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
857
858GLAPI void GLAPIENTRY glPopAttrib( void );
859
860
861GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
862
863GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
864
865
866GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
867
868GLAPI GLenum GLAPIENTRY glGetError( void );
869
870GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
871
872GLAPI void GLAPIENTRY glFinish( void );
873
874GLAPI void GLAPIENTRY glFlush( void );
875
876GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
877
878
879/*
880 * Depth Buffer
881 */
882
883GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
884
885GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
886
887GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
888
889GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
890
891
892/*
893 * Accumulation Buffer
894 */
895
896GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
897
898GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
899
900
901/*
902 * Transformation
903 */
904
905GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
906
907GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
908 GLdouble bottom, GLdouble top,
909 GLdouble near_val, GLdouble far_val );
910
911GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
912 GLdouble bottom, GLdouble top,
913 GLdouble near_val, GLdouble far_val );
914
915GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
916 GLsizei width, GLsizei height );
917
918GLAPI void GLAPIENTRY glPushMatrix( void );
919
920GLAPI void GLAPIENTRY glPopMatrix( void );
921
922GLAPI void GLAPIENTRY glLoadIdentity( void );
923
924GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
925GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
926
927GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
928GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
929
930GLAPI void GLAPIENTRY glRotated( GLdouble angle,
931 GLdouble x, GLdouble y, GLdouble z );
932GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
933 GLfloat x, GLfloat y, GLfloat z );
934
935GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
936GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
937
938GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
939GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
940
941
942/*
943 * Display Lists
944 */
945
946GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
947
948GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
949
950GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
951
952GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
953
954GLAPI void GLAPIENTRY glEndList( void );
955
956GLAPI void GLAPIENTRY glCallList( GLuint list );
957
958GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
959 const GLvoid *lists );
960
961GLAPI void GLAPIENTRY glListBase( GLuint base );
962
963
964/*
965 * Drawing Functions
966 */
967
968GLAPI void GLAPIENTRY glBegin( GLenum mode );
969
970GLAPI void GLAPIENTRY glEnd( void );
971
972
973GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
974GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
975GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
976GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
977
978GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
979GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
980GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
981GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
982
983GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
984GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
985GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
986GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
987
988GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
989GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
990GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
991GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
992
993GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
994GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
995GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
996GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
997
998GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
999GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
1000GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
1001GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
1002
1003
1004GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
1005GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
1006GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
1007GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
1008GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
1009
1010GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
1011GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
1012GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
1013GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
1014GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
1015
1016
1017GLAPI void GLAPIENTRY glIndexd( GLdouble c );
1018GLAPI void GLAPIENTRY glIndexf( GLfloat c );
1019GLAPI void GLAPIENTRY glIndexi( GLint c );
1020GLAPI void GLAPIENTRY glIndexs( GLshort c );
1021GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
1022
1023GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
1024GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
1025GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
1026GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
1027GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
1028
1029GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
1030GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
1031GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
1032GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
1033GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
1034GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
1035GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
1036GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
1037
1038GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
1039 GLbyte blue, GLbyte alpha );
1040GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
1041 GLdouble blue, GLdouble alpha );
1042GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
1043 GLfloat blue, GLfloat alpha );
1044GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
1045 GLint blue, GLint alpha );
1046GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
1047 GLshort blue, GLshort alpha );
1048GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
1049 GLubyte blue, GLubyte alpha );
1050GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
1051 GLuint blue, GLuint alpha );
1052GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
1053 GLushort blue, GLushort alpha );
1054
1055
1056GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
1057GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
1058GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
1059GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
1060GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
1061GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
1062GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
1063GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
1064
1065GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
1066GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
1067GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
1068GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
1069GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
1070GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
1071GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
1072GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
1073
1074
1075GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
1076GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
1077GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
1078GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
1079
1080GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
1081GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
1082GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
1083GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
1084
1085GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
1086GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
1087GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
1088GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
1089
1090GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
1091GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
1092GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
1093GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
1094
1095GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
1096GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
1097GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
1098GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
1099
1100GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
1101GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
1102GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
1103GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
1104
1105GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
1106GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
1107GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
1108GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
1109
1110GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
1111GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
1112GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
1113GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
1114
1115
1116GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
1117GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
1118GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
1119GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
1120
1121GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
1122GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
1123GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
1124GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
1125
1126GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
1127GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1128GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
1129GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
1130
1131GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
1132GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
1133GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
1134GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
1135
1136GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
1137GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
1138GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
1139GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
1140
1141GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
1142GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
1143GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
1144GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
1145
1146
1147GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
1148GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
1149GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
1150GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
1151
1152
1153GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
1154GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
1155GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
1156GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
1157
1158
1159/*
1160 * Vertex Arrays (1.1)
1161 */
1162
1163GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
1164 GLsizei stride, const GLvoid *ptr );
1165
1166GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
1167 const GLvoid *ptr );
1168
1169GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
1170 GLsizei stride, const GLvoid *ptr );
1171
1172GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
1173 const GLvoid *ptr );
1174
1175GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
1176 GLsizei stride, const GLvoid *ptr );
1177
1178GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
1179
1180GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
1181
1182GLAPI void GLAPIENTRY glArrayElement( GLint i );
1183
1184GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
1185
1186GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
1187 GLenum type, const GLvoid *indices );
1188
1189GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
1190 const GLvoid *pointer );
1191
1192/*
1193 * Lighting
1194 */
1195
1196GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
1197
1198GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
1199GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
1200GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
1201 const GLfloat *params );
1202GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
1203 const GLint *params );
1204
1205GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
1206 GLfloat *params );
1207GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
1208 GLint *params );
1209
1210GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
1211GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
1212GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
1213GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
1214
1215GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
1216GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
1217GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
1218GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
1219
1220GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
1221GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
1222
1223GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
1224
1225
1226/*
1227 * Raster functions
1228 */
1229
1230GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
1231
1232GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
1233GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
1234
1235GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
1236GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
1237
1238GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
1239 const GLfloat *values );
1240GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
1241 const GLuint *values );
1242GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
1243 const GLushort *values );
1244
1245GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
1246GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
1247GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
1248
1249GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
1250 GLfloat xorig, GLfloat yorig,
1251 GLfloat xmove, GLfloat ymove,
1252 const GLubyte *bitmap );
1253
1254GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
1255 GLsizei width, GLsizei height,
1256 GLenum format, GLenum type,
1257 GLvoid *pixels );
1258
1259GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
1260 GLenum format, GLenum type,
1261 const GLvoid *pixels );
1262
1263GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
1264 GLsizei width, GLsizei height,
1265 GLenum type );
1266
1267/*
1268 * Stenciling
1269 */
1270
1271GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
1272
1273GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
1274
1275GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
1276
1277GLAPI void GLAPIENTRY glClearStencil( GLint s );
1278
1279
1280
1281/*
1282 * Texture mapping
1283 */
1284
1285GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
1286GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
1287GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
1288
1289GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
1290GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
1291GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
1292
1293GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
1294GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
1295GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
1296
1297
1298GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
1299GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
1300
1301GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
1302GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
1303
1304GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
1305GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
1306
1307
1308GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
1309GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
1310
1311GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
1312 const GLfloat *params );
1313GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
1314 const GLint *params );
1315
1316GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
1317 GLenum pname, GLfloat *params);
1318GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
1319 GLenum pname, GLint *params );
1320
1321GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
1322 GLenum pname, GLfloat *params );
1323GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
1324 GLenum pname, GLint *params );
1325
1326
1327GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
1328 GLint internalFormat,
1329 GLsizei width, GLint border,
1330 GLenum format, GLenum type,
1331 const GLvoid *pixels );
1332
1333GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
1334 GLint internalFormat,
1335 GLsizei width, GLsizei height,
1336 GLint border, GLenum format, GLenum type,
1337 const GLvoid *pixels );
1338
1339GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
1340 GLenum format, GLenum type,
1341 GLvoid *pixels );
1342
1343
1344/* 1.1 functions */
1345
1346GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
1347
1348GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
1349
1350GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
1351
1352GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
1353 const GLuint *textures,
1354 const GLclampf *priorities );
1355
1356GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
1357 const GLuint *textures,
1358 GLboolean *residences );
1359
1360GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
1361
1362
1363GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
1364 GLint xoffset,
1365 GLsizei width, GLenum format,
1366 GLenum type, const GLvoid *pixels );
1367
1368
1369GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
1370 GLint xoffset, GLint yoffset,
1371 GLsizei width, GLsizei height,
1372 GLenum format, GLenum type,
1373 const GLvoid *pixels );
1374
1375
1376GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
1377 GLenum internalformat,
1378 GLint x, GLint y,
1379 GLsizei width, GLint border );
1380
1381
1382GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
1383 GLenum internalformat,
1384 GLint x, GLint y,
1385 GLsizei width, GLsizei height,
1386 GLint border );
1387
1388
1389GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
1390 GLint xoffset, GLint x, GLint y,
1391 GLsizei width );
1392
1393
1394GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
1395 GLint xoffset, GLint yoffset,
1396 GLint x, GLint y,
1397 GLsizei width, GLsizei height );
1398
1399
1400/*
1401 * Evaluators
1402 */
1403
1404GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
1405 GLint stride,
1406 GLint order, const GLdouble *points );
1407GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
1408 GLint stride,
1409 GLint order, const GLfloat *points );
1410
1411GLAPI void GLAPIENTRY glMap2d( GLenum target,
1412 GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
1413 GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
1414 const GLdouble *points );
1415GLAPI void GLAPIENTRY glMap2f( GLenum target,
1416 GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
1417 GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
1418 const GLfloat *points );
1419
1420GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
1421GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
1422GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
1423
1424GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
1425GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
1426
1427GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
1428GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
1429
1430GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
1431GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
1432
1433GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
1434GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
1435
1436GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
1437GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
1438
1439GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
1440 GLint vn, GLdouble v1, GLdouble v2 );
1441GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
1442 GLint vn, GLfloat v1, GLfloat v2 );
1443
1444GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
1445
1446GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
1447
1448GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
1449
1450GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
1451
1452
1453/*
1454 * Fog
1455 */
1456
1457GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
1458
1459GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
1460
1461GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
1462
1463GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
1464
1465
1466/*
1467 * Selection and Feedback
1468 */
1469
1470GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
1471
1472GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
1473
1474GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
1475
1476GLAPI void GLAPIENTRY glInitNames( void );
1477
1478GLAPI void GLAPIENTRY glLoadName( GLuint name );
1479
1480GLAPI void GLAPIENTRY glPushName( GLuint name );
1481
1482GLAPI void GLAPIENTRY glPopName( void );
1483
1484#endif
1485#ifdef SDL_OPENGL_1_FUNCTION_TYPEDEFS
1486
1487typedef void (APIENTRYP PFNGLCLEARINDEXPROC) ( GLfloat c );
1488
1489typedef void (APIENTRYP PFNGLCLEARCOLORPROC) ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
1490
1491typedef void (APIENTRYP PFNGLCLEARPROC) ( GLbitfield mask );
1492
1493typedef void (APIENTRYP PFNGLINDEXMASKPROC) ( GLuint mask );
1494
1495typedef void (APIENTRYP PFNGLCOLORMASKPROC) ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
1496
1497typedef void (APIENTRYP PFNGLALPHAFUNCPROC) ( GLenum func, GLclampf ref );
1498
1499typedef void (APIENTRYP PFNGLBLENDFUNCPROC) ( GLenum sfactor, GLenum dfactor );
1500
1501typedef void (APIENTRYP PFNGLLOGICOPPROC) ( GLenum opcode );
1502
1503typedef void (APIENTRYP PFNGLCULLFACEPROC) ( GLenum mode );
1504
1505typedef void (APIENTRYP PFNGLFRONTFACEPROC) ( GLenum mode );
1506
1507typedef void (APIENTRYP PFNGLPOINTSIZEPROC) ( GLfloat size );
1508
1509typedef void (APIENTRYP PFNGLLINEWIDTHPROC) ( GLfloat width );
1510
1511typedef void (APIENTRYP PFNGLLINESTIPPLEPROC) ( GLint factor, GLushort pattern );
1512
1513typedef void (APIENTRYP PFNGLPOLYGONMODEPROC) ( GLenum face, GLenum mode );
1514
1515typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC) ( GLfloat factor, GLfloat units );
1516
1517typedef void (APIENTRYP PFNGLPOLYGONSTIPPLEPROC) ( const GLubyte *mask );
1518
1519typedef void (APIENTRYP PFNGLGETPOLYGONSTIPPLEPROC) ( GLubyte *mask );
1520
1521typedef void (APIENTRYP PFNGLEDGEFLAGPROC) ( GLboolean flag );
1522
1523typedef void (APIENTRYP PFNGLEDGEFLAGVPROC) ( const GLboolean *flag );
1524
1525typedef void (APIENTRYP PFNGLSCISSORPROC) ( GLint x, GLint y, GLsizei width, GLsizei height);
1526
1527typedef void (APIENTRYP PFNGLCLIPPLANEPROC) ( GLenum plane, const GLdouble *equation );
1528
1529typedef void (APIENTRYP PFNGLGETCLIPPLANEPROC) ( GLenum plane, GLdouble *equation );
1530
1531typedef void (APIENTRYP PFNGLDRAWBUFFERPROC) ( GLenum mode );
1532
1533typedef void (APIENTRYP PFNGLREADBUFFERPROC) ( GLenum mode );
1534
1535typedef void (APIENTRYP PFNGLENABLEPROC) ( GLenum cap );
1536
1537typedef void (APIENTRYP PFNGLDISABLEPROC) ( GLenum cap );
1538
1539typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) ( GLenum cap );
1540
1541
1542typedef void (APIENTRYP PFNGLENABLECLIENTSTATEPROC) ( GLenum cap ); /* 1.1 */
1543
1544typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEPROC) ( GLenum cap ); /* 1.1 */
1545
1546
1547typedef void (APIENTRYP PFNGLGETBOOLEANVPROC) ( GLenum pname, GLboolean *params );
1548
1549typedef void (APIENTRYP PFNGLGETDOUBLEVPROC) ( GLenum pname, GLdouble *params );
1550
1551typedef void (APIENTRYP PFNGLGETFLOATVPROC) ( GLenum pname, GLfloat *params );
1552
1553typedef void (APIENTRYP PFNGLGETINTEGERVPROC) ( GLenum pname, GLint *params );
1554
1555
1556typedef void (APIENTRYP PFNGLPUSHATTRIBPROC) ( GLbitfield mask );
1557
1558typedef void (APIENTRYP PFNGLPOPATTRIBPROC) ( void );
1559
1560
1561typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBPROC) ( GLbitfield mask ); /* 1.1 */
1562
1563typedef void (APIENTRYP PFNGLPOPCLIENTATTRIBPROC) ( void ); /* 1.1 */
1564
1565
1566typedef GLint (APIENTRYP PFNGLRENDERMODEPROC) ( GLenum mode );
1567
1568typedef GLenum (APIENTRYP PFNGLGETERRORPROC) ( void );
1569
1570typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGPROC) ( GLenum name );
1571
1572typedef void (APIENTRYP PFNGLFINISHPROC) ( void );
1573
1574typedef void (APIENTRYP PFNGLFLUSHPROC) ( void );
1575
1576typedef void (APIENTRYP PFNGLHINTPROC) ( GLenum target, GLenum mode );
1577
1578
1579/*
1580 * Depth Buffer
1581 */
1582
1583typedef void (APIENTRYP PFNGLCLEARDEPTHPROC) ( GLclampd depth );
1584
1585typedef void (APIENTRYP PFNGLDEPTHFUNCPROC) ( GLenum func );
1586
1587typedef void (APIENTRYP PFNGLDEPTHMASKPROC) ( GLboolean flag );
1588
1589typedef void (APIENTRYP PFNGLDEPTHRANGEPROC) ( GLclampd near_val, GLclampd far_val );
1590
1591
1592/*
1593 * Accumulation Buffer
1594 */
1595
1596typedef void (APIENTRYP PFNGLCLEARACCUMPROC) ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
1597
1598typedef void (APIENTRYP PFNGLACCUMPROC) ( GLenum op, GLfloat value );
1599
1600
1601/*
1602 * Transformation
1603 */
1604
1605typedef void (APIENTRYP PFNGLMATRIXMODEPROC) ( GLenum mode );
1606
1607typedef void (APIENTRYP PFNGLORTHOPROC) ( GLdouble left, GLdouble right,
1608 GLdouble bottom, GLdouble top,
1609 GLdouble near_val, GLdouble far_val );
1610
1611typedef void (APIENTRYP PFNGLFRUSTUMPROC) ( GLdouble left, GLdouble right,
1612 GLdouble bottom, GLdouble top,
1613 GLdouble near_val, GLdouble far_val );
1614
1615typedef void (APIENTRYP PFNGLVIEWPORTPROC) ( GLint x, GLint y,
1616 GLsizei width, GLsizei height );
1617
1618typedef void (APIENTRYP PFNGLPUSHMATRIXPROC) ( void );
1619
1620typedef void (APIENTRYP PFNGLPOPMATRIXPROC) ( void );
1621
1622typedef void (APIENTRYP PFNGLLOADIDENTITYPROC) ( void );
1623
1624typedef void (APIENTRYP PFNGLLOADMATRIXDPROC) ( const GLdouble *m );
1625typedef void (APIENTRYP PFNGLLOADMATRIXFPROC) ( const GLfloat *m );
1626
1627typedef void (APIENTRYP PFNGLMULTMATRIXDPROC) ( const GLdouble *m );
1628typedef void (APIENTRYP PFNGLMULTMATRIXFPROC) ( const GLfloat *m );
1629
1630typedef void (APIENTRYP PFNGLROTATEDPROC) ( GLdouble angle,
1631 GLdouble x, GLdouble y, GLdouble z );
1632typedef void (APIENTRYP PFNGLROTATEFPROC) ( GLfloat angle,
1633 GLfloat x, GLfloat y, GLfloat z );
1634
1635typedef void (APIENTRYP PFNGLSCALEDPROC) ( GLdouble x, GLdouble y, GLdouble z );
1636typedef void (APIENTRYP PFNGLSCALEFPROC) ( GLfloat x, GLfloat y, GLfloat z );
1637
1638typedef void (APIENTRYP PFNGLTRANSLATEDPROC) ( GLdouble x, GLdouble y, GLdouble z );
1639typedef void (APIENTRYP PFNGLTRANSLATEFPROC) ( GLfloat x, GLfloat y, GLfloat z );
1640
1641
1642/*
1643 * Display Lists
1644 */
1645
1646typedef GLboolean (APIENTRYP PFNGLISLISTPROC) ( GLuint list );
1647
1648typedef void (APIENTRYP PFNGLDELETELISTSPROC) ( GLuint list, GLsizei range );
1649
1650typedef GLuint (APIENTRYP PFNGLGENLISTSPROC) ( GLsizei range );
1651
1652typedef void (APIENTRYP PFNGLNEWLISTPROC) ( GLuint list, GLenum mode );
1653
1654typedef void (APIENTRYP PFNGLENDLISTPROC) ( void );
1655
1656typedef void (APIENTRYP PFNGLCALLLISTPROC) ( GLuint list );
1657
1658typedef void (APIENTRYP PFNGLCALLLISTSPROC) ( GLsizei n, GLenum type,
1659 const GLvoid *lists );
1660
1661typedef void (APIENTRYP PFNGLLISTBASEPROC) ( GLuint base );
1662
1663
1664/*
1665 * Drawing Functions
1666 */
1667
1668typedef void (APIENTRYP PFNGLBEGINPROC) ( GLenum mode );
1669
1670typedef void (APIENTRYP PFNGLENDPROC) ( void );
1671
1672
1673typedef void (APIENTRYP PFNGLVERTEX2DPROC) ( GLdouble x, GLdouble y );
1674typedef void (APIENTRYP PFNGLVERTEX2FPROC) ( GLfloat x, GLfloat y );
1675typedef void (APIENTRYP PFNGLVERTEX2IPROC) ( GLint x, GLint y );
1676typedef void (APIENTRYP PFNGLVERTEX2SPROC) ( GLshort x, GLshort y );
1677
1678typedef void (APIENTRYP PFNGLVERTEX3DPROC) ( GLdouble x, GLdouble y, GLdouble z );
1679typedef void (APIENTRYP PFNGLVERTEX3FPROC) ( GLfloat x, GLfloat y, GLfloat z );
1680typedef void (APIENTRYP PFNGLVERTEX3IPROC) ( GLint x, GLint y, GLint z );
1681typedef void (APIENTRYP PFNGLVERTEX3SPROC) ( GLshort x, GLshort y, GLshort z );
1682
1683typedef void (APIENTRYP PFNGLVERTEX4DPROC) ( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
1684typedef void (APIENTRYP PFNGLVERTEX4FPROC) ( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1685typedef void (APIENTRYP PFNGLVERTEX4IPROC) ( GLint x, GLint y, GLint z, GLint w );
1686typedef void (APIENTRYP PFNGLVERTEX4SPROC) ( GLshort x, GLshort y, GLshort z, GLshort w );
1687
1688typedef void (APIENTRYP PFNGLVERTEX2DVPROC) ( const GLdouble *v );
1689typedef void (APIENTRYP PFNGLVERTEX2FVPROC) ( const GLfloat *v );
1690typedef void (APIENTRYP PFNGLVERTEX2IVPROC) ( const GLint *v );
1691typedef void (APIENTRYP PFNGLVERTEX2SVPROC) ( const GLshort *v );
1692
1693typedef void (APIENTRYP PFNGLVERTEX3DVPROC) ( const GLdouble *v );
1694typedef void (APIENTRYP PFNGLVERTEX3FVPROC) ( const GLfloat *v );
1695typedef void (APIENTRYP PFNGLVERTEX3IVPROC) ( const GLint *v );
1696typedef void (APIENTRYP PFNGLVERTEX3SVPROC) ( const GLshort *v );
1697
1698typedef void (APIENTRYP PFNGLVERTEX4DVPROC) ( const GLdouble *v );
1699typedef void (APIENTRYP PFNGLVERTEX4FVPROC) ( const GLfloat *v );
1700typedef void (APIENTRYP PFNGLVERTEX4IVPROC) ( const GLint *v );
1701typedef void (APIENTRYP PFNGLVERTEX4SVPROC) ( const GLshort *v );
1702
1703
1704typedef void (APIENTRYP PFNGLNORMAL3BPROC) ( GLbyte nx, GLbyte ny, GLbyte nz );
1705typedef void (APIENTRYP PFNGLNORMAL3DPROC) ( GLdouble nx, GLdouble ny, GLdouble nz );
1706typedef void (APIENTRYP PFNGLNORMAL3FPROC) ( GLfloat nx, GLfloat ny, GLfloat nz );
1707typedef void (APIENTRYP PFNGLNORMAL3IPROC) ( GLint nx, GLint ny, GLint nz );
1708typedef void (APIENTRYP PFNGLNORMAL3SPROC) ( GLshort nx, GLshort ny, GLshort nz );
1709
1710typedef void (APIENTRYP PFNGLNORMAL3BVPROC) ( const GLbyte *v );
1711typedef void (APIENTRYP PFNGLNORMAL3DVPROC) ( const GLdouble *v );
1712typedef void (APIENTRYP PFNGLNORMAL3FVPROC) ( const GLfloat *v );
1713typedef void (APIENTRYP PFNGLNORMAL3IVPROC) ( const GLint *v );
1714typedef void (APIENTRYP PFNGLNORMAL3SVPROC) ( const GLshort *v );
1715
1716
1717typedef void (APIENTRYP PFNGLINDEXDPROC) ( GLdouble c );
1718typedef void (APIENTRYP PFNGLINDEXFPROC) ( GLfloat c );
1719typedef void (APIENTRYP PFNGLINDEXIPROC) ( GLint c );
1720typedef void (APIENTRYP PFNGLINDEXSPROC) ( GLshort c );
1721typedef void (APIENTRYP PFNGLINDEXUBPROC) ( GLubyte c ); /* 1.1 */
1722
1723typedef void (APIENTRYP PFNGLINDEXDVPROC) ( const GLdouble *c );
1724typedef void (APIENTRYP PFNGLINDEXFVPROC) ( const GLfloat *c );
1725typedef void (APIENTRYP PFNGLINDEXIVPROC) ( const GLint *c );
1726typedef void (APIENTRYP PFNGLINDEXSVPROC) ( const GLshort *c );
1727typedef void (APIENTRYP PFNGLINDEXUBVPROC) ( const GLubyte *c ); /* 1.1 */
1728
1729typedef void (APIENTRYP PFNGLCOLOR3BPROC) ( GLbyte red, GLbyte green, GLbyte blue );
1730typedef void (APIENTRYP PFNGLCOLOR3DPROC) ( GLdouble red, GLdouble green, GLdouble blue );
1731typedef void (APIENTRYP PFNGLCOLOR3FPROC) ( GLfloat red, GLfloat green, GLfloat blue );
1732typedef void (APIENTRYP PFNGLCOLOR3IPROC) ( GLint red, GLint green, GLint blue );
1733typedef void (APIENTRYP PFNGLCOLOR3SPROC) ( GLshort red, GLshort green, GLshort blue );
1734typedef void (APIENTRYP PFNGLCOLOR3UBPROC) ( GLubyte red, GLubyte green, GLubyte blue );
1735typedef void (APIENTRYP PFNGLCOLOR3UIPROC) ( GLuint red, GLuint green, GLuint blue );
1736typedef void (APIENTRYP PFNGLCOLOR3USPROC) ( GLushort red, GLushort green, GLushort blue );
1737
1738typedef void (APIENTRYP PFNGLCOLOR4BPROC) ( GLbyte red, GLbyte green,
1739 GLbyte blue, GLbyte alpha );
1740typedef void (APIENTRYP PFNGLCOLOR4DPROC) ( GLdouble red, GLdouble green,
1741 GLdouble blue, GLdouble alpha );
1742typedef void (APIENTRYP PFNGLCOLOR4FPROC) ( GLfloat red, GLfloat green,
1743 GLfloat blue, GLfloat alpha );
1744typedef void (APIENTRYP PFNGLCOLOR4IPROC) ( GLint red, GLint green,
1745 GLint blue, GLint alpha );
1746typedef void (APIENTRYP PFNGLCOLOR4SPROC) ( GLshort red, GLshort green,
1747 GLshort blue, GLshort alpha );
1748typedef void (APIENTRYP PFNGLCOLOR4UBPROC) ( GLubyte red, GLubyte green,
1749 GLubyte blue, GLubyte alpha );
1750typedef void (APIENTRYP PFNGLCOLOR4UIPROC) ( GLuint red, GLuint green,
1751 GLuint blue, GLuint alpha );
1752typedef void (APIENTRYP PFNGLCOLOR4USPROC) ( GLushort red, GLushort green,
1753 GLushort blue, GLushort alpha );
1754
1755
1756typedef void (APIENTRYP PFNGLCOLOR3BVPROC) ( const GLbyte *v );
1757typedef void (APIENTRYP PFNGLCOLOR3DVPROC) ( const GLdouble *v );
1758typedef void (APIENTRYP PFNGLCOLOR3FVPROC) ( const GLfloat *v );
1759typedef void (APIENTRYP PFNGLCOLOR3IVPROC) ( const GLint *v );
1760typedef void (APIENTRYP PFNGLCOLOR3SVPROC) ( const GLshort *v );
1761typedef void (APIENTRYP PFNGLCOLOR3UBVPROC) ( const GLubyte *v );
1762typedef void (APIENTRYP PFNGLCOLOR3UIVPROC) ( const GLuint *v );
1763typedef void (APIENTRYP PFNGLCOLOR3USVPROC) ( const GLushort *v );
1764
1765typedef void (APIENTRYP PFNGLCOLOR4BVPROC) ( const GLbyte *v );
1766typedef void (APIENTRYP PFNGLCOLOR4DVPROC) ( const GLdouble *v );
1767typedef void (APIENTRYP PFNGLCOLOR4FVPROC) ( const GLfloat *v );
1768typedef void (APIENTRYP PFNGLCOLOR4IVPROC) ( const GLint *v );
1769typedef void (APIENTRYP PFNGLCOLOR4SVPROC) ( const GLshort *v );
1770typedef void (APIENTRYP PFNGLCOLOR4UBVPROC) ( const GLubyte *v );
1771typedef void (APIENTRYP PFNGLCOLOR4UIVPROC) ( const GLuint *v );
1772typedef void (APIENTRYP PFNGLCOLOR4USVPROC) ( const GLushort *v );
1773
1774
1775typedef void (APIENTRYP PFNGLTEXCOORD1DPROC) ( GLdouble s );
1776typedef void (APIENTRYP PFNGLTEXCOORD1FPROC) ( GLfloat s );
1777typedef void (APIENTRYP PFNGLTEXCOORD1IPROC) ( GLint s );
1778typedef void (APIENTRYP PFNGLTEXCOORD1SPROC) ( GLshort s );
1779
1780typedef void (APIENTRYP PFNGLTEXCOORD2DPROC) ( GLdouble s, GLdouble t );
1781typedef void (APIENTRYP PFNGLTEXCOORD2FPROC) ( GLfloat s, GLfloat t );
1782typedef void (APIENTRYP PFNGLTEXCOORD2IPROC) ( GLint s, GLint t );
1783typedef void (APIENTRYP PFNGLTEXCOORD2SPROC) ( GLshort s, GLshort t );
1784
1785typedef void (APIENTRYP PFNGLTEXCOORD3DPROC) ( GLdouble s, GLdouble t, GLdouble r );
1786typedef void (APIENTRYP PFNGLTEXCOORD3FPROC) ( GLfloat s, GLfloat t, GLfloat r );
1787typedef void (APIENTRYP PFNGLTEXCOORD3IPROC) ( GLint s, GLint t, GLint r );
1788typedef void (APIENTRYP PFNGLTEXCOORD3SPROC) ( GLshort s, GLshort t, GLshort r );
1789
1790typedef void (APIENTRYP PFNGLTEXCOORD4DPROC) ( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
1791typedef void (APIENTRYP PFNGLTEXCOORD4FPROC) ( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
1792typedef void (APIENTRYP PFNGLTEXCOORD4IPROC) ( GLint s, GLint t, GLint r, GLint q );
1793typedef void (APIENTRYP PFNGLTEXCOORD4SPROC) ( GLshort s, GLshort t, GLshort r, GLshort q );
1794
1795typedef void (APIENTRYP PFNGLTEXCOORD1DVPROC) ( const GLdouble *v );
1796typedef void (APIENTRYP PFNGLTEXCOORD1FVPROC) ( const GLfloat *v );
1797typedef void (APIENTRYP PFNGLTEXCOORD1IVPROC) ( const GLint *v );
1798typedef void (APIENTRYP PFNGLTEXCOORD1SVPROC) ( const GLshort *v );
1799
1800typedef void (APIENTRYP PFNGLTEXCOORD2DVPROC) ( const GLdouble *v );
1801typedef void (APIENTRYP PFNGLTEXCOORD2FVPROC) ( const GLfloat *v );
1802typedef void (APIENTRYP PFNGLTEXCOORD2IVPROC) ( const GLint *v );
1803typedef void (APIENTRYP PFNGLTEXCOORD2SVPROC) ( const GLshort *v );
1804
1805typedef void (APIENTRYP PFNGLTEXCOORD3DVPROC) ( const GLdouble *v );
1806typedef void (APIENTRYP PFNGLTEXCOORD3FVPROC) ( const GLfloat *v );
1807typedef void (APIENTRYP PFNGLTEXCOORD3IVPROC) ( const GLint *v );
1808typedef void (APIENTRYP PFNGLTEXCOORD3SVPROC) ( const GLshort *v );
1809
1810typedef void (APIENTRYP PFNGLTEXCOORD4DVPROC) ( const GLdouble *v );
1811typedef void (APIENTRYP PFNGLTEXCOORD4FVPROC) ( const GLfloat *v );
1812typedef void (APIENTRYP PFNGLTEXCOORD4IVPROC) ( const GLint *v );
1813typedef void (APIENTRYP PFNGLTEXCOORD4SVPROC) ( const GLshort *v );
1814
1815
1816typedef void (APIENTRYP PFNGLRASTERPOS2DPROC) ( GLdouble x, GLdouble y );
1817typedef void (APIENTRYP PFNGLRASTERPOS2FPROC) ( GLfloat x, GLfloat y );
1818typedef void (APIENTRYP PFNGLRASTERPOS2IPROC) ( GLint x, GLint y );
1819typedef void (APIENTRYP PFNGLRASTERPOS2SPROC) ( GLshort x, GLshort y );
1820
1821typedef void (APIENTRYP PFNGLRASTERPOS3DPROC) ( GLdouble x, GLdouble y, GLdouble z );
1822typedef void (APIENTRYP PFNGLRASTERPOS3FPROC) ( GLfloat x, GLfloat y, GLfloat z );
1823typedef void (APIENTRYP PFNGLRASTERPOS3IPROC) ( GLint x, GLint y, GLint z );
1824typedef void (APIENTRYP PFNGLRASTERPOS3SPROC) ( GLshort x, GLshort y, GLshort z );
1825
1826typedef void (APIENTRYP PFNGLRASTERPOS4DPROC) ( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
1827typedef void (APIENTRYP PFNGLRASTERPOS4FPROC) ( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1828typedef void (APIENTRYP PFNGLRASTERPOS4IPROC) ( GLint x, GLint y, GLint z, GLint w );
1829typedef void (APIENTRYP PFNGLRASTERPOS4SPROC) ( GLshort x, GLshort y, GLshort z, GLshort w );
1830
1831typedef void (APIENTRYP PFNGLRASTERPOS2DVPROC) ( const GLdouble *v );
1832typedef void (APIENTRYP PFNGLRASTERPOS2FVPROC) ( const GLfloat *v );
1833typedef void (APIENTRYP PFNGLRASTERPOS2IVPROC) ( const GLint *v );
1834typedef void (APIENTRYP PFNGLRASTERPOS2SVPROC) ( const GLshort *v );
1835
1836typedef void (APIENTRYP PFNGLRASTERPOS3DVPROC) ( const GLdouble *v );
1837typedef void (APIENTRYP PFNGLRASTERPOS3FVPROC) ( const GLfloat *v );
1838typedef void (APIENTRYP PFNGLRASTERPOS3IVPROC) ( const GLint *v );
1839typedef void (APIENTRYP PFNGLRASTERPOS3SVPROC) ( const GLshort *v );
1840
1841typedef void (APIENTRYP PFNGLRASTERPOS4DVPROC) ( const GLdouble *v );
1842typedef void (APIENTRYP PFNGLRASTERPOS4FVPROC) ( const GLfloat *v );
1843typedef void (APIENTRYP PFNGLRASTERPOS4IVPROC) ( const GLint *v );
1844typedef void (APIENTRYP PFNGLRASTERPOS4SVPROC) ( const GLshort *v );
1845
1846
1847typedef void (APIENTRYP PFNGLRECTDPROC) ( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
1848typedef void (APIENTRYP PFNGLRECTFPROC) ( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
1849typedef void (APIENTRYP PFNGLRECTIPROC) ( GLint x1, GLint y1, GLint x2, GLint y2 );
1850typedef void (APIENTRYP PFNGLRECTSPROC) ( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
1851
1852
1853typedef void (APIENTRYP PFNGLRECTDVPROC) ( const GLdouble *v1, const GLdouble *v2 );
1854typedef void (APIENTRYP PFNGLRECTFVPROC) ( const GLfloat *v1, const GLfloat *v2 );
1855typedef void (APIENTRYP PFNGLRECTIVPROC) ( const GLint *v1, const GLint *v2 );
1856typedef void (APIENTRYP PFNGLRECTSVPROC) ( const GLshort *v1, const GLshort *v2 );
1857
1858
1859/*
1860 * Vertex Arrays (1.1)
1861 */
1862
1863typedef void (APIENTRYP PFNGLVERTEXPOINTERPROC) ( GLint size, GLenum type,
1864 GLsizei stride, const GLvoid *ptr );
1865
1866typedef void (APIENTRYP PFNGLNORMALPOINTERPROC) ( GLenum type, GLsizei stride,
1867 const GLvoid *ptr );
1868
1869typedef void (APIENTRYP PFNGLCOLORPOINTERPROC) ( GLint size, GLenum type,
1870 GLsizei stride, const GLvoid *ptr );
1871
1872typedef void (APIENTRYP PFNGLINDEXPOINTERPROC) ( GLenum type, GLsizei stride,
1873 const GLvoid *ptr );
1874
1875typedef void (APIENTRYP PFNGLTEXCOORDPOINTERPROC) ( GLint size, GLenum type,
1876 GLsizei stride, const GLvoid *ptr );
1877
1878typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERPROC) ( GLsizei stride, const GLvoid *ptr );
1879
1880typedef void (APIENTRYP PFNGLGETPOINTERVPROC) ( GLenum pname, GLvoid **params );
1881
1882typedef void (APIENTRYP PFNGLARRAYELEMENTPROC) ( GLint i );
1883
1884typedef void (APIENTRYP PFNGLDRAWARRAYSPROC) ( GLenum mode, GLint first, GLsizei count );
1885
1886typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC) ( GLenum mode, GLsizei count,
1887 GLenum type, const GLvoid *indices );
1888
1889typedef void (APIENTRYP PFNGLINTERLEAVEDARRAYSPROC) ( GLenum format, GLsizei stride,
1890 const GLvoid *pointer );
1891
1892/*
1893 * Lighting
1894 */
1895
1896typedef void (APIENTRYP PFNGLSHADEMODELPROC) ( GLenum mode );
1897
1898typedef void (APIENTRYP PFNGLLIGHTFPROC) ( GLenum light, GLenum pname, GLfloat param );
1899typedef void (APIENTRYP PFNGLLIGHTIPROC) ( GLenum light, GLenum pname, GLint param );
1900typedef void (APIENTRYP PFNGLLIGHTFVPROC) ( GLenum light, GLenum pname,
1901 const GLfloat *params );
1902typedef void (APIENTRYP PFNGLLIGHTIVPROC) ( GLenum light, GLenum pname,
1903 const GLint *params );
1904
1905typedef void (APIENTRYP PFNGLGETLIGHTFVPROC) ( GLenum light, GLenum pname,
1906 GLfloat *params );
1907typedef void (APIENTRYP PFNGLGETLIGHTIVPROC) ( GLenum light, GLenum pname,
1908 GLint *params );
1909
1910typedef void (APIENTRYP PFNGLLIGHTMODELFPROC) ( GLenum pname, GLfloat param );
1911typedef void (APIENTRYP PFNGLLIGHTMODELIPROC) ( GLenum pname, GLint param );
1912typedef void (APIENTRYP PFNGLLIGHTMODELFVPROC) ( GLenum pname, const GLfloat *params );
1913typedef void (APIENTRYP PFNGLLIGHTMODELIVPROC) ( GLenum pname, const GLint *params );
1914
1915typedef void (APIENTRYP PFNGLMATERIALFPROC) ( GLenum face, GLenum pname, GLfloat param );
1916typedef void (APIENTRYP PFNGLMATERIALIPROC) ( GLenum face, GLenum pname, GLint param );
1917typedef void (APIENTRYP PFNGLMATERIALFVPROC) ( GLenum face, GLenum pname, const GLfloat *params );
1918typedef void (APIENTRYP PFNGLMATERIALIVPROC) ( GLenum face, GLenum pname, const GLint *params );
1919
1920typedef void (APIENTRYP PFNGLGETMATERIALFVPROC) ( GLenum face, GLenum pname, GLfloat *params );
1921typedef void (APIENTRYP PFNGLGETMATERIALIVPROC) ( GLenum face, GLenum pname, GLint *params );
1922
1923typedef void (APIENTRYP PFNGLCOLORMATERIALPROC) ( GLenum face, GLenum mode );
1924
1925
1926/*
1927 * Raster functions
1928 */
1929
1930typedef void (APIENTRYP PFNGLPIXELZOOMPROC) ( GLfloat xfactor, GLfloat yfactor );
1931
1932typedef void (APIENTRYP PFNGLPIXELSTOREFPROC) ( GLenum pname, GLfloat param );
1933typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) ( GLenum pname, GLint param );
1934
1935typedef void (APIENTRYP PFNGLPIXELTRANSFERFPROC) ( GLenum pname, GLfloat param );
1936typedef void (APIENTRYP PFNGLPIXELTRANSFERIPROC) ( GLenum pname, GLint param );
1937
1938typedef void (APIENTRYP PFNGLPIXELMAPFVPROC) ( GLenum map, GLsizei mapsize,
1939 const GLfloat *values );
1940typedef void (APIENTRYP PFNGLPIXELMAPUIVPROC) ( GLenum map, GLsizei mapsize,
1941 const GLuint *values );
1942typedef void (APIENTRYP PFNGLPIXELMAPUSVPROC) ( GLenum map, GLsizei mapsize,
1943 const GLushort *values );
1944
1945typedef void (APIENTRYP PFNGLGETPIXELMAPFVPROC) ( GLenum map, GLfloat *values );
1946typedef void (APIENTRYP PFNGLGETPIXELMAPUIVPROC) ( GLenum map, GLuint *values );
1947typedef void (APIENTRYP PFNGLGETPIXELMAPUSVPROC) ( GLenum map, GLushort *values );
1948
1949typedef void (APIENTRYP PFNGLBITMAPPROC) ( GLsizei width, GLsizei height,
1950 GLfloat xorig, GLfloat yorig,
1951 GLfloat xmove, GLfloat ymove,
1952 const GLubyte *bitmap );
1953
1954typedef void (APIENTRYP PFNGLREADPIXELSPROC) ( GLint x, GLint y,
1955 GLsizei width, GLsizei height,
1956 GLenum format, GLenum type,
1957 GLvoid *pixels );
1958
1959typedef void (APIENTRYP PFNGLDRAWPIXELSPROC) ( GLsizei width, GLsizei height,
1960 GLenum format, GLenum type,
1961 const GLvoid *pixels );
1962
1963typedef void (APIENTRYP PFNGLCOPYPIXELSPROC) ( GLint x, GLint y,
1964 GLsizei width, GLsizei height,
1965 GLenum type );
1966
1967/*
1968 * Stenciling
1969 */
1970
1971typedef void (APIENTRYP PFNGLSTENCILFUNCPROC) ( GLenum func, GLint ref, GLuint mask );
1972
1973typedef void (APIENTRYP PFNGLSTENCILMASKPROC) ( GLuint mask );
1974
1975typedef void (APIENTRYP PFNGLSTENCILOPPROC) ( GLenum fail, GLenum zfail, GLenum zpass );
1976
1977typedef void (APIENTRYP PFNGLCLEARSTENCILPROC) ( GLint s );
1978
1979
1980
1981/*
1982 * Texture mapping
1983 */
1984
1985typedef void (APIENTRYP PFNGLTEXGENDPROC) ( GLenum coord, GLenum pname, GLdouble param );
1986typedef void (APIENTRYP PFNGLTEXGENFPROC) ( GLenum coord, GLenum pname, GLfloat param );
1987typedef void (APIENTRYP PFNGLTEXGENIPROC) ( GLenum coord, GLenum pname, GLint param );
1988
1989typedef void (APIENTRYP PFNGLTEXGENDVPROC) ( GLenum coord, GLenum pname, const GLdouble *params );
1990typedef void (APIENTRYP PFNGLTEXGENFVPROC) ( GLenum coord, GLenum pname, const GLfloat *params );
1991typedef void (APIENTRYP PFNGLTEXGENIVPROC) ( GLenum coord, GLenum pname, const GLint *params );
1992
1993typedef void (APIENTRYP PFNGLGETTEXGENDVPROC) ( GLenum coord, GLenum pname, GLdouble *params );
1994typedef void (APIENTRYP PFNGLGETTEXGENFVPROC) ( GLenum coord, GLenum pname, GLfloat *params );
1995typedef void (APIENTRYP PFNGLGETTEXGENIVPROC) ( GLenum coord, GLenum pname, GLint *params );
1996
1997
1998typedef void (APIENTRYP PFNGLTEXENVFPROC) ( GLenum target, GLenum pname, GLfloat param );
1999typedef void (APIENTRYP PFNGLTEXENVIPROC) ( GLenum target, GLenum pname, GLint param );
2000
2001typedef void (APIENTRYP PFNGLTEXENVFVPROC) ( GLenum target, GLenum pname, const GLfloat *params );
2002typedef void (APIENTRYP PFNGLTEXENVIVPROC) ( GLenum target, GLenum pname, const GLint *params );
2003
2004typedef void (APIENTRYP PFNGLGETTEXENVFVPROC) ( GLenum target, GLenum pname, GLfloat *params );
2005typedef void (APIENTRYP PFNGLGETTEXENVIVPROC) ( GLenum target, GLenum pname, GLint *params );
2006
2007
2008typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC) ( GLenum target, GLenum pname, GLfloat param );
2009typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) ( GLenum target, GLenum pname, GLint param );
2010
2011typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC) ( GLenum target, GLenum pname,
2012 const GLfloat *params );
2013typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC) ( GLenum target, GLenum pname,
2014 const GLint *params );
2015
2016typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC) ( GLenum target,
2017 GLenum pname, GLfloat *params);
2018typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC) ( GLenum target,
2019 GLenum pname, GLint *params );
2020
2021typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) ( GLenum target, GLint level,
2022 GLenum pname, GLfloat *params );
2023typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) ( GLenum target, GLint level,
2024 GLenum pname, GLint *params );
2025
2026
2027typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC) ( GLenum target, GLint level,
2028 GLint internalFormat,
2029 GLsizei width, GLint border,
2030 GLenum format, GLenum type,
2031 const GLvoid *pixels );
2032
2033typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC) ( GLenum target, GLint level,
2034 GLint internalFormat,
2035 GLsizei width, GLsizei height,
2036 GLint border, GLenum format, GLenum type,
2037 const GLvoid *pixels );
2038
2039typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC) ( GLenum target, GLint level,
2040 GLenum format, GLenum type,
2041 GLvoid *pixels );
2042
2043
2044/* 1.1 functions */
2045
2046typedef void (APIENTRYP PFNGLGENTEXTURESPROC) ( GLsizei n, GLuint *textures );
2047
2048typedef void (APIENTRYP PFNGLDELETETEXTURESPROC) ( GLsizei n, const GLuint *textures);
2049
2050typedef void (APIENTRYP PFNGLBINDTEXTUREPROC) ( GLenum target, GLuint texture );
2051
2052typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESPROC) ( GLsizei n,
2053 const GLuint *textures,
2054 const GLclampf *priorities );
2055
2056typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTPROC) ( GLsizei n,
2057 const GLuint *textures,
2058 GLboolean *residences );
2059
2060typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC) ( GLuint texture );
2061
2062
2063typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC) ( GLenum target, GLint level,
2064 GLint xoffset,
2065 GLsizei width, GLenum format,
2066 GLenum type, const GLvoid *pixels );
2067
2068
2069typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC) ( GLenum target, GLint level,
2070 GLint xoffset, GLint yoffset,
2071 GLsizei width, GLsizei height,
2072 GLenum format, GLenum type,
2073 const GLvoid *pixels );
2074
2075
2076typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC) ( GLenum target, GLint level,
2077 GLenum internalformat,
2078 GLint x, GLint y,
2079 GLsizei width, GLint border );
2080
2081
2082typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) ( GLenum target, GLint level,
2083 GLenum internalformat,
2084 GLint x, GLint y,
2085 GLsizei width, GLsizei height,
2086 GLint border );
2087
2088
2089typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC) ( GLenum target, GLint level,
2090 GLint xoffset, GLint x, GLint y,
2091 GLsizei width );
2092
2093
2094typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) ( GLenum target, GLint level,
2095 GLint xoffset, GLint yoffset,
2096 GLint x, GLint y,
2097 GLsizei width, GLsizei height );
2098
2099
2100/*
2101 * Evaluators
2102 */
2103
2104typedef void (APIENTRYP PFNGLMAP1DPROC) ( GLenum target, GLdouble u1, GLdouble u2,
2105 GLint stride,
2106 GLint order, const GLdouble *points );
2107typedef void (APIENTRYP PFNGLMAP1FPROC) ( GLenum target, GLfloat u1, GLfloat u2,
2108 GLint stride,
2109 GLint order, const GLfloat *points );
2110
2111typedef void (APIENTRYP PFNGLMAP2DPROC) ( GLenum target,
2112 GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
2113 GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
2114 const GLdouble *points );
2115typedef void (APIENTRYP PFNGLMAP2FPROC) ( GLenum target,
2116 GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
2117 GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
2118 const GLfloat *points );
2119
2120typedef void (APIENTRYP PFNGLGETMAPDVPROC) ( GLenum target, GLenum query, GLdouble *v );
2121typedef void (APIENTRYP PFNGLGETMAPFVPROC) ( GLenum target, GLenum query, GLfloat *v );
2122typedef void (APIENTRYP PFNGLGETMAPIVPROC) ( GLenum target, GLenum query, GLint *v );
2123
2124typedef void (APIENTRYP PFNGLEVALCOORD1DPROC) ( GLdouble u );
2125typedef void (APIENTRYP PFNGLEVALCOORD1FPROC) ( GLfloat u );
2126
2127typedef void (APIENTRYP PFNGLEVALCOORD1DVPROC) ( const GLdouble *u );
2128typedef void (APIENTRYP PFNGLEVALCOORD1FVPROC) ( const GLfloat *u );
2129
2130typedef void (APIENTRYP PFNGLEVALCOORD2DPROC) ( GLdouble u, GLdouble v );
2131typedef void (APIENTRYP PFNGLEVALCOORD2FPROC) ( GLfloat u, GLfloat v );
2132
2133typedef void (APIENTRYP PFNGLEVALCOORD2DVPROC) ( const GLdouble *u );
2134typedef void (APIENTRYP PFNGLEVALCOORD2FVPROC) ( const GLfloat *u );
2135
2136typedef void (APIENTRYP PFNGLMAPGRID1DPROC) ( GLint un, GLdouble u1, GLdouble u2 );
2137typedef void (APIENTRYP PFNGLMAPGRID1FPROC) ( GLint un, GLfloat u1, GLfloat u2 );
2138
2139typedef void (APIENTRYP PFNGLMAPGRID2DPROC) ( GLint un, GLdouble u1, GLdouble u2,
2140 GLint vn, GLdouble v1, GLdouble v2 );
2141typedef void (APIENTRYP PFNGLMAPGRID2FPROC) ( GLint un, GLfloat u1, GLfloat u2,
2142 GLint vn, GLfloat v1, GLfloat v2 );
2143
2144typedef void (APIENTRYP PFNGLEVALPOINT1PROC) ( GLint i );
2145
2146typedef void (APIENTRYP PFNGLEVALPOINT2PROC) ( GLint i, GLint j );
2147
2148typedef void (APIENTRYP PFNGLEVALMESH1PROC) ( GLenum mode, GLint i1, GLint i2 );
2149
2150typedef void (APIENTRYP PFNGLEVALMESH2PROC) ( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
2151
2152
2153/*
2154 * Fog
2155 */
2156
2157typedef void (APIENTRYP PFNGLFOGFPROC) ( GLenum pname, GLfloat param );
2158
2159typedef void (APIENTRYP PFNGLFOGIPROC) ( GLenum pname, GLint param );
2160
2161typedef void (APIENTRYP PFNGLFOGFVPROC) ( GLenum pname, const GLfloat *params );
2162
2163typedef void (APIENTRYP PFNGLFOGIVPROC) ( GLenum pname, const GLint *params );
2164
2165
2166/*
2167 * Selection and Feedback
2168 */
2169
2170typedef void (APIENTRYP PFNGLFEEDBACKBUFFERPROC) ( GLsizei size, GLenum type, GLfloat *buffer );
2171
2172typedef void (APIENTRYP PFNGLPASSTHROUGHPROC) ( GLfloat token );
2173
2174typedef void (APIENTRYP PFNGLSELECTBUFFERPROC) ( GLsizei size, GLuint *buffer );
2175
2176typedef void (APIENTRYP PFNGLINITNAMESPROC) ( void );
2177
2178typedef void (APIENTRYP PFNGLLOADNAMEPROC) ( GLuint name );
2179
2180typedef void (APIENTRYP PFNGLPUSHNAMEPROC) ( GLuint name );
2181
2182typedef void (APIENTRYP PFNGLPOPNAMEPROC) ( void );
2183#endif
2184
2185
2186/*
2187 * OpenGL 1.2
2188 */
2189
2190#define GL_RESCALE_NORMAL 0x803A
2191#define GL_CLAMP_TO_EDGE 0x812F
2192#define GL_MAX_ELEMENTS_VERTICES 0x80E8
2193#define GL_MAX_ELEMENTS_INDICES 0x80E9
2194#define GL_BGR 0x80E0
2195#define GL_BGRA 0x80E1
2196#define GL_UNSIGNED_BYTE_3_3_2 0x8032
2197#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
2198#define GL_UNSIGNED_SHORT_5_6_5 0x8363
2199#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
2200#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
2201#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
2202#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
2203#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
2204#define GL_UNSIGNED_INT_8_8_8_8 0x8035
2205#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
2206#define GL_UNSIGNED_INT_10_10_10_2 0x8036
2207#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
2208#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
2209#define GL_SINGLE_COLOR 0x81F9
2210#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
2211#define GL_TEXTURE_MIN_LOD 0x813A
2212#define GL_TEXTURE_MAX_LOD 0x813B
2213#define GL_TEXTURE_BASE_LEVEL 0x813C
2214#define GL_TEXTURE_MAX_LEVEL 0x813D
2215#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
2216#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
2217#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
2218#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
2219#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
2220#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
2221#define GL_PACK_SKIP_IMAGES 0x806B
2222#define GL_PACK_IMAGE_HEIGHT 0x806C
2223#define GL_UNPACK_SKIP_IMAGES 0x806D
2224#define GL_UNPACK_IMAGE_HEIGHT 0x806E
2225#define GL_TEXTURE_3D 0x806F
2226#define GL_PROXY_TEXTURE_3D 0x8070
2227#define GL_TEXTURE_DEPTH 0x8071
2228#define GL_TEXTURE_WRAP_R 0x8072
2229#define GL_MAX_3D_TEXTURE_SIZE 0x8073
2230#define GL_TEXTURE_BINDING_3D 0x806A
2231
2232#ifndef SDL_OPENGL_1_NO_PROTOTYPES
2233
2234GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
2235 GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
2236
2237GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
2238 GLint internalFormat,
2239 GLsizei width, GLsizei height,
2240 GLsizei depth, GLint border,
2241 GLenum format, GLenum type,
2242 const GLvoid *pixels );
2243
2244GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
2245 GLint xoffset, GLint yoffset,
2246 GLint zoffset, GLsizei width,
2247 GLsizei height, GLsizei depth,
2248 GLenum format,
2249 GLenum type, const GLvoid *pixels);
2250
2251GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
2252 GLint xoffset, GLint yoffset,
2253 GLint zoffset, GLint x,
2254 GLint y, GLsizei width,
2255 GLsizei height );
2256
2257#endif
2258#ifdef SDL_OPENGL_1_FUNCTION_TYPEDEFS
2259
2260typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) ( GLenum mode, GLuint start,
2261 GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
2262
2263typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) ( GLenum target, GLint level,
2264 GLint internalFormat,
2265 GLsizei width, GLsizei height,
2266 GLsizei depth, GLint border,
2267 GLenum format, GLenum type,
2268 const GLvoid *pixels );
2269
2270typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) ( GLenum target, GLint level,
2271 GLint xoffset, GLint yoffset,
2272 GLint zoffset, GLsizei width,
2273 GLsizei height, GLsizei depth,
2274 GLenum format,
2275 GLenum type, const GLvoid *pixels);
2276
2277typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) ( GLenum target, GLint level,
2278 GLint xoffset, GLint yoffset,
2279 GLint zoffset, GLint x,
2280 GLint y, GLsizei width,
2281 GLsizei height );
2282
2283#endif
2284
2285typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
2286typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
2287typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
2288typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
2289
2290
2291/*
2292 * GL_ARB_imaging
2293 */
2294
2295#define GL_CONSTANT_COLOR 0x8001
2296#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
2297#define GL_CONSTANT_ALPHA 0x8003
2298#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
2299#define GL_COLOR_TABLE 0x80D0
2300#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
2301#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
2302#define GL_PROXY_COLOR_TABLE 0x80D3
2303#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
2304#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
2305#define GL_COLOR_TABLE_SCALE 0x80D6
2306#define GL_COLOR_TABLE_BIAS 0x80D7
2307#define GL_COLOR_TABLE_FORMAT 0x80D8
2308#define GL_COLOR_TABLE_WIDTH 0x80D9
2309#define GL_COLOR_TABLE_RED_SIZE 0x80DA
2310#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
2311#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
2312#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
2313#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
2314#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
2315#define GL_CONVOLUTION_1D 0x8010
2316#define GL_CONVOLUTION_2D 0x8011
2317#define GL_SEPARABLE_2D 0x8012
2318#define GL_CONVOLUTION_BORDER_MODE 0x8013
2319#define GL_CONVOLUTION_FILTER_SCALE 0x8014
2320#define GL_CONVOLUTION_FILTER_BIAS 0x8015
2321#define GL_REDUCE 0x8016
2322#define GL_CONVOLUTION_FORMAT 0x8017
2323#define GL_CONVOLUTION_WIDTH 0x8018
2324#define GL_CONVOLUTION_HEIGHT 0x8019
2325#define GL_MAX_CONVOLUTION_WIDTH 0x801A
2326#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
2327#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
2328#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
2329#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
2330#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
2331#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
2332#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
2333#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
2334#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
2335#define GL_CONSTANT_BORDER 0x8151
2336#define GL_REPLICATE_BORDER 0x8153
2337#define GL_CONVOLUTION_BORDER_COLOR 0x8154
2338#define GL_COLOR_MATRIX 0x80B1
2339#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
2340#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
2341#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
2342#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
2343#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
2344#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
2345#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
2346#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
2347#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
2348#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
2349#define GL_HISTOGRAM 0x8024
2350#define GL_PROXY_HISTOGRAM 0x8025
2351#define GL_HISTOGRAM_WIDTH 0x8026
2352#define GL_HISTOGRAM_FORMAT 0x8027
2353#define GL_HISTOGRAM_RED_SIZE 0x8028
2354#define GL_HISTOGRAM_GREEN_SIZE 0x8029
2355#define GL_HISTOGRAM_BLUE_SIZE 0x802A
2356#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
2357#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
2358#define GL_HISTOGRAM_SINK 0x802D
2359#define GL_MINMAX 0x802E
2360#define GL_MINMAX_FORMAT 0x802F
2361#define GL_MINMAX_SINK 0x8030
2362#define GL_TABLE_TOO_LARGE 0x8031
2363#define GL_BLEND_EQUATION 0x8009
2364#define GL_MIN 0x8007
2365#define GL_MAX 0x8008
2366#define GL_FUNC_ADD 0x8006
2367#define GL_FUNC_SUBTRACT 0x800A
2368#define GL_FUNC_REVERSE_SUBTRACT 0x800B
2369#define GL_BLEND_COLOR 0x8005
2370
2371
2372#ifndef SDL_OPENGL_1_NO_PROTOTYPES
2373
2374GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
2375 GLsizei width, GLenum format,
2376 GLenum type, const GLvoid *table );
2377
2378GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
2379 GLsizei start, GLsizei count,
2380 GLenum format, GLenum type,
2381 const GLvoid *data );
2382
2383GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
2384 const GLint *params);
2385
2386GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
2387 const GLfloat *params);
2388
2389GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
2390 GLint x, GLint y, GLsizei width );
2391
2392GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
2393 GLint x, GLint y, GLsizei width );
2394
2395GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
2396 GLenum type, GLvoid *table );
2397
2398GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
2399 GLfloat *params );
2400
2401GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
2402 GLint *params );
2403
2404GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
2405
2406GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
2407 GLclampf blue, GLclampf alpha );
2408
2409GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
2410 GLenum internalformat, GLboolean sink );
2411
2412GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
2413
2414GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
2415 GLenum format, GLenum type,
2416 GLvoid *values );
2417
2418GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
2419 GLfloat *params );
2420
2421GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
2422 GLint *params );
2423
2424GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
2425 GLboolean sink );
2426
2427GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
2428
2429GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
2430 GLenum format, GLenum types,
2431 GLvoid *values );
2432
2433GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
2434 GLfloat *params );
2435
2436GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
2437 GLint *params );
2438
2439GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
2440 GLenum internalformat, GLsizei width, GLenum format, GLenum type,
2441 const GLvoid *image );
2442
2443GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
2444 GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
2445 GLenum type, const GLvoid *image );
2446
2447GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
2448 GLfloat params );
2449
2450GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
2451 const GLfloat *params );
2452
2453GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
2454 GLint params );
2455
2456GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
2457 const GLint *params );
2458
2459GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
2460 GLenum internalformat, GLint x, GLint y, GLsizei width );
2461
2462GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
2463 GLenum internalformat, GLint x, GLint y, GLsizei width,
2464 GLsizei height);
2465
2466GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
2467 GLenum type, GLvoid *image );
2468
2469GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
2470 GLfloat *params );
2471
2472GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
2473 GLint *params );
2474
2475GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
2476 GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
2477 GLenum type, const GLvoid *row, const GLvoid *column );
2478
2479GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
2480 GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
2481
2482#endif
2483#ifdef SDL_OPENGL_1_FUNCTION_TYPEDEFS
2484
2485typedef void (APIENTRYP PFNGLCOLORTABLEPROC) ( GLenum target, GLenum internalformat,
2486 GLsizei width, GLenum format,
2487 GLenum type, const GLvoid *table );
2488
2489typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) ( GLenum target,
2490 GLsizei start, GLsizei count,
2491 GLenum format, GLenum type,
2492 const GLvoid *data );
2493
2494typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname,
2495 const GLint *params);
2496
2497typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname,
2498 const GLfloat *params);
2499
2500typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) ( GLenum target, GLsizei start,
2501 GLint x, GLint y, GLsizei width );
2502
2503typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) ( GLenum target, GLenum internalformat,
2504 GLint x, GLint y, GLsizei width );
2505
2506typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) ( GLenum target, GLenum format,
2507 GLenum type, GLvoid *table );
2508
2509typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) ( GLenum target, GLenum pname,
2510 GLfloat *params );
2511
2512typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) ( GLenum target, GLenum pname,
2513 GLint *params );
2514
2515typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) ( GLenum mode );
2516
2517typedef void (APIENTRYP PFNGLBLENDCOLORPROC) ( GLclampf red, GLclampf green,
2518 GLclampf blue, GLclampf alpha );
2519
2520typedef void (APIENTRYP PFNGLHISTOGRAMPROC) ( GLenum target, GLsizei width,
2521 GLenum internalformat, GLboolean sink );
2522
2523typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) ( GLenum target );
2524
2525typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) ( GLenum target, GLboolean reset,
2526 GLenum format, GLenum type,
2527 GLvoid *values );
2528
2529typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) ( GLenum target, GLenum pname,
2530 GLfloat *params );
2531
2532typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) ( GLenum target, GLenum pname,
2533 GLint *params );
2534
2535typedef void (APIENTRYP PFNGLMINMAXPROC) ( GLenum target, GLenum internalformat,
2536 GLboolean sink );
2537
2538typedef void (APIENTRYP PFNGLRESETMINMAXPROC) ( GLenum target );
2539
2540typedef void (APIENTRYP PFNGLGETMINMAXPROC) ( GLenum target, GLboolean reset,
2541 GLenum format, GLenum types,
2542 GLvoid *values );
2543
2544typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) ( GLenum target, GLenum pname,
2545 GLfloat *params );
2546
2547typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) ( GLenum target, GLenum pname,
2548 GLint *params );
2549
2550typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) ( GLenum target,
2551 GLenum internalformat, GLsizei width, GLenum format, GLenum type,
2552 const GLvoid *image );
2553
2554typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) ( GLenum target,
2555 GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
2556 GLenum type, const GLvoid *image );
2557
2558typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) ( GLenum target, GLenum pname,
2559 GLfloat params );
2560
2561typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) ( GLenum target, GLenum pname,
2562 const GLfloat *params );
2563
2564typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) ( GLenum target, GLenum pname,
2565 GLint params );
2566
2567typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) ( GLenum target, GLenum pname,
2568 const GLint *params );
2569
2570typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) ( GLenum target,
2571 GLenum internalformat, GLint x, GLint y, GLsizei width );
2572
2573typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) ( GLenum target,
2574 GLenum internalformat, GLint x, GLint y, GLsizei width,
2575 GLsizei height);
2576
2577typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) ( GLenum target, GLenum format,
2578 GLenum type, GLvoid *image );
2579
2580typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) ( GLenum target, GLenum pname,
2581 GLfloat *params );
2582
2583typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) ( GLenum target, GLenum pname,
2584 GLint *params );
2585
2586typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) ( GLenum target,
2587 GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
2588 GLenum type, const GLvoid *row, const GLvoid *column );
2589
2590typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) ( GLenum target, GLenum format,
2591 GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
2592
2593#endif
2594
2595
2596
2597
2598/*
2599 * OpenGL 1.3
2600 */
2601
2602/* multitexture */
2603#define GL_TEXTURE0 0x84C0
2604#define GL_TEXTURE1 0x84C1
2605#define GL_TEXTURE2 0x84C2
2606#define GL_TEXTURE3 0x84C3
2607#define GL_TEXTURE4 0x84C4
2608#define GL_TEXTURE5 0x84C5
2609#define GL_TEXTURE6 0x84C6
2610#define GL_TEXTURE7 0x84C7
2611#define GL_TEXTURE8 0x84C8
2612#define GL_TEXTURE9 0x84C9
2613#define GL_TEXTURE10 0x84CA
2614#define GL_TEXTURE11 0x84CB
2615#define GL_TEXTURE12 0x84CC
2616#define GL_TEXTURE13 0x84CD
2617#define GL_TEXTURE14 0x84CE
2618#define GL_TEXTURE15 0x84CF
2619#define GL_TEXTURE16 0x84D0
2620#define GL_TEXTURE17 0x84D1
2621#define GL_TEXTURE18 0x84D2
2622#define GL_TEXTURE19 0x84D3
2623#define GL_TEXTURE20 0x84D4
2624#define GL_TEXTURE21 0x84D5
2625#define GL_TEXTURE22 0x84D6
2626#define GL_TEXTURE23 0x84D7
2627#define GL_TEXTURE24 0x84D8
2628#define GL_TEXTURE25 0x84D9
2629#define GL_TEXTURE26 0x84DA
2630#define GL_TEXTURE27 0x84DB
2631#define GL_TEXTURE28 0x84DC
2632#define GL_TEXTURE29 0x84DD
2633#define GL_TEXTURE30 0x84DE
2634#define GL_TEXTURE31 0x84DF
2635#define GL_ACTIVE_TEXTURE 0x84E0
2636#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
2637#define GL_MAX_TEXTURE_UNITS 0x84E2
2638/* texture_cube_map */
2639#define GL_NORMAL_MAP 0x8511
2640#define GL_REFLECTION_MAP 0x8512
2641#define GL_TEXTURE_CUBE_MAP 0x8513
2642#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
2643#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
2644#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
2645#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
2646#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
2647#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
2648#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
2649#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
2650#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
2651/* texture_compression */
2652#define GL_COMPRESSED_ALPHA 0x84E9
2653#define GL_COMPRESSED_LUMINANCE 0x84EA
2654#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
2655#define GL_COMPRESSED_INTENSITY 0x84EC
2656#define GL_COMPRESSED_RGB 0x84ED
2657#define GL_COMPRESSED_RGBA 0x84EE
2658#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
2659#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
2660#define GL_TEXTURE_COMPRESSED 0x86A1
2661#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
2662#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
2663/* multisample */
2664#define GL_MULTISAMPLE 0x809D
2665#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
2666#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
2667#define GL_SAMPLE_COVERAGE 0x80A0
2668#define GL_SAMPLE_BUFFERS 0x80A8
2669#define GL_SAMPLES 0x80A9
2670#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
2671#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
2672#define GL_MULTISAMPLE_BIT 0x20000000
2673/* transpose_matrix */
2674#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
2675#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
2676#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
2677#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
2678/* texture_env_combine */
2679#define GL_COMBINE 0x8570
2680#define GL_COMBINE_RGB 0x8571
2681#define GL_COMBINE_ALPHA 0x8572
2682#define GL_SOURCE0_RGB 0x8580
2683#define GL_SOURCE1_RGB 0x8581
2684#define GL_SOURCE2_RGB 0x8582
2685#define GL_SOURCE0_ALPHA 0x8588
2686#define GL_SOURCE1_ALPHA 0x8589
2687#define GL_SOURCE2_ALPHA 0x858A
2688#define GL_OPERAND0_RGB 0x8590
2689#define GL_OPERAND1_RGB 0x8591
2690#define GL_OPERAND2_RGB 0x8592
2691#define GL_OPERAND0_ALPHA 0x8598
2692#define GL_OPERAND1_ALPHA 0x8599
2693#define GL_OPERAND2_ALPHA 0x859A
2694#define GL_RGB_SCALE 0x8573
2695#define GL_ADD_SIGNED 0x8574
2696#define GL_INTERPOLATE 0x8575
2697#define GL_SUBTRACT 0x84E7
2698#define GL_CONSTANT 0x8576
2699#define GL_PRIMARY_COLOR 0x8577
2700#define GL_PREVIOUS 0x8578
2701/* texture_env_dot3 */
2702#define GL_DOT3_RGB 0x86AE
2703#define GL_DOT3_RGBA 0x86AF
2704/* texture_border_clamp */
2705#define GL_CLAMP_TO_BORDER 0x812D
2706
2707#ifndef SDL_OPENGL_1_NO_PROTOTYPES
2708
2709GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
2710
2711GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
2712
2713GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
2714
2715GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
2716
2717GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
2718
2719GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
2720
2721GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
2722
2723GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
2724
2725GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
2726
2727GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
2728
2729GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
2730
2731GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
2732
2733GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
2734
2735GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
2736
2737GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
2738
2739GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
2740
2741GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
2742
2743GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
2744
2745GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
2746
2747GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
2748
2749GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
2750
2751GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
2752
2753GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
2754
2755GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
2756
2757GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
2758
2759GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
2760
2761GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
2762
2763GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
2764
2765GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
2766
2767GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
2768
2769GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
2770
2771GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
2772
2773GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
2774
2775GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
2776
2777GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
2778
2779GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
2780
2781GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
2782
2783GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
2784
2785GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
2786
2787GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
2788
2789GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
2790
2791
2792GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
2793
2794GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
2795
2796GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
2797
2798GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
2799
2800GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
2801
2802#endif
2803#ifdef SDL_OPENGL_1_FUNCTION_TYPEDEFS
2804
2805typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) ( GLenum texture );
2806
2807typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) ( GLenum texture );
2808
2809typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
2810
2811typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
2812
2813typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
2814
2815typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) ( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
2816
2817typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
2818
2819typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
2820
2821typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) ( GLenum target, GLint lod, GLvoid *img );
2822
2823typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) ( GLenum target, GLdouble s );
2824
2825typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) ( GLenum target, const GLdouble *v );
2826
2827typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) ( GLenum target, GLfloat s );
2828
2829typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) ( GLenum target, const GLfloat *v );
2830
2831typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) ( GLenum target, GLint s );
2832
2833typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) ( GLenum target, const GLint *v );
2834
2835typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) ( GLenum target, GLshort s );
2836
2837typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) ( GLenum target, const GLshort *v );
2838
2839typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) ( GLenum target, GLdouble s, GLdouble t );
2840
2841typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) ( GLenum target, const GLdouble *v );
2842
2843typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) ( GLenum target, GLfloat s, GLfloat t );
2844
2845typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) ( GLenum target, const GLfloat *v );
2846
2847typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) ( GLenum target, GLint s, GLint t );
2848
2849typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) ( GLenum target, const GLint *v );
2850
2851typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) ( GLenum target, GLshort s, GLshort t );
2852
2853typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) ( GLenum target, const GLshort *v );
2854
2855typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) ( GLenum target, GLdouble s, GLdouble t, GLdouble r );
2856
2857typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) ( GLenum target, const GLdouble *v );
2858
2859typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) ( GLenum target, GLfloat s, GLfloat t, GLfloat r );
2860
2861typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) ( GLenum target, const GLfloat *v );
2862
2863typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) ( GLenum target, GLint s, GLint t, GLint r );
2864
2865typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) ( GLenum target, const GLint *v );
2866
2867typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) ( GLenum target, GLshort s, GLshort t, GLshort r );
2868
2869typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) ( GLenum target, const GLshort *v );
2870
2871typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) ( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
2872
2873typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) ( GLenum target, const GLdouble *v );
2874
2875typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
2876
2877typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) ( GLenum target, const GLfloat *v );
2878
2879typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) ( GLenum target, GLint s, GLint t, GLint r, GLint q );
2880
2881typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) ( GLenum target, const GLint *v );
2882
2883typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) ( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
2884
2885typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) ( GLenum target, const GLshort *v );
2886
2887
2888typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) ( const GLdouble m[16] );
2889
2890typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) ( const GLfloat m[16] );
2891
2892typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) ( const GLdouble m[16] );
2893
2894typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) ( const GLfloat m[16] );
2895
2896typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) ( GLclampf value, GLboolean invert );
2897
2898#endif
2899
2900
2901typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
2902typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
2903typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
2904typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
2905typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
2906typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
2907typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
2908typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
2909typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
2910
2911
2912
2913/*
2914 * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
2915 */
2916#ifndef GL_ARB_multitexture
2917#define GL_ARB_multitexture 1
2918
2919#define GL_TEXTURE0_ARB 0x84C0
2920#define GL_TEXTURE1_ARB 0x84C1
2921#define GL_TEXTURE2_ARB 0x84C2
2922#define GL_TEXTURE3_ARB 0x84C3
2923#define GL_TEXTURE4_ARB 0x84C4
2924#define GL_TEXTURE5_ARB 0x84C5
2925#define GL_TEXTURE6_ARB 0x84C6
2926#define GL_TEXTURE7_ARB 0x84C7
2927#define GL_TEXTURE8_ARB 0x84C8
2928#define GL_TEXTURE9_ARB 0x84C9
2929#define GL_TEXTURE10_ARB 0x84CA
2930#define GL_TEXTURE11_ARB 0x84CB
2931#define GL_TEXTURE12_ARB 0x84CC
2932#define GL_TEXTURE13_ARB 0x84CD
2933#define GL_TEXTURE14_ARB 0x84CE
2934#define GL_TEXTURE15_ARB 0x84CF
2935#define GL_TEXTURE16_ARB 0x84D0
2936#define GL_TEXTURE17_ARB 0x84D1
2937#define GL_TEXTURE18_ARB 0x84D2
2938#define GL_TEXTURE19_ARB 0x84D3
2939#define GL_TEXTURE20_ARB 0x84D4
2940#define GL_TEXTURE21_ARB 0x84D5
2941#define GL_TEXTURE22_ARB 0x84D6
2942#define GL_TEXTURE23_ARB 0x84D7
2943#define GL_TEXTURE24_ARB 0x84D8
2944#define GL_TEXTURE25_ARB 0x84D9
2945#define GL_TEXTURE26_ARB 0x84DA
2946#define GL_TEXTURE27_ARB 0x84DB
2947#define GL_TEXTURE28_ARB 0x84DC
2948#define GL_TEXTURE29_ARB 0x84DD
2949#define GL_TEXTURE30_ARB 0x84DE
2950#define GL_TEXTURE31_ARB 0x84DF
2951#define GL_ACTIVE_TEXTURE_ARB 0x84E0
2952#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
2953#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
2954
2955#ifndef SDL_OPENGL_1_NO_PROTOTYPES
2956
2957GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
2958GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
2959GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
2960GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
2961GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
2962GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
2963GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
2964GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
2965GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
2966GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
2967GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
2968GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
2969GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
2970GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
2971GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
2972GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
2973GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
2974GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
2975GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
2976GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
2977GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
2978GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
2979GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
2980GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
2981GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
2982GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
2983GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
2984GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
2985GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
2986GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
2987GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
2988GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
2989GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
2990GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
2991
2992#endif
2993#ifdef SDL_OPENGL_1_FUNCTION_TYPEDEFS
2994
2995typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
2996typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
2997typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
2998typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
2999typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
3000typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
3001typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
3002typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
3003typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
3004typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
3005typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
3006typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
3007typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
3008typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
3009typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
3010typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
3011typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
3012typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
3013typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
3014typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
3015typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
3016typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
3017typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
3018typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
3019typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
3020typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
3021typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
3022typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
3023typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
3024typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
3025typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
3026typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
3027typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
3028typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
3029
3030#endif
3031
3032typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
3033typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
3034typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
3035typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
3036typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
3037typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
3038typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
3039typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
3040typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
3041typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
3042typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
3043typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
3044typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
3045typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
3046typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
3047typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
3048typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
3049typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
3050typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
3051typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
3052typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
3053typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
3054typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
3055typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
3056typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
3057typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
3058typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
3059typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
3060typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
3061typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
3062typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
3063typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
3064typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
3065typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
3066
3067#endif /* GL_ARB_multitexture */
3068
3069
3070
3071/*
3072 * Define this token if you want "old-style" header file behaviour (extensions
3073 * defined in gl.h). Otherwise, extensions will be included from glext.h.
3074 */
3075#if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)
3076#include <SDL3/SDL_opengl_glext.h>
3077#endif /* GL_GLEXT_LEGACY */
3078
3079
3080
3081/**********************************************************************
3082 * Begin system-specific stuff
3083 */
3084#if defined(PRAGMA_EXPORT_SUPPORTED)
3085#pragma export off
3086#endif
3087
3088/*
3089 * End system-specific stuff
3090 **********************************************************************/
3091
3092
3093#ifdef __cplusplus
3094}
3095#endif
3096
3097#endif /* __gl_h_ */
3098
3099#endif /* !SDL_PLATFORM_IOS */
3100
3101#endif /* SDL_opengl_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengl_glext.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengl_glext.h
new file mode 100644
index 0000000..fa0f6c2
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengl_glext.h
@@ -0,0 +1,13213 @@
1/* SDL modified the include guard to be compatible with Mesa and Apple include guards:
2 * - Mesa uses: __gl_glext_h_
3 * - Apple uses: __glext_h_ */
4#if !defined(__glext_h_) && !defined(__gl_glext_h_)
5#define __glext_h_ 1
6#define __gl_glext_h_ 1
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12/*
13** Copyright 2013-2020 The Khronos Group Inc.
14** SPDX-License-Identifier: MIT
15**
16** This header is generated from the Khronos OpenGL / OpenGL ES XML
17** API Registry. The current version of the Registry, generator scripts
18** used to make the header, and the header can be found at
19** https://github.com/KhronosGroup/OpenGL-Registry
20*/
21
22#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
23#ifndef WIN32_LEAN_AND_MEAN
24#define WIN32_LEAN_AND_MEAN 1
25#endif
26#include <windows.h>
27#endif
28
29#ifndef APIENTRY
30#define APIENTRY
31#endif
32#ifndef APIENTRYP
33#define APIENTRYP APIENTRY *
34#endif
35#ifndef GLAPI
36#define GLAPI extern
37#endif
38
39#define GL_GLEXT_VERSION 20220530
40
41/*#include <KHR/khrplatform.h>*/
42#ifndef __khrplatform_h_
43#define __khrplatform_h_
44
45/*
46** Copyright (c) 2008-2018 The Khronos Group Inc.
47**
48** Permission is hereby granted, free of charge, to any person obtaining a
49** copy of this software and/or associated documentation files (the
50** "Materials"), to deal in the Materials without restriction, including
51** without limitation the rights to use, copy, modify, merge, publish,
52** distribute, sublicense, and/or sell copies of the Materials, and to
53** permit persons to whom the Materials are furnished to do so, subject to
54** the following conditions:
55**
56** The above copyright notice and this permission notice shall be included
57** in all copies or substantial portions of the Materials.
58**
59** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
60** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
61** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
62** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
63** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
64** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
65** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
66*/
67
68/* Khronos platform-specific types and definitions.
69 *
70 * The master copy of khrplatform.h is maintained in the Khronos EGL
71 * Registry repository at https://github.com/KhronosGroup/EGL-Registry
72 * The last semantic modification to khrplatform.h was at commit ID:
73 * 67a3e0864c2d75ea5287b9f3d2eb74a745936692
74 *
75 * Adopters may modify this file to suit their platform. Adopters are
76 * encouraged to submit platform specific modifications to the Khronos
77 * group so that they can be included in future versions of this file.
78 * Please submit changes by filing pull requests or issues on
79 * the EGL Registry repository linked above.
80 *
81 *
82 * See the Implementer's Guidelines for information about where this file
83 * should be located on your system and for more details of its use:
84 * http://www.khronos.org/registry/implementers_guide.pdf
85 *
86 * This file should be included as
87 * #include <KHR/khrplatform.h>
88 * by Khronos client API header files that use its types and defines.
89 *
90 * The types in khrplatform.h should only be used to define API-specific types.
91 *
92 * Types defined in khrplatform.h:
93 * khronos_int8_t signed 8 bit
94 * khronos_uint8_t unsigned 8 bit
95 * khronos_int16_t signed 16 bit
96 * khronos_uint16_t unsigned 16 bit
97 * khronos_int32_t signed 32 bit
98 * khronos_uint32_t unsigned 32 bit
99 * khronos_int64_t signed 64 bit
100 * khronos_uint64_t unsigned 64 bit
101 * khronos_intptr_t signed same number of bits as a pointer
102 * khronos_uintptr_t unsigned same number of bits as a pointer
103 * khronos_ssize_t signed size
104 * khronos_usize_t unsigned size
105 * khronos_float_t signed 32 bit floating point
106 * khronos_time_ns_t unsigned 64 bit time in nanoseconds
107 * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
108 * nanoseconds
109 * khronos_stime_nanoseconds_t signed time interval in nanoseconds
110 * khronos_boolean_enum_t enumerated boolean type. This should
111 * only be used as a base type when a client API's boolean type is
112 * an enum. Client APIs which use an integer or other type for
113 * booleans cannot use this as the base type for their boolean.
114 *
115 * Tokens defined in khrplatform.h:
116 *
117 * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
118 *
119 * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
120 * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
121 *
122 * Calling convention macros defined in this file:
123 * KHRONOS_APICALL
124 * KHRONOS_APIENTRY
125 * KHRONOS_APIATTRIBUTES
126 *
127 * These may be used in function prototypes as:
128 *
129 * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
130 * int arg1,
131 * int arg2) KHRONOS_APIATTRIBUTES;
132 */
133
134#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
135# define KHRONOS_STATIC 1
136#endif
137
138/*-------------------------------------------------------------------------
139 * Definition of KHRONOS_APICALL
140 *-------------------------------------------------------------------------
141 * This precedes the return type of the function in the function prototype.
142 */
143#if defined(KHRONOS_STATIC)
144 /* If the preprocessor constant KHRONOS_STATIC is defined, make the
145 * header compatible with static linking. */
146# define KHRONOS_APICALL
147#elif defined(_WIN32)
148# define KHRONOS_APICALL __declspec(dllimport)
149#elif defined (__SYMBIAN32__)
150# define KHRONOS_APICALL IMPORT_C
151#elif defined(__ANDROID__)
152# define KHRONOS_APICALL __attribute__((visibility("default")))
153#else
154# define KHRONOS_APICALL
155#endif
156
157/*-------------------------------------------------------------------------
158 * Definition of KHRONOS_APIENTRY
159 *-------------------------------------------------------------------------
160 * This follows the return type of the function and precedes the function
161 * name in the function prototype.
162 */
163#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
164 /* Win32 but not WinCE */
165# define KHRONOS_APIENTRY __stdcall
166#else
167# define KHRONOS_APIENTRY
168#endif
169
170/*-------------------------------------------------------------------------
171 * Definition of KHRONOS_APIATTRIBUTES
172 *-------------------------------------------------------------------------
173 * This follows the closing parenthesis of the function prototype arguments.
174 */
175#if defined (__ARMCC_2__)
176#define KHRONOS_APIATTRIBUTES __softfp
177#else
178#define KHRONOS_APIATTRIBUTES
179#endif
180
181/*-------------------------------------------------------------------------
182 * basic type definitions
183 *-----------------------------------------------------------------------*/
184#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
185
186
187/*
188 * Using <stdint.h>
189 */
190#include <stdint.h>
191typedef int32_t khronos_int32_t;
192typedef uint32_t khronos_uint32_t;
193typedef int64_t khronos_int64_t;
194typedef uint64_t khronos_uint64_t;
195#define KHRONOS_SUPPORT_INT64 1
196#define KHRONOS_SUPPORT_FLOAT 1
197/*
198 * To support platform where unsigned long cannot be used interchangeably with
199 * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
200 * Ideally, we could just use (u)intptr_t everywhere, but this could result in
201 * ABI breakage if khronos_uintptr_t is changed from unsigned long to
202 * unsigned long long or similar (this results in different C++ name mangling).
203 * To avoid changes for existing platforms, we restrict usage of intptr_t to
204 * platforms where the size of a pointer is larger than the size of long.
205 */
206#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
207#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
208#define KHRONOS_USE_INTPTR_T
209#endif
210#endif
211
212#elif defined(__VMS ) || defined(__sgi)
213
214/*
215 * Using <inttypes.h>
216 */
217#include <inttypes.h>
218typedef int32_t khronos_int32_t;
219typedef uint32_t khronos_uint32_t;
220typedef int64_t khronos_int64_t;
221typedef uint64_t khronos_uint64_t;
222#define KHRONOS_SUPPORT_INT64 1
223#define KHRONOS_SUPPORT_FLOAT 1
224
225#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
226
227/*
228 * Win32
229 */
230typedef __int32 khronos_int32_t;
231typedef unsigned __int32 khronos_uint32_t;
232typedef __int64 khronos_int64_t;
233typedef unsigned __int64 khronos_uint64_t;
234#define KHRONOS_SUPPORT_INT64 1
235#define KHRONOS_SUPPORT_FLOAT 1
236
237#elif defined(__sun__) || defined(__digital__)
238
239/*
240 * Sun or Digital
241 */
242typedef int khronos_int32_t;
243typedef unsigned int khronos_uint32_t;
244#if defined(__arch64__) || defined(_LP64)
245typedef long int khronos_int64_t;
246typedef unsigned long int khronos_uint64_t;
247#else
248typedef long long int khronos_int64_t;
249typedef unsigned long long int khronos_uint64_t;
250#endif /* __arch64__ */
251#define KHRONOS_SUPPORT_INT64 1
252#define KHRONOS_SUPPORT_FLOAT 1
253
254#elif 0
255
256/*
257 * Hypothetical platform with no float or int64 support
258 */
259typedef int khronos_int32_t;
260typedef unsigned int khronos_uint32_t;
261#define KHRONOS_SUPPORT_INT64 0
262#define KHRONOS_SUPPORT_FLOAT 0
263
264#else
265
266/*
267 * Generic fallback
268 */
269#include <stdint.h>
270typedef int32_t khronos_int32_t;
271typedef uint32_t khronos_uint32_t;
272typedef int64_t khronos_int64_t;
273typedef uint64_t khronos_uint64_t;
274#define KHRONOS_SUPPORT_INT64 1
275#define KHRONOS_SUPPORT_FLOAT 1
276
277#endif
278
279
280/*
281 * Types that are (so far) the same on all platforms
282 */
283typedef signed char khronos_int8_t;
284typedef unsigned char khronos_uint8_t;
285typedef signed short int khronos_int16_t;
286typedef unsigned short int khronos_uint16_t;
287
288/*
289 * Types that differ between LLP64 and LP64 architectures - in LLP64,
290 * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
291 * to be the only LLP64 architecture in current use.
292 */
293#ifdef KHRONOS_USE_INTPTR_T
294typedef intptr_t khronos_intptr_t;
295typedef uintptr_t khronos_uintptr_t;
296#elif defined(_WIN64)
297typedef signed long long int khronos_intptr_t;
298typedef unsigned long long int khronos_uintptr_t;
299#else
300typedef signed long int khronos_intptr_t;
301typedef unsigned long int khronos_uintptr_t;
302#endif
303
304#if defined(_WIN64)
305typedef signed long long int khronos_ssize_t;
306typedef unsigned long long int khronos_usize_t;
307#else
308typedef signed long int khronos_ssize_t;
309typedef unsigned long int khronos_usize_t;
310#endif
311
312#if KHRONOS_SUPPORT_FLOAT
313/*
314 * Float type
315 */
316typedef float khronos_float_t;
317#endif
318
319#if KHRONOS_SUPPORT_INT64
320/* Time types
321 *
322 * These types can be used to represent a time interval in nanoseconds or
323 * an absolute Unadjusted System Time. Unadjusted System Time is the number
324 * of nanoseconds since some arbitrary system event (e.g. since the last
325 * time the system booted). The Unadjusted System Time is an unsigned
326 * 64 bit value that wraps back to 0 every 584 years. Time intervals
327 * may be either signed or unsigned.
328 */
329typedef khronos_uint64_t khronos_utime_nanoseconds_t;
330typedef khronos_int64_t khronos_stime_nanoseconds_t;
331#endif
332
333/*
334 * Dummy value used to pad enum types to 32 bits.
335 */
336#ifndef KHRONOS_MAX_ENUM
337#define KHRONOS_MAX_ENUM 0x7FFFFFFF
338#endif
339
340/*
341 * Enumerated boolean type
342 *
343 * Values other than zero should be considered to be true. Therefore
344 * comparisons should not be made against KHRONOS_TRUE.
345 */
346typedef enum {
347 KHRONOS_FALSE = 0,
348 KHRONOS_TRUE = 1,
349 KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
350} khronos_boolean_enum_t;
351
352#endif /* __khrplatform_h_ */
353
354/* Generated C header for:
355 * API: gl
356 * Profile: compatibility
357 * Versions considered: .*
358 * Versions emitted: 1\.[2-9]|[234]\.[0-9]
359 * Default extensions included: gl
360 * Additional extensions included: _nomatch_^
361 * Extensions removed: _nomatch_^
362 */
363
364#ifndef GL_VERSION_1_2
365#define GL_VERSION_1_2 1
366#define GL_UNSIGNED_BYTE_3_3_2 0x8032
367#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
368#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
369#define GL_UNSIGNED_INT_8_8_8_8 0x8035
370#define GL_UNSIGNED_INT_10_10_10_2 0x8036
371#define GL_TEXTURE_BINDING_3D 0x806A
372#define GL_PACK_SKIP_IMAGES 0x806B
373#define GL_PACK_IMAGE_HEIGHT 0x806C
374#define GL_UNPACK_SKIP_IMAGES 0x806D
375#define GL_UNPACK_IMAGE_HEIGHT 0x806E
376#define GL_TEXTURE_3D 0x806F
377#define GL_PROXY_TEXTURE_3D 0x8070
378#define GL_TEXTURE_DEPTH 0x8071
379#define GL_TEXTURE_WRAP_R 0x8072
380#define GL_MAX_3D_TEXTURE_SIZE 0x8073
381#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
382#define GL_UNSIGNED_SHORT_5_6_5 0x8363
383#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
384#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
385#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
386#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
387#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
388#define GL_BGR 0x80E0
389#define GL_BGRA 0x80E1
390#define GL_MAX_ELEMENTS_VERTICES 0x80E8
391#define GL_MAX_ELEMENTS_INDICES 0x80E9
392#define GL_CLAMP_TO_EDGE 0x812F
393#define GL_TEXTURE_MIN_LOD 0x813A
394#define GL_TEXTURE_MAX_LOD 0x813B
395#define GL_TEXTURE_BASE_LEVEL 0x813C
396#define GL_TEXTURE_MAX_LEVEL 0x813D
397#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
398#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
399#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
400#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
401#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
402#define GL_RESCALE_NORMAL 0x803A
403#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
404#define GL_SINGLE_COLOR 0x81F9
405#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
406#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
407typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
408typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
409typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
410typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
411#ifdef GL_GLEXT_PROTOTYPES
412GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
413GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
414GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
415GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
416#endif
417#endif /* GL_VERSION_1_2 */
418
419#ifndef GL_VERSION_1_3
420#define GL_VERSION_1_3 1
421#define GL_TEXTURE0 0x84C0
422#define GL_TEXTURE1 0x84C1
423#define GL_TEXTURE2 0x84C2
424#define GL_TEXTURE3 0x84C3
425#define GL_TEXTURE4 0x84C4
426#define GL_TEXTURE5 0x84C5
427#define GL_TEXTURE6 0x84C6
428#define GL_TEXTURE7 0x84C7
429#define GL_TEXTURE8 0x84C8
430#define GL_TEXTURE9 0x84C9
431#define GL_TEXTURE10 0x84CA
432#define GL_TEXTURE11 0x84CB
433#define GL_TEXTURE12 0x84CC
434#define GL_TEXTURE13 0x84CD
435#define GL_TEXTURE14 0x84CE
436#define GL_TEXTURE15 0x84CF
437#define GL_TEXTURE16 0x84D0
438#define GL_TEXTURE17 0x84D1
439#define GL_TEXTURE18 0x84D2
440#define GL_TEXTURE19 0x84D3
441#define GL_TEXTURE20 0x84D4
442#define GL_TEXTURE21 0x84D5
443#define GL_TEXTURE22 0x84D6
444#define GL_TEXTURE23 0x84D7
445#define GL_TEXTURE24 0x84D8
446#define GL_TEXTURE25 0x84D9
447#define GL_TEXTURE26 0x84DA
448#define GL_TEXTURE27 0x84DB
449#define GL_TEXTURE28 0x84DC
450#define GL_TEXTURE29 0x84DD
451#define GL_TEXTURE30 0x84DE
452#define GL_TEXTURE31 0x84DF
453#define GL_ACTIVE_TEXTURE 0x84E0
454#define GL_MULTISAMPLE 0x809D
455#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
456#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
457#define GL_SAMPLE_COVERAGE 0x80A0
458#define GL_SAMPLE_BUFFERS 0x80A8
459#define GL_SAMPLES 0x80A9
460#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
461#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
462#define GL_TEXTURE_CUBE_MAP 0x8513
463#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
464#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
465#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
466#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
467#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
468#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
469#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
470#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
471#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
472#define GL_COMPRESSED_RGB 0x84ED
473#define GL_COMPRESSED_RGBA 0x84EE
474#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
475#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
476#define GL_TEXTURE_COMPRESSED 0x86A1
477#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
478#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
479#define GL_CLAMP_TO_BORDER 0x812D
480#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
481#define GL_MAX_TEXTURE_UNITS 0x84E2
482#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
483#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
484#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
485#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
486#define GL_MULTISAMPLE_BIT 0x20000000
487#define GL_NORMAL_MAP 0x8511
488#define GL_REFLECTION_MAP 0x8512
489#define GL_COMPRESSED_ALPHA 0x84E9
490#define GL_COMPRESSED_LUMINANCE 0x84EA
491#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
492#define GL_COMPRESSED_INTENSITY 0x84EC
493#define GL_COMBINE 0x8570
494#define GL_COMBINE_RGB 0x8571
495#define GL_COMBINE_ALPHA 0x8572
496#define GL_SOURCE0_RGB 0x8580
497#define GL_SOURCE1_RGB 0x8581
498#define GL_SOURCE2_RGB 0x8582
499#define GL_SOURCE0_ALPHA 0x8588
500#define GL_SOURCE1_ALPHA 0x8589
501#define GL_SOURCE2_ALPHA 0x858A
502#define GL_OPERAND0_RGB 0x8590
503#define GL_OPERAND1_RGB 0x8591
504#define GL_OPERAND2_RGB 0x8592
505#define GL_OPERAND0_ALPHA 0x8598
506#define GL_OPERAND1_ALPHA 0x8599
507#define GL_OPERAND2_ALPHA 0x859A
508#define GL_RGB_SCALE 0x8573
509#define GL_ADD_SIGNED 0x8574
510#define GL_INTERPOLATE 0x8575
511#define GL_SUBTRACT 0x84E7
512#define GL_CONSTANT 0x8576
513#define GL_PRIMARY_COLOR 0x8577
514#define GL_PREVIOUS 0x8578
515#define GL_DOT3_RGB 0x86AE
516#define GL_DOT3_RGBA 0x86AF
517typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
518typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
519typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
520typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
521typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
522typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
523typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
524typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
525typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
526typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
527typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
528typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
529typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
530typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
531typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
532typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
533typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
534typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
535typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
536typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
537typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
538typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
539typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
540typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
541typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
542typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
543typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
544typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
545typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
546typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
547typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
548typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
549typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
550typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
551typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
552typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
553typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
554typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
555typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
556typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
557typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
558typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
559typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
560typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
561typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
562typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
563#ifdef GL_GLEXT_PROTOTYPES
564GLAPI void APIENTRY glActiveTexture (GLenum texture);
565GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
566GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
567GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
568GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
569GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
570GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
571GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
572GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img);
573GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
574GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s);
575GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v);
576GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s);
577GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v);
578GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s);
579GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v);
580GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s);
581GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v);
582GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);
583GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v);
584GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);
585GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);
586GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t);
587GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v);
588GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);
589GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v);
590GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);
591GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v);
592GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);
593GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v);
594GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);
595GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v);
596GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);
597GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v);
598GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
599GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v);
600GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
601GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v);
602GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);
603GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v);
604GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
605GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v);
606GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m);
607GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m);
608GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m);
609GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m);
610#endif
611#endif /* GL_VERSION_1_3 */
612
613#ifndef GL_VERSION_1_4
614#define GL_VERSION_1_4 1
615#define GL_BLEND_DST_RGB 0x80C8
616#define GL_BLEND_SRC_RGB 0x80C9
617#define GL_BLEND_DST_ALPHA 0x80CA
618#define GL_BLEND_SRC_ALPHA 0x80CB
619#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
620#define GL_DEPTH_COMPONENT16 0x81A5
621#define GL_DEPTH_COMPONENT24 0x81A6
622#define GL_DEPTH_COMPONENT32 0x81A7
623#define GL_MIRRORED_REPEAT 0x8370
624#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
625#define GL_TEXTURE_LOD_BIAS 0x8501
626#define GL_INCR_WRAP 0x8507
627#define GL_DECR_WRAP 0x8508
628#define GL_TEXTURE_DEPTH_SIZE 0x884A
629#define GL_TEXTURE_COMPARE_MODE 0x884C
630#define GL_TEXTURE_COMPARE_FUNC 0x884D
631#define GL_POINT_SIZE_MIN 0x8126
632#define GL_POINT_SIZE_MAX 0x8127
633#define GL_POINT_DISTANCE_ATTENUATION 0x8129
634#define GL_GENERATE_MIPMAP 0x8191
635#define GL_GENERATE_MIPMAP_HINT 0x8192
636#define GL_FOG_COORDINATE_SOURCE 0x8450
637#define GL_FOG_COORDINATE 0x8451
638#define GL_FRAGMENT_DEPTH 0x8452
639#define GL_CURRENT_FOG_COORDINATE 0x8453
640#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
641#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
642#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
643#define GL_FOG_COORDINATE_ARRAY 0x8457
644#define GL_COLOR_SUM 0x8458
645#define GL_CURRENT_SECONDARY_COLOR 0x8459
646#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
647#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
648#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
649#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
650#define GL_SECONDARY_COLOR_ARRAY 0x845E
651#define GL_TEXTURE_FILTER_CONTROL 0x8500
652#define GL_DEPTH_TEXTURE_MODE 0x884B
653#define GL_COMPARE_R_TO_TEXTURE 0x884E
654#define GL_BLEND_COLOR 0x8005
655#define GL_BLEND_EQUATION 0x8009
656#define GL_CONSTANT_COLOR 0x8001
657#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
658#define GL_CONSTANT_ALPHA 0x8003
659#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
660#define GL_FUNC_ADD 0x8006
661#define GL_FUNC_REVERSE_SUBTRACT 0x800B
662#define GL_FUNC_SUBTRACT 0x800A
663#define GL_MIN 0x8007
664#define GL_MAX 0x8008
665typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
666typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
667typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
668typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
669typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
670typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
671typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
672typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
673typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
674typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
675typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
676typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer);
677typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
678typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
679typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
680typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
681typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
682typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
683typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
684typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
685typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
686typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
687typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
688typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
689typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
690typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
691typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
692typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
693typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
694typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
695typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
696typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
697typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
698typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
699typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
700typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
701typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
702typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
703typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
704typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
705typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
706typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
707typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
708typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
709typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
710typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
711typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
712#ifdef GL_GLEXT_PROTOTYPES
713GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
714GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
715GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
716GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);
717GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
718GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);
719GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);
720GLAPI void APIENTRY glFogCoordf (GLfloat coord);
721GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord);
722GLAPI void APIENTRY glFogCoordd (GLdouble coord);
723GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord);
724GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer);
725GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);
726GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v);
727GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);
728GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v);
729GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);
730GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v);
731GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue);
732GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v);
733GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);
734GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v);
735GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);
736GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v);
737GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);
738GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v);
739GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);
740GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v);
741GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
742GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y);
743GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v);
744GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y);
745GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v);
746GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y);
747GLAPI void APIENTRY glWindowPos2iv (const GLint *v);
748GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y);
749GLAPI void APIENTRY glWindowPos2sv (const GLshort *v);
750GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);
751GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v);
752GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);
753GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v);
754GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z);
755GLAPI void APIENTRY glWindowPos3iv (const GLint *v);
756GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z);
757GLAPI void APIENTRY glWindowPos3sv (const GLshort *v);
758GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
759GLAPI void APIENTRY glBlendEquation (GLenum mode);
760#endif
761#endif /* GL_VERSION_1_4 */
762
763#ifndef GL_VERSION_1_5
764#define GL_VERSION_1_5 1
765typedef khronos_ssize_t GLsizeiptr;
766typedef khronos_intptr_t GLintptr;
767#define GL_BUFFER_SIZE 0x8764
768#define GL_BUFFER_USAGE 0x8765
769#define GL_QUERY_COUNTER_BITS 0x8864
770#define GL_CURRENT_QUERY 0x8865
771#define GL_QUERY_RESULT 0x8866
772#define GL_QUERY_RESULT_AVAILABLE 0x8867
773#define GL_ARRAY_BUFFER 0x8892
774#define GL_ELEMENT_ARRAY_BUFFER 0x8893
775#define GL_ARRAY_BUFFER_BINDING 0x8894
776#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
777#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
778#define GL_READ_ONLY 0x88B8
779#define GL_WRITE_ONLY 0x88B9
780#define GL_READ_WRITE 0x88BA
781#define GL_BUFFER_ACCESS 0x88BB
782#define GL_BUFFER_MAPPED 0x88BC
783#define GL_BUFFER_MAP_POINTER 0x88BD
784#define GL_STREAM_DRAW 0x88E0
785#define GL_STREAM_READ 0x88E1
786#define GL_STREAM_COPY 0x88E2
787#define GL_STATIC_DRAW 0x88E4
788#define GL_STATIC_READ 0x88E5
789#define GL_STATIC_COPY 0x88E6
790#define GL_DYNAMIC_DRAW 0x88E8
791#define GL_DYNAMIC_READ 0x88E9
792#define GL_DYNAMIC_COPY 0x88EA
793#define GL_SAMPLES_PASSED 0x8914
794#define GL_SRC1_ALPHA 0x8589
795#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
796#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
797#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
798#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
799#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
800#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
801#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
802#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
803#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
804#define GL_FOG_COORD_SRC 0x8450
805#define GL_FOG_COORD 0x8451
806#define GL_CURRENT_FOG_COORD 0x8453
807#define GL_FOG_COORD_ARRAY_TYPE 0x8454
808#define GL_FOG_COORD_ARRAY_STRIDE 0x8455
809#define GL_FOG_COORD_ARRAY_POINTER 0x8456
810#define GL_FOG_COORD_ARRAY 0x8457
811#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D
812#define GL_SRC0_RGB 0x8580
813#define GL_SRC1_RGB 0x8581
814#define GL_SRC2_RGB 0x8582
815#define GL_SRC0_ALPHA 0x8588
816#define GL_SRC2_ALPHA 0x858A
817typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
818typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
819typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
820typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
821typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
822typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
823typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
824typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
825typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
826typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
827typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
828typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
829typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
830typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
831typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
832typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
833typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
834typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
835typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params);
836#ifdef GL_GLEXT_PROTOTYPES
837GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);
838GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
839GLAPI GLboolean APIENTRY glIsQuery (GLuint id);
840GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);
841GLAPI void APIENTRY glEndQuery (GLenum target);
842GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
843GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);
844GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
845GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
846GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
847GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
848GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);
849GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
850GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
851GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
852GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access);
853GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);
854GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
855GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
856#endif
857#endif /* GL_VERSION_1_5 */
858
859#ifndef GL_VERSION_2_0
860#define GL_VERSION_2_0 1
861typedef char GLchar;
862#define GL_BLEND_EQUATION_RGB 0x8009
863#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
864#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
865#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
866#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
867#define GL_CURRENT_VERTEX_ATTRIB 0x8626
868#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
869#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
870#define GL_STENCIL_BACK_FUNC 0x8800
871#define GL_STENCIL_BACK_FAIL 0x8801
872#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
873#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
874#define GL_MAX_DRAW_BUFFERS 0x8824
875#define GL_DRAW_BUFFER0 0x8825
876#define GL_DRAW_BUFFER1 0x8826
877#define GL_DRAW_BUFFER2 0x8827
878#define GL_DRAW_BUFFER3 0x8828
879#define GL_DRAW_BUFFER4 0x8829
880#define GL_DRAW_BUFFER5 0x882A
881#define GL_DRAW_BUFFER6 0x882B
882#define GL_DRAW_BUFFER7 0x882C
883#define GL_DRAW_BUFFER8 0x882D
884#define GL_DRAW_BUFFER9 0x882E
885#define GL_DRAW_BUFFER10 0x882F
886#define GL_DRAW_BUFFER11 0x8830
887#define GL_DRAW_BUFFER12 0x8831
888#define GL_DRAW_BUFFER13 0x8832
889#define GL_DRAW_BUFFER14 0x8833
890#define GL_DRAW_BUFFER15 0x8834
891#define GL_BLEND_EQUATION_ALPHA 0x883D
892#define GL_MAX_VERTEX_ATTRIBS 0x8869
893#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
894#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
895#define GL_FRAGMENT_SHADER 0x8B30
896#define GL_VERTEX_SHADER 0x8B31
897#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
898#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
899#define GL_MAX_VARYING_FLOATS 0x8B4B
900#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
901#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
902#define GL_SHADER_TYPE 0x8B4F
903#define GL_FLOAT_VEC2 0x8B50
904#define GL_FLOAT_VEC3 0x8B51
905#define GL_FLOAT_VEC4 0x8B52
906#define GL_INT_VEC2 0x8B53
907#define GL_INT_VEC3 0x8B54
908#define GL_INT_VEC4 0x8B55
909#define GL_BOOL 0x8B56
910#define GL_BOOL_VEC2 0x8B57
911#define GL_BOOL_VEC3 0x8B58
912#define GL_BOOL_VEC4 0x8B59
913#define GL_FLOAT_MAT2 0x8B5A
914#define GL_FLOAT_MAT3 0x8B5B
915#define GL_FLOAT_MAT4 0x8B5C
916#define GL_SAMPLER_1D 0x8B5D
917#define GL_SAMPLER_2D 0x8B5E
918#define GL_SAMPLER_3D 0x8B5F
919#define GL_SAMPLER_CUBE 0x8B60
920#define GL_SAMPLER_1D_SHADOW 0x8B61
921#define GL_SAMPLER_2D_SHADOW 0x8B62
922#define GL_DELETE_STATUS 0x8B80
923#define GL_COMPILE_STATUS 0x8B81
924#define GL_LINK_STATUS 0x8B82
925#define GL_VALIDATE_STATUS 0x8B83
926#define GL_INFO_LOG_LENGTH 0x8B84
927#define GL_ATTACHED_SHADERS 0x8B85
928#define GL_ACTIVE_UNIFORMS 0x8B86
929#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
930#define GL_SHADER_SOURCE_LENGTH 0x8B88
931#define GL_ACTIVE_ATTRIBUTES 0x8B89
932#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
933#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
934#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
935#define GL_CURRENT_PROGRAM 0x8B8D
936#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
937#define GL_LOWER_LEFT 0x8CA1
938#define GL_UPPER_LEFT 0x8CA2
939#define GL_STENCIL_BACK_REF 0x8CA3
940#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
941#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
942#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
943#define GL_POINT_SPRITE 0x8861
944#define GL_COORD_REPLACE 0x8862
945#define GL_MAX_TEXTURE_COORDS 0x8871
946typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
947typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
948typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
949typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
950typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
951typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
952typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
953typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
954typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
955typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
956typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
957typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
958typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
959typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
960typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
961typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
962typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
963typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
964typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
965typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
966typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
967typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
968typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
969typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
970typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
971typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
972typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
973typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
974typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
975typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
976typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
977typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
978typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
979typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
980typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
981typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
982typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
983typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
984typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
985typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
986typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
987typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
988typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
989typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
990typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
991typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
992typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
993typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
994typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
995typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
996typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
997typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
998typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
999typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1000typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1001typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
1002typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
1003typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
1004typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
1005typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
1006typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
1007typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
1008typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
1009typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
1010typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
1011typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
1012typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
1013typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
1014typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
1015typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
1016typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
1017typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
1018typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
1019typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
1020typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
1021typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
1022typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
1023typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
1024typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
1025typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
1026typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
1027typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
1028typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1029typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
1030typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1031typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
1032typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
1033typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
1034typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
1035typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
1036typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
1037typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
1038typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
1039#ifdef GL_GLEXT_PROTOTYPES
1040GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
1041GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
1042GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
1043GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
1044GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
1045GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
1046GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
1047GLAPI void APIENTRY glCompileShader (GLuint shader);
1048GLAPI GLuint APIENTRY glCreateProgram (void);
1049GLAPI GLuint APIENTRY glCreateShader (GLenum type);
1050GLAPI void APIENTRY glDeleteProgram (GLuint program);
1051GLAPI void APIENTRY glDeleteShader (GLuint shader);
1052GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
1053GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
1054GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
1055GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
1056GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
1057GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
1058GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
1059GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
1060GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1061GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
1062GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1063GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
1064GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
1065GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
1066GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
1067GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);
1068GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
1069GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
1070GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
1071GLAPI GLboolean APIENTRY glIsProgram (GLuint program);
1072GLAPI GLboolean APIENTRY glIsShader (GLuint shader);
1073GLAPI void APIENTRY glLinkProgram (GLuint program);
1074GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
1075GLAPI void APIENTRY glUseProgram (GLuint program);
1076GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);
1077GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
1078GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
1079GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
1080GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
1081GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
1082GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
1083GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
1084GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
1085GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
1086GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
1087GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
1088GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
1089GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
1090GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
1091GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
1092GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1093GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1094GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1095GLAPI void APIENTRY glValidateProgram (GLuint program);
1096GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);
1097GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);
1098GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
1099GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
1100GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);
1101GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);
1102GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);
1103GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);
1104GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
1105GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
1106GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);
1107GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);
1108GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
1109GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);
1110GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
1111GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
1112GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);
1113GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);
1114GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);
1115GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);
1116GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);
1117GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
1118GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);
1119GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);
1120GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);
1121GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);
1122GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1123GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);
1124GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1125GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
1126GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);
1127GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
1128GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);
1129GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);
1130GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);
1131GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);
1132GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
1133#endif
1134#endif /* GL_VERSION_2_0 */
1135
1136#ifndef GL_VERSION_2_1
1137#define GL_VERSION_2_1 1
1138#define GL_PIXEL_PACK_BUFFER 0x88EB
1139#define GL_PIXEL_UNPACK_BUFFER 0x88EC
1140#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
1141#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
1142#define GL_FLOAT_MAT2x3 0x8B65
1143#define GL_FLOAT_MAT2x4 0x8B66
1144#define GL_FLOAT_MAT3x2 0x8B67
1145#define GL_FLOAT_MAT3x4 0x8B68
1146#define GL_FLOAT_MAT4x2 0x8B69
1147#define GL_FLOAT_MAT4x3 0x8B6A
1148#define GL_SRGB 0x8C40
1149#define GL_SRGB8 0x8C41
1150#define GL_SRGB_ALPHA 0x8C42
1151#define GL_SRGB8_ALPHA8 0x8C43
1152#define GL_COMPRESSED_SRGB 0x8C48
1153#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
1154#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
1155#define GL_SLUMINANCE_ALPHA 0x8C44
1156#define GL_SLUMINANCE8_ALPHA8 0x8C45
1157#define GL_SLUMINANCE 0x8C46
1158#define GL_SLUMINANCE8 0x8C47
1159#define GL_COMPRESSED_SLUMINANCE 0x8C4A
1160#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
1161typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1162typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1163typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1164typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1165typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1166typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1167#ifdef GL_GLEXT_PROTOTYPES
1168GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1169GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1170GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1171GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1172GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1173GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1174#endif
1175#endif /* GL_VERSION_2_1 */
1176
1177#ifndef GL_VERSION_3_0
1178#define GL_VERSION_3_0 1
1179typedef khronos_uint16_t GLhalf;
1180#define GL_COMPARE_REF_TO_TEXTURE 0x884E
1181#define GL_CLIP_DISTANCE0 0x3000
1182#define GL_CLIP_DISTANCE1 0x3001
1183#define GL_CLIP_DISTANCE2 0x3002
1184#define GL_CLIP_DISTANCE3 0x3003
1185#define GL_CLIP_DISTANCE4 0x3004
1186#define GL_CLIP_DISTANCE5 0x3005
1187#define GL_CLIP_DISTANCE6 0x3006
1188#define GL_CLIP_DISTANCE7 0x3007
1189#define GL_MAX_CLIP_DISTANCES 0x0D32
1190#define GL_MAJOR_VERSION 0x821B
1191#define GL_MINOR_VERSION 0x821C
1192#define GL_NUM_EXTENSIONS 0x821D
1193#define GL_CONTEXT_FLAGS 0x821E
1194#define GL_COMPRESSED_RED 0x8225
1195#define GL_COMPRESSED_RG 0x8226
1196#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
1197#define GL_RGBA32F 0x8814
1198#define GL_RGB32F 0x8815
1199#define GL_RGBA16F 0x881A
1200#define GL_RGB16F 0x881B
1201#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
1202#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
1203#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
1204#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
1205#define GL_CLAMP_READ_COLOR 0x891C
1206#define GL_FIXED_ONLY 0x891D
1207#define GL_MAX_VARYING_COMPONENTS 0x8B4B
1208#define GL_TEXTURE_1D_ARRAY 0x8C18
1209#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
1210#define GL_TEXTURE_2D_ARRAY 0x8C1A
1211#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
1212#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
1213#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
1214#define GL_R11F_G11F_B10F 0x8C3A
1215#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
1216#define GL_RGB9_E5 0x8C3D
1217#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
1218#define GL_TEXTURE_SHARED_SIZE 0x8C3F
1219#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
1220#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
1221#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
1222#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
1223#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
1224#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
1225#define GL_PRIMITIVES_GENERATED 0x8C87
1226#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
1227#define GL_RASTERIZER_DISCARD 0x8C89
1228#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
1229#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
1230#define GL_INTERLEAVED_ATTRIBS 0x8C8C
1231#define GL_SEPARATE_ATTRIBS 0x8C8D
1232#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
1233#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
1234#define GL_RGBA32UI 0x8D70
1235#define GL_RGB32UI 0x8D71
1236#define GL_RGBA16UI 0x8D76
1237#define GL_RGB16UI 0x8D77
1238#define GL_RGBA8UI 0x8D7C
1239#define GL_RGB8UI 0x8D7D
1240#define GL_RGBA32I 0x8D82
1241#define GL_RGB32I 0x8D83
1242#define GL_RGBA16I 0x8D88
1243#define GL_RGB16I 0x8D89
1244#define GL_RGBA8I 0x8D8E
1245#define GL_RGB8I 0x8D8F
1246#define GL_RED_INTEGER 0x8D94
1247#define GL_GREEN_INTEGER 0x8D95
1248#define GL_BLUE_INTEGER 0x8D96
1249#define GL_RGB_INTEGER 0x8D98
1250#define GL_RGBA_INTEGER 0x8D99
1251#define GL_BGR_INTEGER 0x8D9A
1252#define GL_BGRA_INTEGER 0x8D9B
1253#define GL_SAMPLER_1D_ARRAY 0x8DC0
1254#define GL_SAMPLER_2D_ARRAY 0x8DC1
1255#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
1256#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
1257#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
1258#define GL_UNSIGNED_INT_VEC2 0x8DC6
1259#define GL_UNSIGNED_INT_VEC3 0x8DC7
1260#define GL_UNSIGNED_INT_VEC4 0x8DC8
1261#define GL_INT_SAMPLER_1D 0x8DC9
1262#define GL_INT_SAMPLER_2D 0x8DCA
1263#define GL_INT_SAMPLER_3D 0x8DCB
1264#define GL_INT_SAMPLER_CUBE 0x8DCC
1265#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
1266#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
1267#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
1268#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
1269#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
1270#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
1271#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
1272#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
1273#define GL_QUERY_WAIT 0x8E13
1274#define GL_QUERY_NO_WAIT 0x8E14
1275#define GL_QUERY_BY_REGION_WAIT 0x8E15
1276#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
1277#define GL_BUFFER_ACCESS_FLAGS 0x911F
1278#define GL_BUFFER_MAP_LENGTH 0x9120
1279#define GL_BUFFER_MAP_OFFSET 0x9121
1280#define GL_DEPTH_COMPONENT32F 0x8CAC
1281#define GL_DEPTH32F_STENCIL8 0x8CAD
1282#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
1283#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
1284#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
1285#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
1286#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
1287#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
1288#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
1289#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
1290#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
1291#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
1292#define GL_FRAMEBUFFER_DEFAULT 0x8218
1293#define GL_FRAMEBUFFER_UNDEFINED 0x8219
1294#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
1295#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
1296#define GL_DEPTH_STENCIL 0x84F9
1297#define GL_UNSIGNED_INT_24_8 0x84FA
1298#define GL_DEPTH24_STENCIL8 0x88F0
1299#define GL_TEXTURE_STENCIL_SIZE 0x88F1
1300#define GL_TEXTURE_RED_TYPE 0x8C10
1301#define GL_TEXTURE_GREEN_TYPE 0x8C11
1302#define GL_TEXTURE_BLUE_TYPE 0x8C12
1303#define GL_TEXTURE_ALPHA_TYPE 0x8C13
1304#define GL_TEXTURE_DEPTH_TYPE 0x8C16
1305#define GL_UNSIGNED_NORMALIZED 0x8C17
1306#define GL_FRAMEBUFFER_BINDING 0x8CA6
1307#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
1308#define GL_RENDERBUFFER_BINDING 0x8CA7
1309#define GL_READ_FRAMEBUFFER 0x8CA8
1310#define GL_DRAW_FRAMEBUFFER 0x8CA9
1311#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
1312#define GL_RENDERBUFFER_SAMPLES 0x8CAB
1313#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
1314#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
1315#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
1316#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
1317#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
1318#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
1319#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
1320#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
1321#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
1322#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
1323#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
1324#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
1325#define GL_COLOR_ATTACHMENT0 0x8CE0
1326#define GL_COLOR_ATTACHMENT1 0x8CE1
1327#define GL_COLOR_ATTACHMENT2 0x8CE2
1328#define GL_COLOR_ATTACHMENT3 0x8CE3
1329#define GL_COLOR_ATTACHMENT4 0x8CE4
1330#define GL_COLOR_ATTACHMENT5 0x8CE5
1331#define GL_COLOR_ATTACHMENT6 0x8CE6
1332#define GL_COLOR_ATTACHMENT7 0x8CE7
1333#define GL_COLOR_ATTACHMENT8 0x8CE8
1334#define GL_COLOR_ATTACHMENT9 0x8CE9
1335#define GL_COLOR_ATTACHMENT10 0x8CEA
1336#define GL_COLOR_ATTACHMENT11 0x8CEB
1337#define GL_COLOR_ATTACHMENT12 0x8CEC
1338#define GL_COLOR_ATTACHMENT13 0x8CED
1339#define GL_COLOR_ATTACHMENT14 0x8CEE
1340#define GL_COLOR_ATTACHMENT15 0x8CEF
1341#define GL_COLOR_ATTACHMENT16 0x8CF0
1342#define GL_COLOR_ATTACHMENT17 0x8CF1
1343#define GL_COLOR_ATTACHMENT18 0x8CF2
1344#define GL_COLOR_ATTACHMENT19 0x8CF3
1345#define GL_COLOR_ATTACHMENT20 0x8CF4
1346#define GL_COLOR_ATTACHMENT21 0x8CF5
1347#define GL_COLOR_ATTACHMENT22 0x8CF6
1348#define GL_COLOR_ATTACHMENT23 0x8CF7
1349#define GL_COLOR_ATTACHMENT24 0x8CF8
1350#define GL_COLOR_ATTACHMENT25 0x8CF9
1351#define GL_COLOR_ATTACHMENT26 0x8CFA
1352#define GL_COLOR_ATTACHMENT27 0x8CFB
1353#define GL_COLOR_ATTACHMENT28 0x8CFC
1354#define GL_COLOR_ATTACHMENT29 0x8CFD
1355#define GL_COLOR_ATTACHMENT30 0x8CFE
1356#define GL_COLOR_ATTACHMENT31 0x8CFF
1357#define GL_DEPTH_ATTACHMENT 0x8D00
1358#define GL_STENCIL_ATTACHMENT 0x8D20
1359#define GL_FRAMEBUFFER 0x8D40
1360#define GL_RENDERBUFFER 0x8D41
1361#define GL_RENDERBUFFER_WIDTH 0x8D42
1362#define GL_RENDERBUFFER_HEIGHT 0x8D43
1363#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
1364#define GL_STENCIL_INDEX1 0x8D46
1365#define GL_STENCIL_INDEX4 0x8D47
1366#define GL_STENCIL_INDEX8 0x8D48
1367#define GL_STENCIL_INDEX16 0x8D49
1368#define GL_RENDERBUFFER_RED_SIZE 0x8D50
1369#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
1370#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
1371#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
1372#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
1373#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
1374#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
1375#define GL_MAX_SAMPLES 0x8D57
1376#define GL_INDEX 0x8222
1377#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
1378#define GL_TEXTURE_INTENSITY_TYPE 0x8C15
1379#define GL_FRAMEBUFFER_SRGB 0x8DB9
1380#define GL_HALF_FLOAT 0x140B
1381#define GL_MAP_READ_BIT 0x0001
1382#define GL_MAP_WRITE_BIT 0x0002
1383#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
1384#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
1385#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
1386#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
1387#define GL_COMPRESSED_RED_RGTC1 0x8DBB
1388#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
1389#define GL_COMPRESSED_RG_RGTC2 0x8DBD
1390#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
1391#define GL_RG 0x8227
1392#define GL_RG_INTEGER 0x8228
1393#define GL_R8 0x8229
1394#define GL_R16 0x822A
1395#define GL_RG8 0x822B
1396#define GL_RG16 0x822C
1397#define GL_R16F 0x822D
1398#define GL_R32F 0x822E
1399#define GL_RG16F 0x822F
1400#define GL_RG32F 0x8230
1401#define GL_R8I 0x8231
1402#define GL_R8UI 0x8232
1403#define GL_R16I 0x8233
1404#define GL_R16UI 0x8234
1405#define GL_R32I 0x8235
1406#define GL_R32UI 0x8236
1407#define GL_RG8I 0x8237
1408#define GL_RG8UI 0x8238
1409#define GL_RG16I 0x8239
1410#define GL_RG16UI 0x823A
1411#define GL_RG32I 0x823B
1412#define GL_RG32UI 0x823C
1413#define GL_VERTEX_ARRAY_BINDING 0x85B5
1414#define GL_CLAMP_VERTEX_COLOR 0x891A
1415#define GL_CLAMP_FRAGMENT_COLOR 0x891B
1416#define GL_ALPHA_INTEGER 0x8D97
1417typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
1418typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
1419typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
1420typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);
1421typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);
1422typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);
1423typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
1424typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
1425typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
1426typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
1427typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
1428typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
1429typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
1430typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
1431typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
1432typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1433typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
1434typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
1435typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);
1436typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);
1437typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);
1438typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
1439typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);
1440typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);
1441typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
1442typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1443typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);
1444typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);
1445typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);
1446typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
1447typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);
1448typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);
1449typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);
1450typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
1451typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);
1452typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);
1453typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);
1454typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);
1455typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
1456typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
1457typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
1458typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
1459typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
1460typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
1461typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1462typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1463typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1464typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1465typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1466typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);
1467typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
1468typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);
1469typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);
1470typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
1471typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
1472typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
1473typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
1474typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
1475typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
1476typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
1477typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
1478typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
1479typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
1480typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
1481typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
1482typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
1483typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
1484typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
1485typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
1486typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1487typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1488typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1489typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
1490typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
1491typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
1492typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1493typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1494typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
1495typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1496typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
1497typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
1498typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
1499typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
1500typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
1501#ifdef GL_GLEXT_PROTOTYPES
1502GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
1503GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
1504GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
1505GLAPI void APIENTRY glEnablei (GLenum target, GLuint index);
1506GLAPI void APIENTRY glDisablei (GLenum target, GLuint index);
1507GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);
1508GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
1509GLAPI void APIENTRY glEndTransformFeedback (void);
1510GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
1511GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
1512GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
1513GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
1514GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);
1515GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);
1516GLAPI void APIENTRY glEndConditionalRender (void);
1517GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1518GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
1519GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
1520GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);
1521GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);
1522GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);
1523GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
1524GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);
1525GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);
1526GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);
1527GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1528GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);
1529GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);
1530GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);
1531GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
1532GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);
1533GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);
1534GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);
1535GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
1536GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);
1537GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);
1538GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);
1539GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);
1540GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
1541GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);
1542GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
1543GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);
1544GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
1545GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
1546GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1547GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
1548GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
1549GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
1550GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
1551GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);
1552GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);
1553GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);
1554GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);
1555GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
1556GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
1557GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
1558GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
1559GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);
1560GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);
1561GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
1562GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
1563GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
1564GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
1565GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
1566GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);
1567GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
1568GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
1569GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
1570GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);
1571GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1572GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1573GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1574GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
1575GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
1576GLAPI void APIENTRY glGenerateMipmap (GLenum target);
1577GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1578GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1579GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
1580GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1581GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
1582GLAPI void APIENTRY glBindVertexArray (GLuint array);
1583GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
1584GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
1585GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
1586#endif
1587#endif /* GL_VERSION_3_0 */
1588
1589#ifndef GL_VERSION_3_1
1590#define GL_VERSION_3_1 1
1591#define GL_SAMPLER_2D_RECT 0x8B63
1592#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
1593#define GL_SAMPLER_BUFFER 0x8DC2
1594#define GL_INT_SAMPLER_2D_RECT 0x8DCD
1595#define GL_INT_SAMPLER_BUFFER 0x8DD0
1596#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
1597#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
1598#define GL_TEXTURE_BUFFER 0x8C2A
1599#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
1600#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
1601#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
1602#define GL_TEXTURE_RECTANGLE 0x84F5
1603#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
1604#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
1605#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
1606#define GL_R8_SNORM 0x8F94
1607#define GL_RG8_SNORM 0x8F95
1608#define GL_RGB8_SNORM 0x8F96
1609#define GL_RGBA8_SNORM 0x8F97
1610#define GL_R16_SNORM 0x8F98
1611#define GL_RG16_SNORM 0x8F99
1612#define GL_RGB16_SNORM 0x8F9A
1613#define GL_RGBA16_SNORM 0x8F9B
1614#define GL_SIGNED_NORMALIZED 0x8F9C
1615#define GL_PRIMITIVE_RESTART 0x8F9D
1616#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
1617#define GL_COPY_READ_BUFFER 0x8F36
1618#define GL_COPY_WRITE_BUFFER 0x8F37
1619#define GL_UNIFORM_BUFFER 0x8A11
1620#define GL_UNIFORM_BUFFER_BINDING 0x8A28
1621#define GL_UNIFORM_BUFFER_START 0x8A29
1622#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
1623#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
1624#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
1625#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
1626#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
1627#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
1628#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
1629#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
1630#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
1631#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
1632#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
1633#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
1634#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
1635#define GL_UNIFORM_TYPE 0x8A37
1636#define GL_UNIFORM_SIZE 0x8A38
1637#define GL_UNIFORM_NAME_LENGTH 0x8A39
1638#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
1639#define GL_UNIFORM_OFFSET 0x8A3B
1640#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
1641#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
1642#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
1643#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
1644#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
1645#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
1646#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
1647#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
1648#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
1649#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
1650#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
1651#define GL_INVALID_INDEX 0xFFFFFFFFu
1652typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
1653typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
1654typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
1655typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);
1656typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
1657typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
1658typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
1659typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
1660typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
1661typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
1662typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
1663typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
1664#ifdef GL_GLEXT_PROTOTYPES
1665GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
1666GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
1667GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
1668GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);
1669GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
1670GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
1671GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
1672GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
1673GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
1674GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
1675GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
1676GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
1677#endif
1678#endif /* GL_VERSION_3_1 */
1679
1680#ifndef GL_VERSION_3_2
1681#define GL_VERSION_3_2 1
1682typedef struct __GLsync *GLsync;
1683typedef khronos_uint64_t GLuint64;
1684typedef khronos_int64_t GLint64;
1685#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
1686#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
1687#define GL_LINES_ADJACENCY 0x000A
1688#define GL_LINE_STRIP_ADJACENCY 0x000B
1689#define GL_TRIANGLES_ADJACENCY 0x000C
1690#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
1691#define GL_PROGRAM_POINT_SIZE 0x8642
1692#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
1693#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
1694#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
1695#define GL_GEOMETRY_SHADER 0x8DD9
1696#define GL_GEOMETRY_VERTICES_OUT 0x8916
1697#define GL_GEOMETRY_INPUT_TYPE 0x8917
1698#define GL_GEOMETRY_OUTPUT_TYPE 0x8918
1699#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
1700#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
1701#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
1702#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
1703#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
1704#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
1705#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
1706#define GL_CONTEXT_PROFILE_MASK 0x9126
1707#define GL_DEPTH_CLAMP 0x864F
1708#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
1709#define GL_FIRST_VERTEX_CONVENTION 0x8E4D
1710#define GL_LAST_VERTEX_CONVENTION 0x8E4E
1711#define GL_PROVOKING_VERTEX 0x8E4F
1712#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
1713#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
1714#define GL_OBJECT_TYPE 0x9112
1715#define GL_SYNC_CONDITION 0x9113
1716#define GL_SYNC_STATUS 0x9114
1717#define GL_SYNC_FLAGS 0x9115
1718#define GL_SYNC_FENCE 0x9116
1719#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
1720#define GL_UNSIGNALED 0x9118
1721#define GL_SIGNALED 0x9119
1722#define GL_ALREADY_SIGNALED 0x911A
1723#define GL_TIMEOUT_EXPIRED 0x911B
1724#define GL_CONDITION_SATISFIED 0x911C
1725#define GL_WAIT_FAILED 0x911D
1726#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
1727#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
1728#define GL_SAMPLE_POSITION 0x8E50
1729#define GL_SAMPLE_MASK 0x8E51
1730#define GL_SAMPLE_MASK_VALUE 0x8E52
1731#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
1732#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
1733#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
1734#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
1735#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
1736#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
1737#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
1738#define GL_TEXTURE_SAMPLES 0x9106
1739#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
1740#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
1741#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
1742#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
1743#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
1744#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
1745#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
1746#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
1747#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
1748#define GL_MAX_INTEGER_SAMPLES 0x9110
1749typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1750typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1751typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
1752typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
1753typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
1754typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
1755typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);
1756typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);
1757typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1758typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1759typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);
1760typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
1761typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
1762typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
1763typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
1764typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
1765typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
1766typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
1767typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);
1768#ifdef GL_GLEXT_PROTOTYPES
1769GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1770GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1771GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
1772GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
1773GLAPI void APIENTRY glProvokingVertex (GLenum mode);
1774GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
1775GLAPI GLboolean APIENTRY glIsSync (GLsync sync);
1776GLAPI void APIENTRY glDeleteSync (GLsync sync);
1777GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
1778GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
1779GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
1780GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
1781GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
1782GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
1783GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);
1784GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
1785GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
1786GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
1787GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
1788#endif
1789#endif /* GL_VERSION_3_2 */
1790
1791#ifndef GL_VERSION_3_3
1792#define GL_VERSION_3_3 1
1793#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
1794#define GL_SRC1_COLOR 0x88F9
1795#define GL_ONE_MINUS_SRC1_COLOR 0x88FA
1796#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
1797#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
1798#define GL_ANY_SAMPLES_PASSED 0x8C2F
1799#define GL_SAMPLER_BINDING 0x8919
1800#define GL_RGB10_A2UI 0x906F
1801#define GL_TEXTURE_SWIZZLE_R 0x8E42
1802#define GL_TEXTURE_SWIZZLE_G 0x8E43
1803#define GL_TEXTURE_SWIZZLE_B 0x8E44
1804#define GL_TEXTURE_SWIZZLE_A 0x8E45
1805#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46
1806#define GL_TIME_ELAPSED 0x88BF
1807#define GL_TIMESTAMP 0x8E28
1808#define GL_INT_2_10_10_10_REV 0x8D9F
1809typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
1810typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);
1811typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
1812typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
1813typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);
1814typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
1815typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
1816typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
1817typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
1818typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
1819typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
1820typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);
1821typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
1822typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);
1823typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
1824typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
1825typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
1826typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
1827typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
1828typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
1829typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1830typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1831typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1832typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1833typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1834typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1835typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1836typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1837typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);
1838typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);
1839typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);
1840typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);
1841typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);
1842typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);
1843typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);
1844typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);
1845typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);
1846typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);
1847typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);
1848typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);
1849typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);
1850typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);
1851typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);
1852typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1853typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);
1854typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1855typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);
1856typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1857typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);
1858typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1859typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);
1860typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);
1861typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);
1862typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);
1863typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);
1864typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);
1865typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);
1866typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);
1867#ifdef GL_GLEXT_PROTOTYPES
1868GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
1869GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);
1870GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
1871GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
1872GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);
1873GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
1874GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
1875GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
1876GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
1877GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
1878GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);
1879GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);
1880GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
1881GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);
1882GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
1883GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);
1884GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);
1885GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);
1886GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);
1887GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
1888GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1889GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1890GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1891GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1892GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1893GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1894GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1895GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1896GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);
1897GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);
1898GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);
1899GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);
1900GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);
1901GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);
1902GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);
1903GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);
1904GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);
1905GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);
1906GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);
1907GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);
1908GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);
1909GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);
1910GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);
1911GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);
1912GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);
1913GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);
1914GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);
1915GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);
1916GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);
1917GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);
1918GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);
1919GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);
1920GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);
1921GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);
1922GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);
1923GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);
1924GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);
1925GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);
1926#endif
1927#endif /* GL_VERSION_3_3 */
1928
1929#ifndef GL_VERSION_4_0
1930#define GL_VERSION_4_0 1
1931#define GL_SAMPLE_SHADING 0x8C36
1932#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37
1933#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
1934#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
1935#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009
1936#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
1937#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B
1938#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
1939#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
1940#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
1941#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
1942#define GL_DRAW_INDIRECT_BUFFER 0x8F3F
1943#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
1944#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F
1945#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
1946#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
1947#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
1948#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
1949#define GL_MAX_VERTEX_STREAMS 0x8E71
1950#define GL_DOUBLE_VEC2 0x8FFC
1951#define GL_DOUBLE_VEC3 0x8FFD
1952#define GL_DOUBLE_VEC4 0x8FFE
1953#define GL_DOUBLE_MAT2 0x8F46
1954#define GL_DOUBLE_MAT3 0x8F47
1955#define GL_DOUBLE_MAT4 0x8F48
1956#define GL_DOUBLE_MAT2x3 0x8F49
1957#define GL_DOUBLE_MAT2x4 0x8F4A
1958#define GL_DOUBLE_MAT3x2 0x8F4B
1959#define GL_DOUBLE_MAT3x4 0x8F4C
1960#define GL_DOUBLE_MAT4x2 0x8F4D
1961#define GL_DOUBLE_MAT4x3 0x8F4E
1962#define GL_ACTIVE_SUBROUTINES 0x8DE5
1963#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6
1964#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47
1965#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48
1966#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49
1967#define GL_MAX_SUBROUTINES 0x8DE7
1968#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8
1969#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A
1970#define GL_COMPATIBLE_SUBROUTINES 0x8E4B
1971#define GL_PATCHES 0x000E
1972#define GL_PATCH_VERTICES 0x8E72
1973#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
1974#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74
1975#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75
1976#define GL_TESS_GEN_MODE 0x8E76
1977#define GL_TESS_GEN_SPACING 0x8E77
1978#define GL_TESS_GEN_VERTEX_ORDER 0x8E78
1979#define GL_TESS_GEN_POINT_MODE 0x8E79
1980#define GL_ISOLINES 0x8E7A
1981#define GL_FRACTIONAL_ODD 0x8E7B
1982#define GL_FRACTIONAL_EVEN 0x8E7C
1983#define GL_MAX_PATCH_VERTICES 0x8E7D
1984#define GL_MAX_TESS_GEN_LEVEL 0x8E7E
1985#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
1986#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
1987#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
1988#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
1989#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
1990#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84
1991#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
1992#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
1993#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
1994#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
1995#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
1996#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
1997#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
1998#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
1999#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0
2000#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1
2001#define GL_TESS_EVALUATION_SHADER 0x8E87
2002#define GL_TESS_CONTROL_SHADER 0x8E88
2003#define GL_TRANSFORM_FEEDBACK 0x8E22
2004#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
2005#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
2006#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
2007#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
2008typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);
2009typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);
2010typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
2011typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);
2012typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
2013typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect);
2014typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect);
2015typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);
2016typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);
2017typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);
2018typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2019typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);
2020typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);
2021typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);
2022typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);
2023typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2024typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2025typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2026typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2027typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2028typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2029typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2030typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2031typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2032typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);
2033typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);
2034typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);
2035typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
2036typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2037typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2038typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);
2039typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);
2040typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
2041typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);
2042typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);
2043typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
2044typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);
2045typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
2046typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
2047typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
2048typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
2049typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);
2050typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);
2051typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);
2052typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);
2053typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
2054#ifdef GL_GLEXT_PROTOTYPES
2055GLAPI void APIENTRY glMinSampleShading (GLfloat value);
2056GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);
2057GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
2058GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);
2059GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
2060GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
2061GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);
2062GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);
2063GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);
2064GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);
2065GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2066GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);
2067GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);
2068GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);
2069GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);
2070GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2071GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2072GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2073GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2074GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2075GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2076GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2077GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2078GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2079GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);
2080GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);
2081GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);
2082GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
2083GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2084GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2085GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);
2086GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);
2087GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
2088GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);
2089GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);
2090GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
2091GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
2092GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
2093GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);
2094GLAPI void APIENTRY glPauseTransformFeedback (void);
2095GLAPI void APIENTRY glResumeTransformFeedback (void);
2096GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);
2097GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);
2098GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);
2099GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);
2100GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);
2101#endif
2102#endif /* GL_VERSION_4_0 */
2103
2104#ifndef GL_VERSION_4_1
2105#define GL_VERSION_4_1 1
2106#define GL_FIXED 0x140C
2107#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
2108#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
2109#define GL_LOW_FLOAT 0x8DF0
2110#define GL_MEDIUM_FLOAT 0x8DF1
2111#define GL_HIGH_FLOAT 0x8DF2
2112#define GL_LOW_INT 0x8DF3
2113#define GL_MEDIUM_INT 0x8DF4
2114#define GL_HIGH_INT 0x8DF5
2115#define GL_SHADER_COMPILER 0x8DFA
2116#define GL_SHADER_BINARY_FORMATS 0x8DF8
2117#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
2118#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
2119#define GL_MAX_VARYING_VECTORS 0x8DFC
2120#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
2121#define GL_RGB565 0x8D62
2122#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
2123#define GL_PROGRAM_BINARY_LENGTH 0x8741
2124#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
2125#define GL_PROGRAM_BINARY_FORMATS 0x87FF
2126#define GL_VERTEX_SHADER_BIT 0x00000001
2127#define GL_FRAGMENT_SHADER_BIT 0x00000002
2128#define GL_GEOMETRY_SHADER_BIT 0x00000004
2129#define GL_TESS_CONTROL_SHADER_BIT 0x00000008
2130#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010
2131#define GL_ALL_SHADER_BITS 0xFFFFFFFF
2132#define GL_PROGRAM_SEPARABLE 0x8258
2133#define GL_ACTIVE_PROGRAM 0x8259
2134#define GL_PROGRAM_PIPELINE_BINDING 0x825A
2135#define GL_MAX_VIEWPORTS 0x825B
2136#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C
2137#define GL_VIEWPORT_BOUNDS_RANGE 0x825D
2138#define GL_LAYER_PROVOKING_VERTEX 0x825E
2139#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F
2140#define GL_UNDEFINED_VERTEX 0x8260
2141typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
2142typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
2143typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
2144typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
2145typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
2146typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
2147typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
2148typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
2149typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
2150typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);
2151typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings);
2152typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);
2153typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);
2154typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
2155typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);
2156typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);
2157typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);
2158typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
2159typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);
2160typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2161typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);
2162typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2163typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);
2164typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
2165typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);
2166typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
2167typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
2168typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2169typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);
2170typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2171typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
2172typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
2173typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
2174typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
2175typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
2176typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2177typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
2178typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2179typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
2180typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
2181typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
2182typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
2183typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
2184typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2185typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
2186typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2187typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
2188typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
2189typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2190typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2191typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2192typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2193typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2194typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2195typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2196typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2197typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2198typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2199typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2200typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2201typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2202typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2203typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2204typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2205typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2206typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2207typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
2208typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
2209typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);
2210typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);
2211typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
2212typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2213typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);
2214typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);
2215typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);
2216typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);
2217typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
2218typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);
2219typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);
2220typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
2221typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);
2222typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);
2223typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
2224typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);
2225typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);
2226typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);
2227typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
2228typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
2229#ifdef GL_GLEXT_PROTOTYPES
2230GLAPI void APIENTRY glReleaseShaderCompiler (void);
2231GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
2232GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
2233GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);
2234GLAPI void APIENTRY glClearDepthf (GLfloat d);
2235GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
2236GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
2237GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
2238GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
2239GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
2240GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
2241GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);
2242GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
2243GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
2244GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);
2245GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
2246GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
2247GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
2248GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
2249GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2250GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);
2251GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2252GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
2253GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
2254GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
2255GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
2256GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
2257GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2258GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);
2259GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2260GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
2261GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
2262GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
2263GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
2264GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
2265GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2266GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
2267GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2268GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
2269GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
2270GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
2271GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
2272GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
2273GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2274GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
2275GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2276GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
2277GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
2278GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2279GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2280GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2281GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2282GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2283GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2284GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2285GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2286GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2287GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2288GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2289GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2290GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2291GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2292GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2293GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2294GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2295GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2296GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);
2297GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
2298GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);
2299GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);
2300GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
2301GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2302GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);
2303GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);
2304GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);
2305GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);
2306GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
2307GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);
2308GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);
2309GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
2310GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);
2311GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);
2312GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
2313GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);
2314GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);
2315GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);
2316GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);
2317GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);
2318#endif
2319#endif /* GL_VERSION_4_1 */
2320
2321#ifndef GL_VERSION_4_2
2322#define GL_VERSION_4_2 1
2323#define GL_COPY_READ_BUFFER_BINDING 0x8F36
2324#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
2325#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
2326#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
2327#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
2328#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
2329#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
2330#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A
2331#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B
2332#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C
2333#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D
2334#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E
2335#define GL_NUM_SAMPLE_COUNTS 0x9380
2336#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC
2337#define GL_ATOMIC_COUNTER_BUFFER 0x92C0
2338#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
2339#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
2340#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
2341#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
2342#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
2343#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
2344#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
2345#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
2346#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
2347#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
2348#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
2349#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
2350#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
2351#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
2352#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
2353#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
2354#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
2355#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
2356#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
2357#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
2358#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
2359#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
2360#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
2361#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
2362#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
2363#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
2364#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
2365#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
2366#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
2367#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
2368#define GL_UNIFORM_BARRIER_BIT 0x00000004
2369#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
2370#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
2371#define GL_COMMAND_BARRIER_BIT 0x00000040
2372#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
2373#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
2374#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
2375#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
2376#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
2377#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
2378#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
2379#define GL_MAX_IMAGE_UNITS 0x8F38
2380#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
2381#define GL_IMAGE_BINDING_NAME 0x8F3A
2382#define GL_IMAGE_BINDING_LEVEL 0x8F3B
2383#define GL_IMAGE_BINDING_LAYERED 0x8F3C
2384#define GL_IMAGE_BINDING_LAYER 0x8F3D
2385#define GL_IMAGE_BINDING_ACCESS 0x8F3E
2386#define GL_IMAGE_1D 0x904C
2387#define GL_IMAGE_2D 0x904D
2388#define GL_IMAGE_3D 0x904E
2389#define GL_IMAGE_2D_RECT 0x904F
2390#define GL_IMAGE_CUBE 0x9050
2391#define GL_IMAGE_BUFFER 0x9051
2392#define GL_IMAGE_1D_ARRAY 0x9052
2393#define GL_IMAGE_2D_ARRAY 0x9053
2394#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
2395#define GL_IMAGE_2D_MULTISAMPLE 0x9055
2396#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
2397#define GL_INT_IMAGE_1D 0x9057
2398#define GL_INT_IMAGE_2D 0x9058
2399#define GL_INT_IMAGE_3D 0x9059
2400#define GL_INT_IMAGE_2D_RECT 0x905A
2401#define GL_INT_IMAGE_CUBE 0x905B
2402#define GL_INT_IMAGE_BUFFER 0x905C
2403#define GL_INT_IMAGE_1D_ARRAY 0x905D
2404#define GL_INT_IMAGE_2D_ARRAY 0x905E
2405#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
2406#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
2407#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
2408#define GL_UNSIGNED_INT_IMAGE_1D 0x9062
2409#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
2410#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
2411#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
2412#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
2413#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
2414#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
2415#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
2416#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
2417#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
2418#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
2419#define GL_MAX_IMAGE_SAMPLES 0x906D
2420#define GL_IMAGE_BINDING_FORMAT 0x906E
2421#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
2422#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
2423#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
2424#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
2425#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
2426#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
2427#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
2428#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
2429#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
2430#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
2431#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
2432#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
2433#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
2434#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
2435typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
2436typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
2437typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
2438typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params);
2439typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
2440typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
2441typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
2442typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2443typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2444typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2445typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);
2446typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
2447#ifdef GL_GLEXT_PROTOTYPES
2448GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
2449GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
2450GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
2451GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params);
2452GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
2453GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
2454GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);
2455GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2456GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2457GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2458GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);
2459GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
2460#endif
2461#endif /* GL_VERSION_4_2 */
2462
2463#ifndef GL_VERSION_4_3
2464#define GL_VERSION_4_3 1
2465typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
2466#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9
2467#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E
2468#define GL_COMPRESSED_RGB8_ETC2 0x9274
2469#define GL_COMPRESSED_SRGB8_ETC2 0x9275
2470#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
2471#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
2472#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
2473#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
2474#define GL_COMPRESSED_R11_EAC 0x9270
2475#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
2476#define GL_COMPRESSED_RG11_EAC 0x9272
2477#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
2478#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
2479#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
2480#define GL_MAX_ELEMENT_INDEX 0x8D6B
2481#define GL_COMPUTE_SHADER 0x91B9
2482#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
2483#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
2484#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
2485#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
2486#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
2487#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
2488#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
2489#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
2490#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
2491#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
2492#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
2493#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267
2494#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
2495#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
2496#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
2497#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
2498#define GL_COMPUTE_SHADER_BIT 0x00000020
2499#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
2500#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
2501#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
2502#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
2503#define GL_DEBUG_SOURCE_API 0x8246
2504#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
2505#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
2506#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
2507#define GL_DEBUG_SOURCE_APPLICATION 0x824A
2508#define GL_DEBUG_SOURCE_OTHER 0x824B
2509#define GL_DEBUG_TYPE_ERROR 0x824C
2510#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
2511#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
2512#define GL_DEBUG_TYPE_PORTABILITY 0x824F
2513#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
2514#define GL_DEBUG_TYPE_OTHER 0x8251
2515#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
2516#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
2517#define GL_DEBUG_LOGGED_MESSAGES 0x9145
2518#define GL_DEBUG_SEVERITY_HIGH 0x9146
2519#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
2520#define GL_DEBUG_SEVERITY_LOW 0x9148
2521#define GL_DEBUG_TYPE_MARKER 0x8268
2522#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
2523#define GL_DEBUG_TYPE_POP_GROUP 0x826A
2524#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
2525#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
2526#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
2527#define GL_BUFFER 0x82E0
2528#define GL_SHADER 0x82E1
2529#define GL_PROGRAM 0x82E2
2530#define GL_QUERY 0x82E3
2531#define GL_PROGRAM_PIPELINE 0x82E4
2532#define GL_SAMPLER 0x82E6
2533#define GL_MAX_LABEL_LENGTH 0x82E8
2534#define GL_DEBUG_OUTPUT 0x92E0
2535#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
2536#define GL_MAX_UNIFORM_LOCATIONS 0x826E
2537#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
2538#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
2539#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312
2540#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313
2541#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
2542#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315
2543#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316
2544#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317
2545#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
2546#define GL_INTERNALFORMAT_SUPPORTED 0x826F
2547#define GL_INTERNALFORMAT_PREFERRED 0x8270
2548#define GL_INTERNALFORMAT_RED_SIZE 0x8271
2549#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272
2550#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273
2551#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274
2552#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275
2553#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276
2554#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277
2555#define GL_INTERNALFORMAT_RED_TYPE 0x8278
2556#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279
2557#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A
2558#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B
2559#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C
2560#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D
2561#define GL_MAX_WIDTH 0x827E
2562#define GL_MAX_HEIGHT 0x827F
2563#define GL_MAX_DEPTH 0x8280
2564#define GL_MAX_LAYERS 0x8281
2565#define GL_MAX_COMBINED_DIMENSIONS 0x8282
2566#define GL_COLOR_COMPONENTS 0x8283
2567#define GL_DEPTH_COMPONENTS 0x8284
2568#define GL_STENCIL_COMPONENTS 0x8285
2569#define GL_COLOR_RENDERABLE 0x8286
2570#define GL_DEPTH_RENDERABLE 0x8287
2571#define GL_STENCIL_RENDERABLE 0x8288
2572#define GL_FRAMEBUFFER_RENDERABLE 0x8289
2573#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A
2574#define GL_FRAMEBUFFER_BLEND 0x828B
2575#define GL_READ_PIXELS 0x828C
2576#define GL_READ_PIXELS_FORMAT 0x828D
2577#define GL_READ_PIXELS_TYPE 0x828E
2578#define GL_TEXTURE_IMAGE_FORMAT 0x828F
2579#define GL_TEXTURE_IMAGE_TYPE 0x8290
2580#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291
2581#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292
2582#define GL_MIPMAP 0x8293
2583#define GL_MANUAL_GENERATE_MIPMAP 0x8294
2584#define GL_AUTO_GENERATE_MIPMAP 0x8295
2585#define GL_COLOR_ENCODING 0x8296
2586#define GL_SRGB_READ 0x8297
2587#define GL_SRGB_WRITE 0x8298
2588#define GL_FILTER 0x829A
2589#define GL_VERTEX_TEXTURE 0x829B
2590#define GL_TESS_CONTROL_TEXTURE 0x829C
2591#define GL_TESS_EVALUATION_TEXTURE 0x829D
2592#define GL_GEOMETRY_TEXTURE 0x829E
2593#define GL_FRAGMENT_TEXTURE 0x829F
2594#define GL_COMPUTE_TEXTURE 0x82A0
2595#define GL_TEXTURE_SHADOW 0x82A1
2596#define GL_TEXTURE_GATHER 0x82A2
2597#define GL_TEXTURE_GATHER_SHADOW 0x82A3
2598#define GL_SHADER_IMAGE_LOAD 0x82A4
2599#define GL_SHADER_IMAGE_STORE 0x82A5
2600#define GL_SHADER_IMAGE_ATOMIC 0x82A6
2601#define GL_IMAGE_TEXEL_SIZE 0x82A7
2602#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8
2603#define GL_IMAGE_PIXEL_FORMAT 0x82A9
2604#define GL_IMAGE_PIXEL_TYPE 0x82AA
2605#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC
2606#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD
2607#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE
2608#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF
2609#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1
2610#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2
2611#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3
2612#define GL_CLEAR_BUFFER 0x82B4
2613#define GL_TEXTURE_VIEW 0x82B5
2614#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6
2615#define GL_FULL_SUPPORT 0x82B7
2616#define GL_CAVEAT_SUPPORT 0x82B8
2617#define GL_IMAGE_CLASS_4_X_32 0x82B9
2618#define GL_IMAGE_CLASS_2_X_32 0x82BA
2619#define GL_IMAGE_CLASS_1_X_32 0x82BB
2620#define GL_IMAGE_CLASS_4_X_16 0x82BC
2621#define GL_IMAGE_CLASS_2_X_16 0x82BD
2622#define GL_IMAGE_CLASS_1_X_16 0x82BE
2623#define GL_IMAGE_CLASS_4_X_8 0x82BF
2624#define GL_IMAGE_CLASS_2_X_8 0x82C0
2625#define GL_IMAGE_CLASS_1_X_8 0x82C1
2626#define GL_IMAGE_CLASS_11_11_10 0x82C2
2627#define GL_IMAGE_CLASS_10_10_10_2 0x82C3
2628#define GL_VIEW_CLASS_128_BITS 0x82C4
2629#define GL_VIEW_CLASS_96_BITS 0x82C5
2630#define GL_VIEW_CLASS_64_BITS 0x82C6
2631#define GL_VIEW_CLASS_48_BITS 0x82C7
2632#define GL_VIEW_CLASS_32_BITS 0x82C8
2633#define GL_VIEW_CLASS_24_BITS 0x82C9
2634#define GL_VIEW_CLASS_16_BITS 0x82CA
2635#define GL_VIEW_CLASS_8_BITS 0x82CB
2636#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC
2637#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD
2638#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE
2639#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF
2640#define GL_VIEW_CLASS_RGTC1_RED 0x82D0
2641#define GL_VIEW_CLASS_RGTC2_RG 0x82D1
2642#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2
2643#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3
2644#define GL_UNIFORM 0x92E1
2645#define GL_UNIFORM_BLOCK 0x92E2
2646#define GL_PROGRAM_INPUT 0x92E3
2647#define GL_PROGRAM_OUTPUT 0x92E4
2648#define GL_BUFFER_VARIABLE 0x92E5
2649#define GL_SHADER_STORAGE_BLOCK 0x92E6
2650#define GL_VERTEX_SUBROUTINE 0x92E8
2651#define GL_TESS_CONTROL_SUBROUTINE 0x92E9
2652#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA
2653#define GL_GEOMETRY_SUBROUTINE 0x92EB
2654#define GL_FRAGMENT_SUBROUTINE 0x92EC
2655#define GL_COMPUTE_SUBROUTINE 0x92ED
2656#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE
2657#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF
2658#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0
2659#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1
2660#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2
2661#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3
2662#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4
2663#define GL_ACTIVE_RESOURCES 0x92F5
2664#define GL_MAX_NAME_LENGTH 0x92F6
2665#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7
2666#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8
2667#define GL_NAME_LENGTH 0x92F9
2668#define GL_TYPE 0x92FA
2669#define GL_ARRAY_SIZE 0x92FB
2670#define GL_OFFSET 0x92FC
2671#define GL_BLOCK_INDEX 0x92FD
2672#define GL_ARRAY_STRIDE 0x92FE
2673#define GL_MATRIX_STRIDE 0x92FF
2674#define GL_IS_ROW_MAJOR 0x9300
2675#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301
2676#define GL_BUFFER_BINDING 0x9302
2677#define GL_BUFFER_DATA_SIZE 0x9303
2678#define GL_NUM_ACTIVE_VARIABLES 0x9304
2679#define GL_ACTIVE_VARIABLES 0x9305
2680#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306
2681#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307
2682#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308
2683#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309
2684#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A
2685#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B
2686#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C
2687#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D
2688#define GL_LOCATION 0x930E
2689#define GL_LOCATION_INDEX 0x930F
2690#define GL_IS_PER_PATCH 0x92E7
2691#define GL_SHADER_STORAGE_BUFFER 0x90D2
2692#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3
2693#define GL_SHADER_STORAGE_BUFFER_START 0x90D4
2694#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5
2695#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
2696#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
2697#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
2698#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
2699#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
2700#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
2701#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
2702#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
2703#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE
2704#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
2705#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000
2706#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39
2707#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA
2708#define GL_TEXTURE_BUFFER_OFFSET 0x919D
2709#define GL_TEXTURE_BUFFER_SIZE 0x919E
2710#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F
2711#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB
2712#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC
2713#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD
2714#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE
2715#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
2716#define GL_VERTEX_ATTRIB_BINDING 0x82D4
2717#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5
2718#define GL_VERTEX_BINDING_DIVISOR 0x82D6
2719#define GL_VERTEX_BINDING_OFFSET 0x82D7
2720#define GL_VERTEX_BINDING_STRIDE 0x82D8
2721#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
2722#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
2723#define GL_VERTEX_BINDING_BUFFER 0x8F4F
2724#define GL_DISPLAY_LIST 0x82E7
2725typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
2726typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
2727typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
2728typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);
2729typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
2730typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
2731typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
2732typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64 *params);
2733typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
2734typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);
2735typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
2736typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);
2737typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
2738typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
2739typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
2740typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
2741typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
2742typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2743typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2744typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLint *params);
2745typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2746typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2747typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
2748typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2749typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
2750typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
2751typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
2752typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
2753typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
2754typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2755typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2756typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
2757typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
2758typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2759typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2760typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
2761typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2762typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
2763typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
2764typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
2765typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
2766typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
2767typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
2768#ifdef GL_GLEXT_PROTOTYPES
2769GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
2770GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
2771GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
2772GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);
2773GLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
2774GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
2775GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
2776GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64 *params);
2777GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
2778GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);
2779GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);
2780GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);
2781GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
2782GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
2783GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
2784GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
2785GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
2786GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
2787GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2788GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLint *params);
2789GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
2790GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);
2791GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
2792GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2793GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
2794GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
2795GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
2796GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
2797GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
2798GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2799GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2800GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
2801GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
2802GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2803GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2804GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
2805GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2806GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
2807GLAPI void APIENTRY glPopDebugGroup (void);
2808GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
2809GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
2810GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
2811GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
2812#endif
2813#endif /* GL_VERSION_4_3 */
2814
2815#ifndef GL_VERSION_4_4
2816#define GL_VERSION_4_4 1
2817#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
2818#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
2819#define GL_TEXTURE_BUFFER_BINDING 0x8C2A
2820#define GL_MAP_PERSISTENT_BIT 0x0040
2821#define GL_MAP_COHERENT_BIT 0x0080
2822#define GL_DYNAMIC_STORAGE_BIT 0x0100
2823#define GL_CLIENT_STORAGE_BIT 0x0200
2824#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000
2825#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
2826#define GL_BUFFER_STORAGE_FLAGS 0x8220
2827#define GL_CLEAR_TEXTURE 0x9365
2828#define GL_LOCATION_COMPONENT 0x934A
2829#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B
2830#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C
2831#define GL_QUERY_BUFFER 0x9192
2832#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000
2833#define GL_QUERY_BUFFER_BINDING 0x9193
2834#define GL_QUERY_RESULT_NO_WAIT 0x9194
2835#define GL_MIRROR_CLAMP_TO_EDGE 0x8743
2836typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
2837typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
2838typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
2839typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
2840typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
2841typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
2842typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers);
2843typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
2844typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
2845#ifdef GL_GLEXT_PROTOTYPES
2846GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
2847GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
2848GLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
2849GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
2850GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
2851GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures);
2852GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers);
2853GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures);
2854GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
2855#endif
2856#endif /* GL_VERSION_4_4 */
2857
2858#ifndef GL_VERSION_4_5
2859#define GL_VERSION_4_5 1
2860#define GL_CONTEXT_LOST 0x0507
2861#define GL_NEGATIVE_ONE_TO_ONE 0x935E
2862#define GL_ZERO_TO_ONE 0x935F
2863#define GL_CLIP_ORIGIN 0x935C
2864#define GL_CLIP_DEPTH_MODE 0x935D
2865#define GL_QUERY_WAIT_INVERTED 0x8E17
2866#define GL_QUERY_NO_WAIT_INVERTED 0x8E18
2867#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19
2868#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A
2869#define GL_MAX_CULL_DISTANCES 0x82F9
2870#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA
2871#define GL_TEXTURE_TARGET 0x1006
2872#define GL_QUERY_TARGET 0x82EA
2873#define GL_GUILTY_CONTEXT_RESET 0x8253
2874#define GL_INNOCENT_CONTEXT_RESET 0x8254
2875#define GL_UNKNOWN_CONTEXT_RESET 0x8255
2876#define GL_RESET_NOTIFICATION_STRATEGY 0x8256
2877#define GL_LOSE_CONTEXT_ON_RESET 0x8252
2878#define GL_NO_RESET_NOTIFICATION 0x8261
2879#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004
2880#define GL_COLOR_TABLE 0x80D0
2881#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
2882#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
2883#define GL_PROXY_COLOR_TABLE 0x80D3
2884#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
2885#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
2886#define GL_CONVOLUTION_1D 0x8010
2887#define GL_CONVOLUTION_2D 0x8011
2888#define GL_SEPARABLE_2D 0x8012
2889#define GL_HISTOGRAM 0x8024
2890#define GL_PROXY_HISTOGRAM 0x8025
2891#define GL_MINMAX 0x802E
2892#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB
2893#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
2894typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth);
2895typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
2896typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer);
2897typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
2898typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint *param);
2899typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param);
2900typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
2901typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers);
2902typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
2903typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
2904typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
2905typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
2906typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
2907typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
2908typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access);
2909typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
2910typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer);
2911typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
2912typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params);
2913typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params);
2914typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params);
2915typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
2916typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
2917typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
2918typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param);
2919typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
2920typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
2921typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) (GLuint framebuffer, GLenum buf);
2922typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
2923typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) (GLuint framebuffer, GLenum src);
2924typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
2925typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
2926typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
2927typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
2928typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
2929typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
2930typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
2931typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target);
2932typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint *param);
2933typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
2934typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
2935typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
2936typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
2937typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
2938typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures);
2939typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer);
2940typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2941typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
2942typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2943typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2944typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
2945typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
2946typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
2947typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
2948typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
2949typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
2950typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
2951typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
2952typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
2953typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
2954typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
2955typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC) (GLuint texture, GLenum pname, GLfloat param);
2956typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat *param);
2957typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC) (GLuint texture, GLenum pname, GLint param);
2958typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint *params);
2959typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint *params);
2960typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint *param);
2961typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC) (GLuint texture);
2962typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC) (GLuint unit, GLuint texture);
2963typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
2964typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLsizei bufSize, void *pixels);
2965typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC) (GLuint texture, GLint level, GLenum pname, GLfloat *params);
2966typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC) (GLuint texture, GLint level, GLenum pname, GLint *params);
2967typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, GLfloat *params);
2968typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, GLint *params);
2969typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, GLuint *params);
2970typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, GLint *params);
2971typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
2972typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
2973typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
2974typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC) (GLuint vaobj, GLuint buffer);
2975typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
2976typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
2977typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
2978typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
2979typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2980typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2981typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
2982typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC) (GLuint vaobj, GLenum pname, GLint *param);
2983typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
2984typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
2985typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint *samplers);
2986typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
2987typedef void (APIENTRYP PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint *ids);
2988typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
2989typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
2990typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
2991typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
2992typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers);
2993typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
2994typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
2995typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void);
2996typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLsizei bufSize, void *pixels);
2997typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
2998typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
2999typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
3000typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
3001typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
3002typedef void (APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
3003typedef void (APIENTRYP PFNGLGETNMAPDVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
3004typedef void (APIENTRYP PFNGLGETNMAPFVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
3005typedef void (APIENTRYP PFNGLGETNMAPIVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
3006typedef void (APIENTRYP PFNGLGETNPIXELMAPFVPROC) (GLenum map, GLsizei bufSize, GLfloat *values);
3007typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVPROC) (GLenum map, GLsizei bufSize, GLuint *values);
3008typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVPROC) (GLenum map, GLsizei bufSize, GLushort *values);
3009typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEPROC) (GLsizei bufSize, GLubyte *pattern);
3010typedef void (APIENTRYP PFNGLGETNCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
3011typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
3012typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
3013typedef void (APIENTRYP PFNGLGETNHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3014typedef void (APIENTRYP PFNGLGETNMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3015typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void);
3016#ifdef GL_GLEXT_PROTOTYPES
3017GLAPI void APIENTRY glClipControl (GLenum origin, GLenum depth);
3018GLAPI void APIENTRY glCreateTransformFeedbacks (GLsizei n, GLuint *ids);
3019GLAPI void APIENTRY glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer);
3020GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
3021GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint *param);
3022GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint *param);
3023GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
3024GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers);
3025GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
3026GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
3027GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
3028GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
3029GLAPI void APIENTRY glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
3030GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
3031GLAPI void *APIENTRY glMapNamedBuffer (GLuint buffer, GLenum access);
3032GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
3033GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer);
3034GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length);
3035GLAPI void APIENTRY glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint *params);
3036GLAPI void APIENTRY glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64 *params);
3037GLAPI void APIENTRY glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void **params);
3038GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
3039GLAPI void APIENTRY glCreateFramebuffers (GLsizei n, GLuint *framebuffers);
3040GLAPI void APIENTRY glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
3041GLAPI void APIENTRY glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param);
3042GLAPI void APIENTRY glNamedFramebufferTexture (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
3043GLAPI void APIENTRY glNamedFramebufferTextureLayer (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
3044GLAPI void APIENTRY glNamedFramebufferDrawBuffer (GLuint framebuffer, GLenum buf);
3045GLAPI void APIENTRY glNamedFramebufferDrawBuffers (GLuint framebuffer, GLsizei n, const GLenum *bufs);
3046GLAPI void APIENTRY glNamedFramebufferReadBuffer (GLuint framebuffer, GLenum src);
3047GLAPI void APIENTRY glInvalidateNamedFramebufferData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
3048GLAPI void APIENTRY glInvalidateNamedFramebufferSubData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
3049GLAPI void APIENTRY glClearNamedFramebufferiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
3050GLAPI void APIENTRY glClearNamedFramebufferuiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
3051GLAPI void APIENTRY glClearNamedFramebufferfv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
3052GLAPI void APIENTRY glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
3053GLAPI void APIENTRY glBlitNamedFramebuffer (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
3054GLAPI GLenum APIENTRY glCheckNamedFramebufferStatus (GLuint framebuffer, GLenum target);
3055GLAPI void APIENTRY glGetNamedFramebufferParameteriv (GLuint framebuffer, GLenum pname, GLint *param);
3056GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameteriv (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
3057GLAPI void APIENTRY glCreateRenderbuffers (GLsizei n, GLuint *renderbuffers);
3058GLAPI void APIENTRY glNamedRenderbufferStorage (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
3059GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
3060GLAPI void APIENTRY glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint *params);
3061GLAPI void APIENTRY glCreateTextures (GLenum target, GLsizei n, GLuint *textures);
3062GLAPI void APIENTRY glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer);
3063GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
3064GLAPI void APIENTRY glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
3065GLAPI void APIENTRY glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
3066GLAPI void APIENTRY glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
3067GLAPI void APIENTRY glTextureStorage2DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
3068GLAPI void APIENTRY glTextureStorage3DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
3069GLAPI void APIENTRY glTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
3070GLAPI void APIENTRY glTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
3071GLAPI void APIENTRY glTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
3072GLAPI void APIENTRY glCompressedTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
3073GLAPI void APIENTRY glCompressedTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
3074GLAPI void APIENTRY glCompressedTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
3075GLAPI void APIENTRY glCopyTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
3076GLAPI void APIENTRY glCopyTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
3077GLAPI void APIENTRY glCopyTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
3078GLAPI void APIENTRY glTextureParameterf (GLuint texture, GLenum pname, GLfloat param);
3079GLAPI void APIENTRY glTextureParameterfv (GLuint texture, GLenum pname, const GLfloat *param);
3080GLAPI void APIENTRY glTextureParameteri (GLuint texture, GLenum pname, GLint param);
3081GLAPI void APIENTRY glTextureParameterIiv (GLuint texture, GLenum pname, const GLint *params);
3082GLAPI void APIENTRY glTextureParameterIuiv (GLuint texture, GLenum pname, const GLuint *params);
3083GLAPI void APIENTRY glTextureParameteriv (GLuint texture, GLenum pname, const GLint *param);
3084GLAPI void APIENTRY glGenerateTextureMipmap (GLuint texture);
3085GLAPI void APIENTRY glBindTextureUnit (GLuint unit, GLuint texture);
3086GLAPI void APIENTRY glGetTextureImage (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
3087GLAPI void APIENTRY glGetCompressedTextureImage (GLuint texture, GLint level, GLsizei bufSize, void *pixels);
3088GLAPI void APIENTRY glGetTextureLevelParameterfv (GLuint texture, GLint level, GLenum pname, GLfloat *params);
3089GLAPI void APIENTRY glGetTextureLevelParameteriv (GLuint texture, GLint level, GLenum pname, GLint *params);
3090GLAPI void APIENTRY glGetTextureParameterfv (GLuint texture, GLenum pname, GLfloat *params);
3091GLAPI void APIENTRY glGetTextureParameterIiv (GLuint texture, GLenum pname, GLint *params);
3092GLAPI void APIENTRY glGetTextureParameterIuiv (GLuint texture, GLenum pname, GLuint *params);
3093GLAPI void APIENTRY glGetTextureParameteriv (GLuint texture, GLenum pname, GLint *params);
3094GLAPI void APIENTRY glCreateVertexArrays (GLsizei n, GLuint *arrays);
3095GLAPI void APIENTRY glDisableVertexArrayAttrib (GLuint vaobj, GLuint index);
3096GLAPI void APIENTRY glEnableVertexArrayAttrib (GLuint vaobj, GLuint index);
3097GLAPI void APIENTRY glVertexArrayElementBuffer (GLuint vaobj, GLuint buffer);
3098GLAPI void APIENTRY glVertexArrayVertexBuffer (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
3099GLAPI void APIENTRY glVertexArrayVertexBuffers (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
3100GLAPI void APIENTRY glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
3101GLAPI void APIENTRY glVertexArrayAttribFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
3102GLAPI void APIENTRY glVertexArrayAttribIFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
3103GLAPI void APIENTRY glVertexArrayAttribLFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
3104GLAPI void APIENTRY glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor);
3105GLAPI void APIENTRY glGetVertexArrayiv (GLuint vaobj, GLenum pname, GLint *param);
3106GLAPI void APIENTRY glGetVertexArrayIndexediv (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
3107GLAPI void APIENTRY glGetVertexArrayIndexed64iv (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
3108GLAPI void APIENTRY glCreateSamplers (GLsizei n, GLuint *samplers);
3109GLAPI void APIENTRY glCreateProgramPipelines (GLsizei n, GLuint *pipelines);
3110GLAPI void APIENTRY glCreateQueries (GLenum target, GLsizei n, GLuint *ids);
3111GLAPI void APIENTRY glGetQueryBufferObjecti64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
3112GLAPI void APIENTRY glGetQueryBufferObjectiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
3113GLAPI void APIENTRY glGetQueryBufferObjectui64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
3114GLAPI void APIENTRY glGetQueryBufferObjectuiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
3115GLAPI void APIENTRY glMemoryBarrierByRegion (GLbitfield barriers);
3116GLAPI void APIENTRY glGetTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
3117GLAPI void APIENTRY glGetCompressedTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
3118GLAPI GLenum APIENTRY glGetGraphicsResetStatus (void);
3119GLAPI void APIENTRY glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, void *pixels);
3120GLAPI void APIENTRY glGetnTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
3121GLAPI void APIENTRY glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
3122GLAPI void APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
3123GLAPI void APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params);
3124GLAPI void APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
3125GLAPI void APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
3126GLAPI void APIENTRY glGetnMapdv (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
3127GLAPI void APIENTRY glGetnMapfv (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
3128GLAPI void APIENTRY glGetnMapiv (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
3129GLAPI void APIENTRY glGetnPixelMapfv (GLenum map, GLsizei bufSize, GLfloat *values);
3130GLAPI void APIENTRY glGetnPixelMapuiv (GLenum map, GLsizei bufSize, GLuint *values);
3131GLAPI void APIENTRY glGetnPixelMapusv (GLenum map, GLsizei bufSize, GLushort *values);
3132GLAPI void APIENTRY glGetnPolygonStipple (GLsizei bufSize, GLubyte *pattern);
3133GLAPI void APIENTRY glGetnColorTable (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
3134GLAPI void APIENTRY glGetnConvolutionFilter (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
3135GLAPI void APIENTRY glGetnSeparableFilter (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
3136GLAPI void APIENTRY glGetnHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3137GLAPI void APIENTRY glGetnMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3138GLAPI void APIENTRY glTextureBarrier (void);
3139#endif
3140#endif /* GL_VERSION_4_5 */
3141
3142#ifndef GL_VERSION_4_6
3143#define GL_VERSION_4_6 1
3144#define GL_SHADER_BINARY_FORMAT_SPIR_V 0x9551
3145#define GL_SPIR_V_BINARY 0x9552
3146#define GL_PARAMETER_BUFFER 0x80EE
3147#define GL_PARAMETER_BUFFER_BINDING 0x80EF
3148#define GL_CONTEXT_FLAG_NO_ERROR_BIT 0x00000008
3149#define GL_VERTICES_SUBMITTED 0x82EE
3150#define GL_PRIMITIVES_SUBMITTED 0x82EF
3151#define GL_VERTEX_SHADER_INVOCATIONS 0x82F0
3152#define GL_TESS_CONTROL_SHADER_PATCHES 0x82F1
3153#define GL_TESS_EVALUATION_SHADER_INVOCATIONS 0x82F2
3154#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED 0x82F3
3155#define GL_FRAGMENT_SHADER_INVOCATIONS 0x82F4
3156#define GL_COMPUTE_SHADER_INVOCATIONS 0x82F5
3157#define GL_CLIPPING_INPUT_PRIMITIVES 0x82F6
3158#define GL_CLIPPING_OUTPUT_PRIMITIVES 0x82F7
3159#define GL_POLYGON_OFFSET_CLAMP 0x8E1B
3160#define GL_SPIR_V_EXTENSIONS 0x9553
3161#define GL_NUM_SPIR_V_EXTENSIONS 0x9554
3162#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE
3163#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF
3164#define GL_TRANSFORM_FEEDBACK_OVERFLOW 0x82EC
3165#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW 0x82ED
3166typedef void (APIENTRYP PFNGLSPECIALIZESHADERPROC) (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue);
3167typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC) (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3168typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC) (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3169typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPPROC) (GLfloat factor, GLfloat units, GLfloat clamp);
3170#ifdef GL_GLEXT_PROTOTYPES
3171GLAPI void APIENTRY glSpecializeShader (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue);
3172GLAPI void APIENTRY glMultiDrawArraysIndirectCount (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3173GLAPI void APIENTRY glMultiDrawElementsIndirectCount (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3174GLAPI void APIENTRY glPolygonOffsetClamp (GLfloat factor, GLfloat units, GLfloat clamp);
3175#endif
3176#endif /* GL_VERSION_4_6 */
3177
3178#ifndef GL_ARB_ES2_compatibility
3179#define GL_ARB_ES2_compatibility 1
3180#endif /* GL_ARB_ES2_compatibility */
3181
3182#ifndef GL_ARB_ES3_1_compatibility
3183#define GL_ARB_ES3_1_compatibility 1
3184#endif /* GL_ARB_ES3_1_compatibility */
3185
3186#ifndef GL_ARB_ES3_2_compatibility
3187#define GL_ARB_ES3_2_compatibility 1
3188#define GL_PRIMITIVE_BOUNDING_BOX_ARB 0x92BE
3189#define GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB 0x9381
3190#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB 0x9382
3191typedef void (APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXARBPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
3192#ifdef GL_GLEXT_PROTOTYPES
3193GLAPI void APIENTRY glPrimitiveBoundingBoxARB (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
3194#endif
3195#endif /* GL_ARB_ES3_2_compatibility */
3196
3197#ifndef GL_ARB_ES3_compatibility
3198#define GL_ARB_ES3_compatibility 1
3199#endif /* GL_ARB_ES3_compatibility */
3200
3201#ifndef GL_ARB_arrays_of_arrays
3202#define GL_ARB_arrays_of_arrays 1
3203#endif /* GL_ARB_arrays_of_arrays */
3204
3205#ifndef GL_ARB_base_instance
3206#define GL_ARB_base_instance 1
3207#endif /* GL_ARB_base_instance */
3208
3209#ifndef GL_ARB_bindless_texture
3210#define GL_ARB_bindless_texture 1
3211typedef khronos_uint64_t GLuint64EXT;
3212#define GL_UNSIGNED_INT64_ARB 0x140F
3213typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);
3214typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);
3215typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
3216typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle);
3217typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
3218typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);
3219typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle);
3220typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value);
3221typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
3222typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value);
3223typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
3224typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
3225typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle);
3226typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);
3227typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v);
3228typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
3229#ifdef GL_GLEXT_PROTOTYPES
3230GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture);
3231GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler);
3232GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle);
3233GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle);
3234GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
3235GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access);
3236GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle);
3237GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value);
3238GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value);
3239GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value);
3240GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
3241GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle);
3242GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle);
3243GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x);
3244GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v);
3245GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params);
3246#endif
3247#endif /* GL_ARB_bindless_texture */
3248
3249#ifndef GL_ARB_blend_func_extended
3250#define GL_ARB_blend_func_extended 1
3251#endif /* GL_ARB_blend_func_extended */
3252
3253#ifndef GL_ARB_buffer_storage
3254#define GL_ARB_buffer_storage 1
3255#endif /* GL_ARB_buffer_storage */
3256
3257#ifndef GL_ARB_cl_event
3258#define GL_ARB_cl_event 1
3259struct _cl_context;
3260struct _cl_event;
3261#define GL_SYNC_CL_EVENT_ARB 0x8240
3262#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241
3263typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
3264#ifdef GL_GLEXT_PROTOTYPES
3265GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
3266#endif
3267#endif /* GL_ARB_cl_event */
3268
3269#ifndef GL_ARB_clear_buffer_object
3270#define GL_ARB_clear_buffer_object 1
3271#endif /* GL_ARB_clear_buffer_object */
3272
3273#ifndef GL_ARB_clear_texture
3274#define GL_ARB_clear_texture 1
3275#endif /* GL_ARB_clear_texture */
3276
3277#ifndef GL_ARB_clip_control
3278#define GL_ARB_clip_control 1
3279#endif /* GL_ARB_clip_control */
3280
3281#ifndef GL_ARB_color_buffer_float
3282#define GL_ARB_color_buffer_float 1
3283#define GL_RGBA_FLOAT_MODE_ARB 0x8820
3284#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
3285#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
3286#define GL_CLAMP_READ_COLOR_ARB 0x891C
3287#define GL_FIXED_ONLY_ARB 0x891D
3288typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
3289#ifdef GL_GLEXT_PROTOTYPES
3290GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp);
3291#endif
3292#endif /* GL_ARB_color_buffer_float */
3293
3294#ifndef GL_ARB_compatibility
3295#define GL_ARB_compatibility 1
3296#endif /* GL_ARB_compatibility */
3297
3298#ifndef GL_ARB_compressed_texture_pixel_storage
3299#define GL_ARB_compressed_texture_pixel_storage 1
3300#endif /* GL_ARB_compressed_texture_pixel_storage */
3301
3302#ifndef GL_ARB_compute_shader
3303#define GL_ARB_compute_shader 1
3304#endif /* GL_ARB_compute_shader */
3305
3306#ifndef GL_ARB_compute_variable_group_size
3307#define GL_ARB_compute_variable_group_size 1
3308#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344
3309#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB
3310#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345
3311#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF
3312typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
3313#ifdef GL_GLEXT_PROTOTYPES
3314GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
3315#endif
3316#endif /* GL_ARB_compute_variable_group_size */
3317
3318#ifndef GL_ARB_conditional_render_inverted
3319#define GL_ARB_conditional_render_inverted 1
3320#endif /* GL_ARB_conditional_render_inverted */
3321
3322#ifndef GL_ARB_conservative_depth
3323#define GL_ARB_conservative_depth 1
3324#endif /* GL_ARB_conservative_depth */
3325
3326#ifndef GL_ARB_copy_buffer
3327#define GL_ARB_copy_buffer 1
3328#endif /* GL_ARB_copy_buffer */
3329
3330#ifndef GL_ARB_copy_image
3331#define GL_ARB_copy_image 1
3332#endif /* GL_ARB_copy_image */
3333
3334#ifndef GL_ARB_cull_distance
3335#define GL_ARB_cull_distance 1
3336#endif /* GL_ARB_cull_distance */
3337
3338#ifndef GL_ARB_debug_output
3339#define GL_ARB_debug_output 1
3340typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
3341#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
3342#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
3343#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
3344#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245
3345#define GL_DEBUG_SOURCE_API_ARB 0x8246
3346#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
3347#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
3348#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
3349#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A
3350#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B
3351#define GL_DEBUG_TYPE_ERROR_ARB 0x824C
3352#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
3353#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
3354#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F
3355#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250
3356#define GL_DEBUG_TYPE_OTHER_ARB 0x8251
3357#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
3358#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
3359#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145
3360#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146
3361#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
3362#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
3363typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
3364typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
3365typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);
3366typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
3367#ifdef GL_GLEXT_PROTOTYPES
3368GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
3369GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
3370GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam);
3371GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
3372#endif
3373#endif /* GL_ARB_debug_output */
3374
3375#ifndef GL_ARB_depth_buffer_float
3376#define GL_ARB_depth_buffer_float 1
3377#endif /* GL_ARB_depth_buffer_float */
3378
3379#ifndef GL_ARB_depth_clamp
3380#define GL_ARB_depth_clamp 1
3381#endif /* GL_ARB_depth_clamp */
3382
3383#ifndef GL_ARB_depth_texture
3384#define GL_ARB_depth_texture 1
3385#define GL_DEPTH_COMPONENT16_ARB 0x81A5
3386#define GL_DEPTH_COMPONENT24_ARB 0x81A6
3387#define GL_DEPTH_COMPONENT32_ARB 0x81A7
3388#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
3389#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
3390#endif /* GL_ARB_depth_texture */
3391
3392#ifndef GL_ARB_derivative_control
3393#define GL_ARB_derivative_control 1
3394#endif /* GL_ARB_derivative_control */
3395
3396#ifndef GL_ARB_direct_state_access
3397#define GL_ARB_direct_state_access 1
3398#endif /* GL_ARB_direct_state_access */
3399
3400#ifndef GL_ARB_draw_buffers
3401#define GL_ARB_draw_buffers 1
3402#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
3403#define GL_DRAW_BUFFER0_ARB 0x8825
3404#define GL_DRAW_BUFFER1_ARB 0x8826
3405#define GL_DRAW_BUFFER2_ARB 0x8827
3406#define GL_DRAW_BUFFER3_ARB 0x8828
3407#define GL_DRAW_BUFFER4_ARB 0x8829
3408#define GL_DRAW_BUFFER5_ARB 0x882A
3409#define GL_DRAW_BUFFER6_ARB 0x882B
3410#define GL_DRAW_BUFFER7_ARB 0x882C
3411#define GL_DRAW_BUFFER8_ARB 0x882D
3412#define GL_DRAW_BUFFER9_ARB 0x882E
3413#define GL_DRAW_BUFFER10_ARB 0x882F
3414#define GL_DRAW_BUFFER11_ARB 0x8830
3415#define GL_DRAW_BUFFER12_ARB 0x8831
3416#define GL_DRAW_BUFFER13_ARB 0x8832
3417#define GL_DRAW_BUFFER14_ARB 0x8833
3418#define GL_DRAW_BUFFER15_ARB 0x8834
3419typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
3420#ifdef GL_GLEXT_PROTOTYPES
3421GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs);
3422#endif
3423#endif /* GL_ARB_draw_buffers */
3424
3425#ifndef GL_ARB_draw_buffers_blend
3426#define GL_ARB_draw_buffers_blend 1
3427typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
3428typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
3429typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);
3430typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
3431#ifdef GL_GLEXT_PROTOTYPES
3432GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);
3433GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
3434GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);
3435GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
3436#endif
3437#endif /* GL_ARB_draw_buffers_blend */
3438
3439#ifndef GL_ARB_draw_elements_base_vertex
3440#define GL_ARB_draw_elements_base_vertex 1
3441#endif /* GL_ARB_draw_elements_base_vertex */
3442
3443#ifndef GL_ARB_draw_indirect
3444#define GL_ARB_draw_indirect 1
3445#endif /* GL_ARB_draw_indirect */
3446
3447#ifndef GL_ARB_draw_instanced
3448#define GL_ARB_draw_instanced 1
3449typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
3450typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
3451#ifdef GL_GLEXT_PROTOTYPES
3452GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
3453GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
3454#endif
3455#endif /* GL_ARB_draw_instanced */
3456
3457#ifndef GL_ARB_enhanced_layouts
3458#define GL_ARB_enhanced_layouts 1
3459#endif /* GL_ARB_enhanced_layouts */
3460
3461#ifndef GL_ARB_explicit_attrib_location
3462#define GL_ARB_explicit_attrib_location 1
3463#endif /* GL_ARB_explicit_attrib_location */
3464
3465#ifndef GL_ARB_explicit_uniform_location
3466#define GL_ARB_explicit_uniform_location 1
3467#endif /* GL_ARB_explicit_uniform_location */
3468
3469#ifndef GL_ARB_fragment_coord_conventions
3470#define GL_ARB_fragment_coord_conventions 1
3471#endif /* GL_ARB_fragment_coord_conventions */
3472
3473#ifndef GL_ARB_fragment_layer_viewport
3474#define GL_ARB_fragment_layer_viewport 1
3475#endif /* GL_ARB_fragment_layer_viewport */
3476
3477#ifndef GL_ARB_fragment_program
3478#define GL_ARB_fragment_program 1
3479#define GL_FRAGMENT_PROGRAM_ARB 0x8804
3480#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
3481#define GL_PROGRAM_LENGTH_ARB 0x8627
3482#define GL_PROGRAM_FORMAT_ARB 0x8876
3483#define GL_PROGRAM_BINDING_ARB 0x8677
3484#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
3485#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
3486#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
3487#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
3488#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
3489#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
3490#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
3491#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
3492#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
3493#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
3494#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
3495#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
3496#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
3497#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
3498#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
3499#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
3500#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
3501#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
3502#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
3503#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
3504#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
3505#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
3506#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
3507#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
3508#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
3509#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
3510#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
3511#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
3512#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
3513#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
3514#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
3515#define GL_PROGRAM_STRING_ARB 0x8628
3516#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
3517#define GL_CURRENT_MATRIX_ARB 0x8641
3518#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
3519#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
3520#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
3521#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
3522#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
3523#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
3524#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
3525#define GL_MATRIX0_ARB 0x88C0
3526#define GL_MATRIX1_ARB 0x88C1
3527#define GL_MATRIX2_ARB 0x88C2
3528#define GL_MATRIX3_ARB 0x88C3
3529#define GL_MATRIX4_ARB 0x88C4
3530#define GL_MATRIX5_ARB 0x88C5
3531#define GL_MATRIX6_ARB 0x88C6
3532#define GL_MATRIX7_ARB 0x88C7
3533#define GL_MATRIX8_ARB 0x88C8
3534#define GL_MATRIX9_ARB 0x88C9
3535#define GL_MATRIX10_ARB 0x88CA
3536#define GL_MATRIX11_ARB 0x88CB
3537#define GL_MATRIX12_ARB 0x88CC
3538#define GL_MATRIX13_ARB 0x88CD
3539#define GL_MATRIX14_ARB 0x88CE
3540#define GL_MATRIX15_ARB 0x88CF
3541#define GL_MATRIX16_ARB 0x88D0
3542#define GL_MATRIX17_ARB 0x88D1
3543#define GL_MATRIX18_ARB 0x88D2
3544#define GL_MATRIX19_ARB 0x88D3
3545#define GL_MATRIX20_ARB 0x88D4
3546#define GL_MATRIX21_ARB 0x88D5
3547#define GL_MATRIX22_ARB 0x88D6
3548#define GL_MATRIX23_ARB 0x88D7
3549#define GL_MATRIX24_ARB 0x88D8
3550#define GL_MATRIX25_ARB 0x88D9
3551#define GL_MATRIX26_ARB 0x88DA
3552#define GL_MATRIX27_ARB 0x88DB
3553#define GL_MATRIX28_ARB 0x88DC
3554#define GL_MATRIX29_ARB 0x88DD
3555#define GL_MATRIX30_ARB 0x88DE
3556#define GL_MATRIX31_ARB 0x88DF
3557typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string);
3558typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
3559typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
3560typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
3561typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
3562typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
3563typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
3564typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
3565typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
3566typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
3567typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
3568typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
3569typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
3570typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
3571typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
3572typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
3573typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
3574typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string);
3575typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
3576#ifdef GL_GLEXT_PROTOTYPES
3577GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string);
3578GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program);
3579GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs);
3580GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs);
3581GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
3582GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
3583GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
3584GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
3585GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
3586GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
3587GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
3588GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
3589GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);
3590GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);
3591GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);
3592GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);
3593GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params);
3594GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string);
3595GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program);
3596#endif
3597#endif /* GL_ARB_fragment_program */
3598
3599#ifndef GL_ARB_fragment_program_shadow
3600#define GL_ARB_fragment_program_shadow 1
3601#endif /* GL_ARB_fragment_program_shadow */
3602
3603#ifndef GL_ARB_fragment_shader
3604#define GL_ARB_fragment_shader 1
3605#define GL_FRAGMENT_SHADER_ARB 0x8B30
3606#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
3607#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
3608#endif /* GL_ARB_fragment_shader */
3609
3610#ifndef GL_ARB_fragment_shader_interlock
3611#define GL_ARB_fragment_shader_interlock 1
3612#endif /* GL_ARB_fragment_shader_interlock */
3613
3614#ifndef GL_ARB_framebuffer_no_attachments
3615#define GL_ARB_framebuffer_no_attachments 1
3616#endif /* GL_ARB_framebuffer_no_attachments */
3617
3618#ifndef GL_ARB_framebuffer_object
3619#define GL_ARB_framebuffer_object 1
3620#endif /* GL_ARB_framebuffer_object */
3621
3622#ifndef GL_ARB_framebuffer_sRGB
3623#define GL_ARB_framebuffer_sRGB 1
3624#endif /* GL_ARB_framebuffer_sRGB */
3625
3626#ifndef GL_ARB_geometry_shader4
3627#define GL_ARB_geometry_shader4 1
3628#define GL_LINES_ADJACENCY_ARB 0x000A
3629#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B
3630#define GL_TRIANGLES_ADJACENCY_ARB 0x000C
3631#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D
3632#define GL_PROGRAM_POINT_SIZE_ARB 0x8642
3633#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
3634#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
3635#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
3636#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
3637#define GL_GEOMETRY_SHADER_ARB 0x8DD9
3638#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA
3639#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB
3640#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC
3641#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
3642#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
3643#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
3644#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
3645#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
3646typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);
3647typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
3648typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
3649typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
3650#ifdef GL_GLEXT_PROTOTYPES
3651GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value);
3652GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level);
3653GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
3654GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
3655#endif
3656#endif /* GL_ARB_geometry_shader4 */
3657
3658#ifndef GL_ARB_get_program_binary
3659#define GL_ARB_get_program_binary 1
3660#endif /* GL_ARB_get_program_binary */
3661
3662#ifndef GL_ARB_get_texture_sub_image
3663#define GL_ARB_get_texture_sub_image 1
3664#endif /* GL_ARB_get_texture_sub_image */
3665
3666#ifndef GL_ARB_gl_spirv
3667#define GL_ARB_gl_spirv 1
3668#define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551
3669#define GL_SPIR_V_BINARY_ARB 0x9552
3670typedef void (APIENTRYP PFNGLSPECIALIZESHADERARBPROC) (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue);
3671#ifdef GL_GLEXT_PROTOTYPES
3672GLAPI void APIENTRY glSpecializeShaderARB (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue);
3673#endif
3674#endif /* GL_ARB_gl_spirv */
3675
3676#ifndef GL_ARB_gpu_shader5
3677#define GL_ARB_gpu_shader5 1
3678#endif /* GL_ARB_gpu_shader5 */
3679
3680#ifndef GL_ARB_gpu_shader_fp64
3681#define GL_ARB_gpu_shader_fp64 1
3682#endif /* GL_ARB_gpu_shader_fp64 */
3683
3684#ifndef GL_ARB_gpu_shader_int64
3685#define GL_ARB_gpu_shader_int64 1
3686#define GL_INT64_ARB 0x140E
3687#define GL_INT64_VEC2_ARB 0x8FE9
3688#define GL_INT64_VEC3_ARB 0x8FEA
3689#define GL_INT64_VEC4_ARB 0x8FEB
3690#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5
3691#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6
3692#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7
3693typedef void (APIENTRYP PFNGLUNIFORM1I64ARBPROC) (GLint location, GLint64 x);
3694typedef void (APIENTRYP PFNGLUNIFORM2I64ARBPROC) (GLint location, GLint64 x, GLint64 y);
3695typedef void (APIENTRYP PFNGLUNIFORM3I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z);
3696typedef void (APIENTRYP PFNGLUNIFORM4I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w);
3697typedef void (APIENTRYP PFNGLUNIFORM1I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value);
3698typedef void (APIENTRYP PFNGLUNIFORM2I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value);
3699typedef void (APIENTRYP PFNGLUNIFORM3I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value);
3700typedef void (APIENTRYP PFNGLUNIFORM4I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value);
3701typedef void (APIENTRYP PFNGLUNIFORM1UI64ARBPROC) (GLint location, GLuint64 x);
3702typedef void (APIENTRYP PFNGLUNIFORM2UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y);
3703typedef void (APIENTRYP PFNGLUNIFORM3UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z);
3704typedef void (APIENTRYP PFNGLUNIFORM4UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w);
3705typedef void (APIENTRYP PFNGLUNIFORM1UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
3706typedef void (APIENTRYP PFNGLUNIFORM2UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
3707typedef void (APIENTRYP PFNGLUNIFORM3UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
3708typedef void (APIENTRYP PFNGLUNIFORM4UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
3709typedef void (APIENTRYP PFNGLGETUNIFORMI64VARBPROC) (GLuint program, GLint location, GLint64 *params);
3710typedef void (APIENTRYP PFNGLGETUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLuint64 *params);
3711typedef void (APIENTRYP PFNGLGETNUNIFORMI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint64 *params);
3712typedef void (APIENTRYP PFNGLGETNUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params);
3713typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64ARBPROC) (GLuint program, GLint location, GLint64 x);
3714typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y);
3715typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z);
3716typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w);
3717typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value);
3718typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value);
3719typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value);
3720typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value);
3721typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64ARBPROC) (GLuint program, GLint location, GLuint64 x);
3722typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y);
3723typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z);
3724typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w);
3725typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
3726typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
3727typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
3728typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
3729#ifdef GL_GLEXT_PROTOTYPES
3730GLAPI void APIENTRY glUniform1i64ARB (GLint location, GLint64 x);
3731GLAPI void APIENTRY glUniform2i64ARB (GLint location, GLint64 x, GLint64 y);
3732GLAPI void APIENTRY glUniform3i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z);
3733GLAPI void APIENTRY glUniform4i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w);
3734GLAPI void APIENTRY glUniform1i64vARB (GLint location, GLsizei count, const GLint64 *value);
3735GLAPI void APIENTRY glUniform2i64vARB (GLint location, GLsizei count, const GLint64 *value);
3736GLAPI void APIENTRY glUniform3i64vARB (GLint location, GLsizei count, const GLint64 *value);
3737GLAPI void APIENTRY glUniform4i64vARB (GLint location, GLsizei count, const GLint64 *value);
3738GLAPI void APIENTRY glUniform1ui64ARB (GLint location, GLuint64 x);
3739GLAPI void APIENTRY glUniform2ui64ARB (GLint location, GLuint64 x, GLuint64 y);
3740GLAPI void APIENTRY glUniform3ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z);
3741GLAPI void APIENTRY glUniform4ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w);
3742GLAPI void APIENTRY glUniform1ui64vARB (GLint location, GLsizei count, const GLuint64 *value);
3743GLAPI void APIENTRY glUniform2ui64vARB (GLint location, GLsizei count, const GLuint64 *value);
3744GLAPI void APIENTRY glUniform3ui64vARB (GLint location, GLsizei count, const GLuint64 *value);
3745GLAPI void APIENTRY glUniform4ui64vARB (GLint location, GLsizei count, const GLuint64 *value);
3746GLAPI void APIENTRY glGetUniformi64vARB (GLuint program, GLint location, GLint64 *params);
3747GLAPI void APIENTRY glGetUniformui64vARB (GLuint program, GLint location, GLuint64 *params);
3748GLAPI void APIENTRY glGetnUniformi64vARB (GLuint program, GLint location, GLsizei bufSize, GLint64 *params);
3749GLAPI void APIENTRY glGetnUniformui64vARB (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params);
3750GLAPI void APIENTRY glProgramUniform1i64ARB (GLuint program, GLint location, GLint64 x);
3751GLAPI void APIENTRY glProgramUniform2i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y);
3752GLAPI void APIENTRY glProgramUniform3i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z);
3753GLAPI void APIENTRY glProgramUniform4i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w);
3754GLAPI void APIENTRY glProgramUniform1i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value);
3755GLAPI void APIENTRY glProgramUniform2i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value);
3756GLAPI void APIENTRY glProgramUniform3i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value);
3757GLAPI void APIENTRY glProgramUniform4i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value);
3758GLAPI void APIENTRY glProgramUniform1ui64ARB (GLuint program, GLint location, GLuint64 x);
3759GLAPI void APIENTRY glProgramUniform2ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y);
3760GLAPI void APIENTRY glProgramUniform3ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z);
3761GLAPI void APIENTRY glProgramUniform4ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w);
3762GLAPI void APIENTRY glProgramUniform1ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
3763GLAPI void APIENTRY glProgramUniform2ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
3764GLAPI void APIENTRY glProgramUniform3ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
3765GLAPI void APIENTRY glProgramUniform4ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
3766#endif
3767#endif /* GL_ARB_gpu_shader_int64 */
3768
3769#ifndef GL_ARB_half_float_pixel
3770#define GL_ARB_half_float_pixel 1
3771typedef khronos_uint16_t GLhalfARB;
3772#define GL_HALF_FLOAT_ARB 0x140B
3773#endif /* GL_ARB_half_float_pixel */
3774
3775#ifndef GL_ARB_half_float_vertex
3776#define GL_ARB_half_float_vertex 1
3777#endif /* GL_ARB_half_float_vertex */
3778
3779#ifndef GL_ARB_imaging
3780#define GL_ARB_imaging 1
3781#define GL_CONVOLUTION_BORDER_MODE 0x8013
3782#define GL_CONVOLUTION_FILTER_SCALE 0x8014
3783#define GL_CONVOLUTION_FILTER_BIAS 0x8015
3784#define GL_REDUCE 0x8016
3785#define GL_CONVOLUTION_FORMAT 0x8017
3786#define GL_CONVOLUTION_WIDTH 0x8018
3787#define GL_CONVOLUTION_HEIGHT 0x8019
3788#define GL_MAX_CONVOLUTION_WIDTH 0x801A
3789#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
3790#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
3791#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
3792#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
3793#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
3794#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
3795#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
3796#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
3797#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
3798#define GL_HISTOGRAM_WIDTH 0x8026
3799#define GL_HISTOGRAM_FORMAT 0x8027
3800#define GL_HISTOGRAM_RED_SIZE 0x8028
3801#define GL_HISTOGRAM_GREEN_SIZE 0x8029
3802#define GL_HISTOGRAM_BLUE_SIZE 0x802A
3803#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
3804#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
3805#define GL_HISTOGRAM_SINK 0x802D
3806#define GL_MINMAX_FORMAT 0x802F
3807#define GL_MINMAX_SINK 0x8030
3808#define GL_TABLE_TOO_LARGE 0x8031
3809#define GL_COLOR_MATRIX 0x80B1
3810#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
3811#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
3812#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
3813#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
3814#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
3815#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
3816#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
3817#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
3818#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
3819#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
3820#define GL_COLOR_TABLE_SCALE 0x80D6
3821#define GL_COLOR_TABLE_BIAS 0x80D7
3822#define GL_COLOR_TABLE_FORMAT 0x80D8
3823#define GL_COLOR_TABLE_WIDTH 0x80D9
3824#define GL_COLOR_TABLE_RED_SIZE 0x80DA
3825#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
3826#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
3827#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
3828#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
3829#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
3830#define GL_CONSTANT_BORDER 0x8151
3831#define GL_REPLICATE_BORDER 0x8153
3832#define GL_CONVOLUTION_BORDER_COLOR 0x8154
3833typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
3834typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
3835typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
3836typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3837typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table);
3838typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3839typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3840typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
3841typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
3842typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
3843typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
3844typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
3845typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
3846typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
3847typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
3848typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3849typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
3850typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image);
3851typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3852typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3853typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
3854typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
3855typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3856typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3857typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3858typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3859typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3860typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3861typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
3862typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
3863typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
3864typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
3865#ifdef GL_GLEXT_PROTOTYPES
3866GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
3867GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);
3868GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);
3869GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3870GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table);
3871GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);
3872GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);
3873GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
3874GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
3875GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
3876GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
3877GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);
3878GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);
3879GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params);
3880GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);
3881GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3882GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
3883GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image);
3884GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);
3885GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);
3886GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
3887GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
3888GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3889GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);
3890GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);
3891GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3892GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);
3893GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);
3894GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
3895GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink);
3896GLAPI void APIENTRY glResetHistogram (GLenum target);
3897GLAPI void APIENTRY glResetMinmax (GLenum target);
3898#endif
3899#endif /* GL_ARB_imaging */
3900
3901#ifndef GL_ARB_indirect_parameters
3902#define GL_ARB_indirect_parameters 1
3903#define GL_PARAMETER_BUFFER_ARB 0x80EE
3904#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF
3905typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3906typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3907#ifdef GL_GLEXT_PROTOTYPES
3908GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3909GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3910#endif
3911#endif /* GL_ARB_indirect_parameters */
3912
3913#ifndef GL_ARB_instanced_arrays
3914#define GL_ARB_instanced_arrays 1
3915#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
3916typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
3917#ifdef GL_GLEXT_PROTOTYPES
3918GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor);
3919#endif
3920#endif /* GL_ARB_instanced_arrays */
3921
3922#ifndef GL_ARB_internalformat_query
3923#define GL_ARB_internalformat_query 1
3924#endif /* GL_ARB_internalformat_query */
3925
3926#ifndef GL_ARB_internalformat_query2
3927#define GL_ARB_internalformat_query2 1
3928#define GL_SRGB_DECODE_ARB 0x8299
3929#define GL_VIEW_CLASS_EAC_R11 0x9383
3930#define GL_VIEW_CLASS_EAC_RG11 0x9384
3931#define GL_VIEW_CLASS_ETC2_RGB 0x9385
3932#define GL_VIEW_CLASS_ETC2_RGBA 0x9386
3933#define GL_VIEW_CLASS_ETC2_EAC_RGBA 0x9387
3934#define GL_VIEW_CLASS_ASTC_4x4_RGBA 0x9388
3935#define GL_VIEW_CLASS_ASTC_5x4_RGBA 0x9389
3936#define GL_VIEW_CLASS_ASTC_5x5_RGBA 0x938A
3937#define GL_VIEW_CLASS_ASTC_6x5_RGBA 0x938B
3938#define GL_VIEW_CLASS_ASTC_6x6_RGBA 0x938C
3939#define GL_VIEW_CLASS_ASTC_8x5_RGBA 0x938D
3940#define GL_VIEW_CLASS_ASTC_8x6_RGBA 0x938E
3941#define GL_VIEW_CLASS_ASTC_8x8_RGBA 0x938F
3942#define GL_VIEW_CLASS_ASTC_10x5_RGBA 0x9390
3943#define GL_VIEW_CLASS_ASTC_10x6_RGBA 0x9391
3944#define GL_VIEW_CLASS_ASTC_10x8_RGBA 0x9392
3945#define GL_VIEW_CLASS_ASTC_10x10_RGBA 0x9393
3946#define GL_VIEW_CLASS_ASTC_12x10_RGBA 0x9394
3947#define GL_VIEW_CLASS_ASTC_12x12_RGBA 0x9395
3948#endif /* GL_ARB_internalformat_query2 */
3949
3950#ifndef GL_ARB_invalidate_subdata
3951#define GL_ARB_invalidate_subdata 1
3952#endif /* GL_ARB_invalidate_subdata */
3953
3954#ifndef GL_ARB_map_buffer_alignment
3955#define GL_ARB_map_buffer_alignment 1
3956#endif /* GL_ARB_map_buffer_alignment */
3957
3958#ifndef GL_ARB_map_buffer_range
3959#define GL_ARB_map_buffer_range 1
3960#endif /* GL_ARB_map_buffer_range */
3961
3962#ifndef GL_ARB_matrix_palette
3963#define GL_ARB_matrix_palette 1
3964#define GL_MATRIX_PALETTE_ARB 0x8840
3965#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
3966#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
3967#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
3968#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
3969#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
3970#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
3971#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
3972#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
3973#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
3974typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
3975typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
3976typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
3977typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
3978typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
3979#ifdef GL_GLEXT_PROTOTYPES
3980GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index);
3981GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices);
3982GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices);
3983GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices);
3984GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
3985#endif
3986#endif /* GL_ARB_matrix_palette */
3987
3988#ifndef GL_ARB_multi_bind
3989#define GL_ARB_multi_bind 1
3990#endif /* GL_ARB_multi_bind */
3991
3992#ifndef GL_ARB_multi_draw_indirect
3993#define GL_ARB_multi_draw_indirect 1
3994#endif /* GL_ARB_multi_draw_indirect */
3995
3996#ifndef GL_ARB_multisample
3997#define GL_ARB_multisample 1
3998#define GL_MULTISAMPLE_ARB 0x809D
3999#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
4000#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
4001#define GL_SAMPLE_COVERAGE_ARB 0x80A0
4002#define GL_SAMPLE_BUFFERS_ARB 0x80A8
4003#define GL_SAMPLES_ARB 0x80A9
4004#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
4005#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
4006#define GL_MULTISAMPLE_BIT_ARB 0x20000000
4007typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert);
4008#ifdef GL_GLEXT_PROTOTYPES
4009GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert);
4010#endif
4011#endif /* GL_ARB_multisample */
4012
4013#ifndef GL_ARB_multitexture
4014#define GL_ARB_multitexture 1
4015#define GL_TEXTURE0_ARB 0x84C0
4016#define GL_TEXTURE1_ARB 0x84C1
4017#define GL_TEXTURE2_ARB 0x84C2
4018#define GL_TEXTURE3_ARB 0x84C3
4019#define GL_TEXTURE4_ARB 0x84C4
4020#define GL_TEXTURE5_ARB 0x84C5
4021#define GL_TEXTURE6_ARB 0x84C6
4022#define GL_TEXTURE7_ARB 0x84C7
4023#define GL_TEXTURE8_ARB 0x84C8
4024#define GL_TEXTURE9_ARB 0x84C9
4025#define GL_TEXTURE10_ARB 0x84CA
4026#define GL_TEXTURE11_ARB 0x84CB
4027#define GL_TEXTURE12_ARB 0x84CC
4028#define GL_TEXTURE13_ARB 0x84CD
4029#define GL_TEXTURE14_ARB 0x84CE
4030#define GL_TEXTURE15_ARB 0x84CF
4031#define GL_TEXTURE16_ARB 0x84D0
4032#define GL_TEXTURE17_ARB 0x84D1
4033#define GL_TEXTURE18_ARB 0x84D2
4034#define GL_TEXTURE19_ARB 0x84D3
4035#define GL_TEXTURE20_ARB 0x84D4
4036#define GL_TEXTURE21_ARB 0x84D5
4037#define GL_TEXTURE22_ARB 0x84D6
4038#define GL_TEXTURE23_ARB 0x84D7
4039#define GL_TEXTURE24_ARB 0x84D8
4040#define GL_TEXTURE25_ARB 0x84D9
4041#define GL_TEXTURE26_ARB 0x84DA
4042#define GL_TEXTURE27_ARB 0x84DB
4043#define GL_TEXTURE28_ARB 0x84DC
4044#define GL_TEXTURE29_ARB 0x84DD
4045#define GL_TEXTURE30_ARB 0x84DE
4046#define GL_TEXTURE31_ARB 0x84DF
4047#define GL_ACTIVE_TEXTURE_ARB 0x84E0
4048#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
4049#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
4050typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
4051typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
4052typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
4053typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
4054typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
4055typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
4056typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
4057typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
4058typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
4059typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
4060typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
4061typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
4062typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
4063typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
4064typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
4065typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
4066typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
4067typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
4068typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
4069typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
4070typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
4071typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
4072typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
4073typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
4074typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
4075typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
4076typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
4077typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
4078typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
4079typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
4080typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
4081typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
4082typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
4083typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
4084#ifdef GL_GLEXT_PROTOTYPES
4085GLAPI void APIENTRY glActiveTextureARB (GLenum texture);
4086GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture);
4087GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s);
4088GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);
4089GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s);
4090GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);
4091GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s);
4092GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v);
4093GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s);
4094GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v);
4095GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);
4096GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);
4097GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);
4098GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);
4099GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);
4100GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v);
4101GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);
4102GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v);
4103GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);
4104GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);
4105GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);
4106GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);
4107GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);
4108GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v);
4109GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);
4110GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v);
4111GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
4112GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);
4113GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
4114GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);
4115GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);
4116GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v);
4117GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
4118GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v);
4119#endif
4120#endif /* GL_ARB_multitexture */
4121
4122#ifndef GL_ARB_occlusion_query
4123#define GL_ARB_occlusion_query 1
4124#define GL_QUERY_COUNTER_BITS_ARB 0x8864
4125#define GL_CURRENT_QUERY_ARB 0x8865
4126#define GL_QUERY_RESULT_ARB 0x8866
4127#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
4128#define GL_SAMPLES_PASSED_ARB 0x8914
4129typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
4130typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
4131typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
4132typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
4133typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
4134typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
4135typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
4136typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
4137#ifdef GL_GLEXT_PROTOTYPES
4138GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids);
4139GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids);
4140GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id);
4141GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id);
4142GLAPI void APIENTRY glEndQueryARB (GLenum target);
4143GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params);
4144GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);
4145GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);
4146#endif
4147#endif /* GL_ARB_occlusion_query */
4148
4149#ifndef GL_ARB_occlusion_query2
4150#define GL_ARB_occlusion_query2 1
4151#endif /* GL_ARB_occlusion_query2 */
4152
4153#ifndef GL_ARB_parallel_shader_compile
4154#define GL_ARB_parallel_shader_compile 1
4155#define GL_MAX_SHADER_COMPILER_THREADS_ARB 0x91B0
4156#define GL_COMPLETION_STATUS_ARB 0x91B1
4157typedef void (APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSARBPROC) (GLuint count);
4158#ifdef GL_GLEXT_PROTOTYPES
4159GLAPI void APIENTRY glMaxShaderCompilerThreadsARB (GLuint count);
4160#endif
4161#endif /* GL_ARB_parallel_shader_compile */
4162
4163#ifndef GL_ARB_pipeline_statistics_query
4164#define GL_ARB_pipeline_statistics_query 1
4165#define GL_VERTICES_SUBMITTED_ARB 0x82EE
4166#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF
4167#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0
4168#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1
4169#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2
4170#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3
4171#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4
4172#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5
4173#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6
4174#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7
4175#endif /* GL_ARB_pipeline_statistics_query */
4176
4177#ifndef GL_ARB_pixel_buffer_object
4178#define GL_ARB_pixel_buffer_object 1
4179#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
4180#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
4181#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
4182#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
4183#endif /* GL_ARB_pixel_buffer_object */
4184
4185#ifndef GL_ARB_point_parameters
4186#define GL_ARB_point_parameters 1
4187#define GL_POINT_SIZE_MIN_ARB 0x8126
4188#define GL_POINT_SIZE_MAX_ARB 0x8127
4189#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
4190#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
4191typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
4192typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
4193#ifdef GL_GLEXT_PROTOTYPES
4194GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param);
4195GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params);
4196#endif
4197#endif /* GL_ARB_point_parameters */
4198
4199#ifndef GL_ARB_point_sprite
4200#define GL_ARB_point_sprite 1
4201#define GL_POINT_SPRITE_ARB 0x8861
4202#define GL_COORD_REPLACE_ARB 0x8862
4203#endif /* GL_ARB_point_sprite */
4204
4205#ifndef GL_ARB_polygon_offset_clamp
4206#define GL_ARB_polygon_offset_clamp 1
4207#endif /* GL_ARB_polygon_offset_clamp */
4208
4209#ifndef GL_ARB_post_depth_coverage
4210#define GL_ARB_post_depth_coverage 1
4211#endif /* GL_ARB_post_depth_coverage */
4212
4213#ifndef GL_ARB_program_interface_query
4214#define GL_ARB_program_interface_query 1
4215#endif /* GL_ARB_program_interface_query */
4216
4217#ifndef GL_ARB_provoking_vertex
4218#define GL_ARB_provoking_vertex 1
4219#endif /* GL_ARB_provoking_vertex */
4220
4221#ifndef GL_ARB_query_buffer_object
4222#define GL_ARB_query_buffer_object 1
4223#endif /* GL_ARB_query_buffer_object */
4224
4225#ifndef GL_ARB_robust_buffer_access_behavior
4226#define GL_ARB_robust_buffer_access_behavior 1
4227#endif /* GL_ARB_robust_buffer_access_behavior */
4228
4229#ifndef GL_ARB_robustness
4230#define GL_ARB_robustness 1
4231#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
4232#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
4233#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
4234#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
4235#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
4236#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
4237#define GL_NO_RESET_NOTIFICATION_ARB 0x8261
4238typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
4239typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
4240typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
4241typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img);
4242typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
4243typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
4244typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
4245typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
4246typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
4247typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
4248typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
4249typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values);
4250typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values);
4251typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values);
4252typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern);
4253typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
4254typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
4255typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
4256typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
4257typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
4258#ifdef GL_GLEXT_PROTOTYPES
4259GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);
4260GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
4261GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
4262GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img);
4263GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
4264GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);
4265GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
4266GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
4267GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
4268GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
4269GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
4270GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values);
4271GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values);
4272GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values);
4273GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern);
4274GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
4275GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
4276GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
4277GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
4278GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
4279#endif
4280#endif /* GL_ARB_robustness */
4281
4282#ifndef GL_ARB_robustness_isolation
4283#define GL_ARB_robustness_isolation 1
4284#endif /* GL_ARB_robustness_isolation */
4285
4286#ifndef GL_ARB_sample_locations
4287#define GL_ARB_sample_locations 1
4288#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB 0x933D
4289#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB 0x933E
4290#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB 0x933F
4291#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB 0x9340
4292#define GL_SAMPLE_LOCATION_ARB 0x8E50
4293#define GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341
4294#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB 0x9342
4295#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB 0x9343
4296typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v);
4297typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
4298typedef void (APIENTRYP PFNGLEVALUATEDEPTHVALUESARBPROC) (void);
4299#ifdef GL_GLEXT_PROTOTYPES
4300GLAPI void APIENTRY glFramebufferSampleLocationsfvARB (GLenum target, GLuint start, GLsizei count, const GLfloat *v);
4301GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvARB (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
4302GLAPI void APIENTRY glEvaluateDepthValuesARB (void);
4303#endif
4304#endif /* GL_ARB_sample_locations */
4305
4306#ifndef GL_ARB_sample_shading
4307#define GL_ARB_sample_shading 1
4308#define GL_SAMPLE_SHADING_ARB 0x8C36
4309#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37
4310typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);
4311#ifdef GL_GLEXT_PROTOTYPES
4312GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);
4313#endif
4314#endif /* GL_ARB_sample_shading */
4315
4316#ifndef GL_ARB_sampler_objects
4317#define GL_ARB_sampler_objects 1
4318#endif /* GL_ARB_sampler_objects */
4319
4320#ifndef GL_ARB_seamless_cube_map
4321#define GL_ARB_seamless_cube_map 1
4322#endif /* GL_ARB_seamless_cube_map */
4323
4324#ifndef GL_ARB_seamless_cubemap_per_texture
4325#define GL_ARB_seamless_cubemap_per_texture 1
4326#endif /* GL_ARB_seamless_cubemap_per_texture */
4327
4328#ifndef GL_ARB_separate_shader_objects
4329#define GL_ARB_separate_shader_objects 1
4330#endif /* GL_ARB_separate_shader_objects */
4331
4332#ifndef GL_ARB_shader_atomic_counter_ops
4333#define GL_ARB_shader_atomic_counter_ops 1
4334#endif /* GL_ARB_shader_atomic_counter_ops */
4335
4336#ifndef GL_ARB_shader_atomic_counters
4337#define GL_ARB_shader_atomic_counters 1
4338#endif /* GL_ARB_shader_atomic_counters */
4339
4340#ifndef GL_ARB_shader_ballot
4341#define GL_ARB_shader_ballot 1
4342#endif /* GL_ARB_shader_ballot */
4343
4344#ifndef GL_ARB_shader_bit_encoding
4345#define GL_ARB_shader_bit_encoding 1
4346#endif /* GL_ARB_shader_bit_encoding */
4347
4348#ifndef GL_ARB_shader_clock
4349#define GL_ARB_shader_clock 1
4350#endif /* GL_ARB_shader_clock */
4351
4352#ifndef GL_ARB_shader_draw_parameters
4353#define GL_ARB_shader_draw_parameters 1
4354#endif /* GL_ARB_shader_draw_parameters */
4355
4356#ifndef GL_ARB_shader_group_vote
4357#define GL_ARB_shader_group_vote 1
4358#endif /* GL_ARB_shader_group_vote */
4359
4360#ifndef GL_ARB_shader_image_load_store
4361#define GL_ARB_shader_image_load_store 1
4362#endif /* GL_ARB_shader_image_load_store */
4363
4364#ifndef GL_ARB_shader_image_size
4365#define GL_ARB_shader_image_size 1
4366#endif /* GL_ARB_shader_image_size */
4367
4368#ifndef GL_ARB_shader_objects
4369#define GL_ARB_shader_objects 1
4370#ifdef __APPLE__
4371typedef void *GLhandleARB;
4372#else
4373typedef unsigned int GLhandleARB;
4374#endif
4375typedef char GLcharARB;
4376#define GL_PROGRAM_OBJECT_ARB 0x8B40
4377#define GL_SHADER_OBJECT_ARB 0x8B48
4378#define GL_OBJECT_TYPE_ARB 0x8B4E
4379#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
4380#define GL_FLOAT_VEC2_ARB 0x8B50
4381#define GL_FLOAT_VEC3_ARB 0x8B51
4382#define GL_FLOAT_VEC4_ARB 0x8B52
4383#define GL_INT_VEC2_ARB 0x8B53
4384#define GL_INT_VEC3_ARB 0x8B54
4385#define GL_INT_VEC4_ARB 0x8B55
4386#define GL_BOOL_ARB 0x8B56
4387#define GL_BOOL_VEC2_ARB 0x8B57
4388#define GL_BOOL_VEC3_ARB 0x8B58
4389#define GL_BOOL_VEC4_ARB 0x8B59
4390#define GL_FLOAT_MAT2_ARB 0x8B5A
4391#define GL_FLOAT_MAT3_ARB 0x8B5B
4392#define GL_FLOAT_MAT4_ARB 0x8B5C
4393#define GL_SAMPLER_1D_ARB 0x8B5D
4394#define GL_SAMPLER_2D_ARB 0x8B5E
4395#define GL_SAMPLER_3D_ARB 0x8B5F
4396#define GL_SAMPLER_CUBE_ARB 0x8B60
4397#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
4398#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
4399#define GL_SAMPLER_2D_RECT_ARB 0x8B63
4400#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
4401#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
4402#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
4403#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
4404#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
4405#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
4406#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
4407#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
4408#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
4409#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
4410typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
4411typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
4412typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
4413typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
4414typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
4415typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
4416typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
4417typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
4418typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
4419typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
4420typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
4421typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
4422typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
4423typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
4424typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
4425typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
4426typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
4427typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
4428typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
4429typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
4430typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
4431typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
4432typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
4433typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
4434typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
4435typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
4436typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
4437typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
4438typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
4439typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
4440typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
4441typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
4442typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
4443typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
4444typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
4445typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
4446typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
4447typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
4448typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
4449#ifdef GL_GLEXT_PROTOTYPES
4450GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj);
4451GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname);
4452GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);
4453GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);
4454GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
4455GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj);
4456GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
4457GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);
4458GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj);
4459GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj);
4460GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj);
4461GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0);
4462GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);
4463GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
4464GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
4465GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0);
4466GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1);
4467GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);
4468GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
4469GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);
4470GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);
4471GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);
4472GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);
4473GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value);
4474GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value);
4475GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value);
4476GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value);
4477GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
4478GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
4479GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
4480GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);
4481GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);
4482GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
4483GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
4484GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);
4485GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
4486GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);
4487GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);
4488GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
4489#endif
4490#endif /* GL_ARB_shader_objects */
4491
4492#ifndef GL_ARB_shader_precision
4493#define GL_ARB_shader_precision 1
4494#endif /* GL_ARB_shader_precision */
4495
4496#ifndef GL_ARB_shader_stencil_export
4497#define GL_ARB_shader_stencil_export 1
4498#endif /* GL_ARB_shader_stencil_export */
4499
4500#ifndef GL_ARB_shader_storage_buffer_object
4501#define GL_ARB_shader_storage_buffer_object 1
4502#endif /* GL_ARB_shader_storage_buffer_object */
4503
4504#ifndef GL_ARB_shader_subroutine
4505#define GL_ARB_shader_subroutine 1
4506#endif /* GL_ARB_shader_subroutine */
4507
4508#ifndef GL_ARB_shader_texture_image_samples
4509#define GL_ARB_shader_texture_image_samples 1
4510#endif /* GL_ARB_shader_texture_image_samples */
4511
4512#ifndef GL_ARB_shader_texture_lod
4513#define GL_ARB_shader_texture_lod 1
4514#endif /* GL_ARB_shader_texture_lod */
4515
4516#ifndef GL_ARB_shader_viewport_layer_array
4517#define GL_ARB_shader_viewport_layer_array 1
4518#endif /* GL_ARB_shader_viewport_layer_array */
4519
4520#ifndef GL_ARB_shading_language_100
4521#define GL_ARB_shading_language_100 1
4522#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
4523#endif /* GL_ARB_shading_language_100 */
4524
4525#ifndef GL_ARB_shading_language_420pack
4526#define GL_ARB_shading_language_420pack 1
4527#endif /* GL_ARB_shading_language_420pack */
4528
4529#ifndef GL_ARB_shading_language_include
4530#define GL_ARB_shading_language_include 1
4531#define GL_SHADER_INCLUDE_ARB 0x8DAE
4532#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9
4533#define GL_NAMED_STRING_TYPE_ARB 0x8DEA
4534typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
4535typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
4536typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
4537typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
4538typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
4539typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
4540#ifdef GL_GLEXT_PROTOTYPES
4541GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
4542GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);
4543GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
4544GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);
4545GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
4546GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
4547#endif
4548#endif /* GL_ARB_shading_language_include */
4549
4550#ifndef GL_ARB_shading_language_packing
4551#define GL_ARB_shading_language_packing 1
4552#endif /* GL_ARB_shading_language_packing */
4553
4554#ifndef GL_ARB_shadow
4555#define GL_ARB_shadow 1
4556#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
4557#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
4558#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
4559#endif /* GL_ARB_shadow */
4560
4561#ifndef GL_ARB_shadow_ambient
4562#define GL_ARB_shadow_ambient 1
4563#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
4564#endif /* GL_ARB_shadow_ambient */
4565
4566#ifndef GL_ARB_sparse_buffer
4567#define GL_ARB_sparse_buffer 1
4568#define GL_SPARSE_STORAGE_BIT_ARB 0x0400
4569#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8
4570typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit);
4571typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
4572typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
4573#ifdef GL_GLEXT_PROTOTYPES
4574GLAPI void APIENTRY glBufferPageCommitmentARB (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit);
4575GLAPI void APIENTRY glNamedBufferPageCommitmentEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
4576GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
4577#endif
4578#endif /* GL_ARB_sparse_buffer */
4579
4580#ifndef GL_ARB_sparse_texture
4581#define GL_ARB_sparse_texture 1
4582#define GL_TEXTURE_SPARSE_ARB 0x91A6
4583#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7
4584#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA
4585#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8
4586#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195
4587#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196
4588#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197
4589#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198
4590#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199
4591#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A
4592#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9
4593typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
4594#ifdef GL_GLEXT_PROTOTYPES
4595GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
4596#endif
4597#endif /* GL_ARB_sparse_texture */
4598
4599#ifndef GL_ARB_sparse_texture2
4600#define GL_ARB_sparse_texture2 1
4601#endif /* GL_ARB_sparse_texture2 */
4602
4603#ifndef GL_ARB_sparse_texture_clamp
4604#define GL_ARB_sparse_texture_clamp 1
4605#endif /* GL_ARB_sparse_texture_clamp */
4606
4607#ifndef GL_ARB_spirv_extensions
4608#define GL_ARB_spirv_extensions 1
4609#endif /* GL_ARB_spirv_extensions */
4610
4611#ifndef GL_ARB_stencil_texturing
4612#define GL_ARB_stencil_texturing 1
4613#endif /* GL_ARB_stencil_texturing */
4614
4615#ifndef GL_ARB_sync
4616#define GL_ARB_sync 1
4617#endif /* GL_ARB_sync */
4618
4619#ifndef GL_ARB_tessellation_shader
4620#define GL_ARB_tessellation_shader 1
4621#endif /* GL_ARB_tessellation_shader */
4622
4623#ifndef GL_ARB_texture_barrier
4624#define GL_ARB_texture_barrier 1
4625#endif /* GL_ARB_texture_barrier */
4626
4627#ifndef GL_ARB_texture_border_clamp
4628#define GL_ARB_texture_border_clamp 1
4629#define GL_CLAMP_TO_BORDER_ARB 0x812D
4630#endif /* GL_ARB_texture_border_clamp */
4631
4632#ifndef GL_ARB_texture_buffer_object
4633#define GL_ARB_texture_buffer_object 1
4634#define GL_TEXTURE_BUFFER_ARB 0x8C2A
4635#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B
4636#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C
4637#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
4638#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
4639typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);
4640#ifdef GL_GLEXT_PROTOTYPES
4641GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer);
4642#endif
4643#endif /* GL_ARB_texture_buffer_object */
4644
4645#ifndef GL_ARB_texture_buffer_object_rgb32
4646#define GL_ARB_texture_buffer_object_rgb32 1
4647#endif /* GL_ARB_texture_buffer_object_rgb32 */
4648
4649#ifndef GL_ARB_texture_buffer_range
4650#define GL_ARB_texture_buffer_range 1
4651#endif /* GL_ARB_texture_buffer_range */
4652
4653#ifndef GL_ARB_texture_compression
4654#define GL_ARB_texture_compression 1
4655#define GL_COMPRESSED_ALPHA_ARB 0x84E9
4656#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
4657#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
4658#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
4659#define GL_COMPRESSED_RGB_ARB 0x84ED
4660#define GL_COMPRESSED_RGBA_ARB 0x84EE
4661#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
4662#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
4663#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
4664#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
4665#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
4666typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
4667typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
4668typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
4669typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
4670typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
4671typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
4672typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img);
4673#ifdef GL_GLEXT_PROTOTYPES
4674GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
4675GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
4676GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
4677GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
4678GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
4679GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
4680GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img);
4681#endif
4682#endif /* GL_ARB_texture_compression */
4683
4684#ifndef GL_ARB_texture_compression_bptc
4685#define GL_ARB_texture_compression_bptc 1
4686#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
4687#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
4688#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
4689#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
4690#endif /* GL_ARB_texture_compression_bptc */
4691
4692#ifndef GL_ARB_texture_compression_rgtc
4693#define GL_ARB_texture_compression_rgtc 1
4694#endif /* GL_ARB_texture_compression_rgtc */
4695
4696#ifndef GL_ARB_texture_cube_map
4697#define GL_ARB_texture_cube_map 1
4698#define GL_NORMAL_MAP_ARB 0x8511
4699#define GL_REFLECTION_MAP_ARB 0x8512
4700#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
4701#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
4702#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
4703#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
4704#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
4705#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
4706#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
4707#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
4708#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
4709#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
4710#endif /* GL_ARB_texture_cube_map */
4711
4712#ifndef GL_ARB_texture_cube_map_array
4713#define GL_ARB_texture_cube_map_array 1
4714#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009
4715#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
4716#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
4717#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C
4718#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
4719#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
4720#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
4721#endif /* GL_ARB_texture_cube_map_array */
4722
4723#ifndef GL_ARB_texture_env_add
4724#define GL_ARB_texture_env_add 1
4725#endif /* GL_ARB_texture_env_add */
4726
4727#ifndef GL_ARB_texture_env_combine
4728#define GL_ARB_texture_env_combine 1
4729#define GL_COMBINE_ARB 0x8570
4730#define GL_COMBINE_RGB_ARB 0x8571
4731#define GL_COMBINE_ALPHA_ARB 0x8572
4732#define GL_SOURCE0_RGB_ARB 0x8580
4733#define GL_SOURCE1_RGB_ARB 0x8581
4734#define GL_SOURCE2_RGB_ARB 0x8582
4735#define GL_SOURCE0_ALPHA_ARB 0x8588
4736#define GL_SOURCE1_ALPHA_ARB 0x8589
4737#define GL_SOURCE2_ALPHA_ARB 0x858A
4738#define GL_OPERAND0_RGB_ARB 0x8590
4739#define GL_OPERAND1_RGB_ARB 0x8591
4740#define GL_OPERAND2_RGB_ARB 0x8592
4741#define GL_OPERAND0_ALPHA_ARB 0x8598
4742#define GL_OPERAND1_ALPHA_ARB 0x8599
4743#define GL_OPERAND2_ALPHA_ARB 0x859A
4744#define GL_RGB_SCALE_ARB 0x8573
4745#define GL_ADD_SIGNED_ARB 0x8574
4746#define GL_INTERPOLATE_ARB 0x8575
4747#define GL_SUBTRACT_ARB 0x84E7
4748#define GL_CONSTANT_ARB 0x8576
4749#define GL_PRIMARY_COLOR_ARB 0x8577
4750#define GL_PREVIOUS_ARB 0x8578
4751#endif /* GL_ARB_texture_env_combine */
4752
4753#ifndef GL_ARB_texture_env_crossbar
4754#define GL_ARB_texture_env_crossbar 1
4755#endif /* GL_ARB_texture_env_crossbar */
4756
4757#ifndef GL_ARB_texture_env_dot3
4758#define GL_ARB_texture_env_dot3 1
4759#define GL_DOT3_RGB_ARB 0x86AE
4760#define GL_DOT3_RGBA_ARB 0x86AF
4761#endif /* GL_ARB_texture_env_dot3 */
4762
4763#ifndef GL_ARB_texture_filter_anisotropic
4764#define GL_ARB_texture_filter_anisotropic 1
4765#endif /* GL_ARB_texture_filter_anisotropic */
4766
4767#ifndef GL_ARB_texture_filter_minmax
4768#define GL_ARB_texture_filter_minmax 1
4769#define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366
4770#define GL_WEIGHTED_AVERAGE_ARB 0x9367
4771#endif /* GL_ARB_texture_filter_minmax */
4772
4773#ifndef GL_ARB_texture_float
4774#define GL_ARB_texture_float 1
4775#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
4776#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
4777#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
4778#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
4779#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
4780#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
4781#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
4782#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
4783#define GL_RGBA32F_ARB 0x8814
4784#define GL_RGB32F_ARB 0x8815
4785#define GL_ALPHA32F_ARB 0x8816
4786#define GL_INTENSITY32F_ARB 0x8817
4787#define GL_LUMINANCE32F_ARB 0x8818
4788#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
4789#define GL_RGBA16F_ARB 0x881A
4790#define GL_RGB16F_ARB 0x881B
4791#define GL_ALPHA16F_ARB 0x881C
4792#define GL_INTENSITY16F_ARB 0x881D
4793#define GL_LUMINANCE16F_ARB 0x881E
4794#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
4795#endif /* GL_ARB_texture_float */
4796
4797#ifndef GL_ARB_texture_gather
4798#define GL_ARB_texture_gather 1
4799#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E
4800#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F
4801#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F
4802#endif /* GL_ARB_texture_gather */
4803
4804#ifndef GL_ARB_texture_mirror_clamp_to_edge
4805#define GL_ARB_texture_mirror_clamp_to_edge 1
4806#endif /* GL_ARB_texture_mirror_clamp_to_edge */
4807
4808#ifndef GL_ARB_texture_mirrored_repeat
4809#define GL_ARB_texture_mirrored_repeat 1
4810#define GL_MIRRORED_REPEAT_ARB 0x8370
4811#endif /* GL_ARB_texture_mirrored_repeat */
4812
4813#ifndef GL_ARB_texture_multisample
4814#define GL_ARB_texture_multisample 1
4815#endif /* GL_ARB_texture_multisample */
4816
4817#ifndef GL_ARB_texture_non_power_of_two
4818#define GL_ARB_texture_non_power_of_two 1
4819#endif /* GL_ARB_texture_non_power_of_two */
4820
4821#ifndef GL_ARB_texture_query_levels
4822#define GL_ARB_texture_query_levels 1
4823#endif /* GL_ARB_texture_query_levels */
4824
4825#ifndef GL_ARB_texture_query_lod
4826#define GL_ARB_texture_query_lod 1
4827#endif /* GL_ARB_texture_query_lod */
4828
4829#ifndef GL_ARB_texture_rectangle
4830#define GL_ARB_texture_rectangle 1
4831#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
4832#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
4833#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
4834#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
4835#endif /* GL_ARB_texture_rectangle */
4836
4837#ifndef GL_ARB_texture_rg
4838#define GL_ARB_texture_rg 1
4839#endif /* GL_ARB_texture_rg */
4840
4841#ifndef GL_ARB_texture_rgb10_a2ui
4842#define GL_ARB_texture_rgb10_a2ui 1
4843#endif /* GL_ARB_texture_rgb10_a2ui */
4844
4845#ifndef GL_ARB_texture_stencil8
4846#define GL_ARB_texture_stencil8 1
4847#endif /* GL_ARB_texture_stencil8 */
4848
4849#ifndef GL_ARB_texture_storage
4850#define GL_ARB_texture_storage 1
4851#endif /* GL_ARB_texture_storage */
4852
4853#ifndef GL_ARB_texture_storage_multisample
4854#define GL_ARB_texture_storage_multisample 1
4855#endif /* GL_ARB_texture_storage_multisample */
4856
4857#ifndef GL_ARB_texture_swizzle
4858#define GL_ARB_texture_swizzle 1
4859#endif /* GL_ARB_texture_swizzle */
4860
4861#ifndef GL_ARB_texture_view
4862#define GL_ARB_texture_view 1
4863#endif /* GL_ARB_texture_view */
4864
4865#ifndef GL_ARB_timer_query
4866#define GL_ARB_timer_query 1
4867#endif /* GL_ARB_timer_query */
4868
4869#ifndef GL_ARB_transform_feedback2
4870#define GL_ARB_transform_feedback2 1
4871#endif /* GL_ARB_transform_feedback2 */
4872
4873#ifndef GL_ARB_transform_feedback3
4874#define GL_ARB_transform_feedback3 1
4875#endif /* GL_ARB_transform_feedback3 */
4876
4877#ifndef GL_ARB_transform_feedback_instanced
4878#define GL_ARB_transform_feedback_instanced 1
4879#endif /* GL_ARB_transform_feedback_instanced */
4880
4881#ifndef GL_ARB_transform_feedback_overflow_query
4882#define GL_ARB_transform_feedback_overflow_query 1
4883#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC
4884#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED
4885#endif /* GL_ARB_transform_feedback_overflow_query */
4886
4887#ifndef GL_ARB_transpose_matrix
4888#define GL_ARB_transpose_matrix 1
4889#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
4890#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
4891#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
4892#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
4893typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
4894typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
4895typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
4896typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
4897#ifdef GL_GLEXT_PROTOTYPES
4898GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m);
4899GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m);
4900GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m);
4901GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m);
4902#endif
4903#endif /* GL_ARB_transpose_matrix */
4904
4905#ifndef GL_ARB_uniform_buffer_object
4906#define GL_ARB_uniform_buffer_object 1
4907#endif /* GL_ARB_uniform_buffer_object */
4908
4909#ifndef GL_ARB_vertex_array_bgra
4910#define GL_ARB_vertex_array_bgra 1
4911#endif /* GL_ARB_vertex_array_bgra */
4912
4913#ifndef GL_ARB_vertex_array_object
4914#define GL_ARB_vertex_array_object 1
4915#endif /* GL_ARB_vertex_array_object */
4916
4917#ifndef GL_ARB_vertex_attrib_64bit
4918#define GL_ARB_vertex_attrib_64bit 1
4919#endif /* GL_ARB_vertex_attrib_64bit */
4920
4921#ifndef GL_ARB_vertex_attrib_binding
4922#define GL_ARB_vertex_attrib_binding 1
4923#endif /* GL_ARB_vertex_attrib_binding */
4924
4925#ifndef GL_ARB_vertex_blend
4926#define GL_ARB_vertex_blend 1
4927#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
4928#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
4929#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
4930#define GL_VERTEX_BLEND_ARB 0x86A7
4931#define GL_CURRENT_WEIGHT_ARB 0x86A8
4932#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
4933#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
4934#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
4935#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
4936#define GL_WEIGHT_ARRAY_ARB 0x86AD
4937#define GL_MODELVIEW0_ARB 0x1700
4938#define GL_MODELVIEW1_ARB 0x850A
4939#define GL_MODELVIEW2_ARB 0x8722
4940#define GL_MODELVIEW3_ARB 0x8723
4941#define GL_MODELVIEW4_ARB 0x8724
4942#define GL_MODELVIEW5_ARB 0x8725
4943#define GL_MODELVIEW6_ARB 0x8726
4944#define GL_MODELVIEW7_ARB 0x8727
4945#define GL_MODELVIEW8_ARB 0x8728
4946#define GL_MODELVIEW9_ARB 0x8729
4947#define GL_MODELVIEW10_ARB 0x872A
4948#define GL_MODELVIEW11_ARB 0x872B
4949#define GL_MODELVIEW12_ARB 0x872C
4950#define GL_MODELVIEW13_ARB 0x872D
4951#define GL_MODELVIEW14_ARB 0x872E
4952#define GL_MODELVIEW15_ARB 0x872F
4953#define GL_MODELVIEW16_ARB 0x8730
4954#define GL_MODELVIEW17_ARB 0x8731
4955#define GL_MODELVIEW18_ARB 0x8732
4956#define GL_MODELVIEW19_ARB 0x8733
4957#define GL_MODELVIEW20_ARB 0x8734
4958#define GL_MODELVIEW21_ARB 0x8735
4959#define GL_MODELVIEW22_ARB 0x8736
4960#define GL_MODELVIEW23_ARB 0x8737
4961#define GL_MODELVIEW24_ARB 0x8738
4962#define GL_MODELVIEW25_ARB 0x8739
4963#define GL_MODELVIEW26_ARB 0x873A
4964#define GL_MODELVIEW27_ARB 0x873B
4965#define GL_MODELVIEW28_ARB 0x873C
4966#define GL_MODELVIEW29_ARB 0x873D
4967#define GL_MODELVIEW30_ARB 0x873E
4968#define GL_MODELVIEW31_ARB 0x873F
4969typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
4970typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
4971typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
4972typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
4973typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
4974typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
4975typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
4976typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
4977typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
4978typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
4979#ifdef GL_GLEXT_PROTOTYPES
4980GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights);
4981GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights);
4982GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights);
4983GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights);
4984GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights);
4985GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights);
4986GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights);
4987GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights);
4988GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
4989GLAPI void APIENTRY glVertexBlendARB (GLint count);
4990#endif
4991#endif /* GL_ARB_vertex_blend */
4992
4993#ifndef GL_ARB_vertex_buffer_object
4994#define GL_ARB_vertex_buffer_object 1
4995typedef khronos_ssize_t GLsizeiptrARB;
4996typedef khronos_intptr_t GLintptrARB;
4997#define GL_BUFFER_SIZE_ARB 0x8764
4998#define GL_BUFFER_USAGE_ARB 0x8765
4999#define GL_ARRAY_BUFFER_ARB 0x8892
5000#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
5001#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
5002#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
5003#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
5004#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
5005#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
5006#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
5007#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
5008#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
5009#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
5010#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
5011#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
5012#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
5013#define GL_READ_ONLY_ARB 0x88B8
5014#define GL_WRITE_ONLY_ARB 0x88B9
5015#define GL_READ_WRITE_ARB 0x88BA
5016#define GL_BUFFER_ACCESS_ARB 0x88BB
5017#define GL_BUFFER_MAPPED_ARB 0x88BC
5018#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
5019#define GL_STREAM_DRAW_ARB 0x88E0
5020#define GL_STREAM_READ_ARB 0x88E1
5021#define GL_STREAM_COPY_ARB 0x88E2
5022#define GL_STATIC_DRAW_ARB 0x88E4
5023#define GL_STATIC_READ_ARB 0x88E5
5024#define GL_STATIC_COPY_ARB 0x88E6
5025#define GL_DYNAMIC_DRAW_ARB 0x88E8
5026#define GL_DYNAMIC_READ_ARB 0x88E9
5027#define GL_DYNAMIC_COPY_ARB 0x88EA
5028typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
5029typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
5030typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
5031typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
5032typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
5033typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
5034typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
5035typedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
5036typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
5037typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
5038typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params);
5039#ifdef GL_GLEXT_PROTOTYPES
5040GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer);
5041GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers);
5042GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers);
5043GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer);
5044GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
5045GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
5046GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
5047GLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access);
5048GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target);
5049GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);
5050GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params);
5051#endif
5052#endif /* GL_ARB_vertex_buffer_object */
5053
5054#ifndef GL_ARB_vertex_program
5055#define GL_ARB_vertex_program 1
5056#define GL_COLOR_SUM_ARB 0x8458
5057#define GL_VERTEX_PROGRAM_ARB 0x8620
5058#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
5059#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
5060#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
5061#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
5062#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
5063#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
5064#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
5065#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
5066#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
5067#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
5068#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
5069#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
5070#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
5071#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
5072typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
5073typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
5074typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
5075typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
5076typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
5077typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
5078typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
5079typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
5080typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
5081typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
5082typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
5083typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
5084typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
5085typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
5086typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
5087typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
5088typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
5089typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
5090typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
5091typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
5092typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
5093typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
5094typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
5095typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
5096typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
5097typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
5098typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
5099typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
5100typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
5101typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
5102typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
5103typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
5104typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
5105typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
5106typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
5107typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
5108typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
5109typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
5110typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
5111typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
5112typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
5113typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
5114typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer);
5115#ifdef GL_GLEXT_PROTOTYPES
5116GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x);
5117GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v);
5118GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x);
5119GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v);
5120GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x);
5121GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v);
5122GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);
5123GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v);
5124GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);
5125GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v);
5126GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);
5127GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v);
5128GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);
5129GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v);
5130GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);
5131GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v);
5132GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);
5133GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v);
5134GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);
5135GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v);
5136GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v);
5137GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
5138GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);
5139GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v);
5140GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v);
5141GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v);
5142GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
5143GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v);
5144GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
5145GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v);
5146GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v);
5147GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
5148GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v);
5149GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);
5150GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v);
5151GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v);
5152GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
5153GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index);
5154GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index);
5155GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);
5156GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);
5157GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);
5158GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer);
5159#endif
5160#endif /* GL_ARB_vertex_program */
5161
5162#ifndef GL_ARB_vertex_shader
5163#define GL_ARB_vertex_shader 1
5164#define GL_VERTEX_SHADER_ARB 0x8B31
5165#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
5166#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
5167#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
5168#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
5169#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
5170#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
5171typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
5172typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
5173typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
5174#ifdef GL_GLEXT_PROTOTYPES
5175GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);
5176GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
5177GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);
5178#endif
5179#endif /* GL_ARB_vertex_shader */
5180
5181#ifndef GL_ARB_vertex_type_10f_11f_11f_rev
5182#define GL_ARB_vertex_type_10f_11f_11f_rev 1
5183#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */
5184
5185#ifndef GL_ARB_vertex_type_2_10_10_10_rev
5186#define GL_ARB_vertex_type_2_10_10_10_rev 1
5187#endif /* GL_ARB_vertex_type_2_10_10_10_rev */
5188
5189#ifndef GL_ARB_viewport_array
5190#define GL_ARB_viewport_array 1
5191typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYDVNVPROC) (GLuint first, GLsizei count, const GLdouble *v);
5192typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDDNVPROC) (GLuint index, GLdouble n, GLdouble f);
5193#ifdef GL_GLEXT_PROTOTYPES
5194GLAPI void APIENTRY glDepthRangeArraydvNV (GLuint first, GLsizei count, const GLdouble *v);
5195GLAPI void APIENTRY glDepthRangeIndexeddNV (GLuint index, GLdouble n, GLdouble f);
5196#endif
5197#endif /* GL_ARB_viewport_array */
5198
5199#ifndef GL_ARB_window_pos
5200#define GL_ARB_window_pos 1
5201typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
5202typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
5203typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
5204typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
5205typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
5206typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
5207typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
5208typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
5209typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
5210typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
5211typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
5212typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
5213typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
5214typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
5215typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
5216typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
5217#ifdef GL_GLEXT_PROTOTYPES
5218GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y);
5219GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v);
5220GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y);
5221GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v);
5222GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y);
5223GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v);
5224GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y);
5225GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v);
5226GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z);
5227GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v);
5228GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z);
5229GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v);
5230GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z);
5231GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v);
5232GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z);
5233GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v);
5234#endif
5235#endif /* GL_ARB_window_pos */
5236
5237#ifndef GL_KHR_blend_equation_advanced
5238#define GL_KHR_blend_equation_advanced 1
5239#define GL_MULTIPLY_KHR 0x9294
5240#define GL_SCREEN_KHR 0x9295
5241#define GL_OVERLAY_KHR 0x9296
5242#define GL_DARKEN_KHR 0x9297
5243#define GL_LIGHTEN_KHR 0x9298
5244#define GL_COLORDODGE_KHR 0x9299
5245#define GL_COLORBURN_KHR 0x929A
5246#define GL_HARDLIGHT_KHR 0x929B
5247#define GL_SOFTLIGHT_KHR 0x929C
5248#define GL_DIFFERENCE_KHR 0x929E
5249#define GL_EXCLUSION_KHR 0x92A0
5250#define GL_HSL_HUE_KHR 0x92AD
5251#define GL_HSL_SATURATION_KHR 0x92AE
5252#define GL_HSL_COLOR_KHR 0x92AF
5253#define GL_HSL_LUMINOSITY_KHR 0x92B0
5254typedef void (APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void);
5255#ifdef GL_GLEXT_PROTOTYPES
5256GLAPI void APIENTRY glBlendBarrierKHR (void);
5257#endif
5258#endif /* GL_KHR_blend_equation_advanced */
5259
5260#ifndef GL_KHR_blend_equation_advanced_coherent
5261#define GL_KHR_blend_equation_advanced_coherent 1
5262#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
5263#endif /* GL_KHR_blend_equation_advanced_coherent */
5264
5265#ifndef GL_KHR_context_flush_control
5266#define GL_KHR_context_flush_control 1
5267#endif /* GL_KHR_context_flush_control */
5268
5269#ifndef GL_KHR_debug
5270#define GL_KHR_debug 1
5271#endif /* GL_KHR_debug */
5272
5273#ifndef GL_KHR_no_error
5274#define GL_KHR_no_error 1
5275#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
5276#endif /* GL_KHR_no_error */
5277
5278#ifndef GL_KHR_parallel_shader_compile
5279#define GL_KHR_parallel_shader_compile 1
5280#define GL_MAX_SHADER_COMPILER_THREADS_KHR 0x91B0
5281#define GL_COMPLETION_STATUS_KHR 0x91B1
5282typedef void (APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSKHRPROC) (GLuint count);
5283#ifdef GL_GLEXT_PROTOTYPES
5284GLAPI void APIENTRY glMaxShaderCompilerThreadsKHR (GLuint count);
5285#endif
5286#endif /* GL_KHR_parallel_shader_compile */
5287
5288#ifndef GL_KHR_robust_buffer_access_behavior
5289#define GL_KHR_robust_buffer_access_behavior 1
5290#endif /* GL_KHR_robust_buffer_access_behavior */
5291
5292#ifndef GL_KHR_robustness
5293#define GL_KHR_robustness 1
5294#define GL_CONTEXT_ROBUST_ACCESS 0x90F3
5295#endif /* GL_KHR_robustness */
5296
5297#ifndef GL_KHR_shader_subgroup
5298#define GL_KHR_shader_subgroup 1
5299#define GL_SUBGROUP_SIZE_KHR 0x9532
5300#define GL_SUBGROUP_SUPPORTED_STAGES_KHR 0x9533
5301#define GL_SUBGROUP_SUPPORTED_FEATURES_KHR 0x9534
5302#define GL_SUBGROUP_QUAD_ALL_STAGES_KHR 0x9535
5303#define GL_SUBGROUP_FEATURE_BASIC_BIT_KHR 0x00000001
5304#define GL_SUBGROUP_FEATURE_VOTE_BIT_KHR 0x00000002
5305#define GL_SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR 0x00000004
5306#define GL_SUBGROUP_FEATURE_BALLOT_BIT_KHR 0x00000008
5307#define GL_SUBGROUP_FEATURE_SHUFFLE_BIT_KHR 0x00000010
5308#define GL_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR 0x00000020
5309#define GL_SUBGROUP_FEATURE_CLUSTERED_BIT_KHR 0x00000040
5310#define GL_SUBGROUP_FEATURE_QUAD_BIT_KHR 0x00000080
5311#endif /* GL_KHR_shader_subgroup */
5312
5313#ifndef GL_KHR_texture_compression_astc_hdr
5314#define GL_KHR_texture_compression_astc_hdr 1
5315#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
5316#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
5317#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
5318#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
5319#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
5320#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
5321#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
5322#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
5323#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
5324#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
5325#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
5326#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
5327#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
5328#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
5329#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
5330#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
5331#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
5332#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
5333#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
5334#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
5335#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
5336#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
5337#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
5338#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
5339#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
5340#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
5341#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
5342#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
5343#endif /* GL_KHR_texture_compression_astc_hdr */
5344
5345#ifndef GL_KHR_texture_compression_astc_ldr
5346#define GL_KHR_texture_compression_astc_ldr 1
5347#endif /* GL_KHR_texture_compression_astc_ldr */
5348
5349#ifndef GL_KHR_texture_compression_astc_sliced_3d
5350#define GL_KHR_texture_compression_astc_sliced_3d 1
5351#endif /* GL_KHR_texture_compression_astc_sliced_3d */
5352
5353#ifndef GL_OES_byte_coordinates
5354#define GL_OES_byte_coordinates 1
5355typedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s);
5356typedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords);
5357typedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t);
5358typedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords);
5359typedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
5360typedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords);
5361typedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
5362typedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords);
5363typedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s);
5364typedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords);
5365typedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t);
5366typedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords);
5367typedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r);
5368typedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords);
5369typedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
5370typedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords);
5371typedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x, GLbyte y);
5372typedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords);
5373typedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y, GLbyte z);
5374typedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords);
5375typedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z, GLbyte w);
5376typedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords);
5377#ifdef GL_GLEXT_PROTOTYPES
5378GLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s);
5379GLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords);
5380GLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t);
5381GLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords);
5382GLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
5383GLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords);
5384GLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
5385GLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords);
5386GLAPI void APIENTRY glTexCoord1bOES (GLbyte s);
5387GLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords);
5388GLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t);
5389GLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords);
5390GLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r);
5391GLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords);
5392GLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
5393GLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords);
5394GLAPI void APIENTRY glVertex2bOES (GLbyte x, GLbyte y);
5395GLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords);
5396GLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y, GLbyte z);
5397GLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords);
5398GLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z, GLbyte w);
5399GLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords);
5400#endif
5401#endif /* GL_OES_byte_coordinates */
5402
5403#ifndef GL_OES_compressed_paletted_texture
5404#define GL_OES_compressed_paletted_texture 1
5405#define GL_PALETTE4_RGB8_OES 0x8B90
5406#define GL_PALETTE4_RGBA8_OES 0x8B91
5407#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
5408#define GL_PALETTE4_RGBA4_OES 0x8B93
5409#define GL_PALETTE4_RGB5_A1_OES 0x8B94
5410#define GL_PALETTE8_RGB8_OES 0x8B95
5411#define GL_PALETTE8_RGBA8_OES 0x8B96
5412#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
5413#define GL_PALETTE8_RGBA4_OES 0x8B98
5414#define GL_PALETTE8_RGB5_A1_OES 0x8B99
5415#endif /* GL_OES_compressed_paletted_texture */
5416
5417#ifndef GL_OES_fixed_point
5418#define GL_OES_fixed_point 1
5419typedef khronos_int32_t GLfixed;
5420#define GL_FIXED_OES 0x140C
5421typedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);
5422typedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
5423typedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);
5424typedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
5425typedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
5426typedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);
5427typedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
5428typedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);
5429typedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
5430typedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);
5431typedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
5432typedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
5433typedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
5434typedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
5435typedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);
5436typedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
5437typedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
5438typedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
5439typedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
5440typedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
5441typedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);
5442typedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
5443typedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
5444typedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
5445typedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
5446typedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
5447typedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
5448typedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
5449typedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
5450typedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
5451typedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
5452typedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
5453typedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
5454typedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
5455typedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
5456typedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value);
5457typedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
5458typedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
5459typedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
5460typedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue);
5461typedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components);
5462typedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components);
5463typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
5464typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
5465typedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u);
5466typedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords);
5467typedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v);
5468typedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords);
5469typedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer);
5470typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
5471typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
5472typedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params);
5473typedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v);
5474typedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
5475typedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values);
5476typedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
5477typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params);
5478typedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component);
5479typedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component);
5480typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
5481typedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
5482typedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
5483typedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2);
5484typedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
5485typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
5486typedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s);
5487typedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords);
5488typedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t);
5489typedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords);
5490typedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
5491typedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords);
5492typedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords);
5493typedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords);
5494typedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token);
5495typedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values);
5496typedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param);
5497typedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param);
5498typedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor);
5499typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities);
5500typedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y);
5501typedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords);
5502typedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
5503typedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords);
5504typedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
5505typedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords);
5506typedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
5507typedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2);
5508typedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s);
5509typedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords);
5510typedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t);
5511typedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords);
5512typedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r);
5513typedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords);
5514typedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
5515typedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords);
5516typedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
5517typedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
5518typedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x);
5519typedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords);
5520typedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y);
5521typedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords);
5522typedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
5523typedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords);
5524#ifdef GL_GLEXT_PROTOTYPES
5525GLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);
5526GLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
5527GLAPI void APIENTRY glClearDepthxOES (GLfixed depth);
5528GLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
5529GLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
5530GLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);
5531GLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param);
5532GLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);
5533GLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
5534GLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);
5535GLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
5536GLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);
5537GLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
5538GLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
5539GLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);
5540GLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
5541GLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
5542GLAPI void APIENTRY glLineWidthxOES (GLfixed width);
5543GLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m);
5544GLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
5545GLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);
5546GLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m);
5547GLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
5548GLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
5549GLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
5550GLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
5551GLAPI void APIENTRY glPointSizexOES (GLfixed size);
5552GLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
5553GLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
5554GLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
5555GLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
5556GLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
5557GLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
5558GLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
5559GLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
5560GLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value);
5561GLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
5562GLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
5563GLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
5564GLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue);
5565GLAPI void APIENTRY glColor3xvOES (const GLfixed *components);
5566GLAPI void APIENTRY glColor4xvOES (const GLfixed *components);
5567GLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param);
5568GLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
5569GLAPI void APIENTRY glEvalCoord1xOES (GLfixed u);
5570GLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords);
5571GLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v);
5572GLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords);
5573GLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer);
5574GLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
5575GLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
5576GLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params);
5577GLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v);
5578GLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param);
5579GLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values);
5580GLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
5581GLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params);
5582GLAPI void APIENTRY glIndexxOES (GLfixed component);
5583GLAPI void APIENTRY glIndexxvOES (const GLfixed *component);
5584GLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m);
5585GLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
5586GLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
5587GLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2);
5588GLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
5589GLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m);
5590GLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s);
5591GLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords);
5592GLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t);
5593GLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords);
5594GLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
5595GLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords);
5596GLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords);
5597GLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords);
5598GLAPI void APIENTRY glPassThroughxOES (GLfixed token);
5599GLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values);
5600GLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param);
5601GLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param);
5602GLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor);
5603GLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities);
5604GLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y);
5605GLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords);
5606GLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z);
5607GLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords);
5608GLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
5609GLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords);
5610GLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
5611GLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2);
5612GLAPI void APIENTRY glTexCoord1xOES (GLfixed s);
5613GLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords);
5614GLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t);
5615GLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords);
5616GLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r);
5617GLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords);
5618GLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
5619GLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords);
5620GLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
5621GLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
5622GLAPI void APIENTRY glVertex2xOES (GLfixed x);
5623GLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords);
5624GLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y);
5625GLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords);
5626GLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z);
5627GLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords);
5628#endif
5629#endif /* GL_OES_fixed_point */
5630
5631#ifndef GL_OES_query_matrix
5632#define GL_OES_query_matrix 1
5633typedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent);
5634#ifdef GL_GLEXT_PROTOTYPES
5635GLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent);
5636#endif
5637#endif /* GL_OES_query_matrix */
5638
5639#ifndef GL_OES_read_format
5640#define GL_OES_read_format 1
5641#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
5642#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
5643#endif /* GL_OES_read_format */
5644
5645#ifndef GL_OES_single_precision
5646#define GL_OES_single_precision 1
5647typedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
5648typedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
5649typedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);
5650typedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
5651typedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);
5652typedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
5653#ifdef GL_GLEXT_PROTOTYPES
5654GLAPI void APIENTRY glClearDepthfOES (GLclampf depth);
5655GLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
5656GLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);
5657GLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
5658GLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);
5659GLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
5660#endif
5661#endif /* GL_OES_single_precision */
5662
5663#ifndef GL_3DFX_multisample
5664#define GL_3DFX_multisample 1
5665#define GL_MULTISAMPLE_3DFX 0x86B2
5666#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
5667#define GL_SAMPLES_3DFX 0x86B4
5668#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
5669#endif /* GL_3DFX_multisample */
5670
5671#ifndef GL_3DFX_tbuffer
5672#define GL_3DFX_tbuffer 1
5673typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
5674#ifdef GL_GLEXT_PROTOTYPES
5675GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask);
5676#endif
5677#endif /* GL_3DFX_tbuffer */
5678
5679#ifndef GL_3DFX_texture_compression_FXT1
5680#define GL_3DFX_texture_compression_FXT1 1
5681#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
5682#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
5683#endif /* GL_3DFX_texture_compression_FXT1 */
5684
5685#ifndef GL_AMD_blend_minmax_factor
5686#define GL_AMD_blend_minmax_factor 1
5687#define GL_FACTOR_MIN_AMD 0x901C
5688#define GL_FACTOR_MAX_AMD 0x901D
5689#endif /* GL_AMD_blend_minmax_factor */
5690
5691#ifndef GL_AMD_conservative_depth
5692#define GL_AMD_conservative_depth 1
5693#endif /* GL_AMD_conservative_depth */
5694
5695#ifndef GL_AMD_debug_output
5696#define GL_AMD_debug_output 1
5697typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
5698#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143
5699#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144
5700#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145
5701#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146
5702#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147
5703#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148
5704#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149
5705#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A
5706#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B
5707#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C
5708#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D
5709#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E
5710#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
5711#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150
5712typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
5713typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
5714typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam);
5715typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufSize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
5716#ifdef GL_GLEXT_PROTOTYPES
5717GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
5718GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
5719GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam);
5720GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufSize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
5721#endif
5722#endif /* GL_AMD_debug_output */
5723
5724#ifndef GL_AMD_depth_clamp_separate
5725#define GL_AMD_depth_clamp_separate 1
5726#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E
5727#define GL_DEPTH_CLAMP_FAR_AMD 0x901F
5728#endif /* GL_AMD_depth_clamp_separate */
5729
5730#ifndef GL_AMD_draw_buffers_blend
5731#define GL_AMD_draw_buffers_blend 1
5732typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);
5733typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
5734typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);
5735typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
5736#ifdef GL_GLEXT_PROTOTYPES
5737GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst);
5738GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
5739GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode);
5740GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
5741#endif
5742#endif /* GL_AMD_draw_buffers_blend */
5743
5744#ifndef GL_AMD_framebuffer_multisample_advanced
5745#define GL_AMD_framebuffer_multisample_advanced 1
5746#define GL_RENDERBUFFER_STORAGE_SAMPLES_AMD 0x91B2
5747#define GL_MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD 0x91B3
5748#define GL_MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD 0x91B4
5749#define GL_MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD 0x91B5
5750#define GL_NUM_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B6
5751#define GL_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B7
5752typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC) (GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height);
5753typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC) (GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height);
5754#ifdef GL_GLEXT_PROTOTYPES
5755GLAPI void APIENTRY glRenderbufferStorageMultisampleAdvancedAMD (GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height);
5756GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleAdvancedAMD (GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height);
5757#endif
5758#endif /* GL_AMD_framebuffer_multisample_advanced */
5759
5760#ifndef GL_AMD_framebuffer_sample_positions
5761#define GL_AMD_framebuffer_sample_positions 1
5762#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F
5763#define GL_PIXELS_PER_SAMPLE_PATTERN_X_AMD 0x91AE
5764#define GL_PIXELS_PER_SAMPLE_PATTERN_Y_AMD 0x91AF
5765#define GL_ALL_PIXELS_AMD 0xFFFFFFFF
5766typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLEPOSITIONSFVAMDPROC) (GLenum target, GLuint numsamples, GLuint pixelindex, const GLfloat *values);
5767typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLEPOSITIONSFVAMDPROC) (GLuint framebuffer, GLuint numsamples, GLuint pixelindex, const GLfloat *values);
5768typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERFVAMDPROC) (GLenum target, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values);
5769typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERFVAMDPROC) (GLuint framebuffer, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values);
5770#ifdef GL_GLEXT_PROTOTYPES
5771GLAPI void APIENTRY glFramebufferSamplePositionsfvAMD (GLenum target, GLuint numsamples, GLuint pixelindex, const GLfloat *values);
5772GLAPI void APIENTRY glNamedFramebufferSamplePositionsfvAMD (GLuint framebuffer, GLuint numsamples, GLuint pixelindex, const GLfloat *values);
5773GLAPI void APIENTRY glGetFramebufferParameterfvAMD (GLenum target, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values);
5774GLAPI void APIENTRY glGetNamedFramebufferParameterfvAMD (GLuint framebuffer, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values);
5775#endif
5776#endif /* GL_AMD_framebuffer_sample_positions */
5777
5778#ifndef GL_AMD_gcn_shader
5779#define GL_AMD_gcn_shader 1
5780#endif /* GL_AMD_gcn_shader */
5781
5782#ifndef GL_AMD_gpu_shader_half_float
5783#define GL_AMD_gpu_shader_half_float 1
5784#define GL_FLOAT16_NV 0x8FF8
5785#define GL_FLOAT16_VEC2_NV 0x8FF9
5786#define GL_FLOAT16_VEC3_NV 0x8FFA
5787#define GL_FLOAT16_VEC4_NV 0x8FFB
5788#define GL_FLOAT16_MAT2_AMD 0x91C5
5789#define GL_FLOAT16_MAT3_AMD 0x91C6
5790#define GL_FLOAT16_MAT4_AMD 0x91C7
5791#define GL_FLOAT16_MAT2x3_AMD 0x91C8
5792#define GL_FLOAT16_MAT2x4_AMD 0x91C9
5793#define GL_FLOAT16_MAT3x2_AMD 0x91CA
5794#define GL_FLOAT16_MAT3x4_AMD 0x91CB
5795#define GL_FLOAT16_MAT4x2_AMD 0x91CC
5796#define GL_FLOAT16_MAT4x3_AMD 0x91CD
5797#endif /* GL_AMD_gpu_shader_half_float */
5798
5799#ifndef GL_AMD_gpu_shader_int16
5800#define GL_AMD_gpu_shader_int16 1
5801#endif /* GL_AMD_gpu_shader_int16 */
5802
5803#ifndef GL_AMD_gpu_shader_int64
5804#define GL_AMD_gpu_shader_int64 1
5805typedef khronos_int64_t GLint64EXT;
5806#define GL_INT64_NV 0x140E
5807#define GL_UNSIGNED_INT64_NV 0x140F
5808#define GL_INT8_NV 0x8FE0
5809#define GL_INT8_VEC2_NV 0x8FE1
5810#define GL_INT8_VEC3_NV 0x8FE2
5811#define GL_INT8_VEC4_NV 0x8FE3
5812#define GL_INT16_NV 0x8FE4
5813#define GL_INT16_VEC2_NV 0x8FE5
5814#define GL_INT16_VEC3_NV 0x8FE6
5815#define GL_INT16_VEC4_NV 0x8FE7
5816#define GL_INT64_VEC2_NV 0x8FE9
5817#define GL_INT64_VEC3_NV 0x8FEA
5818#define GL_INT64_VEC4_NV 0x8FEB
5819#define GL_UNSIGNED_INT8_NV 0x8FEC
5820#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED
5821#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE
5822#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF
5823#define GL_UNSIGNED_INT16_NV 0x8FF0
5824#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
5825#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
5826#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
5827#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5
5828#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6
5829#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7
5830typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
5831typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
5832typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
5833typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
5834typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
5835typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
5836typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
5837typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
5838typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
5839typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
5840typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
5841typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
5842typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
5843typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
5844typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
5845typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
5846typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);
5847typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);
5848typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
5849typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
5850typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
5851typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
5852typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
5853typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
5854typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
5855typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
5856typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
5857typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
5858typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
5859typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
5860typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
5861typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
5862typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
5863typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
5864#ifdef GL_GLEXT_PROTOTYPES
5865GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);
5866GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);
5867GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
5868GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
5869GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
5870GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
5871GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
5872GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
5873GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);
5874GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);
5875GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
5876GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
5877GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
5878GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
5879GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
5880GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
5881GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);
5882GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);
5883GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);
5884GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
5885GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
5886GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
5887GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
5888GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
5889GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
5890GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
5891GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);
5892GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
5893GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
5894GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
5895GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
5896GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
5897GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
5898GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
5899#endif
5900#endif /* GL_AMD_gpu_shader_int64 */
5901
5902#ifndef GL_AMD_interleaved_elements
5903#define GL_AMD_interleaved_elements 1
5904#define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4
5905#define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5
5906typedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param);
5907#ifdef GL_GLEXT_PROTOTYPES
5908GLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param);
5909#endif
5910#endif /* GL_AMD_interleaved_elements */
5911
5912#ifndef GL_AMD_multi_draw_indirect
5913#define GL_AMD_multi_draw_indirect 1
5914typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
5915typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
5916#ifdef GL_GLEXT_PROTOTYPES
5917GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
5918GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
5919#endif
5920#endif /* GL_AMD_multi_draw_indirect */
5921
5922#ifndef GL_AMD_name_gen_delete
5923#define GL_AMD_name_gen_delete 1
5924#define GL_DATA_BUFFER_AMD 0x9151
5925#define GL_PERFORMANCE_MONITOR_AMD 0x9152
5926#define GL_QUERY_OBJECT_AMD 0x9153
5927#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154
5928#define GL_SAMPLER_OBJECT_AMD 0x9155
5929typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names);
5930typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names);
5931typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);
5932#ifdef GL_GLEXT_PROTOTYPES
5933GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names);
5934GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names);
5935GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);
5936#endif
5937#endif /* GL_AMD_name_gen_delete */
5938
5939#ifndef GL_AMD_occlusion_query_event
5940#define GL_AMD_occlusion_query_event 1
5941#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F
5942#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001
5943#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002
5944#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004
5945#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008
5946#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF
5947typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param);
5948#ifdef GL_GLEXT_PROTOTYPES
5949GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param);
5950#endif
5951#endif /* GL_AMD_occlusion_query_event */
5952
5953#ifndef GL_AMD_performance_monitor
5954#define GL_AMD_performance_monitor 1
5955#define GL_COUNTER_TYPE_AMD 0x8BC0
5956#define GL_COUNTER_RANGE_AMD 0x8BC1
5957#define GL_UNSIGNED_INT64_AMD 0x8BC2
5958#define GL_PERCENTAGE_AMD 0x8BC3
5959#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
5960#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
5961#define GL_PERFMON_RESULT_AMD 0x8BC6
5962typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
5963typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
5964typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
5965typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
5966typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
5967typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
5968typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
5969typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
5970typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
5971typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
5972typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
5973#ifdef GL_GLEXT_PROTOTYPES
5974GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
5975GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
5976GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
5977GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
5978GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
5979GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
5980GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
5981GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
5982GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
5983GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor);
5984GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
5985#endif
5986#endif /* GL_AMD_performance_monitor */
5987
5988#ifndef GL_AMD_pinned_memory
5989#define GL_AMD_pinned_memory 1
5990#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160
5991#endif /* GL_AMD_pinned_memory */
5992
5993#ifndef GL_AMD_query_buffer_object
5994#define GL_AMD_query_buffer_object 1
5995#define GL_QUERY_BUFFER_AMD 0x9192
5996#define GL_QUERY_BUFFER_BINDING_AMD 0x9193
5997#define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194
5998#endif /* GL_AMD_query_buffer_object */
5999
6000#ifndef GL_AMD_sample_positions
6001#define GL_AMD_sample_positions 1
6002typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val);
6003#ifdef GL_GLEXT_PROTOTYPES
6004GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val);
6005#endif
6006#endif /* GL_AMD_sample_positions */
6007
6008#ifndef GL_AMD_seamless_cubemap_per_texture
6009#define GL_AMD_seamless_cubemap_per_texture 1
6010#endif /* GL_AMD_seamless_cubemap_per_texture */
6011
6012#ifndef GL_AMD_shader_atomic_counter_ops
6013#define GL_AMD_shader_atomic_counter_ops 1
6014#endif /* GL_AMD_shader_atomic_counter_ops */
6015
6016#ifndef GL_AMD_shader_ballot
6017#define GL_AMD_shader_ballot 1
6018#endif /* GL_AMD_shader_ballot */
6019
6020#ifndef GL_AMD_shader_explicit_vertex_parameter
6021#define GL_AMD_shader_explicit_vertex_parameter 1
6022#endif /* GL_AMD_shader_explicit_vertex_parameter */
6023
6024#ifndef GL_AMD_shader_gpu_shader_half_float_fetch
6025#define GL_AMD_shader_gpu_shader_half_float_fetch 1
6026#endif /* GL_AMD_shader_gpu_shader_half_float_fetch */
6027
6028#ifndef GL_AMD_shader_image_load_store_lod
6029#define GL_AMD_shader_image_load_store_lod 1
6030#endif /* GL_AMD_shader_image_load_store_lod */
6031
6032#ifndef GL_AMD_shader_stencil_export
6033#define GL_AMD_shader_stencil_export 1
6034#endif /* GL_AMD_shader_stencil_export */
6035
6036#ifndef GL_AMD_shader_trinary_minmax
6037#define GL_AMD_shader_trinary_minmax 1
6038#endif /* GL_AMD_shader_trinary_minmax */
6039
6040#ifndef GL_AMD_sparse_texture
6041#define GL_AMD_sparse_texture 1
6042#define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195
6043#define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196
6044#define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197
6045#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198
6046#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199
6047#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A
6048#define GL_MIN_SPARSE_LEVEL_AMD 0x919B
6049#define GL_MIN_LOD_WARNING_AMD 0x919C
6050#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001
6051typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
6052typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
6053#ifdef GL_GLEXT_PROTOTYPES
6054GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
6055GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
6056#endif
6057#endif /* GL_AMD_sparse_texture */
6058
6059#ifndef GL_AMD_stencil_operation_extended
6060#define GL_AMD_stencil_operation_extended 1
6061#define GL_SET_AMD 0x874A
6062#define GL_REPLACE_VALUE_AMD 0x874B
6063#define GL_STENCIL_OP_VALUE_AMD 0x874C
6064#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D
6065typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value);
6066#ifdef GL_GLEXT_PROTOTYPES
6067GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value);
6068#endif
6069#endif /* GL_AMD_stencil_operation_extended */
6070
6071#ifndef GL_AMD_texture_gather_bias_lod
6072#define GL_AMD_texture_gather_bias_lod 1
6073#endif /* GL_AMD_texture_gather_bias_lod */
6074
6075#ifndef GL_AMD_texture_texture4
6076#define GL_AMD_texture_texture4 1
6077#endif /* GL_AMD_texture_texture4 */
6078
6079#ifndef GL_AMD_transform_feedback3_lines_triangles
6080#define GL_AMD_transform_feedback3_lines_triangles 1
6081#endif /* GL_AMD_transform_feedback3_lines_triangles */
6082
6083#ifndef GL_AMD_transform_feedback4
6084#define GL_AMD_transform_feedback4 1
6085#define GL_STREAM_RASTERIZATION_AMD 0x91A0
6086#endif /* GL_AMD_transform_feedback4 */
6087
6088#ifndef GL_AMD_vertex_shader_layer
6089#define GL_AMD_vertex_shader_layer 1
6090#endif /* GL_AMD_vertex_shader_layer */
6091
6092#ifndef GL_AMD_vertex_shader_tessellator
6093#define GL_AMD_vertex_shader_tessellator 1
6094#define GL_SAMPLER_BUFFER_AMD 0x9001
6095#define GL_INT_SAMPLER_BUFFER_AMD 0x9002
6096#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
6097#define GL_TESSELLATION_MODE_AMD 0x9004
6098#define GL_TESSELLATION_FACTOR_AMD 0x9005
6099#define GL_DISCRETE_AMD 0x9006
6100#define GL_CONTINUOUS_AMD 0x9007
6101typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
6102typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
6103#ifdef GL_GLEXT_PROTOTYPES
6104GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor);
6105GLAPI void APIENTRY glTessellationModeAMD (GLenum mode);
6106#endif
6107#endif /* GL_AMD_vertex_shader_tessellator */
6108
6109#ifndef GL_AMD_vertex_shader_viewport_index
6110#define GL_AMD_vertex_shader_viewport_index 1
6111#endif /* GL_AMD_vertex_shader_viewport_index */
6112
6113#ifndef GL_APPLE_aux_depth_stencil
6114#define GL_APPLE_aux_depth_stencil 1
6115#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14
6116#endif /* GL_APPLE_aux_depth_stencil */
6117
6118#ifndef GL_APPLE_client_storage
6119#define GL_APPLE_client_storage 1
6120#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
6121#endif /* GL_APPLE_client_storage */
6122
6123#ifndef GL_APPLE_element_array
6124#define GL_APPLE_element_array 1
6125#define GL_ELEMENT_ARRAY_APPLE 0x8A0C
6126#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D
6127#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E
6128typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer);
6129typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
6130typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
6131typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
6132typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
6133#ifdef GL_GLEXT_PROTOTYPES
6134GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer);
6135GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count);
6136GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
6137GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
6138GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
6139#endif
6140#endif /* GL_APPLE_element_array */
6141
6142#ifndef GL_APPLE_fence
6143#define GL_APPLE_fence 1
6144#define GL_DRAW_PIXELS_APPLE 0x8A0A
6145#define GL_FENCE_APPLE 0x8A0B
6146typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
6147typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
6148typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
6149typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
6150typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
6151typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
6152typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
6153typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
6154#ifdef GL_GLEXT_PROTOTYPES
6155GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences);
6156GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences);
6157GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence);
6158GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence);
6159GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence);
6160GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence);
6161GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name);
6162GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name);
6163#endif
6164#endif /* GL_APPLE_fence */
6165
6166#ifndef GL_APPLE_float_pixels
6167#define GL_APPLE_float_pixels 1
6168#define GL_HALF_APPLE 0x140B
6169#define GL_RGBA_FLOAT32_APPLE 0x8814
6170#define GL_RGB_FLOAT32_APPLE 0x8815
6171#define GL_ALPHA_FLOAT32_APPLE 0x8816
6172#define GL_INTENSITY_FLOAT32_APPLE 0x8817
6173#define GL_LUMINANCE_FLOAT32_APPLE 0x8818
6174#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819
6175#define GL_RGBA_FLOAT16_APPLE 0x881A
6176#define GL_RGB_FLOAT16_APPLE 0x881B
6177#define GL_ALPHA_FLOAT16_APPLE 0x881C
6178#define GL_INTENSITY_FLOAT16_APPLE 0x881D
6179#define GL_LUMINANCE_FLOAT16_APPLE 0x881E
6180#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F
6181#define GL_COLOR_FLOAT_APPLE 0x8A0F
6182#endif /* GL_APPLE_float_pixels */
6183
6184#ifndef GL_APPLE_flush_buffer_range
6185#define GL_APPLE_flush_buffer_range 1
6186#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
6187#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
6188typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
6189typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
6190#ifdef GL_GLEXT_PROTOTYPES
6191GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param);
6192GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size);
6193#endif
6194#endif /* GL_APPLE_flush_buffer_range */
6195
6196#ifndef GL_APPLE_object_purgeable
6197#define GL_APPLE_object_purgeable 1
6198#define GL_BUFFER_OBJECT_APPLE 0x85B3
6199#define GL_RELEASED_APPLE 0x8A19
6200#define GL_VOLATILE_APPLE 0x8A1A
6201#define GL_RETAINED_APPLE 0x8A1B
6202#define GL_UNDEFINED_APPLE 0x8A1C
6203#define GL_PURGEABLE_APPLE 0x8A1D
6204typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
6205typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
6206typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params);
6207#ifdef GL_GLEXT_PROTOTYPES
6208GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
6209GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
6210GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params);
6211#endif
6212#endif /* GL_APPLE_object_purgeable */
6213
6214#ifndef GL_APPLE_rgb_422
6215#define GL_APPLE_rgb_422 1
6216#define GL_RGB_422_APPLE 0x8A1F
6217#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
6218#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
6219#define GL_RGB_RAW_422_APPLE 0x8A51
6220#endif /* GL_APPLE_rgb_422 */
6221
6222#ifndef GL_APPLE_row_bytes
6223#define GL_APPLE_row_bytes 1
6224#define GL_PACK_ROW_BYTES_APPLE 0x8A15
6225#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16
6226#endif /* GL_APPLE_row_bytes */
6227
6228#ifndef GL_APPLE_specular_vector
6229#define GL_APPLE_specular_vector 1
6230#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
6231#endif /* GL_APPLE_specular_vector */
6232
6233#ifndef GL_APPLE_texture_range
6234#define GL_APPLE_texture_range 1
6235#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7
6236#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8
6237#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
6238#define GL_STORAGE_PRIVATE_APPLE 0x85BD
6239#define GL_STORAGE_CACHED_APPLE 0x85BE
6240#define GL_STORAGE_SHARED_APPLE 0x85BF
6241typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer);
6242typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params);
6243#ifdef GL_GLEXT_PROTOTYPES
6244GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer);
6245GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params);
6246#endif
6247#endif /* GL_APPLE_texture_range */
6248
6249#ifndef GL_APPLE_transform_hint
6250#define GL_APPLE_transform_hint 1
6251#define GL_TRANSFORM_HINT_APPLE 0x85B1
6252#endif /* GL_APPLE_transform_hint */
6253
6254#ifndef GL_APPLE_vertex_array_object
6255#define GL_APPLE_vertex_array_object 1
6256#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
6257typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
6258typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
6259typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
6260typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
6261#ifdef GL_GLEXT_PROTOTYPES
6262GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array);
6263GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays);
6264GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays);
6265GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array);
6266#endif
6267#endif /* GL_APPLE_vertex_array_object */
6268
6269#ifndef GL_APPLE_vertex_array_range
6270#define GL_APPLE_vertex_array_range 1
6271#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
6272#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
6273#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
6274#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
6275#define GL_STORAGE_CLIENT_APPLE 0x85B4
6276typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
6277typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
6278typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
6279#ifdef GL_GLEXT_PROTOTYPES
6280GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer);
6281GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer);
6282GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param);
6283#endif
6284#endif /* GL_APPLE_vertex_array_range */
6285
6286#ifndef GL_APPLE_vertex_program_evaluators
6287#define GL_APPLE_vertex_program_evaluators 1
6288#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00
6289#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01
6290#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02
6291#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03
6292#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04
6293#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05
6294#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06
6295#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07
6296#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08
6297#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09
6298typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
6299typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
6300typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);
6301typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
6302typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
6303typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
6304typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
6305#ifdef GL_GLEXT_PROTOTYPES
6306GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname);
6307GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname);
6308GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname);
6309GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
6310GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
6311GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
6312GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
6313#endif
6314#endif /* GL_APPLE_vertex_program_evaluators */
6315
6316#ifndef GL_APPLE_ycbcr_422
6317#define GL_APPLE_ycbcr_422 1
6318#define GL_YCBCR_422_APPLE 0x85B9
6319#endif /* GL_APPLE_ycbcr_422 */
6320
6321#ifndef GL_ATI_draw_buffers
6322#define GL_ATI_draw_buffers 1
6323#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
6324#define GL_DRAW_BUFFER0_ATI 0x8825
6325#define GL_DRAW_BUFFER1_ATI 0x8826
6326#define GL_DRAW_BUFFER2_ATI 0x8827
6327#define GL_DRAW_BUFFER3_ATI 0x8828
6328#define GL_DRAW_BUFFER4_ATI 0x8829
6329#define GL_DRAW_BUFFER5_ATI 0x882A
6330#define GL_DRAW_BUFFER6_ATI 0x882B
6331#define GL_DRAW_BUFFER7_ATI 0x882C
6332#define GL_DRAW_BUFFER8_ATI 0x882D
6333#define GL_DRAW_BUFFER9_ATI 0x882E
6334#define GL_DRAW_BUFFER10_ATI 0x882F
6335#define GL_DRAW_BUFFER11_ATI 0x8830
6336#define GL_DRAW_BUFFER12_ATI 0x8831
6337#define GL_DRAW_BUFFER13_ATI 0x8832
6338#define GL_DRAW_BUFFER14_ATI 0x8833
6339#define GL_DRAW_BUFFER15_ATI 0x8834
6340typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
6341#ifdef GL_GLEXT_PROTOTYPES
6342GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs);
6343#endif
6344#endif /* GL_ATI_draw_buffers */
6345
6346#ifndef GL_ATI_element_array
6347#define GL_ATI_element_array 1
6348#define GL_ELEMENT_ARRAY_ATI 0x8768
6349#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
6350#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
6351typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer);
6352typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
6353typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
6354#ifdef GL_GLEXT_PROTOTYPES
6355GLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer);
6356GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count);
6357GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count);
6358#endif
6359#endif /* GL_ATI_element_array */
6360
6361#ifndef GL_ATI_envmap_bumpmap
6362#define GL_ATI_envmap_bumpmap 1
6363#define GL_BUMP_ROT_MATRIX_ATI 0x8775
6364#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
6365#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
6366#define GL_BUMP_TEX_UNITS_ATI 0x8778
6367#define GL_DUDV_ATI 0x8779
6368#define GL_DU8DV8_ATI 0x877A
6369#define GL_BUMP_ENVMAP_ATI 0x877B
6370#define GL_BUMP_TARGET_ATI 0x877C
6371typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
6372typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
6373typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
6374typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
6375#ifdef GL_GLEXT_PROTOTYPES
6376GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param);
6377GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param);
6378GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param);
6379GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param);
6380#endif
6381#endif /* GL_ATI_envmap_bumpmap */
6382
6383#ifndef GL_ATI_fragment_shader
6384#define GL_ATI_fragment_shader 1
6385#define GL_FRAGMENT_SHADER_ATI 0x8920
6386#define GL_REG_0_ATI 0x8921
6387#define GL_REG_1_ATI 0x8922
6388#define GL_REG_2_ATI 0x8923
6389#define GL_REG_3_ATI 0x8924
6390#define GL_REG_4_ATI 0x8925
6391#define GL_REG_5_ATI 0x8926
6392#define GL_REG_6_ATI 0x8927
6393#define GL_REG_7_ATI 0x8928
6394#define GL_REG_8_ATI 0x8929
6395#define GL_REG_9_ATI 0x892A
6396#define GL_REG_10_ATI 0x892B
6397#define GL_REG_11_ATI 0x892C
6398#define GL_REG_12_ATI 0x892D
6399#define GL_REG_13_ATI 0x892E
6400#define GL_REG_14_ATI 0x892F
6401#define GL_REG_15_ATI 0x8930
6402#define GL_REG_16_ATI 0x8931
6403#define GL_REG_17_ATI 0x8932
6404#define GL_REG_18_ATI 0x8933
6405#define GL_REG_19_ATI 0x8934
6406#define GL_REG_20_ATI 0x8935
6407#define GL_REG_21_ATI 0x8936
6408#define GL_REG_22_ATI 0x8937
6409#define GL_REG_23_ATI 0x8938
6410#define GL_REG_24_ATI 0x8939
6411#define GL_REG_25_ATI 0x893A
6412#define GL_REG_26_ATI 0x893B
6413#define GL_REG_27_ATI 0x893C
6414#define GL_REG_28_ATI 0x893D
6415#define GL_REG_29_ATI 0x893E
6416#define GL_REG_30_ATI 0x893F
6417#define GL_REG_31_ATI 0x8940
6418#define GL_CON_0_ATI 0x8941
6419#define GL_CON_1_ATI 0x8942
6420#define GL_CON_2_ATI 0x8943
6421#define GL_CON_3_ATI 0x8944
6422#define GL_CON_4_ATI 0x8945
6423#define GL_CON_5_ATI 0x8946
6424#define GL_CON_6_ATI 0x8947
6425#define GL_CON_7_ATI 0x8948
6426#define GL_CON_8_ATI 0x8949
6427#define GL_CON_9_ATI 0x894A
6428#define GL_CON_10_ATI 0x894B
6429#define GL_CON_11_ATI 0x894C
6430#define GL_CON_12_ATI 0x894D
6431#define GL_CON_13_ATI 0x894E
6432#define GL_CON_14_ATI 0x894F
6433#define GL_CON_15_ATI 0x8950
6434#define GL_CON_16_ATI 0x8951
6435#define GL_CON_17_ATI 0x8952
6436#define GL_CON_18_ATI 0x8953
6437#define GL_CON_19_ATI 0x8954
6438#define GL_CON_20_ATI 0x8955
6439#define GL_CON_21_ATI 0x8956
6440#define GL_CON_22_ATI 0x8957
6441#define GL_CON_23_ATI 0x8958
6442#define GL_CON_24_ATI 0x8959
6443#define GL_CON_25_ATI 0x895A
6444#define GL_CON_26_ATI 0x895B
6445#define GL_CON_27_ATI 0x895C
6446#define GL_CON_28_ATI 0x895D
6447#define GL_CON_29_ATI 0x895E
6448#define GL_CON_30_ATI 0x895F
6449#define GL_CON_31_ATI 0x8960
6450#define GL_MOV_ATI 0x8961
6451#define GL_ADD_ATI 0x8963
6452#define GL_MUL_ATI 0x8964
6453#define GL_SUB_ATI 0x8965
6454#define GL_DOT3_ATI 0x8966
6455#define GL_DOT4_ATI 0x8967
6456#define GL_MAD_ATI 0x8968
6457#define GL_LERP_ATI 0x8969
6458#define GL_CND_ATI 0x896A
6459#define GL_CND0_ATI 0x896B
6460#define GL_DOT2_ADD_ATI 0x896C
6461#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
6462#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
6463#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
6464#define GL_NUM_PASSES_ATI 0x8970
6465#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
6466#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
6467#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
6468#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
6469#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
6470#define GL_SWIZZLE_STR_ATI 0x8976
6471#define GL_SWIZZLE_STQ_ATI 0x8977
6472#define GL_SWIZZLE_STR_DR_ATI 0x8978
6473#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
6474#define GL_SWIZZLE_STRQ_ATI 0x897A
6475#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
6476#define GL_RED_BIT_ATI 0x00000001
6477#define GL_GREEN_BIT_ATI 0x00000002
6478#define GL_BLUE_BIT_ATI 0x00000004
6479#define GL_2X_BIT_ATI 0x00000001
6480#define GL_4X_BIT_ATI 0x00000002
6481#define GL_8X_BIT_ATI 0x00000004
6482#define GL_HALF_BIT_ATI 0x00000008
6483#define GL_QUARTER_BIT_ATI 0x00000010
6484#define GL_EIGHTH_BIT_ATI 0x00000020
6485#define GL_SATURATE_BIT_ATI 0x00000040
6486#define GL_COMP_BIT_ATI 0x00000002
6487#define GL_NEGATE_BIT_ATI 0x00000004
6488#define GL_BIAS_BIT_ATI 0x00000008
6489typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
6490typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
6491typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
6492typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
6493typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
6494typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
6495typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
6496typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
6497typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
6498typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
6499typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
6500typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
6501typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
6502typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
6503#ifdef GL_GLEXT_PROTOTYPES
6504GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range);
6505GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id);
6506GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id);
6507GLAPI void APIENTRY glBeginFragmentShaderATI (void);
6508GLAPI void APIENTRY glEndFragmentShaderATI (void);
6509GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle);
6510GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle);
6511GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
6512GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
6513GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
6514GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
6515GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
6516GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
6517GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value);
6518#endif
6519#endif /* GL_ATI_fragment_shader */
6520
6521#ifndef GL_ATI_map_object_buffer
6522#define GL_ATI_map_object_buffer 1
6523typedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
6524typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
6525#ifdef GL_GLEXT_PROTOTYPES
6526GLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer);
6527GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer);
6528#endif
6529#endif /* GL_ATI_map_object_buffer */
6530
6531#ifndef GL_ATI_meminfo
6532#define GL_ATI_meminfo 1
6533#define GL_VBO_FREE_MEMORY_ATI 0x87FB
6534#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
6535#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
6536#endif /* GL_ATI_meminfo */
6537
6538#ifndef GL_ATI_pixel_format_float
6539#define GL_ATI_pixel_format_float 1
6540#define GL_RGBA_FLOAT_MODE_ATI 0x8820
6541#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
6542#endif /* GL_ATI_pixel_format_float */
6543
6544#ifndef GL_ATI_pn_triangles
6545#define GL_ATI_pn_triangles 1
6546#define GL_PN_TRIANGLES_ATI 0x87F0
6547#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
6548#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
6549#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
6550#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
6551#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
6552#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
6553#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
6554#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
6555typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
6556typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
6557#ifdef GL_GLEXT_PROTOTYPES
6558GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param);
6559GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param);
6560#endif
6561#endif /* GL_ATI_pn_triangles */
6562
6563#ifndef GL_ATI_separate_stencil
6564#define GL_ATI_separate_stencil 1
6565#define GL_STENCIL_BACK_FUNC_ATI 0x8800
6566#define GL_STENCIL_BACK_FAIL_ATI 0x8801
6567#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
6568#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
6569typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
6570typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
6571#ifdef GL_GLEXT_PROTOTYPES
6572GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
6573GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
6574#endif
6575#endif /* GL_ATI_separate_stencil */
6576
6577#ifndef GL_ATI_text_fragment_shader
6578#define GL_ATI_text_fragment_shader 1
6579#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
6580#endif /* GL_ATI_text_fragment_shader */
6581
6582#ifndef GL_ATI_texture_env_combine3
6583#define GL_ATI_texture_env_combine3 1
6584#define GL_MODULATE_ADD_ATI 0x8744
6585#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
6586#define GL_MODULATE_SUBTRACT_ATI 0x8746
6587#endif /* GL_ATI_texture_env_combine3 */
6588
6589#ifndef GL_ATI_texture_float
6590#define GL_ATI_texture_float 1
6591#define GL_RGBA_FLOAT32_ATI 0x8814
6592#define GL_RGB_FLOAT32_ATI 0x8815
6593#define GL_ALPHA_FLOAT32_ATI 0x8816
6594#define GL_INTENSITY_FLOAT32_ATI 0x8817
6595#define GL_LUMINANCE_FLOAT32_ATI 0x8818
6596#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
6597#define GL_RGBA_FLOAT16_ATI 0x881A
6598#define GL_RGB_FLOAT16_ATI 0x881B
6599#define GL_ALPHA_FLOAT16_ATI 0x881C
6600#define GL_INTENSITY_FLOAT16_ATI 0x881D
6601#define GL_LUMINANCE_FLOAT16_ATI 0x881E
6602#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
6603#endif /* GL_ATI_texture_float */
6604
6605#ifndef GL_ATI_texture_mirror_once
6606#define GL_ATI_texture_mirror_once 1
6607#define GL_MIRROR_CLAMP_ATI 0x8742
6608#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
6609#endif /* GL_ATI_texture_mirror_once */
6610
6611#ifndef GL_ATI_vertex_array_object
6612#define GL_ATI_vertex_array_object 1
6613#define GL_STATIC_ATI 0x8760
6614#define GL_DYNAMIC_ATI 0x8761
6615#define GL_PRESERVE_ATI 0x8762
6616#define GL_DISCARD_ATI 0x8763
6617#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
6618#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
6619#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
6620#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
6621typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage);
6622typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
6623typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
6624typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
6625typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
6626typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
6627typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
6628typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
6629typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
6630typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
6631typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
6632typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
6633#ifdef GL_GLEXT_PROTOTYPES
6634GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage);
6635GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer);
6636GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
6637GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params);
6638GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params);
6639GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer);
6640GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
6641GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params);
6642GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params);
6643GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
6644GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params);
6645GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params);
6646#endif
6647#endif /* GL_ATI_vertex_array_object */
6648
6649#ifndef GL_ATI_vertex_attrib_array_object
6650#define GL_ATI_vertex_attrib_array_object 1
6651typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
6652typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
6653typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
6654#ifdef GL_GLEXT_PROTOTYPES
6655GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
6656GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params);
6657GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params);
6658#endif
6659#endif /* GL_ATI_vertex_attrib_array_object */
6660
6661#ifndef GL_ATI_vertex_streams
6662#define GL_ATI_vertex_streams 1
6663#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
6664#define GL_VERTEX_STREAM0_ATI 0x876C
6665#define GL_VERTEX_STREAM1_ATI 0x876D
6666#define GL_VERTEX_STREAM2_ATI 0x876E
6667#define GL_VERTEX_STREAM3_ATI 0x876F
6668#define GL_VERTEX_STREAM4_ATI 0x8770
6669#define GL_VERTEX_STREAM5_ATI 0x8771
6670#define GL_VERTEX_STREAM6_ATI 0x8772
6671#define GL_VERTEX_STREAM7_ATI 0x8773
6672#define GL_VERTEX_SOURCE_ATI 0x8774
6673typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
6674typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
6675typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
6676typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
6677typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
6678typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
6679typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
6680typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
6681typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
6682typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
6683typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
6684typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
6685typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
6686typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
6687typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
6688typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
6689typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
6690typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
6691typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
6692typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
6693typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
6694typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
6695typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
6696typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
6697typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
6698typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
6699typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
6700typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
6701typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
6702typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
6703typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6704typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
6705typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
6706typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
6707typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
6708typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
6709typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
6710typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
6711typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
6712typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
6713typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
6714typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
6715typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
6716typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
6717typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
6718#ifdef GL_GLEXT_PROTOTYPES
6719GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x);
6720GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords);
6721GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x);
6722GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords);
6723GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x);
6724GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords);
6725GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x);
6726GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords);
6727GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y);
6728GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords);
6729GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y);
6730GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords);
6731GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y);
6732GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords);
6733GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y);
6734GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords);
6735GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z);
6736GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords);
6737GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z);
6738GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords);
6739GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
6740GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords);
6741GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
6742GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords);
6743GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
6744GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords);
6745GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w);
6746GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords);
6747GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
6748GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords);
6749GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6750GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords);
6751GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
6752GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords);
6753GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
6754GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords);
6755GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz);
6756GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords);
6757GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
6758GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords);
6759GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
6760GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords);
6761GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream);
6762GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param);
6763GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param);
6764#endif
6765#endif /* GL_ATI_vertex_streams */
6766
6767#ifndef GL_EXT_422_pixels
6768#define GL_EXT_422_pixels 1
6769#define GL_422_EXT 0x80CC
6770#define GL_422_REV_EXT 0x80CD
6771#define GL_422_AVERAGE_EXT 0x80CE
6772#define GL_422_REV_AVERAGE_EXT 0x80CF
6773#endif /* GL_EXT_422_pixels */
6774
6775#ifndef GL_EXT_EGL_image_storage
6776#define GL_EXT_EGL_image_storage 1
6777typedef void *GLeglImageOES;
6778typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC) (GLenum target, GLeglImageOES image, const GLint* attrib_list);
6779typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC) (GLuint texture, GLeglImageOES image, const GLint* attrib_list);
6780#ifdef GL_GLEXT_PROTOTYPES
6781GLAPI void APIENTRY glEGLImageTargetTexStorageEXT (GLenum target, GLeglImageOES image, const GLint* attrib_list);
6782GLAPI void APIENTRY glEGLImageTargetTextureStorageEXT (GLuint texture, GLeglImageOES image, const GLint* attrib_list);
6783#endif
6784#endif /* GL_EXT_EGL_image_storage */
6785
6786#ifndef GL_EXT_EGL_sync
6787#define GL_EXT_EGL_sync 1
6788#endif /* GL_EXT_EGL_sync */
6789
6790#ifndef GL_EXT_abgr
6791#define GL_EXT_abgr 1
6792#define GL_ABGR_EXT 0x8000
6793#endif /* GL_EXT_abgr */
6794
6795#ifndef GL_EXT_bgra
6796#define GL_EXT_bgra 1
6797#define GL_BGR_EXT 0x80E0
6798#define GL_BGRA_EXT 0x80E1
6799#endif /* GL_EXT_bgra */
6800
6801#ifndef GL_EXT_bindable_uniform
6802#define GL_EXT_bindable_uniform 1
6803#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
6804#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
6805#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
6806#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
6807#define GL_UNIFORM_BUFFER_EXT 0x8DEE
6808#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
6809typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
6810typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
6811typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
6812#ifdef GL_GLEXT_PROTOTYPES
6813GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer);
6814GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location);
6815GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location);
6816#endif
6817#endif /* GL_EXT_bindable_uniform */
6818
6819#ifndef GL_EXT_blend_color
6820#define GL_EXT_blend_color 1
6821#define GL_CONSTANT_COLOR_EXT 0x8001
6822#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
6823#define GL_CONSTANT_ALPHA_EXT 0x8003
6824#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
6825#define GL_BLEND_COLOR_EXT 0x8005
6826typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
6827#ifdef GL_GLEXT_PROTOTYPES
6828GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
6829#endif
6830#endif /* GL_EXT_blend_color */
6831
6832#ifndef GL_EXT_blend_equation_separate
6833#define GL_EXT_blend_equation_separate 1
6834#define GL_BLEND_EQUATION_RGB_EXT 0x8009
6835#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
6836typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
6837#ifdef GL_GLEXT_PROTOTYPES
6838GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha);
6839#endif
6840#endif /* GL_EXT_blend_equation_separate */
6841
6842#ifndef GL_EXT_blend_func_separate
6843#define GL_EXT_blend_func_separate 1
6844#define GL_BLEND_DST_RGB_EXT 0x80C8
6845#define GL_BLEND_SRC_RGB_EXT 0x80C9
6846#define GL_BLEND_DST_ALPHA_EXT 0x80CA
6847#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
6848typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
6849#ifdef GL_GLEXT_PROTOTYPES
6850GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
6851#endif
6852#endif /* GL_EXT_blend_func_separate */
6853
6854#ifndef GL_EXT_blend_logic_op
6855#define GL_EXT_blend_logic_op 1
6856#endif /* GL_EXT_blend_logic_op */
6857
6858#ifndef GL_EXT_blend_minmax
6859#define GL_EXT_blend_minmax 1
6860#define GL_MIN_EXT 0x8007
6861#define GL_MAX_EXT 0x8008
6862#define GL_FUNC_ADD_EXT 0x8006
6863#define GL_BLEND_EQUATION_EXT 0x8009
6864typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
6865#ifdef GL_GLEXT_PROTOTYPES
6866GLAPI void APIENTRY glBlendEquationEXT (GLenum mode);
6867#endif
6868#endif /* GL_EXT_blend_minmax */
6869
6870#ifndef GL_EXT_blend_subtract
6871#define GL_EXT_blend_subtract 1
6872#define GL_FUNC_SUBTRACT_EXT 0x800A
6873#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
6874#endif /* GL_EXT_blend_subtract */
6875
6876#ifndef GL_EXT_clip_volume_hint
6877#define GL_EXT_clip_volume_hint 1
6878#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
6879#endif /* GL_EXT_clip_volume_hint */
6880
6881#ifndef GL_EXT_cmyka
6882#define GL_EXT_cmyka 1
6883#define GL_CMYK_EXT 0x800C
6884#define GL_CMYKA_EXT 0x800D
6885#define GL_PACK_CMYK_HINT_EXT 0x800E
6886#define GL_UNPACK_CMYK_HINT_EXT 0x800F
6887#endif /* GL_EXT_cmyka */
6888
6889#ifndef GL_EXT_color_subtable
6890#define GL_EXT_color_subtable 1
6891typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
6892typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
6893#ifdef GL_GLEXT_PROTOTYPES
6894GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
6895GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
6896#endif
6897#endif /* GL_EXT_color_subtable */
6898
6899#ifndef GL_EXT_compiled_vertex_array
6900#define GL_EXT_compiled_vertex_array 1
6901#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
6902#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
6903typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
6904typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
6905#ifdef GL_GLEXT_PROTOTYPES
6906GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count);
6907GLAPI void APIENTRY glUnlockArraysEXT (void);
6908#endif
6909#endif /* GL_EXT_compiled_vertex_array */
6910
6911#ifndef GL_EXT_convolution
6912#define GL_EXT_convolution 1
6913#define GL_CONVOLUTION_1D_EXT 0x8010
6914#define GL_CONVOLUTION_2D_EXT 0x8011
6915#define GL_SEPARABLE_2D_EXT 0x8012
6916#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
6917#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
6918#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
6919#define GL_REDUCE_EXT 0x8016
6920#define GL_CONVOLUTION_FORMAT_EXT 0x8017
6921#define GL_CONVOLUTION_WIDTH_EXT 0x8018
6922#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
6923#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
6924#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
6925#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
6926#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
6927#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
6928#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
6929#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
6930#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
6931#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
6932#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
6933typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
6934typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
6935typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
6936typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
6937typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
6938typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
6939typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
6940typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
6941typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image);
6942typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
6943typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
6944typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
6945typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
6946#ifdef GL_GLEXT_PROTOTYPES
6947GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
6948GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
6949GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params);
6950GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
6951GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params);
6952GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params);
6953GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
6954GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
6955GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image);
6956GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
6957GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params);
6958GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
6959GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
6960#endif
6961#endif /* GL_EXT_convolution */
6962
6963#ifndef GL_EXT_coordinate_frame
6964#define GL_EXT_coordinate_frame 1
6965#define GL_TANGENT_ARRAY_EXT 0x8439
6966#define GL_BINORMAL_ARRAY_EXT 0x843A
6967#define GL_CURRENT_TANGENT_EXT 0x843B
6968#define GL_CURRENT_BINORMAL_EXT 0x843C
6969#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
6970#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
6971#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
6972#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
6973#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
6974#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
6975#define GL_MAP1_TANGENT_EXT 0x8444
6976#define GL_MAP2_TANGENT_EXT 0x8445
6977#define GL_MAP1_BINORMAL_EXT 0x8446
6978#define GL_MAP2_BINORMAL_EXT 0x8447
6979typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
6980typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
6981typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
6982typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
6983typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
6984typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
6985typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
6986typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
6987typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
6988typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
6989typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
6990typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
6991typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
6992typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
6993typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
6994typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
6995typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
6996typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
6997typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
6998typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
6999typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
7000typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
7001#ifdef GL_GLEXT_PROTOTYPES
7002GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz);
7003GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v);
7004GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz);
7005GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v);
7006GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz);
7007GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v);
7008GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz);
7009GLAPI void APIENTRY glTangent3ivEXT (const GLint *v);
7010GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz);
7011GLAPI void APIENTRY glTangent3svEXT (const GLshort *v);
7012GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz);
7013GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v);
7014GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz);
7015GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v);
7016GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz);
7017GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v);
7018GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz);
7019GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v);
7020GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz);
7021GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v);
7022GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer);
7023GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer);
7024#endif
7025#endif /* GL_EXT_coordinate_frame */
7026
7027#ifndef GL_EXT_copy_texture
7028#define GL_EXT_copy_texture 1
7029typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
7030typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
7031typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
7032typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7033typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7034#ifdef GL_GLEXT_PROTOTYPES
7035GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
7036GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
7037GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
7038GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7039GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7040#endif
7041#endif /* GL_EXT_copy_texture */
7042
7043#ifndef GL_EXT_cull_vertex
7044#define GL_EXT_cull_vertex 1
7045#define GL_CULL_VERTEX_EXT 0x81AA
7046#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
7047#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
7048typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
7049typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
7050#ifdef GL_GLEXT_PROTOTYPES
7051GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params);
7052GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params);
7053#endif
7054#endif /* GL_EXT_cull_vertex */
7055
7056#ifndef GL_EXT_debug_label
7057#define GL_EXT_debug_label 1
7058#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
7059#define GL_PROGRAM_OBJECT_EXT 0x8B40
7060#define GL_SHADER_OBJECT_EXT 0x8B48
7061#define GL_BUFFER_OBJECT_EXT 0x9151
7062#define GL_QUERY_OBJECT_EXT 0x9153
7063#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
7064typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
7065typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
7066#ifdef GL_GLEXT_PROTOTYPES
7067GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
7068GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
7069#endif
7070#endif /* GL_EXT_debug_label */
7071
7072#ifndef GL_EXT_debug_marker
7073#define GL_EXT_debug_marker 1
7074typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
7075typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
7076typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
7077#ifdef GL_GLEXT_PROTOTYPES
7078GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
7079GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
7080GLAPI void APIENTRY glPopGroupMarkerEXT (void);
7081#endif
7082#endif /* GL_EXT_debug_marker */
7083
7084#ifndef GL_EXT_depth_bounds_test
7085#define GL_EXT_depth_bounds_test 1
7086#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
7087#define GL_DEPTH_BOUNDS_EXT 0x8891
7088typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
7089#ifdef GL_GLEXT_PROTOTYPES
7090GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax);
7091#endif
7092#endif /* GL_EXT_depth_bounds_test */
7093
7094#ifndef GL_EXT_direct_state_access
7095#define GL_EXT_direct_state_access 1
7096#define GL_PROGRAM_MATRIX_EXT 0x8E2D
7097#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E
7098#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F
7099typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);
7100typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);
7101typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);
7102typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);
7103typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);
7104typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
7105typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
7106typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
7107typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
7108typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
7109typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
7110typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
7111typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
7112typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);
7113typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);
7114typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
7115typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
7116typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);
7117typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
7118typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);
7119typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
7120typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
7121typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
7122typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
7123typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
7124typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
7125typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
7126typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
7127typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7128typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
7129typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
7130typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
7131typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
7132typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
7133typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
7134typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
7135typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7136typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);
7137typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
7138typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
7139typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
7140typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
7141typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
7142typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
7143typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
7144typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
7145typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
7146typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);
7147typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
7148typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
7149typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
7150typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
7151typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
7152typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
7153typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
7154typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
7155typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
7156typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
7157typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
7158typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
7159typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
7160typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
7161typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
7162typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
7163typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
7164typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7165typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
7166typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
7167typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
7168typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
7169typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
7170typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
7171typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
7172typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7173typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
7174typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
7175typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);
7176typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);
7177typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data);
7178typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
7179typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
7180typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
7181typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
7182typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
7183typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
7184typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
7185typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
7186typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
7187typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
7188typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
7189typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img);
7190typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
7191typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
7192typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
7193typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
7194typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
7195typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
7196typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img);
7197typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
7198typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
7199typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
7200typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
7201typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
7202typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
7203typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);
7204typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);
7205typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);
7206typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params);
7207typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
7208typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
7209typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
7210typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
7211typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
7212typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
7213typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
7214typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
7215typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
7216typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
7217typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
7218typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
7219typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
7220typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
7221typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
7222typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
7223typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
7224typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7225typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7226typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7227typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7228typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7229typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7230typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7231typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7232typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7233typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
7234typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
7235typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
7236typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
7237typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
7238typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);
7239typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
7240typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
7241typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
7242typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
7243typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
7244typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
7245typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
7246typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
7247typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
7248typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
7249typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
7250typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
7251typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
7252typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
7253typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);
7254typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
7255typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
7256typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);
7257typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
7258typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);
7259typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);
7260typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
7261typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
7262typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);
7263typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);
7264typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);
7265typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
7266typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
7267typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);
7268typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
7269typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);
7270typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);
7271typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);
7272typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);
7273typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string);
7274typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
7275typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
7276typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
7277typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
7278typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);
7279typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
7280typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
7281typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
7282typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
7283typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
7284typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);
7285typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);
7286typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
7287typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
7288typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
7289typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
7290typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
7291typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
7292typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
7293typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
7294typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);
7295typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);
7296typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7297typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7298typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
7299typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
7300typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
7301typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7302typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7303typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
7304typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7305typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
7306typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7307typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
7308typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
7309typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
7310typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
7311typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param);
7312typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param);
7313typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
7314typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);
7315typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
7316typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
7317typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
7318typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
7319typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
7320typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);
7321typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
7322typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);
7323typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);
7324typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
7325typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
7326typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
7327typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
7328typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
7329typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
7330typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7331typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7332typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7333typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7334typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7335typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7336typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7337typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7338typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7339typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
7340typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
7341typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
7342typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
7343typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
7344typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
7345typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
7346typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
7347typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
7348typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
7349typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
7350typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
7351typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7352typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
7353typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor);
7354#ifdef GL_GLEXT_PROTOTYPES
7355GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);
7356GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);
7357GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);
7358GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);
7359GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode);
7360GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
7361GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
7362GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
7363GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
7364GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
7365GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
7366GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
7367GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
7368GLAPI void APIENTRY glMatrixPopEXT (GLenum mode);
7369GLAPI void APIENTRY glMatrixPushEXT (GLenum mode);
7370GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask);
7371GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask);
7372GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param);
7373GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
7374GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param);
7375GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
7376GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
7377GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
7378GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
7379GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
7380GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
7381GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
7382GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
7383GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7384GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
7385GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
7386GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
7387GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
7388GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
7389GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
7390GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
7391GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7392GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture);
7393GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
7394GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
7395GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
7396GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
7397GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
7398GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
7399GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
7400GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
7401GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
7402GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param);
7403GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
7404GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
7405GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
7406GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
7407GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
7408GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
7409GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
7410GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
7411GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
7412GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
7413GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
7414GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
7415GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
7416GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
7417GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
7418GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
7419GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
7420GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7421GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
7422GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
7423GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
7424GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
7425GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
7426GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
7427GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
7428GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
7429GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index);
7430GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index);
7431GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data);
7432GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data);
7433GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data);
7434GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index);
7435GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index);
7436GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index);
7437GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data);
7438GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data);
7439GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
7440GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
7441GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
7442GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
7443GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
7444GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
7445GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img);
7446GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
7447GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
7448GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
7449GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
7450GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
7451GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
7452GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img);
7453GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);
7454GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);
7455GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);
7456GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);
7457GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
7458GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
7459GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access);
7460GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer);
7461GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params);
7462GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params);
7463GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
7464GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
7465GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
7466GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
7467GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
7468GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
7469GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
7470GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
7471GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
7472GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
7473GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
7474GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
7475GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
7476GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
7477GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
7478GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
7479GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
7480GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7481GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7482GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7483GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7484GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7485GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7486GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7487GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7488GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
7489GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
7490GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
7491GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
7492GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
7493GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
7494GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params);
7495GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
7496GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
7497GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
7498GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
7499GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
7500GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
7501GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
7502GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
7503GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
7504GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
7505GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
7506GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
7507GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
7508GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
7509GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params);
7510GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
7511GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
7512GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params);
7513GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
7514GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params);
7515GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params);
7516GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index);
7517GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index);
7518GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params);
7519GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params);
7520GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params);
7521GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
7522GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
7523GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params);
7524GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
7525GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params);
7526GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params);
7527GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params);
7528GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params);
7529GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string);
7530GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
7531GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params);
7532GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
7533GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
7534GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target);
7535GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
7536GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
7537GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
7538GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
7539GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
7540GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target);
7541GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target);
7542GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode);
7543GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs);
7544GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode);
7545GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
7546GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
7547GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
7548GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
7549GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
7550GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer);
7551GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer);
7552GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7553GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7554GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
7555GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
7556GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
7557GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7558GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7559GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
7560GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7561GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
7562GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7563GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array);
7564GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array);
7565GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
7566GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
7567GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param);
7568GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param);
7569GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
7570GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param);
7571GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
7572GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);
7573GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
7574GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
7575GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
7576GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);
7577GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
7578GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);
7579GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y);
7580GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
7581GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
7582GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
7583GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
7584GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
7585GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
7586GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7587GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7588GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7589GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7590GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7591GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7592GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7593GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7594GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
7595GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
7596GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
7597GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
7598GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
7599GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
7600GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
7601GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
7602GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
7603GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
7604GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
7605GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
7606GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor);
7607GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
7608GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
7609GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor);
7610#endif
7611#endif /* GL_EXT_direct_state_access */
7612
7613#ifndef GL_EXT_draw_buffers2
7614#define GL_EXT_draw_buffers2 1
7615typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
7616#ifdef GL_GLEXT_PROTOTYPES
7617GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
7618#endif
7619#endif /* GL_EXT_draw_buffers2 */
7620
7621#ifndef GL_EXT_draw_instanced
7622#define GL_EXT_draw_instanced 1
7623typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
7624typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
7625#ifdef GL_GLEXT_PROTOTYPES
7626GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
7627GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
7628#endif
7629#endif /* GL_EXT_draw_instanced */
7630
7631#ifndef GL_EXT_draw_range_elements
7632#define GL_EXT_draw_range_elements 1
7633#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
7634#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
7635typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
7636#ifdef GL_GLEXT_PROTOTYPES
7637GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
7638#endif
7639#endif /* GL_EXT_draw_range_elements */
7640
7641#ifndef GL_EXT_external_buffer
7642#define GL_EXT_external_buffer 1
7643typedef void *GLeglClientBufferEXT;
7644typedef void (APIENTRYP PFNGLBUFFERSTORAGEEXTERNALEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags);
7645typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTERNALEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags);
7646#ifdef GL_GLEXT_PROTOTYPES
7647GLAPI void APIENTRY glBufferStorageExternalEXT (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags);
7648GLAPI void APIENTRY glNamedBufferStorageExternalEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags);
7649#endif
7650#endif /* GL_EXT_external_buffer */
7651
7652#ifndef GL_EXT_fog_coord
7653#define GL_EXT_fog_coord 1
7654#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
7655#define GL_FOG_COORDINATE_EXT 0x8451
7656#define GL_FRAGMENT_DEPTH_EXT 0x8452
7657#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
7658#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
7659#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
7660#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
7661#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
7662typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
7663typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
7664typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
7665typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
7666typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
7667#ifdef GL_GLEXT_PROTOTYPES
7668GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord);
7669GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord);
7670GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord);
7671GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord);
7672GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer);
7673#endif
7674#endif /* GL_EXT_fog_coord */
7675
7676#ifndef GL_EXT_framebuffer_blit
7677#define GL_EXT_framebuffer_blit 1
7678#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
7679#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
7680#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6
7681#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
7682typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
7683#ifdef GL_GLEXT_PROTOTYPES
7684GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
7685#endif
7686#endif /* GL_EXT_framebuffer_blit */
7687
7688#ifndef GL_EXT_framebuffer_multisample
7689#define GL_EXT_framebuffer_multisample 1
7690#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
7691#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
7692#define GL_MAX_SAMPLES_EXT 0x8D57
7693typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
7694#ifdef GL_GLEXT_PROTOTYPES
7695GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
7696#endif
7697#endif /* GL_EXT_framebuffer_multisample */
7698
7699#ifndef GL_EXT_framebuffer_multisample_blit_scaled
7700#define GL_EXT_framebuffer_multisample_blit_scaled 1
7701#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA
7702#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB
7703#endif /* GL_EXT_framebuffer_multisample_blit_scaled */
7704
7705#ifndef GL_EXT_framebuffer_object
7706#define GL_EXT_framebuffer_object 1
7707#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
7708#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
7709#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
7710#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
7711#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
7712#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
7713#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
7714#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
7715#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
7716#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
7717#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
7718#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
7719#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
7720#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
7721#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
7722#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
7723#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
7724#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
7725#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
7726#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
7727#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
7728#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
7729#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
7730#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
7731#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
7732#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
7733#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
7734#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
7735#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
7736#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
7737#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
7738#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
7739#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
7740#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
7741#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
7742#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
7743#define GL_FRAMEBUFFER_EXT 0x8D40
7744#define GL_RENDERBUFFER_EXT 0x8D41
7745#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
7746#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
7747#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
7748#define GL_STENCIL_INDEX1_EXT 0x8D46
7749#define GL_STENCIL_INDEX4_EXT 0x8D47
7750#define GL_STENCIL_INDEX8_EXT 0x8D48
7751#define GL_STENCIL_INDEX16_EXT 0x8D49
7752#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
7753#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
7754#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
7755#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
7756#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
7757#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
7758typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
7759typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
7760typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
7761typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
7762typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
7763typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7764typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
7765typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
7766typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
7767typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
7768typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
7769typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
7770typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
7771typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
7772typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
7773typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
7774typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
7775#ifdef GL_GLEXT_PROTOTYPES
7776GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer);
7777GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer);
7778GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers);
7779GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers);
7780GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
7781GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params);
7782GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer);
7783GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer);
7784GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers);
7785GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers);
7786GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target);
7787GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
7788GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
7789GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
7790GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
7791GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params);
7792GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target);
7793#endif
7794#endif /* GL_EXT_framebuffer_object */
7795
7796#ifndef GL_EXT_framebuffer_sRGB
7797#define GL_EXT_framebuffer_sRGB 1
7798#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
7799#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
7800#endif /* GL_EXT_framebuffer_sRGB */
7801
7802#ifndef GL_EXT_geometry_shader4
7803#define GL_EXT_geometry_shader4 1
7804#define GL_GEOMETRY_SHADER_EXT 0x8DD9
7805#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
7806#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
7807#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
7808#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
7809#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
7810#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
7811#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
7812#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
7813#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
7814#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
7815#define GL_LINES_ADJACENCY_EXT 0x000A
7816#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
7817#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
7818#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
7819#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
7820#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
7821#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
7822#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
7823#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
7824typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
7825#ifdef GL_GLEXT_PROTOTYPES
7826GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
7827#endif
7828#endif /* GL_EXT_geometry_shader4 */
7829
7830#ifndef GL_EXT_gpu_program_parameters
7831#define GL_EXT_gpu_program_parameters 1
7832typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
7833typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
7834#ifdef GL_GLEXT_PROTOTYPES
7835GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
7836GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
7837#endif
7838#endif /* GL_EXT_gpu_program_parameters */
7839
7840#ifndef GL_EXT_gpu_shader4
7841#define GL_EXT_gpu_shader4 1
7842#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
7843#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
7844#define GL_SAMPLER_BUFFER_EXT 0x8DC2
7845#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
7846#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
7847#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
7848#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
7849#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
7850#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
7851#define GL_INT_SAMPLER_1D_EXT 0x8DC9
7852#define GL_INT_SAMPLER_2D_EXT 0x8DCA
7853#define GL_INT_SAMPLER_3D_EXT 0x8DCB
7854#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
7855#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
7856#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
7857#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
7858#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
7859#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
7860#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
7861#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
7862#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
7863#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
7864#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
7865#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
7866#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
7867#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904
7868#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905
7869#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD
7870typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
7871typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
7872typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
7873typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
7874typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
7875typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
7876typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
7877typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
7878typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
7879typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
7880typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
7881typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
7882typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
7883typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
7884typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
7885typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
7886typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
7887typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
7888typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
7889typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
7890typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
7891typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
7892typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
7893typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
7894typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
7895typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
7896typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
7897typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
7898typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
7899typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
7900typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
7901typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
7902typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
7903typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
7904#ifdef GL_GLEXT_PROTOTYPES
7905GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params);
7906GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);
7907GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name);
7908GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);
7909GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1);
7910GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2);
7911GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
7912GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value);
7913GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value);
7914GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value);
7915GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value);
7916GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x);
7917GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y);
7918GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z);
7919GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w);
7920GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x);
7921GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y);
7922GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z);
7923GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
7924GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v);
7925GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v);
7926GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v);
7927GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v);
7928GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v);
7929GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v);
7930GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v);
7931GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v);
7932GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v);
7933GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v);
7934GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v);
7935GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v);
7936GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
7937GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params);
7938GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params);
7939#endif
7940#endif /* GL_EXT_gpu_shader4 */
7941
7942#ifndef GL_EXT_histogram
7943#define GL_EXT_histogram 1
7944#define GL_HISTOGRAM_EXT 0x8024
7945#define GL_PROXY_HISTOGRAM_EXT 0x8025
7946#define GL_HISTOGRAM_WIDTH_EXT 0x8026
7947#define GL_HISTOGRAM_FORMAT_EXT 0x8027
7948#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
7949#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
7950#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
7951#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
7952#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
7953#define GL_HISTOGRAM_SINK_EXT 0x802D
7954#define GL_MINMAX_EXT 0x802E
7955#define GL_MINMAX_FORMAT_EXT 0x802F
7956#define GL_MINMAX_SINK_EXT 0x8030
7957#define GL_TABLE_TOO_LARGE_EXT 0x8031
7958typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
7959typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
7960typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7961typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
7962typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
7963typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7964typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
7965typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
7966typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
7967typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
7968#ifdef GL_GLEXT_PROTOTYPES
7969GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
7970GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
7971GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params);
7972GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
7973GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
7974GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params);
7975GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
7976GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink);
7977GLAPI void APIENTRY glResetHistogramEXT (GLenum target);
7978GLAPI void APIENTRY glResetMinmaxEXT (GLenum target);
7979#endif
7980#endif /* GL_EXT_histogram */
7981
7982#ifndef GL_EXT_index_array_formats
7983#define GL_EXT_index_array_formats 1
7984#define GL_IUI_V2F_EXT 0x81AD
7985#define GL_IUI_V3F_EXT 0x81AE
7986#define GL_IUI_N3F_V2F_EXT 0x81AF
7987#define GL_IUI_N3F_V3F_EXT 0x81B0
7988#define GL_T2F_IUI_V2F_EXT 0x81B1
7989#define GL_T2F_IUI_V3F_EXT 0x81B2
7990#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
7991#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
7992#endif /* GL_EXT_index_array_formats */
7993
7994#ifndef GL_EXT_index_func
7995#define GL_EXT_index_func 1
7996#define GL_INDEX_TEST_EXT 0x81B5
7997#define GL_INDEX_TEST_FUNC_EXT 0x81B6
7998#define GL_INDEX_TEST_REF_EXT 0x81B7
7999typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
8000#ifdef GL_GLEXT_PROTOTYPES
8001GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref);
8002#endif
8003#endif /* GL_EXT_index_func */
8004
8005#ifndef GL_EXT_index_material
8006#define GL_EXT_index_material 1
8007#define GL_INDEX_MATERIAL_EXT 0x81B8
8008#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
8009#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
8010typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
8011#ifdef GL_GLEXT_PROTOTYPES
8012GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode);
8013#endif
8014#endif /* GL_EXT_index_material */
8015
8016#ifndef GL_EXT_index_texture
8017#define GL_EXT_index_texture 1
8018#endif /* GL_EXT_index_texture */
8019
8020#ifndef GL_EXT_light_texture
8021#define GL_EXT_light_texture 1
8022#define GL_FRAGMENT_MATERIAL_EXT 0x8349
8023#define GL_FRAGMENT_NORMAL_EXT 0x834A
8024#define GL_FRAGMENT_COLOR_EXT 0x834C
8025#define GL_ATTENUATION_EXT 0x834D
8026#define GL_SHADOW_ATTENUATION_EXT 0x834E
8027#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
8028#define GL_TEXTURE_LIGHT_EXT 0x8350
8029#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
8030#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
8031typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
8032typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
8033typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
8034#ifdef GL_GLEXT_PROTOTYPES
8035GLAPI void APIENTRY glApplyTextureEXT (GLenum mode);
8036GLAPI void APIENTRY glTextureLightEXT (GLenum pname);
8037GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode);
8038#endif
8039#endif /* GL_EXT_light_texture */
8040
8041#ifndef GL_EXT_memory_object
8042#define GL_EXT_memory_object 1
8043#define GL_TEXTURE_TILING_EXT 0x9580
8044#define GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581
8045#define GL_PROTECTED_MEMORY_OBJECT_EXT 0x959B
8046#define GL_NUM_TILING_TYPES_EXT 0x9582
8047#define GL_TILING_TYPES_EXT 0x9583
8048#define GL_OPTIMAL_TILING_EXT 0x9584
8049#define GL_LINEAR_TILING_EXT 0x9585
8050#define GL_NUM_DEVICE_UUIDS_EXT 0x9596
8051#define GL_DEVICE_UUID_EXT 0x9597
8052#define GL_DRIVER_UUID_EXT 0x9598
8053#define GL_UUID_SIZE_EXT 16
8054typedef void (APIENTRYP PFNGLGETUNSIGNEDBYTEVEXTPROC) (GLenum pname, GLubyte *data);
8055typedef void (APIENTRYP PFNGLGETUNSIGNEDBYTEI_VEXTPROC) (GLenum target, GLuint index, GLubyte *data);
8056typedef void (APIENTRYP PFNGLDELETEMEMORYOBJECTSEXTPROC) (GLsizei n, const GLuint *memoryObjects);
8057typedef GLboolean (APIENTRYP PFNGLISMEMORYOBJECTEXTPROC) (GLuint memoryObject);
8058typedef void (APIENTRYP PFNGLCREATEMEMORYOBJECTSEXTPROC) (GLsizei n, GLuint *memoryObjects);
8059typedef void (APIENTRYP PFNGLMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, const GLint *params);
8060typedef void (APIENTRYP PFNGLGETMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, GLint *params);
8061typedef void (APIENTRYP PFNGLTEXSTORAGEMEM2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset);
8062typedef void (APIENTRYP PFNGLTEXSTORAGEMEM2DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
8063typedef void (APIENTRYP PFNGLTEXSTORAGEMEM3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset);
8064typedef void (APIENTRYP PFNGLTEXSTORAGEMEM3DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
8065typedef void (APIENTRYP PFNGLBUFFERSTORAGEMEMEXTPROC) (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset);
8066typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM2DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset);
8067typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM2DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
8068typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM3DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset);
8069typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM3DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
8070typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEMEMEXTPROC) (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset);
8071typedef void (APIENTRYP PFNGLTEXSTORAGEMEM1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset);
8072typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM1DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset);
8073#ifdef GL_GLEXT_PROTOTYPES
8074GLAPI void APIENTRY glGetUnsignedBytevEXT (GLenum pname, GLubyte *data);
8075GLAPI void APIENTRY glGetUnsignedBytei_vEXT (GLenum target, GLuint index, GLubyte *data);
8076GLAPI void APIENTRY glDeleteMemoryObjectsEXT (GLsizei n, const GLuint *memoryObjects);
8077GLAPI GLboolean APIENTRY glIsMemoryObjectEXT (GLuint memoryObject);
8078GLAPI void APIENTRY glCreateMemoryObjectsEXT (GLsizei n, GLuint *memoryObjects);
8079GLAPI void APIENTRY glMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, const GLint *params);
8080GLAPI void APIENTRY glGetMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, GLint *params);
8081GLAPI void APIENTRY glTexStorageMem2DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset);
8082GLAPI void APIENTRY glTexStorageMem2DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
8083GLAPI void APIENTRY glTexStorageMem3DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset);
8084GLAPI void APIENTRY glTexStorageMem3DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
8085GLAPI void APIENTRY glBufferStorageMemEXT (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset);
8086GLAPI void APIENTRY glTextureStorageMem2DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset);
8087GLAPI void APIENTRY glTextureStorageMem2DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
8088GLAPI void APIENTRY glTextureStorageMem3DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset);
8089GLAPI void APIENTRY glTextureStorageMem3DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
8090GLAPI void APIENTRY glNamedBufferStorageMemEXT (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset);
8091GLAPI void APIENTRY glTexStorageMem1DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset);
8092GLAPI void APIENTRY glTextureStorageMem1DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset);
8093#endif
8094#endif /* GL_EXT_memory_object */
8095
8096#ifndef GL_EXT_memory_object_fd
8097#define GL_EXT_memory_object_fd 1
8098#define GL_HANDLE_TYPE_OPAQUE_FD_EXT 0x9586
8099typedef void (APIENTRYP PFNGLIMPORTMEMORYFDEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, GLint fd);
8100#ifdef GL_GLEXT_PROTOTYPES
8101GLAPI void APIENTRY glImportMemoryFdEXT (GLuint memory, GLuint64 size, GLenum handleType, GLint fd);
8102#endif
8103#endif /* GL_EXT_memory_object_fd */
8104
8105#ifndef GL_EXT_memory_object_win32
8106#define GL_EXT_memory_object_win32 1
8107#define GL_HANDLE_TYPE_OPAQUE_WIN32_EXT 0x9587
8108#define GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT 0x9588
8109#define GL_DEVICE_LUID_EXT 0x9599
8110#define GL_DEVICE_NODE_MASK_EXT 0x959A
8111#define GL_LUID_SIZE_EXT 8
8112#define GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT 0x9589
8113#define GL_HANDLE_TYPE_D3D12_RESOURCE_EXT 0x958A
8114#define GL_HANDLE_TYPE_D3D11_IMAGE_EXT 0x958B
8115#define GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT 0x958C
8116typedef void (APIENTRYP PFNGLIMPORTMEMORYWIN32HANDLEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, void *handle);
8117typedef void (APIENTRYP PFNGLIMPORTMEMORYWIN32NAMEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, const void *name);
8118#ifdef GL_GLEXT_PROTOTYPES
8119GLAPI void APIENTRY glImportMemoryWin32HandleEXT (GLuint memory, GLuint64 size, GLenum handleType, void *handle);
8120GLAPI void APIENTRY glImportMemoryWin32NameEXT (GLuint memory, GLuint64 size, GLenum handleType, const void *name);
8121#endif
8122#endif /* GL_EXT_memory_object_win32 */
8123
8124#ifndef GL_EXT_misc_attribute
8125#define GL_EXT_misc_attribute 1
8126#endif /* GL_EXT_misc_attribute */
8127
8128#ifndef GL_EXT_multi_draw_arrays
8129#define GL_EXT_multi_draw_arrays 1
8130typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
8131typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
8132#ifdef GL_GLEXT_PROTOTYPES
8133GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
8134GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
8135#endif
8136#endif /* GL_EXT_multi_draw_arrays */
8137
8138#ifndef GL_EXT_multisample
8139#define GL_EXT_multisample 1
8140#define GL_MULTISAMPLE_EXT 0x809D
8141#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
8142#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
8143#define GL_SAMPLE_MASK_EXT 0x80A0
8144#define GL_1PASS_EXT 0x80A1
8145#define GL_2PASS_0_EXT 0x80A2
8146#define GL_2PASS_1_EXT 0x80A3
8147#define GL_4PASS_0_EXT 0x80A4
8148#define GL_4PASS_1_EXT 0x80A5
8149#define GL_4PASS_2_EXT 0x80A6
8150#define GL_4PASS_3_EXT 0x80A7
8151#define GL_SAMPLE_BUFFERS_EXT 0x80A8
8152#define GL_SAMPLES_EXT 0x80A9
8153#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
8154#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
8155#define GL_SAMPLE_PATTERN_EXT 0x80AC
8156#define GL_MULTISAMPLE_BIT_EXT 0x20000000
8157typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
8158typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
8159#ifdef GL_GLEXT_PROTOTYPES
8160GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert);
8161GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern);
8162#endif
8163#endif /* GL_EXT_multisample */
8164
8165#ifndef GL_EXT_multiview_tessellation_geometry_shader
8166#define GL_EXT_multiview_tessellation_geometry_shader 1
8167#endif /* GL_EXT_multiview_tessellation_geometry_shader */
8168
8169#ifndef GL_EXT_multiview_texture_multisample
8170#define GL_EXT_multiview_texture_multisample 1
8171#endif /* GL_EXT_multiview_texture_multisample */
8172
8173#ifndef GL_EXT_multiview_timer_query
8174#define GL_EXT_multiview_timer_query 1
8175#endif /* GL_EXT_multiview_timer_query */
8176
8177#ifndef GL_EXT_packed_depth_stencil
8178#define GL_EXT_packed_depth_stencil 1
8179#define GL_DEPTH_STENCIL_EXT 0x84F9
8180#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
8181#define GL_DEPTH24_STENCIL8_EXT 0x88F0
8182#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
8183#endif /* GL_EXT_packed_depth_stencil */
8184
8185#ifndef GL_EXT_packed_float
8186#define GL_EXT_packed_float 1
8187#define GL_R11F_G11F_B10F_EXT 0x8C3A
8188#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
8189#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
8190#endif /* GL_EXT_packed_float */
8191
8192#ifndef GL_EXT_packed_pixels
8193#define GL_EXT_packed_pixels 1
8194#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
8195#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
8196#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
8197#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
8198#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
8199#endif /* GL_EXT_packed_pixels */
8200
8201#ifndef GL_EXT_paletted_texture
8202#define GL_EXT_paletted_texture 1
8203#define GL_COLOR_INDEX1_EXT 0x80E2
8204#define GL_COLOR_INDEX2_EXT 0x80E3
8205#define GL_COLOR_INDEX4_EXT 0x80E4
8206#define GL_COLOR_INDEX8_EXT 0x80E5
8207#define GL_COLOR_INDEX12_EXT 0x80E6
8208#define GL_COLOR_INDEX16_EXT 0x80E7
8209#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
8210typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
8211typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data);
8212typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
8213typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
8214#ifdef GL_GLEXT_PROTOTYPES
8215GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
8216GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data);
8217GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);
8218GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
8219#endif
8220#endif /* GL_EXT_paletted_texture */
8221
8222#ifndef GL_EXT_pixel_buffer_object
8223#define GL_EXT_pixel_buffer_object 1
8224#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
8225#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
8226#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
8227#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
8228#endif /* GL_EXT_pixel_buffer_object */
8229
8230#ifndef GL_EXT_pixel_transform
8231#define GL_EXT_pixel_transform 1
8232#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
8233#define GL_PIXEL_MAG_FILTER_EXT 0x8331
8234#define GL_PIXEL_MIN_FILTER_EXT 0x8332
8235#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
8236#define GL_CUBIC_EXT 0x8334
8237#define GL_AVERAGE_EXT 0x8335
8238#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
8239#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
8240#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
8241typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
8242typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
8243typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
8244typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
8245typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
8246typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
8247#ifdef GL_GLEXT_PROTOTYPES
8248GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param);
8249GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param);
8250GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params);
8251GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
8252GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params);
8253GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
8254#endif
8255#endif /* GL_EXT_pixel_transform */
8256
8257#ifndef GL_EXT_pixel_transform_color_table
8258#define GL_EXT_pixel_transform_color_table 1
8259#endif /* GL_EXT_pixel_transform_color_table */
8260
8261#ifndef GL_EXT_point_parameters
8262#define GL_EXT_point_parameters 1
8263#define GL_POINT_SIZE_MIN_EXT 0x8126
8264#define GL_POINT_SIZE_MAX_EXT 0x8127
8265#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
8266#define GL_DISTANCE_ATTENUATION_EXT 0x8129
8267typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
8268typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
8269#ifdef GL_GLEXT_PROTOTYPES
8270GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param);
8271GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params);
8272#endif
8273#endif /* GL_EXT_point_parameters */
8274
8275#ifndef GL_EXT_polygon_offset
8276#define GL_EXT_polygon_offset 1
8277#define GL_POLYGON_OFFSET_EXT 0x8037
8278#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
8279#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
8280typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
8281#ifdef GL_GLEXT_PROTOTYPES
8282GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias);
8283#endif
8284#endif /* GL_EXT_polygon_offset */
8285
8286#ifndef GL_EXT_polygon_offset_clamp
8287#define GL_EXT_polygon_offset_clamp 1
8288#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B
8289typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp);
8290#ifdef GL_GLEXT_PROTOTYPES
8291GLAPI void APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp);
8292#endif
8293#endif /* GL_EXT_polygon_offset_clamp */
8294
8295#ifndef GL_EXT_post_depth_coverage
8296#define GL_EXT_post_depth_coverage 1
8297#endif /* GL_EXT_post_depth_coverage */
8298
8299#ifndef GL_EXT_provoking_vertex
8300#define GL_EXT_provoking_vertex 1
8301#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
8302#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
8303#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
8304#define GL_PROVOKING_VERTEX_EXT 0x8E4F
8305typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
8306#ifdef GL_GLEXT_PROTOTYPES
8307GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode);
8308#endif
8309#endif /* GL_EXT_provoking_vertex */
8310
8311#ifndef GL_EXT_raster_multisample
8312#define GL_EXT_raster_multisample 1
8313#define GL_RASTER_MULTISAMPLE_EXT 0x9327
8314#define GL_RASTER_SAMPLES_EXT 0x9328
8315#define GL_MAX_RASTER_SAMPLES_EXT 0x9329
8316#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A
8317#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B
8318#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C
8319typedef void (APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations);
8320#ifdef GL_GLEXT_PROTOTYPES
8321GLAPI void APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations);
8322#endif
8323#endif /* GL_EXT_raster_multisample */
8324
8325#ifndef GL_EXT_rescale_normal
8326#define GL_EXT_rescale_normal 1
8327#define GL_RESCALE_NORMAL_EXT 0x803A
8328#endif /* GL_EXT_rescale_normal */
8329
8330#ifndef GL_EXT_secondary_color
8331#define GL_EXT_secondary_color 1
8332#define GL_COLOR_SUM_EXT 0x8458
8333#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
8334#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
8335#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
8336#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
8337#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
8338#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
8339typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
8340typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
8341typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
8342typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
8343typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
8344typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
8345typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
8346typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
8347typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
8348typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
8349typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
8350typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
8351typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
8352typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
8353typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
8354typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
8355typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
8356#ifdef GL_GLEXT_PROTOTYPES
8357GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue);
8358GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v);
8359GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue);
8360GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v);
8361GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue);
8362GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v);
8363GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue);
8364GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v);
8365GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue);
8366GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v);
8367GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue);
8368GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v);
8369GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue);
8370GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v);
8371GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue);
8372GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v);
8373GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
8374#endif
8375#endif /* GL_EXT_secondary_color */
8376
8377#ifndef GL_EXT_semaphore
8378#define GL_EXT_semaphore 1
8379#define GL_LAYOUT_GENERAL_EXT 0x958D
8380#define GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E
8381#define GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F
8382#define GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590
8383#define GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591
8384#define GL_LAYOUT_TRANSFER_SRC_EXT 0x9592
8385#define GL_LAYOUT_TRANSFER_DST_EXT 0x9593
8386#define GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT 0x9530
8387#define GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT 0x9531
8388typedef void (APIENTRYP PFNGLGENSEMAPHORESEXTPROC) (GLsizei n, GLuint *semaphores);
8389typedef void (APIENTRYP PFNGLDELETESEMAPHORESEXTPROC) (GLsizei n, const GLuint *semaphores);
8390typedef GLboolean (APIENTRYP PFNGLISSEMAPHOREEXTPROC) (GLuint semaphore);
8391typedef void (APIENTRYP PFNGLSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, const GLuint64 *params);
8392typedef void (APIENTRYP PFNGLGETSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, GLuint64 *params);
8393typedef void (APIENTRYP PFNGLWAITSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts);
8394typedef void (APIENTRYP PFNGLSIGNALSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts);
8395#ifdef GL_GLEXT_PROTOTYPES
8396GLAPI void APIENTRY glGenSemaphoresEXT (GLsizei n, GLuint *semaphores);
8397GLAPI void APIENTRY glDeleteSemaphoresEXT (GLsizei n, const GLuint *semaphores);
8398GLAPI GLboolean APIENTRY glIsSemaphoreEXT (GLuint semaphore);
8399GLAPI void APIENTRY glSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, const GLuint64 *params);
8400GLAPI void APIENTRY glGetSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, GLuint64 *params);
8401GLAPI void APIENTRY glWaitSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts);
8402GLAPI void APIENTRY glSignalSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts);
8403#endif
8404#endif /* GL_EXT_semaphore */
8405
8406#ifndef GL_EXT_semaphore_fd
8407#define GL_EXT_semaphore_fd 1
8408typedef void (APIENTRYP PFNGLIMPORTSEMAPHOREFDEXTPROC) (GLuint semaphore, GLenum handleType, GLint fd);
8409#ifdef GL_GLEXT_PROTOTYPES
8410GLAPI void APIENTRY glImportSemaphoreFdEXT (GLuint semaphore, GLenum handleType, GLint fd);
8411#endif
8412#endif /* GL_EXT_semaphore_fd */
8413
8414#ifndef GL_EXT_semaphore_win32
8415#define GL_EXT_semaphore_win32 1
8416#define GL_HANDLE_TYPE_D3D12_FENCE_EXT 0x9594
8417#define GL_D3D12_FENCE_VALUE_EXT 0x9595
8418typedef void (APIENTRYP PFNGLIMPORTSEMAPHOREWIN32HANDLEEXTPROC) (GLuint semaphore, GLenum handleType, void *handle);
8419typedef void (APIENTRYP PFNGLIMPORTSEMAPHOREWIN32NAMEEXTPROC) (GLuint semaphore, GLenum handleType, const void *name);
8420#ifdef GL_GLEXT_PROTOTYPES
8421GLAPI void APIENTRY glImportSemaphoreWin32HandleEXT (GLuint semaphore, GLenum handleType, void *handle);
8422GLAPI void APIENTRY glImportSemaphoreWin32NameEXT (GLuint semaphore, GLenum handleType, const void *name);
8423#endif
8424#endif /* GL_EXT_semaphore_win32 */
8425
8426#ifndef GL_EXT_separate_shader_objects
8427#define GL_EXT_separate_shader_objects 1
8428#define GL_ACTIVE_PROGRAM_EXT 0x8B8D
8429typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);
8430typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);
8431typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);
8432#ifdef GL_GLEXT_PROTOTYPES
8433GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program);
8434GLAPI void APIENTRY glActiveProgramEXT (GLuint program);
8435GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);
8436#endif
8437#endif /* GL_EXT_separate_shader_objects */
8438
8439#ifndef GL_EXT_separate_specular_color
8440#define GL_EXT_separate_specular_color 1
8441#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
8442#define GL_SINGLE_COLOR_EXT 0x81F9
8443#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
8444#endif /* GL_EXT_separate_specular_color */
8445
8446#ifndef GL_EXT_shader_framebuffer_fetch
8447#define GL_EXT_shader_framebuffer_fetch 1
8448#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
8449#endif /* GL_EXT_shader_framebuffer_fetch */
8450
8451#ifndef GL_EXT_shader_framebuffer_fetch_non_coherent
8452#define GL_EXT_shader_framebuffer_fetch_non_coherent 1
8453typedef void (APIENTRYP PFNGLFRAMEBUFFERFETCHBARRIEREXTPROC) (void);
8454#ifdef GL_GLEXT_PROTOTYPES
8455GLAPI void APIENTRY glFramebufferFetchBarrierEXT (void);
8456#endif
8457#endif /* GL_EXT_shader_framebuffer_fetch_non_coherent */
8458
8459#ifndef GL_EXT_shader_image_load_formatted
8460#define GL_EXT_shader_image_load_formatted 1
8461#endif /* GL_EXT_shader_image_load_formatted */
8462
8463#ifndef GL_EXT_shader_image_load_store
8464#define GL_EXT_shader_image_load_store 1
8465#define GL_MAX_IMAGE_UNITS_EXT 0x8F38
8466#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39
8467#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A
8468#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B
8469#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C
8470#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D
8471#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E
8472#define GL_IMAGE_1D_EXT 0x904C
8473#define GL_IMAGE_2D_EXT 0x904D
8474#define GL_IMAGE_3D_EXT 0x904E
8475#define GL_IMAGE_2D_RECT_EXT 0x904F
8476#define GL_IMAGE_CUBE_EXT 0x9050
8477#define GL_IMAGE_BUFFER_EXT 0x9051
8478#define GL_IMAGE_1D_ARRAY_EXT 0x9052
8479#define GL_IMAGE_2D_ARRAY_EXT 0x9053
8480#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
8481#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055
8482#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056
8483#define GL_INT_IMAGE_1D_EXT 0x9057
8484#define GL_INT_IMAGE_2D_EXT 0x9058
8485#define GL_INT_IMAGE_3D_EXT 0x9059
8486#define GL_INT_IMAGE_2D_RECT_EXT 0x905A
8487#define GL_INT_IMAGE_CUBE_EXT 0x905B
8488#define GL_INT_IMAGE_BUFFER_EXT 0x905C
8489#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D
8490#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E
8491#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
8492#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060
8493#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061
8494#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062
8495#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063
8496#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064
8497#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065
8498#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066
8499#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067
8500#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068
8501#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069
8502#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
8503#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B
8504#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C
8505#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D
8506#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E
8507#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001
8508#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002
8509#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004
8510#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008
8511#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020
8512#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040
8513#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080
8514#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100
8515#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200
8516#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400
8517#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800
8518#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000
8519#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF
8520typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
8521typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);
8522#ifdef GL_GLEXT_PROTOTYPES
8523GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
8524GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers);
8525#endif
8526#endif /* GL_EXT_shader_image_load_store */
8527
8528#ifndef GL_EXT_shader_integer_mix
8529#define GL_EXT_shader_integer_mix 1
8530#endif /* GL_EXT_shader_integer_mix */
8531
8532#ifndef GL_EXT_shader_samples_identical
8533#define GL_EXT_shader_samples_identical 1
8534#endif /* GL_EXT_shader_samples_identical */
8535
8536#ifndef GL_EXT_shadow_funcs
8537#define GL_EXT_shadow_funcs 1
8538#endif /* GL_EXT_shadow_funcs */
8539
8540#ifndef GL_EXT_shared_texture_palette
8541#define GL_EXT_shared_texture_palette 1
8542#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
8543#endif /* GL_EXT_shared_texture_palette */
8544
8545#ifndef GL_EXT_sparse_texture2
8546#define GL_EXT_sparse_texture2 1
8547#endif /* GL_EXT_sparse_texture2 */
8548
8549#ifndef GL_EXT_stencil_clear_tag
8550#define GL_EXT_stencil_clear_tag 1
8551#define GL_STENCIL_TAG_BITS_EXT 0x88F2
8552#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
8553typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
8554#ifdef GL_GLEXT_PROTOTYPES
8555GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag);
8556#endif
8557#endif /* GL_EXT_stencil_clear_tag */
8558
8559#ifndef GL_EXT_stencil_two_side
8560#define GL_EXT_stencil_two_side 1
8561#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
8562#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
8563typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
8564#ifdef GL_GLEXT_PROTOTYPES
8565GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face);
8566#endif
8567#endif /* GL_EXT_stencil_two_side */
8568
8569#ifndef GL_EXT_stencil_wrap
8570#define GL_EXT_stencil_wrap 1
8571#define GL_INCR_WRAP_EXT 0x8507
8572#define GL_DECR_WRAP_EXT 0x8508
8573#endif /* GL_EXT_stencil_wrap */
8574
8575#ifndef GL_EXT_subtexture
8576#define GL_EXT_subtexture 1
8577typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
8578typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
8579#ifdef GL_GLEXT_PROTOTYPES
8580GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
8581GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
8582#endif
8583#endif /* GL_EXT_subtexture */
8584
8585#ifndef GL_EXT_texture
8586#define GL_EXT_texture 1
8587#define GL_ALPHA4_EXT 0x803B
8588#define GL_ALPHA8_EXT 0x803C
8589#define GL_ALPHA12_EXT 0x803D
8590#define GL_ALPHA16_EXT 0x803E
8591#define GL_LUMINANCE4_EXT 0x803F
8592#define GL_LUMINANCE8_EXT 0x8040
8593#define GL_LUMINANCE12_EXT 0x8041
8594#define GL_LUMINANCE16_EXT 0x8042
8595#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
8596#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
8597#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
8598#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
8599#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
8600#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
8601#define GL_INTENSITY_EXT 0x8049
8602#define GL_INTENSITY4_EXT 0x804A
8603#define GL_INTENSITY8_EXT 0x804B
8604#define GL_INTENSITY12_EXT 0x804C
8605#define GL_INTENSITY16_EXT 0x804D
8606#define GL_RGB2_EXT 0x804E
8607#define GL_RGB4_EXT 0x804F
8608#define GL_RGB5_EXT 0x8050
8609#define GL_RGB8_EXT 0x8051
8610#define GL_RGB10_EXT 0x8052
8611#define GL_RGB12_EXT 0x8053
8612#define GL_RGB16_EXT 0x8054
8613#define GL_RGBA2_EXT 0x8055
8614#define GL_RGBA4_EXT 0x8056
8615#define GL_RGB5_A1_EXT 0x8057
8616#define GL_RGBA8_EXT 0x8058
8617#define GL_RGB10_A2_EXT 0x8059
8618#define GL_RGBA12_EXT 0x805A
8619#define GL_RGBA16_EXT 0x805B
8620#define GL_TEXTURE_RED_SIZE_EXT 0x805C
8621#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
8622#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
8623#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
8624#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
8625#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
8626#define GL_REPLACE_EXT 0x8062
8627#define GL_PROXY_TEXTURE_1D_EXT 0x8063
8628#define GL_PROXY_TEXTURE_2D_EXT 0x8064
8629#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
8630#endif /* GL_EXT_texture */
8631
8632#ifndef GL_EXT_texture3D
8633#define GL_EXT_texture3D 1
8634#define GL_PACK_SKIP_IMAGES_EXT 0x806B
8635#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
8636#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
8637#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
8638#define GL_TEXTURE_3D_EXT 0x806F
8639#define GL_PROXY_TEXTURE_3D_EXT 0x8070
8640#define GL_TEXTURE_DEPTH_EXT 0x8071
8641#define GL_TEXTURE_WRAP_R_EXT 0x8072
8642#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
8643typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
8644typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
8645#ifdef GL_GLEXT_PROTOTYPES
8646GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
8647GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
8648#endif
8649#endif /* GL_EXT_texture3D */
8650
8651#ifndef GL_EXT_texture_array
8652#define GL_EXT_texture_array 1
8653#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
8654#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
8655#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
8656#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
8657#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
8658#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
8659#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
8660#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
8661typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
8662#ifdef GL_GLEXT_PROTOTYPES
8663GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
8664#endif
8665#endif /* GL_EXT_texture_array */
8666
8667#ifndef GL_EXT_texture_buffer_object
8668#define GL_EXT_texture_buffer_object 1
8669#define GL_TEXTURE_BUFFER_EXT 0x8C2A
8670#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
8671#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
8672#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
8673#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
8674typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
8675#ifdef GL_GLEXT_PROTOTYPES
8676GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
8677#endif
8678#endif /* GL_EXT_texture_buffer_object */
8679
8680#ifndef GL_EXT_texture_compression_latc
8681#define GL_EXT_texture_compression_latc 1
8682#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
8683#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
8684#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
8685#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
8686#endif /* GL_EXT_texture_compression_latc */
8687
8688#ifndef GL_EXT_texture_compression_rgtc
8689#define GL_EXT_texture_compression_rgtc 1
8690#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
8691#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
8692#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
8693#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
8694#endif /* GL_EXT_texture_compression_rgtc */
8695
8696#ifndef GL_EXT_texture_compression_s3tc
8697#define GL_EXT_texture_compression_s3tc 1
8698#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
8699#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
8700#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
8701#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
8702#endif /* GL_EXT_texture_compression_s3tc */
8703
8704#ifndef GL_EXT_texture_cube_map
8705#define GL_EXT_texture_cube_map 1
8706#define GL_NORMAL_MAP_EXT 0x8511
8707#define GL_REFLECTION_MAP_EXT 0x8512
8708#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
8709#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
8710#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
8711#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
8712#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
8713#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
8714#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
8715#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
8716#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
8717#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
8718#endif /* GL_EXT_texture_cube_map */
8719
8720#ifndef GL_EXT_texture_env_add
8721#define GL_EXT_texture_env_add 1
8722#endif /* GL_EXT_texture_env_add */
8723
8724#ifndef GL_EXT_texture_env_combine
8725#define GL_EXT_texture_env_combine 1
8726#define GL_COMBINE_EXT 0x8570
8727#define GL_COMBINE_RGB_EXT 0x8571
8728#define GL_COMBINE_ALPHA_EXT 0x8572
8729#define GL_RGB_SCALE_EXT 0x8573
8730#define GL_ADD_SIGNED_EXT 0x8574
8731#define GL_INTERPOLATE_EXT 0x8575
8732#define GL_CONSTANT_EXT 0x8576
8733#define GL_PRIMARY_COLOR_EXT 0x8577
8734#define GL_PREVIOUS_EXT 0x8578
8735#define GL_SOURCE0_RGB_EXT 0x8580
8736#define GL_SOURCE1_RGB_EXT 0x8581
8737#define GL_SOURCE2_RGB_EXT 0x8582
8738#define GL_SOURCE0_ALPHA_EXT 0x8588
8739#define GL_SOURCE1_ALPHA_EXT 0x8589
8740#define GL_SOURCE2_ALPHA_EXT 0x858A
8741#define GL_OPERAND0_RGB_EXT 0x8590
8742#define GL_OPERAND1_RGB_EXT 0x8591
8743#define GL_OPERAND2_RGB_EXT 0x8592
8744#define GL_OPERAND0_ALPHA_EXT 0x8598
8745#define GL_OPERAND1_ALPHA_EXT 0x8599
8746#define GL_OPERAND2_ALPHA_EXT 0x859A
8747#endif /* GL_EXT_texture_env_combine */
8748
8749#ifndef GL_EXT_texture_env_dot3
8750#define GL_EXT_texture_env_dot3 1
8751#define GL_DOT3_RGB_EXT 0x8740
8752#define GL_DOT3_RGBA_EXT 0x8741
8753#endif /* GL_EXT_texture_env_dot3 */
8754
8755#ifndef GL_EXT_texture_filter_anisotropic
8756#define GL_EXT_texture_filter_anisotropic 1
8757#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
8758#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
8759#endif /* GL_EXT_texture_filter_anisotropic */
8760
8761#ifndef GL_EXT_texture_filter_minmax
8762#define GL_EXT_texture_filter_minmax 1
8763#define GL_TEXTURE_REDUCTION_MODE_EXT 0x9366
8764#define GL_WEIGHTED_AVERAGE_EXT 0x9367
8765#endif /* GL_EXT_texture_filter_minmax */
8766
8767#ifndef GL_EXT_texture_integer
8768#define GL_EXT_texture_integer 1
8769#define GL_RGBA32UI_EXT 0x8D70
8770#define GL_RGB32UI_EXT 0x8D71
8771#define GL_ALPHA32UI_EXT 0x8D72
8772#define GL_INTENSITY32UI_EXT 0x8D73
8773#define GL_LUMINANCE32UI_EXT 0x8D74
8774#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
8775#define GL_RGBA16UI_EXT 0x8D76
8776#define GL_RGB16UI_EXT 0x8D77
8777#define GL_ALPHA16UI_EXT 0x8D78
8778#define GL_INTENSITY16UI_EXT 0x8D79
8779#define GL_LUMINANCE16UI_EXT 0x8D7A
8780#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
8781#define GL_RGBA8UI_EXT 0x8D7C
8782#define GL_RGB8UI_EXT 0x8D7D
8783#define GL_ALPHA8UI_EXT 0x8D7E
8784#define GL_INTENSITY8UI_EXT 0x8D7F
8785#define GL_LUMINANCE8UI_EXT 0x8D80
8786#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
8787#define GL_RGBA32I_EXT 0x8D82
8788#define GL_RGB32I_EXT 0x8D83
8789#define GL_ALPHA32I_EXT 0x8D84
8790#define GL_INTENSITY32I_EXT 0x8D85
8791#define GL_LUMINANCE32I_EXT 0x8D86
8792#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
8793#define GL_RGBA16I_EXT 0x8D88
8794#define GL_RGB16I_EXT 0x8D89
8795#define GL_ALPHA16I_EXT 0x8D8A
8796#define GL_INTENSITY16I_EXT 0x8D8B
8797#define GL_LUMINANCE16I_EXT 0x8D8C
8798#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
8799#define GL_RGBA8I_EXT 0x8D8E
8800#define GL_RGB8I_EXT 0x8D8F
8801#define GL_ALPHA8I_EXT 0x8D90
8802#define GL_INTENSITY8I_EXT 0x8D91
8803#define GL_LUMINANCE8I_EXT 0x8D92
8804#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
8805#define GL_RED_INTEGER_EXT 0x8D94
8806#define GL_GREEN_INTEGER_EXT 0x8D95
8807#define GL_BLUE_INTEGER_EXT 0x8D96
8808#define GL_ALPHA_INTEGER_EXT 0x8D97
8809#define GL_RGB_INTEGER_EXT 0x8D98
8810#define GL_RGBA_INTEGER_EXT 0x8D99
8811#define GL_BGR_INTEGER_EXT 0x8D9A
8812#define GL_BGRA_INTEGER_EXT 0x8D9B
8813#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
8814#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
8815#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
8816typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
8817typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
8818typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
8819typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
8820typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
8821typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
8822#ifdef GL_GLEXT_PROTOTYPES
8823GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
8824GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
8825GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
8826GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
8827GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha);
8828GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha);
8829#endif
8830#endif /* GL_EXT_texture_integer */
8831
8832#ifndef GL_EXT_texture_lod_bias
8833#define GL_EXT_texture_lod_bias 1
8834#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
8835#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
8836#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
8837#endif /* GL_EXT_texture_lod_bias */
8838
8839#ifndef GL_EXT_texture_mirror_clamp
8840#define GL_EXT_texture_mirror_clamp 1
8841#define GL_MIRROR_CLAMP_EXT 0x8742
8842#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
8843#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
8844#endif /* GL_EXT_texture_mirror_clamp */
8845
8846#ifndef GL_EXT_texture_object
8847#define GL_EXT_texture_object 1
8848#define GL_TEXTURE_PRIORITY_EXT 0x8066
8849#define GL_TEXTURE_RESIDENT_EXT 0x8067
8850#define GL_TEXTURE_1D_BINDING_EXT 0x8068
8851#define GL_TEXTURE_2D_BINDING_EXT 0x8069
8852#define GL_TEXTURE_3D_BINDING_EXT 0x806A
8853typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
8854typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
8855typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
8856typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
8857typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
8858typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
8859#ifdef GL_GLEXT_PROTOTYPES
8860GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences);
8861GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture);
8862GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures);
8863GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures);
8864GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture);
8865GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities);
8866#endif
8867#endif /* GL_EXT_texture_object */
8868
8869#ifndef GL_EXT_texture_perturb_normal
8870#define GL_EXT_texture_perturb_normal 1
8871#define GL_PERTURB_EXT 0x85AE
8872#define GL_TEXTURE_NORMAL_EXT 0x85AF
8873typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
8874#ifdef GL_GLEXT_PROTOTYPES
8875GLAPI void APIENTRY glTextureNormalEXT (GLenum mode);
8876#endif
8877#endif /* GL_EXT_texture_perturb_normal */
8878
8879#ifndef GL_EXT_texture_sRGB
8880#define GL_EXT_texture_sRGB 1
8881#define GL_SRGB_EXT 0x8C40
8882#define GL_SRGB8_EXT 0x8C41
8883#define GL_SRGB_ALPHA_EXT 0x8C42
8884#define GL_SRGB8_ALPHA8_EXT 0x8C43
8885#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
8886#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
8887#define GL_SLUMINANCE_EXT 0x8C46
8888#define GL_SLUMINANCE8_EXT 0x8C47
8889#define GL_COMPRESSED_SRGB_EXT 0x8C48
8890#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
8891#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
8892#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
8893#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
8894#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
8895#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
8896#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
8897#endif /* GL_EXT_texture_sRGB */
8898
8899#ifndef GL_EXT_texture_sRGB_R8
8900#define GL_EXT_texture_sRGB_R8 1
8901#define GL_SR8_EXT 0x8FBD
8902#endif /* GL_EXT_texture_sRGB_R8 */
8903
8904#ifndef GL_EXT_texture_sRGB_RG8
8905#define GL_EXT_texture_sRGB_RG8 1
8906#define GL_SRG8_EXT 0x8FBE
8907#endif /* GL_EXT_texture_sRGB_RG8 */
8908
8909#ifndef GL_EXT_texture_sRGB_decode
8910#define GL_EXT_texture_sRGB_decode 1
8911#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
8912#define GL_DECODE_EXT 0x8A49
8913#define GL_SKIP_DECODE_EXT 0x8A4A
8914#endif /* GL_EXT_texture_sRGB_decode */
8915
8916#ifndef GL_EXT_texture_shadow_lod
8917#define GL_EXT_texture_shadow_lod 1
8918#endif /* GL_EXT_texture_shadow_lod */
8919
8920#ifndef GL_EXT_texture_shared_exponent
8921#define GL_EXT_texture_shared_exponent 1
8922#define GL_RGB9_E5_EXT 0x8C3D
8923#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
8924#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
8925#endif /* GL_EXT_texture_shared_exponent */
8926
8927#ifndef GL_EXT_texture_snorm
8928#define GL_EXT_texture_snorm 1
8929#define GL_ALPHA_SNORM 0x9010
8930#define GL_LUMINANCE_SNORM 0x9011
8931#define GL_LUMINANCE_ALPHA_SNORM 0x9012
8932#define GL_INTENSITY_SNORM 0x9013
8933#define GL_ALPHA8_SNORM 0x9014
8934#define GL_LUMINANCE8_SNORM 0x9015
8935#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016
8936#define GL_INTENSITY8_SNORM 0x9017
8937#define GL_ALPHA16_SNORM 0x9018
8938#define GL_LUMINANCE16_SNORM 0x9019
8939#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A
8940#define GL_INTENSITY16_SNORM 0x901B
8941#define GL_RED_SNORM 0x8F90
8942#define GL_RG_SNORM 0x8F91
8943#define GL_RGB_SNORM 0x8F92
8944#define GL_RGBA_SNORM 0x8F93
8945#endif /* GL_EXT_texture_snorm */
8946
8947#ifndef GL_EXT_texture_storage
8948#define GL_EXT_texture_storage 1
8949#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
8950#define GL_RGBA32F_EXT 0x8814
8951#define GL_RGB32F_EXT 0x8815
8952#define GL_ALPHA32F_EXT 0x8816
8953#define GL_LUMINANCE32F_EXT 0x8818
8954#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
8955#define GL_RGBA16F_EXT 0x881A
8956#define GL_RGB16F_EXT 0x881B
8957#define GL_ALPHA16F_EXT 0x881C
8958#define GL_LUMINANCE16F_EXT 0x881E
8959#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
8960#define GL_BGRA8_EXT 0x93A1
8961#define GL_R8_EXT 0x8229
8962#define GL_RG8_EXT 0x822B
8963#define GL_R32F_EXT 0x822E
8964#define GL_RG32F_EXT 0x8230
8965#define GL_R16F_EXT 0x822D
8966#define GL_RG16F_EXT 0x822F
8967typedef void (APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
8968typedef void (APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
8969typedef void (APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
8970#ifdef GL_GLEXT_PROTOTYPES
8971GLAPI void APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
8972GLAPI void APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
8973GLAPI void APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
8974#endif
8975#endif /* GL_EXT_texture_storage */
8976
8977#ifndef GL_EXT_texture_swizzle
8978#define GL_EXT_texture_swizzle 1
8979#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42
8980#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43
8981#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44
8982#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45
8983#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46
8984#endif /* GL_EXT_texture_swizzle */
8985
8986#ifndef GL_EXT_timer_query
8987#define GL_EXT_timer_query 1
8988#define GL_TIME_ELAPSED_EXT 0x88BF
8989typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
8990typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
8991#ifdef GL_GLEXT_PROTOTYPES
8992GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
8993GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
8994#endif
8995#endif /* GL_EXT_timer_query */
8996
8997#ifndef GL_EXT_transform_feedback
8998#define GL_EXT_transform_feedback 1
8999#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E
9000#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84
9001#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85
9002#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F
9003#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C
9004#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D
9005#define GL_PRIMITIVES_GENERATED_EXT 0x8C87
9006#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88
9007#define GL_RASTERIZER_DISCARD_EXT 0x8C89
9008#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A
9009#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B
9010#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80
9011#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83
9012#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F
9013#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
9014typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
9015typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
9016typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
9017typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
9018typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
9019typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
9020typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
9021#ifdef GL_GLEXT_PROTOTYPES
9022GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode);
9023GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
9024GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
9025GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
9026GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer);
9027GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
9028GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
9029#endif
9030#endif /* GL_EXT_transform_feedback */
9031
9032#ifndef GL_EXT_vertex_array
9033#define GL_EXT_vertex_array 1
9034#define GL_VERTEX_ARRAY_EXT 0x8074
9035#define GL_NORMAL_ARRAY_EXT 0x8075
9036#define GL_COLOR_ARRAY_EXT 0x8076
9037#define GL_INDEX_ARRAY_EXT 0x8077
9038#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
9039#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
9040#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
9041#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
9042#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
9043#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
9044#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
9045#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
9046#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
9047#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
9048#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
9049#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
9050#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
9051#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
9052#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
9053#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
9054#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
9055#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
9056#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
9057#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
9058#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
9059#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
9060#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
9061#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
9062#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
9063#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
9064#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
9065#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
9066typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
9067typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
9068typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
9069typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
9070typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params);
9071typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
9072typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
9073typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
9074typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
9075#ifdef GL_GLEXT_PROTOTYPES
9076GLAPI void APIENTRY glArrayElementEXT (GLint i);
9077GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
9078GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count);
9079GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer);
9080GLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params);
9081GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
9082GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
9083GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
9084GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
9085#endif
9086#endif /* GL_EXT_vertex_array */
9087
9088#ifndef GL_EXT_vertex_array_bgra
9089#define GL_EXT_vertex_array_bgra 1
9090#endif /* GL_EXT_vertex_array_bgra */
9091
9092#ifndef GL_EXT_vertex_attrib_64bit
9093#define GL_EXT_vertex_attrib_64bit 1
9094#define GL_DOUBLE_VEC2_EXT 0x8FFC
9095#define GL_DOUBLE_VEC3_EXT 0x8FFD
9096#define GL_DOUBLE_VEC4_EXT 0x8FFE
9097#define GL_DOUBLE_MAT2_EXT 0x8F46
9098#define GL_DOUBLE_MAT3_EXT 0x8F47
9099#define GL_DOUBLE_MAT4_EXT 0x8F48
9100#define GL_DOUBLE_MAT2x3_EXT 0x8F49
9101#define GL_DOUBLE_MAT2x4_EXT 0x8F4A
9102#define GL_DOUBLE_MAT3x2_EXT 0x8F4B
9103#define GL_DOUBLE_MAT3x4_EXT 0x8F4C
9104#define GL_DOUBLE_MAT4x2_EXT 0x8F4D
9105#define GL_DOUBLE_MAT4x3_EXT 0x8F4E
9106typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);
9107typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);
9108typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
9109typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
9110typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v);
9111typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v);
9112typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v);
9113typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v);
9114typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
9115typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params);
9116#ifdef GL_GLEXT_PROTOTYPES
9117GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x);
9118GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y);
9119GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z);
9120GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
9121GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v);
9122GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v);
9123GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v);
9124GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v);
9125GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
9126GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params);
9127#endif
9128#endif /* GL_EXT_vertex_attrib_64bit */
9129
9130#ifndef GL_EXT_vertex_shader
9131#define GL_EXT_vertex_shader 1
9132#define GL_VERTEX_SHADER_EXT 0x8780
9133#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
9134#define GL_OP_INDEX_EXT 0x8782
9135#define GL_OP_NEGATE_EXT 0x8783
9136#define GL_OP_DOT3_EXT 0x8784
9137#define GL_OP_DOT4_EXT 0x8785
9138#define GL_OP_MUL_EXT 0x8786
9139#define GL_OP_ADD_EXT 0x8787
9140#define GL_OP_MADD_EXT 0x8788
9141#define GL_OP_FRAC_EXT 0x8789
9142#define GL_OP_MAX_EXT 0x878A
9143#define GL_OP_MIN_EXT 0x878B
9144#define GL_OP_SET_GE_EXT 0x878C
9145#define GL_OP_SET_LT_EXT 0x878D
9146#define GL_OP_CLAMP_EXT 0x878E
9147#define GL_OP_FLOOR_EXT 0x878F
9148#define GL_OP_ROUND_EXT 0x8790
9149#define GL_OP_EXP_BASE_2_EXT 0x8791
9150#define GL_OP_LOG_BASE_2_EXT 0x8792
9151#define GL_OP_POWER_EXT 0x8793
9152#define GL_OP_RECIP_EXT 0x8794
9153#define GL_OP_RECIP_SQRT_EXT 0x8795
9154#define GL_OP_SUB_EXT 0x8796
9155#define GL_OP_CROSS_PRODUCT_EXT 0x8797
9156#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
9157#define GL_OP_MOV_EXT 0x8799
9158#define GL_OUTPUT_VERTEX_EXT 0x879A
9159#define GL_OUTPUT_COLOR0_EXT 0x879B
9160#define GL_OUTPUT_COLOR1_EXT 0x879C
9161#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
9162#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
9163#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
9164#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
9165#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
9166#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
9167#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
9168#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
9169#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
9170#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
9171#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
9172#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
9173#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
9174#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
9175#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
9176#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
9177#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
9178#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
9179#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
9180#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
9181#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
9182#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
9183#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
9184#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
9185#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
9186#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
9187#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
9188#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
9189#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
9190#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
9191#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
9192#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
9193#define GL_OUTPUT_FOG_EXT 0x87BD
9194#define GL_SCALAR_EXT 0x87BE
9195#define GL_VECTOR_EXT 0x87BF
9196#define GL_MATRIX_EXT 0x87C0
9197#define GL_VARIANT_EXT 0x87C1
9198#define GL_INVARIANT_EXT 0x87C2
9199#define GL_LOCAL_CONSTANT_EXT 0x87C3
9200#define GL_LOCAL_EXT 0x87C4
9201#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
9202#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
9203#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
9204#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
9205#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
9206#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
9207#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
9208#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
9209#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
9210#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
9211#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
9212#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
9213#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
9214#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
9215#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
9216#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
9217#define GL_X_EXT 0x87D5
9218#define GL_Y_EXT 0x87D6
9219#define GL_Z_EXT 0x87D7
9220#define GL_W_EXT 0x87D8
9221#define GL_NEGATIVE_X_EXT 0x87D9
9222#define GL_NEGATIVE_Y_EXT 0x87DA
9223#define GL_NEGATIVE_Z_EXT 0x87DB
9224#define GL_NEGATIVE_W_EXT 0x87DC
9225#define GL_ZERO_EXT 0x87DD
9226#define GL_ONE_EXT 0x87DE
9227#define GL_NEGATIVE_ONE_EXT 0x87DF
9228#define GL_NORMALIZED_RANGE_EXT 0x87E0
9229#define GL_FULL_RANGE_EXT 0x87E1
9230#define GL_CURRENT_VERTEX_EXT 0x87E2
9231#define GL_MVP_MATRIX_EXT 0x87E3
9232#define GL_VARIANT_VALUE_EXT 0x87E4
9233#define GL_VARIANT_DATATYPE_EXT 0x87E5
9234#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
9235#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
9236#define GL_VARIANT_ARRAY_EXT 0x87E8
9237#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
9238#define GL_INVARIANT_VALUE_EXT 0x87EA
9239#define GL_INVARIANT_DATATYPE_EXT 0x87EB
9240#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
9241#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
9242typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
9243typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
9244typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
9245typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
9246typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
9247typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
9248typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
9249typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
9250typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
9251typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
9252typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
9253typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
9254typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
9255typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr);
9256typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr);
9257typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
9258typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
9259typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
9260typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
9261typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
9262typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
9263typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
9264typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
9265typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr);
9266typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
9267typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
9268typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
9269typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
9270typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
9271typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
9272typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
9273typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
9274typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
9275typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
9276typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
9277typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data);
9278typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
9279typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
9280typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
9281typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
9282typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
9283typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
9284#ifdef GL_GLEXT_PROTOTYPES
9285GLAPI void APIENTRY glBeginVertexShaderEXT (void);
9286GLAPI void APIENTRY glEndVertexShaderEXT (void);
9287GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id);
9288GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range);
9289GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id);
9290GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1);
9291GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
9292GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
9293GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
9294GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
9295GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num);
9296GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num);
9297GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
9298GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr);
9299GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr);
9300GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr);
9301GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr);
9302GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr);
9303GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr);
9304GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr);
9305GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr);
9306GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr);
9307GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr);
9308GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr);
9309GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id);
9310GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id);
9311GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value);
9312GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value);
9313GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value);
9314GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value);
9315GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value);
9316GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap);
9317GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
9318GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data);
9319GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
9320GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data);
9321GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
9322GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data);
9323GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
9324GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
9325GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data);
9326GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
9327#endif
9328#endif /* GL_EXT_vertex_shader */
9329
9330#ifndef GL_EXT_vertex_weighting
9331#define GL_EXT_vertex_weighting 1
9332#define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3
9333#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
9334#define GL_MODELVIEW0_MATRIX_EXT 0x0BA6
9335#define GL_MODELVIEW1_MATRIX_EXT 0x8506
9336#define GL_VERTEX_WEIGHTING_EXT 0x8509
9337#define GL_MODELVIEW0_EXT 0x1700
9338#define GL_MODELVIEW1_EXT 0x850A
9339#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
9340#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
9341#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
9342#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
9343#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
9344#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
9345typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
9346typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
9347typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
9348#ifdef GL_GLEXT_PROTOTYPES
9349GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight);
9350GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight);
9351GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
9352#endif
9353#endif /* GL_EXT_vertex_weighting */
9354
9355#ifndef GL_EXT_win32_keyed_mutex
9356#define GL_EXT_win32_keyed_mutex 1
9357typedef GLboolean (APIENTRYP PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key, GLuint timeout);
9358typedef GLboolean (APIENTRYP PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key);
9359#ifdef GL_GLEXT_PROTOTYPES
9360GLAPI GLboolean APIENTRY glAcquireKeyedMutexWin32EXT (GLuint memory, GLuint64 key, GLuint timeout);
9361GLAPI GLboolean APIENTRY glReleaseKeyedMutexWin32EXT (GLuint memory, GLuint64 key);
9362#endif
9363#endif /* GL_EXT_win32_keyed_mutex */
9364
9365#ifndef GL_EXT_window_rectangles
9366#define GL_EXT_window_rectangles 1
9367#define GL_INCLUSIVE_EXT 0x8F10
9368#define GL_EXCLUSIVE_EXT 0x8F11
9369#define GL_WINDOW_RECTANGLE_EXT 0x8F12
9370#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13
9371#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14
9372#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15
9373typedef void (APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box);
9374#ifdef GL_GLEXT_PROTOTYPES
9375GLAPI void APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box);
9376#endif
9377#endif /* GL_EXT_window_rectangles */
9378
9379#ifndef GL_EXT_x11_sync_object
9380#define GL_EXT_x11_sync_object 1
9381#define GL_SYNC_X11_FENCE_EXT 0x90E1
9382typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
9383#ifdef GL_GLEXT_PROTOTYPES
9384GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
9385#endif
9386#endif /* GL_EXT_x11_sync_object */
9387
9388#ifndef GL_GREMEDY_frame_terminator
9389#define GL_GREMEDY_frame_terminator 1
9390typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
9391#ifdef GL_GLEXT_PROTOTYPES
9392GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
9393#endif
9394#endif /* GL_GREMEDY_frame_terminator */
9395
9396#ifndef GL_GREMEDY_string_marker
9397#define GL_GREMEDY_string_marker 1
9398typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string);
9399#ifdef GL_GLEXT_PROTOTYPES
9400GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string);
9401#endif
9402#endif /* GL_GREMEDY_string_marker */
9403
9404#ifndef GL_HP_convolution_border_modes
9405#define GL_HP_convolution_border_modes 1
9406#define GL_IGNORE_BORDER_HP 0x8150
9407#define GL_CONSTANT_BORDER_HP 0x8151
9408#define GL_REPLICATE_BORDER_HP 0x8153
9409#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
9410#endif /* GL_HP_convolution_border_modes */
9411
9412#ifndef GL_HP_image_transform
9413#define GL_HP_image_transform 1
9414#define GL_IMAGE_SCALE_X_HP 0x8155
9415#define GL_IMAGE_SCALE_Y_HP 0x8156
9416#define GL_IMAGE_TRANSLATE_X_HP 0x8157
9417#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
9418#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
9419#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
9420#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
9421#define GL_IMAGE_MAG_FILTER_HP 0x815C
9422#define GL_IMAGE_MIN_FILTER_HP 0x815D
9423#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
9424#define GL_CUBIC_HP 0x815F
9425#define GL_AVERAGE_HP 0x8160
9426#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
9427#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
9428#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
9429typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
9430typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
9431typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
9432typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
9433typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
9434typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
9435#ifdef GL_GLEXT_PROTOTYPES
9436GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param);
9437GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param);
9438GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params);
9439GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params);
9440GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params);
9441GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params);
9442#endif
9443#endif /* GL_HP_image_transform */
9444
9445#ifndef GL_HP_occlusion_test
9446#define GL_HP_occlusion_test 1
9447#define GL_OCCLUSION_TEST_HP 0x8165
9448#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
9449#endif /* GL_HP_occlusion_test */
9450
9451#ifndef GL_HP_texture_lighting
9452#define GL_HP_texture_lighting 1
9453#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
9454#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
9455#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
9456#endif /* GL_HP_texture_lighting */
9457
9458#ifndef GL_IBM_cull_vertex
9459#define GL_IBM_cull_vertex 1
9460#define GL_CULL_VERTEX_IBM 103050
9461#endif /* GL_IBM_cull_vertex */
9462
9463#ifndef GL_IBM_multimode_draw_arrays
9464#define GL_IBM_multimode_draw_arrays 1
9465typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
9466typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
9467#ifdef GL_GLEXT_PROTOTYPES
9468GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
9469GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
9470#endif
9471#endif /* GL_IBM_multimode_draw_arrays */
9472
9473#ifndef GL_IBM_rasterpos_clip
9474#define GL_IBM_rasterpos_clip 1
9475#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
9476#endif /* GL_IBM_rasterpos_clip */
9477
9478#ifndef GL_IBM_static_data
9479#define GL_IBM_static_data 1
9480#define GL_ALL_STATIC_DATA_IBM 103060
9481#define GL_STATIC_VERTEX_ARRAY_IBM 103061
9482typedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target);
9483#ifdef GL_GLEXT_PROTOTYPES
9484GLAPI void APIENTRY glFlushStaticDataIBM (GLenum target);
9485#endif
9486#endif /* GL_IBM_static_data */
9487
9488#ifndef GL_IBM_texture_mirrored_repeat
9489#define GL_IBM_texture_mirrored_repeat 1
9490#define GL_MIRRORED_REPEAT_IBM 0x8370
9491#endif /* GL_IBM_texture_mirrored_repeat */
9492
9493#ifndef GL_IBM_vertex_array_lists
9494#define GL_IBM_vertex_array_lists 1
9495#define GL_VERTEX_ARRAY_LIST_IBM 103070
9496#define GL_NORMAL_ARRAY_LIST_IBM 103071
9497#define GL_COLOR_ARRAY_LIST_IBM 103072
9498#define GL_INDEX_ARRAY_LIST_IBM 103073
9499#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
9500#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
9501#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
9502#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
9503#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
9504#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
9505#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
9506#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
9507#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
9508#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
9509#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
9510#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
9511typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9512typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9513typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride);
9514typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9515typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9516typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9517typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9518typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9519#ifdef GL_GLEXT_PROTOTYPES
9520GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9521GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9522GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride);
9523GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9524GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9525GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9526GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9527GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
9528#endif
9529#endif /* GL_IBM_vertex_array_lists */
9530
9531#ifndef GL_INGR_blend_func_separate
9532#define GL_INGR_blend_func_separate 1
9533typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
9534#ifdef GL_GLEXT_PROTOTYPES
9535GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
9536#endif
9537#endif /* GL_INGR_blend_func_separate */
9538
9539#ifndef GL_INGR_color_clamp
9540#define GL_INGR_color_clamp 1
9541#define GL_RED_MIN_CLAMP_INGR 0x8560
9542#define GL_GREEN_MIN_CLAMP_INGR 0x8561
9543#define GL_BLUE_MIN_CLAMP_INGR 0x8562
9544#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
9545#define GL_RED_MAX_CLAMP_INGR 0x8564
9546#define GL_GREEN_MAX_CLAMP_INGR 0x8565
9547#define GL_BLUE_MAX_CLAMP_INGR 0x8566
9548#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
9549#endif /* GL_INGR_color_clamp */
9550
9551#ifndef GL_INGR_interlace_read
9552#define GL_INGR_interlace_read 1
9553#define GL_INTERLACE_READ_INGR 0x8568
9554#endif /* GL_INGR_interlace_read */
9555
9556#ifndef GL_INTEL_blackhole_render
9557#define GL_INTEL_blackhole_render 1
9558#define GL_BLACKHOLE_RENDER_INTEL 0x83FC
9559#endif /* GL_INTEL_blackhole_render */
9560
9561#ifndef GL_INTEL_conservative_rasterization
9562#define GL_INTEL_conservative_rasterization 1
9563#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE
9564#endif /* GL_INTEL_conservative_rasterization */
9565
9566#ifndef GL_INTEL_fragment_shader_ordering
9567#define GL_INTEL_fragment_shader_ordering 1
9568#endif /* GL_INTEL_fragment_shader_ordering */
9569
9570#ifndef GL_INTEL_framebuffer_CMAA
9571#define GL_INTEL_framebuffer_CMAA 1
9572typedef void (APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC) (void);
9573#ifdef GL_GLEXT_PROTOTYPES
9574GLAPI void APIENTRY glApplyFramebufferAttachmentCMAAINTEL (void);
9575#endif
9576#endif /* GL_INTEL_framebuffer_CMAA */
9577
9578#ifndef GL_INTEL_map_texture
9579#define GL_INTEL_map_texture 1
9580#define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF
9581#define GL_LAYOUT_DEFAULT_INTEL 0
9582#define GL_LAYOUT_LINEAR_INTEL 1
9583#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2
9584typedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture);
9585typedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level);
9586typedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
9587#ifdef GL_GLEXT_PROTOTYPES
9588GLAPI void APIENTRY glSyncTextureINTEL (GLuint texture);
9589GLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level);
9590GLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
9591#endif
9592#endif /* GL_INTEL_map_texture */
9593
9594#ifndef GL_INTEL_parallel_arrays
9595#define GL_INTEL_parallel_arrays 1
9596#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
9597#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
9598#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
9599#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
9600#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
9601typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
9602typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer);
9603typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
9604typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
9605#ifdef GL_GLEXT_PROTOTYPES
9606GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer);
9607GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer);
9608GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer);
9609GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer);
9610#endif
9611#endif /* GL_INTEL_parallel_arrays */
9612
9613#ifndef GL_INTEL_performance_query
9614#define GL_INTEL_performance_query 1
9615#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000
9616#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001
9617#define GL_PERFQUERY_WAIT_INTEL 0x83FB
9618#define GL_PERFQUERY_FLUSH_INTEL 0x83FA
9619#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9
9620#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0
9621#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
9622#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
9623#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
9624#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4
9625#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
9626#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
9627#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
9628#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
9629#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
9630#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
9631#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
9632#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
9633#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
9634#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
9635typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
9636typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
9637typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
9638typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
9639typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
9640typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
9641typedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
9642typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten);
9643typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
9644typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
9645#ifdef GL_GLEXT_PROTOTYPES
9646GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
9647GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
9648GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
9649GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
9650GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
9651GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
9652GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
9653GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten);
9654GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
9655GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
9656#endif
9657#endif /* GL_INTEL_performance_query */
9658
9659#ifndef GL_MESAX_texture_stack
9660#define GL_MESAX_texture_stack 1
9661#define GL_TEXTURE_1D_STACK_MESAX 0x8759
9662#define GL_TEXTURE_2D_STACK_MESAX 0x875A
9663#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
9664#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
9665#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
9666#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
9667#endif /* GL_MESAX_texture_stack */
9668
9669#ifndef GL_MESA_framebuffer_flip_x
9670#define GL_MESA_framebuffer_flip_x 1
9671#define GL_FRAMEBUFFER_FLIP_X_MESA 0x8BBC
9672#endif /* GL_MESA_framebuffer_flip_x */
9673
9674#ifndef GL_MESA_framebuffer_flip_y
9675#define GL_MESA_framebuffer_flip_y 1
9676#define GL_FRAMEBUFFER_FLIP_Y_MESA 0x8BBB
9677typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIMESAPROC) (GLenum target, GLenum pname, GLint param);
9678typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVMESAPROC) (GLenum target, GLenum pname, GLint *params);
9679#ifdef GL_GLEXT_PROTOTYPES
9680GLAPI void APIENTRY glFramebufferParameteriMESA (GLenum target, GLenum pname, GLint param);
9681GLAPI void APIENTRY glGetFramebufferParameterivMESA (GLenum target, GLenum pname, GLint *params);
9682#endif
9683#endif /* GL_MESA_framebuffer_flip_y */
9684
9685#ifndef GL_MESA_framebuffer_swap_xy
9686#define GL_MESA_framebuffer_swap_xy 1
9687#define GL_FRAMEBUFFER_SWAP_XY_MESA 0x8BBD
9688#endif /* GL_MESA_framebuffer_swap_xy */
9689
9690#ifndef GL_MESA_pack_invert
9691#define GL_MESA_pack_invert 1
9692#define GL_PACK_INVERT_MESA 0x8758
9693#endif /* GL_MESA_pack_invert */
9694
9695#ifndef GL_MESA_program_binary_formats
9696#define GL_MESA_program_binary_formats 1
9697#define GL_PROGRAM_BINARY_FORMAT_MESA 0x875F
9698#endif /* GL_MESA_program_binary_formats */
9699
9700#ifndef GL_MESA_resize_buffers
9701#define GL_MESA_resize_buffers 1
9702typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
9703#ifdef GL_GLEXT_PROTOTYPES
9704GLAPI void APIENTRY glResizeBuffersMESA (void);
9705#endif
9706#endif /* GL_MESA_resize_buffers */
9707
9708#ifndef GL_MESA_shader_integer_functions
9709#define GL_MESA_shader_integer_functions 1
9710#endif /* GL_MESA_shader_integer_functions */
9711
9712#ifndef GL_MESA_tile_raster_order
9713#define GL_MESA_tile_raster_order 1
9714#define GL_TILE_RASTER_ORDER_FIXED_MESA 0x8BB8
9715#define GL_TILE_RASTER_ORDER_INCREASING_X_MESA 0x8BB9
9716#define GL_TILE_RASTER_ORDER_INCREASING_Y_MESA 0x8BBA
9717#endif /* GL_MESA_tile_raster_order */
9718
9719#ifndef GL_MESA_window_pos
9720#define GL_MESA_window_pos 1
9721typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
9722typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
9723typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
9724typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
9725typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
9726typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
9727typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
9728typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
9729typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
9730typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
9731typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
9732typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
9733typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
9734typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
9735typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
9736typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
9737typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
9738typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
9739typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
9740typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
9741typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
9742typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
9743typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
9744typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
9745#ifdef GL_GLEXT_PROTOTYPES
9746GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y);
9747GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v);
9748GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y);
9749GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v);
9750GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y);
9751GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v);
9752GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y);
9753GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v);
9754GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z);
9755GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v);
9756GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z);
9757GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v);
9758GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z);
9759GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v);
9760GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z);
9761GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v);
9762GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
9763GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v);
9764GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
9765GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v);
9766GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w);
9767GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v);
9768GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w);
9769GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v);
9770#endif
9771#endif /* GL_MESA_window_pos */
9772
9773#ifndef GL_MESA_ycbcr_texture
9774#define GL_MESA_ycbcr_texture 1
9775#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
9776#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
9777#define GL_YCBCR_MESA 0x8757
9778#endif /* GL_MESA_ycbcr_texture */
9779
9780#ifndef GL_NVX_blend_equation_advanced_multi_draw_buffers
9781#define GL_NVX_blend_equation_advanced_multi_draw_buffers 1
9782#endif /* GL_NVX_blend_equation_advanced_multi_draw_buffers */
9783
9784#ifndef GL_NVX_conditional_render
9785#define GL_NVX_conditional_render 1
9786typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id);
9787typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void);
9788#ifdef GL_GLEXT_PROTOTYPES
9789GLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id);
9790GLAPI void APIENTRY glEndConditionalRenderNVX (void);
9791#endif
9792#endif /* GL_NVX_conditional_render */
9793
9794#ifndef GL_NVX_gpu_memory_info
9795#define GL_NVX_gpu_memory_info 1
9796#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
9797#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
9798#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
9799#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
9800#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
9801#endif /* GL_NVX_gpu_memory_info */
9802
9803#ifndef GL_NVX_gpu_multicast2
9804#define GL_NVX_gpu_multicast2 1
9805#define GL_UPLOAD_GPU_MASK_NVX 0x954A
9806typedef void (APIENTRYP PFNGLUPLOADGPUMASKNVXPROC) (GLbitfield mask);
9807typedef void (APIENTRYP PFNGLMULTICASTVIEWPORTARRAYVNVXPROC) (GLuint gpu, GLuint first, GLsizei count, const GLfloat *v);
9808typedef void (APIENTRYP PFNGLMULTICASTVIEWPORTPOSITIONWSCALENVXPROC) (GLuint gpu, GLuint index, GLfloat xcoeff, GLfloat ycoeff);
9809typedef void (APIENTRYP PFNGLMULTICASTSCISSORARRAYVNVXPROC) (GLuint gpu, GLuint first, GLsizei count, const GLint *v);
9810typedef GLuint (APIENTRYP PFNGLASYNCCOPYBUFFERSUBDATANVXPROC) (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *fenceValueArray, GLuint readGPU, GLbitfield writeGPUMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
9811typedef GLuint (APIENTRYP PFNGLASYNCCOPYIMAGESUBDATANVXPROC) (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *waitValueArray, GLuint srcGPU, GLbitfield dstGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
9812#ifdef GL_GLEXT_PROTOTYPES
9813GLAPI void APIENTRY glUploadGPUMaskNVX (GLbitfield mask);
9814GLAPI void APIENTRY glMulticastViewportArrayvNVX (GLuint gpu, GLuint first, GLsizei count, const GLfloat *v);
9815GLAPI void APIENTRY glMulticastViewportPositionWScaleNVX (GLuint gpu, GLuint index, GLfloat xcoeff, GLfloat ycoeff);
9816GLAPI void APIENTRY glMulticastScissorArrayvNVX (GLuint gpu, GLuint first, GLsizei count, const GLint *v);
9817GLAPI GLuint APIENTRY glAsyncCopyBufferSubDataNVX (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *fenceValueArray, GLuint readGPU, GLbitfield writeGPUMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
9818GLAPI GLuint APIENTRY glAsyncCopyImageSubDataNVX (GLsizei waitSemaphoreCount, const GLuint *waitSemaphoreArray, const GLuint64 *waitValueArray, GLuint srcGPU, GLbitfield dstGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth, GLsizei signalSemaphoreCount, const GLuint *signalSemaphoreArray, const GLuint64 *signalValueArray);
9819#endif
9820#endif /* GL_NVX_gpu_multicast2 */
9821
9822#ifndef GL_NVX_linked_gpu_multicast
9823#define GL_NVX_linked_gpu_multicast 1
9824#define GL_LGPU_SEPARATE_STORAGE_BIT_NVX 0x0800
9825#define GL_MAX_LGPU_GPUS_NVX 0x92BA
9826typedef void (APIENTRYP PFNGLLGPUNAMEDBUFFERSUBDATANVXPROC) (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
9827typedef void (APIENTRYP PFNGLLGPUCOPYIMAGESUBDATANVXPROC) (GLuint sourceGPU, GLbitfield destinationGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
9828typedef void (APIENTRYP PFNGLLGPUINTERLOCKNVXPROC) (void);
9829#ifdef GL_GLEXT_PROTOTYPES
9830GLAPI void APIENTRY glLGPUNamedBufferSubDataNVX (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
9831GLAPI void APIENTRY glLGPUCopyImageSubDataNVX (GLuint sourceGPU, GLbitfield destinationGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
9832GLAPI void APIENTRY glLGPUInterlockNVX (void);
9833#endif
9834#endif /* GL_NVX_linked_gpu_multicast */
9835
9836#ifndef GL_NVX_progress_fence
9837#define GL_NVX_progress_fence 1
9838typedef GLuint (APIENTRYP PFNGLCREATEPROGRESSFENCENVXPROC) (void);
9839typedef void (APIENTRYP PFNGLSIGNALSEMAPHOREUI64NVXPROC) (GLuint signalGPU, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
9840typedef void (APIENTRYP PFNGLWAITSEMAPHOREUI64NVXPROC) (GLuint waitGPU, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
9841typedef void (APIENTRYP PFNGLCLIENTWAITSEMAPHOREUI64NVXPROC) (GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
9842#ifdef GL_GLEXT_PROTOTYPES
9843GLAPI GLuint APIENTRY glCreateProgressFenceNVX (void);
9844GLAPI void APIENTRY glSignalSemaphoreui64NVX (GLuint signalGPU, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
9845GLAPI void APIENTRY glWaitSemaphoreui64NVX (GLuint waitGPU, GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
9846GLAPI void APIENTRY glClientWaitSemaphoreui64NVX (GLsizei fenceObjectCount, const GLuint *semaphoreArray, const GLuint64 *fenceValueArray);
9847#endif
9848#endif /* GL_NVX_progress_fence */
9849
9850#ifndef GL_NV_alpha_to_coverage_dither_control
9851#define GL_NV_alpha_to_coverage_dither_control 1
9852#define GL_ALPHA_TO_COVERAGE_DITHER_DEFAULT_NV 0x934D
9853#define GL_ALPHA_TO_COVERAGE_DITHER_ENABLE_NV 0x934E
9854#define GL_ALPHA_TO_COVERAGE_DITHER_DISABLE_NV 0x934F
9855#define GL_ALPHA_TO_COVERAGE_DITHER_MODE_NV 0x92BF
9856typedef void (APIENTRYP PFNGLALPHATOCOVERAGEDITHERCONTROLNVPROC) (GLenum mode);
9857#ifdef GL_GLEXT_PROTOTYPES
9858GLAPI void APIENTRY glAlphaToCoverageDitherControlNV (GLenum mode);
9859#endif
9860#endif /* GL_NV_alpha_to_coverage_dither_control */
9861
9862#ifndef GL_NV_bindless_multi_draw_indirect
9863#define GL_NV_bindless_multi_draw_indirect 1
9864typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
9865typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
9866#ifdef GL_GLEXT_PROTOTYPES
9867GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
9868GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
9869#endif
9870#endif /* GL_NV_bindless_multi_draw_indirect */
9871
9872#ifndef GL_NV_bindless_multi_draw_indirect_count
9873#define GL_NV_bindless_multi_draw_indirect_count 1
9874typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount);
9875typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount);
9876#ifdef GL_GLEXT_PROTOTYPES
9877GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessCountNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount);
9878GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessCountNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount);
9879#endif
9880#endif /* GL_NV_bindless_multi_draw_indirect_count */
9881
9882#ifndef GL_NV_bindless_texture
9883#define GL_NV_bindless_texture 1
9884typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
9885typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
9886typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
9887typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);
9888typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
9889typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);
9890typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);
9891typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);
9892typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);
9893typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);
9894typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
9895typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
9896typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);
9897#ifdef GL_GLEXT_PROTOTYPES
9898GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture);
9899GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);
9900GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);
9901GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);
9902GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
9903GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);
9904GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);
9905GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);
9906GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);
9907GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);
9908GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
9909GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);
9910GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
9911#endif
9912#endif /* GL_NV_bindless_texture */
9913
9914#ifndef GL_NV_blend_equation_advanced
9915#define GL_NV_blend_equation_advanced 1
9916#define GL_BLEND_OVERLAP_NV 0x9281
9917#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280
9918#define GL_BLUE_NV 0x1905
9919#define GL_COLORBURN_NV 0x929A
9920#define GL_COLORDODGE_NV 0x9299
9921#define GL_CONJOINT_NV 0x9284
9922#define GL_CONTRAST_NV 0x92A1
9923#define GL_DARKEN_NV 0x9297
9924#define GL_DIFFERENCE_NV 0x929E
9925#define GL_DISJOINT_NV 0x9283
9926#define GL_DST_ATOP_NV 0x928F
9927#define GL_DST_IN_NV 0x928B
9928#define GL_DST_NV 0x9287
9929#define GL_DST_OUT_NV 0x928D
9930#define GL_DST_OVER_NV 0x9289
9931#define GL_EXCLUSION_NV 0x92A0
9932#define GL_GREEN_NV 0x1904
9933#define GL_HARDLIGHT_NV 0x929B
9934#define GL_HARDMIX_NV 0x92A9
9935#define GL_HSL_COLOR_NV 0x92AF
9936#define GL_HSL_HUE_NV 0x92AD
9937#define GL_HSL_LUMINOSITY_NV 0x92B0
9938#define GL_HSL_SATURATION_NV 0x92AE
9939#define GL_INVERT_OVG_NV 0x92B4
9940#define GL_INVERT_RGB_NV 0x92A3
9941#define GL_LIGHTEN_NV 0x9298
9942#define GL_LINEARBURN_NV 0x92A5
9943#define GL_LINEARDODGE_NV 0x92A4
9944#define GL_LINEARLIGHT_NV 0x92A7
9945#define GL_MINUS_CLAMPED_NV 0x92B3
9946#define GL_MINUS_NV 0x929F
9947#define GL_MULTIPLY_NV 0x9294
9948#define GL_OVERLAY_NV 0x9296
9949#define GL_PINLIGHT_NV 0x92A8
9950#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2
9951#define GL_PLUS_CLAMPED_NV 0x92B1
9952#define GL_PLUS_DARKER_NV 0x9292
9953#define GL_PLUS_NV 0x9291
9954#define GL_RED_NV 0x1903
9955#define GL_SCREEN_NV 0x9295
9956#define GL_SOFTLIGHT_NV 0x929C
9957#define GL_SRC_ATOP_NV 0x928E
9958#define GL_SRC_IN_NV 0x928A
9959#define GL_SRC_NV 0x9286
9960#define GL_SRC_OUT_NV 0x928C
9961#define GL_SRC_OVER_NV 0x9288
9962#define GL_UNCORRELATED_NV 0x9282
9963#define GL_VIVIDLIGHT_NV 0x92A6
9964#define GL_XOR_NV 0x1506
9965typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
9966typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
9967#ifdef GL_GLEXT_PROTOTYPES
9968GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value);
9969GLAPI void APIENTRY glBlendBarrierNV (void);
9970#endif
9971#endif /* GL_NV_blend_equation_advanced */
9972
9973#ifndef GL_NV_blend_equation_advanced_coherent
9974#define GL_NV_blend_equation_advanced_coherent 1
9975#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285
9976#endif /* GL_NV_blend_equation_advanced_coherent */
9977
9978#ifndef GL_NV_blend_minmax_factor
9979#define GL_NV_blend_minmax_factor 1
9980#endif /* GL_NV_blend_minmax_factor */
9981
9982#ifndef GL_NV_blend_square
9983#define GL_NV_blend_square 1
9984#endif /* GL_NV_blend_square */
9985
9986#ifndef GL_NV_clip_space_w_scaling
9987#define GL_NV_clip_space_w_scaling 1
9988#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C
9989#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D
9990#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E
9991typedef void (APIENTRYP PFNGLVIEWPORTPOSITIONWSCALENVPROC) (GLuint index, GLfloat xcoeff, GLfloat ycoeff);
9992#ifdef GL_GLEXT_PROTOTYPES
9993GLAPI void APIENTRY glViewportPositionWScaleNV (GLuint index, GLfloat xcoeff, GLfloat ycoeff);
9994#endif
9995#endif /* GL_NV_clip_space_w_scaling */
9996
9997#ifndef GL_NV_command_list
9998#define GL_NV_command_list 1
9999#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000
10000#define GL_NOP_COMMAND_NV 0x0001
10001#define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002
10002#define GL_DRAW_ARRAYS_COMMAND_NV 0x0003
10003#define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004
10004#define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005
10005#define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006
10006#define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007
10007#define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008
10008#define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009
10009#define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A
10010#define GL_BLEND_COLOR_COMMAND_NV 0x000B
10011#define GL_STENCIL_REF_COMMAND_NV 0x000C
10012#define GL_LINE_WIDTH_COMMAND_NV 0x000D
10013#define GL_POLYGON_OFFSET_COMMAND_NV 0x000E
10014#define GL_ALPHA_REF_COMMAND_NV 0x000F
10015#define GL_VIEWPORT_COMMAND_NV 0x0010
10016#define GL_SCISSOR_COMMAND_NV 0x0011
10017#define GL_FRONT_FACE_COMMAND_NV 0x0012
10018typedef void (APIENTRYP PFNGLCREATESTATESNVPROC) (GLsizei n, GLuint *states);
10019typedef void (APIENTRYP PFNGLDELETESTATESNVPROC) (GLsizei n, const GLuint *states);
10020typedef GLboolean (APIENTRYP PFNGLISSTATENVPROC) (GLuint state);
10021typedef void (APIENTRYP PFNGLSTATECAPTURENVPROC) (GLuint state, GLenum mode);
10022typedef GLuint (APIENTRYP PFNGLGETCOMMANDHEADERNVPROC) (GLenum tokenID, GLuint size);
10023typedef GLushort (APIENTRYP PFNGLGETSTAGEINDEXNVPROC) (GLenum shadertype);
10024typedef void (APIENTRYP PFNGLDRAWCOMMANDSNVPROC) (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count);
10025typedef void (APIENTRYP PFNGLDRAWCOMMANDSADDRESSNVPROC) (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count);
10026typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESNVPROC) (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
10027typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC) (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
10028typedef void (APIENTRYP PFNGLCREATECOMMANDLISTSNVPROC) (GLsizei n, GLuint *lists);
10029typedef void (APIENTRYP PFNGLDELETECOMMANDLISTSNVPROC) (GLsizei n, const GLuint *lists);
10030typedef GLboolean (APIENTRYP PFNGLISCOMMANDLISTNVPROC) (GLuint list);
10031typedef void (APIENTRYP PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC) (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
10032typedef void (APIENTRYP PFNGLCOMMANDLISTSEGMENTSNVPROC) (GLuint list, GLuint segments);
10033typedef void (APIENTRYP PFNGLCOMPILECOMMANDLISTNVPROC) (GLuint list);
10034typedef void (APIENTRYP PFNGLCALLCOMMANDLISTNVPROC) (GLuint list);
10035#ifdef GL_GLEXT_PROTOTYPES
10036GLAPI void APIENTRY glCreateStatesNV (GLsizei n, GLuint *states);
10037GLAPI void APIENTRY glDeleteStatesNV (GLsizei n, const GLuint *states);
10038GLAPI GLboolean APIENTRY glIsStateNV (GLuint state);
10039GLAPI void APIENTRY glStateCaptureNV (GLuint state, GLenum mode);
10040GLAPI GLuint APIENTRY glGetCommandHeaderNV (GLenum tokenID, GLuint size);
10041GLAPI GLushort APIENTRY glGetStageIndexNV (GLenum shadertype);
10042GLAPI void APIENTRY glDrawCommandsNV (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count);
10043GLAPI void APIENTRY glDrawCommandsAddressNV (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count);
10044GLAPI void APIENTRY glDrawCommandsStatesNV (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
10045GLAPI void APIENTRY glDrawCommandsStatesAddressNV (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
10046GLAPI void APIENTRY glCreateCommandListsNV (GLsizei n, GLuint *lists);
10047GLAPI void APIENTRY glDeleteCommandListsNV (GLsizei n, const GLuint *lists);
10048GLAPI GLboolean APIENTRY glIsCommandListNV (GLuint list);
10049GLAPI void APIENTRY glListDrawCommandsStatesClientNV (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
10050GLAPI void APIENTRY glCommandListSegmentsNV (GLuint list, GLuint segments);
10051GLAPI void APIENTRY glCompileCommandListNV (GLuint list);
10052GLAPI void APIENTRY glCallCommandListNV (GLuint list);
10053#endif
10054#endif /* GL_NV_command_list */
10055
10056#ifndef GL_NV_compute_program5
10057#define GL_NV_compute_program5 1
10058#define GL_COMPUTE_PROGRAM_NV 0x90FB
10059#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC
10060#endif /* GL_NV_compute_program5 */
10061
10062#ifndef GL_NV_compute_shader_derivatives
10063#define GL_NV_compute_shader_derivatives 1
10064#endif /* GL_NV_compute_shader_derivatives */
10065
10066#ifndef GL_NV_conditional_render
10067#define GL_NV_conditional_render 1
10068#define GL_QUERY_WAIT_NV 0x8E13
10069#define GL_QUERY_NO_WAIT_NV 0x8E14
10070#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15
10071#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16
10072typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
10073typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
10074#ifdef GL_GLEXT_PROTOTYPES
10075GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);
10076GLAPI void APIENTRY glEndConditionalRenderNV (void);
10077#endif
10078#endif /* GL_NV_conditional_render */
10079
10080#ifndef GL_NV_conservative_raster
10081#define GL_NV_conservative_raster 1
10082#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346
10083#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347
10084#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348
10085#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349
10086typedef void (APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits);
10087#ifdef GL_GLEXT_PROTOTYPES
10088GLAPI void APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits);
10089#endif
10090#endif /* GL_NV_conservative_raster */
10091
10092#ifndef GL_NV_conservative_raster_dilate
10093#define GL_NV_conservative_raster_dilate 1
10094#define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379
10095#define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A
10096#define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B
10097typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERFNVPROC) (GLenum pname, GLfloat value);
10098#ifdef GL_GLEXT_PROTOTYPES
10099GLAPI void APIENTRY glConservativeRasterParameterfNV (GLenum pname, GLfloat value);
10100#endif
10101#endif /* GL_NV_conservative_raster_dilate */
10102
10103#ifndef GL_NV_conservative_raster_pre_snap
10104#define GL_NV_conservative_raster_pre_snap 1
10105#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV 0x9550
10106#endif /* GL_NV_conservative_raster_pre_snap */
10107
10108#ifndef GL_NV_conservative_raster_pre_snap_triangles
10109#define GL_NV_conservative_raster_pre_snap_triangles 1
10110#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D
10111#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E
10112#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F
10113typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param);
10114#ifdef GL_GLEXT_PROTOTYPES
10115GLAPI void APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param);
10116#endif
10117#endif /* GL_NV_conservative_raster_pre_snap_triangles */
10118
10119#ifndef GL_NV_conservative_raster_underestimation
10120#define GL_NV_conservative_raster_underestimation 1
10121#endif /* GL_NV_conservative_raster_underestimation */
10122
10123#ifndef GL_NV_copy_depth_to_color
10124#define GL_NV_copy_depth_to_color 1
10125#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
10126#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
10127#endif /* GL_NV_copy_depth_to_color */
10128
10129#ifndef GL_NV_copy_image
10130#define GL_NV_copy_image 1
10131typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
10132#ifdef GL_GLEXT_PROTOTYPES
10133GLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
10134#endif
10135#endif /* GL_NV_copy_image */
10136
10137#ifndef GL_NV_deep_texture3D
10138#define GL_NV_deep_texture3D 1
10139#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0
10140#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1
10141#endif /* GL_NV_deep_texture3D */
10142
10143#ifndef GL_NV_depth_buffer_float
10144#define GL_NV_depth_buffer_float 1
10145#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
10146#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
10147#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
10148#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
10149typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
10150typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
10151typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
10152#ifdef GL_GLEXT_PROTOTYPES
10153GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar);
10154GLAPI void APIENTRY glClearDepthdNV (GLdouble depth);
10155GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax);
10156#endif
10157#endif /* GL_NV_depth_buffer_float */
10158
10159#ifndef GL_NV_depth_clamp
10160#define GL_NV_depth_clamp 1
10161#define GL_DEPTH_CLAMP_NV 0x864F
10162#endif /* GL_NV_depth_clamp */
10163
10164#ifndef GL_NV_draw_texture
10165#define GL_NV_draw_texture 1
10166typedef void (APIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
10167#ifdef GL_GLEXT_PROTOTYPES
10168GLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
10169#endif
10170#endif /* GL_NV_draw_texture */
10171
10172#ifndef GL_NV_draw_vulkan_image
10173#define GL_NV_draw_vulkan_image 1
10174typedef void (APIENTRY *GLVULKANPROCNV)(void);
10175typedef void (APIENTRYP PFNGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
10176typedef GLVULKANPROCNV (APIENTRYP PFNGLGETVKPROCADDRNVPROC) (const GLchar *name);
10177typedef void (APIENTRYP PFNGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore);
10178typedef void (APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore);
10179typedef void (APIENTRYP PFNGLSIGNALVKFENCENVPROC) (GLuint64 vkFence);
10180#ifdef GL_GLEXT_PROTOTYPES
10181GLAPI void APIENTRY glDrawVkImageNV (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
10182GLAPI GLVULKANPROCNV APIENTRY glGetVkProcAddrNV (const GLchar *name);
10183GLAPI void APIENTRY glWaitVkSemaphoreNV (GLuint64 vkSemaphore);
10184GLAPI void APIENTRY glSignalVkSemaphoreNV (GLuint64 vkSemaphore);
10185GLAPI void APIENTRY glSignalVkFenceNV (GLuint64 vkFence);
10186#endif
10187#endif /* GL_NV_draw_vulkan_image */
10188
10189#ifndef GL_NV_evaluators
10190#define GL_NV_evaluators 1
10191#define GL_EVAL_2D_NV 0x86C0
10192#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
10193#define GL_MAP_TESSELLATION_NV 0x86C2
10194#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
10195#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
10196#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
10197#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
10198#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
10199#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
10200#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
10201#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
10202#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
10203#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
10204#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
10205#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
10206#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
10207#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
10208#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
10209#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
10210#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
10211#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
10212#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
10213#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
10214#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
10215typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
10216typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
10217typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
10218typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
10219typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
10220typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
10221typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
10222typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
10223typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
10224#ifdef GL_GLEXT_PROTOTYPES
10225GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
10226GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params);
10227GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params);
10228GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
10229GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params);
10230GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params);
10231GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params);
10232GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
10233GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode);
10234#endif
10235#endif /* GL_NV_evaluators */
10236
10237#ifndef GL_NV_explicit_multisample
10238#define GL_NV_explicit_multisample 1
10239#define GL_SAMPLE_POSITION_NV 0x8E50
10240#define GL_SAMPLE_MASK_NV 0x8E51
10241#define GL_SAMPLE_MASK_VALUE_NV 0x8E52
10242#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53
10243#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54
10244#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55
10245#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56
10246#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57
10247#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58
10248#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59
10249typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);
10250typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);
10251typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);
10252#ifdef GL_GLEXT_PROTOTYPES
10253GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val);
10254GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask);
10255GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer);
10256#endif
10257#endif /* GL_NV_explicit_multisample */
10258
10259#ifndef GL_NV_fence
10260#define GL_NV_fence 1
10261#define GL_ALL_COMPLETED_NV 0x84F2
10262#define GL_FENCE_STATUS_NV 0x84F3
10263#define GL_FENCE_CONDITION_NV 0x84F4
10264typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
10265typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
10266typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
10267typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
10268typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
10269typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
10270typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
10271#ifdef GL_GLEXT_PROTOTYPES
10272GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
10273GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
10274GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);
10275GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);
10276GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
10277GLAPI void APIENTRY glFinishFenceNV (GLuint fence);
10278GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
10279#endif
10280#endif /* GL_NV_fence */
10281
10282#ifndef GL_NV_fill_rectangle
10283#define GL_NV_fill_rectangle 1
10284#define GL_FILL_RECTANGLE_NV 0x933C
10285#endif /* GL_NV_fill_rectangle */
10286
10287#ifndef GL_NV_float_buffer
10288#define GL_NV_float_buffer 1
10289#define GL_FLOAT_R_NV 0x8880
10290#define GL_FLOAT_RG_NV 0x8881
10291#define GL_FLOAT_RGB_NV 0x8882
10292#define GL_FLOAT_RGBA_NV 0x8883
10293#define GL_FLOAT_R16_NV 0x8884
10294#define GL_FLOAT_R32_NV 0x8885
10295#define GL_FLOAT_RG16_NV 0x8886
10296#define GL_FLOAT_RG32_NV 0x8887
10297#define GL_FLOAT_RGB16_NV 0x8888
10298#define GL_FLOAT_RGB32_NV 0x8889
10299#define GL_FLOAT_RGBA16_NV 0x888A
10300#define GL_FLOAT_RGBA32_NV 0x888B
10301#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
10302#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
10303#define GL_FLOAT_RGBA_MODE_NV 0x888E
10304#endif /* GL_NV_float_buffer */
10305
10306#ifndef GL_NV_fog_distance
10307#define GL_NV_fog_distance 1
10308#define GL_FOG_DISTANCE_MODE_NV 0x855A
10309#define GL_EYE_RADIAL_NV 0x855B
10310#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
10311#endif /* GL_NV_fog_distance */
10312
10313#ifndef GL_NV_fragment_coverage_to_color
10314#define GL_NV_fragment_coverage_to_color 1
10315#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD
10316#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE
10317typedef void (APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color);
10318#ifdef GL_GLEXT_PROTOTYPES
10319GLAPI void APIENTRY glFragmentCoverageColorNV (GLuint color);
10320#endif
10321#endif /* GL_NV_fragment_coverage_to_color */
10322
10323#ifndef GL_NV_fragment_program
10324#define GL_NV_fragment_program 1
10325#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
10326#define GL_FRAGMENT_PROGRAM_NV 0x8870
10327#define GL_MAX_TEXTURE_COORDS_NV 0x8871
10328#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
10329#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
10330#define GL_PROGRAM_ERROR_STRING_NV 0x8874
10331typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10332typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
10333typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10334typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
10335typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
10336typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
10337#ifdef GL_GLEXT_PROTOTYPES
10338GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10339GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
10340GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10341GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
10342GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
10343GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
10344#endif
10345#endif /* GL_NV_fragment_program */
10346
10347#ifndef GL_NV_fragment_program2
10348#define GL_NV_fragment_program2 1
10349#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
10350#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
10351#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
10352#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
10353#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
10354#endif /* GL_NV_fragment_program2 */
10355
10356#ifndef GL_NV_fragment_program4
10357#define GL_NV_fragment_program4 1
10358#endif /* GL_NV_fragment_program4 */
10359
10360#ifndef GL_NV_fragment_program_option
10361#define GL_NV_fragment_program_option 1
10362#endif /* GL_NV_fragment_program_option */
10363
10364#ifndef GL_NV_fragment_shader_barycentric
10365#define GL_NV_fragment_shader_barycentric 1
10366#endif /* GL_NV_fragment_shader_barycentric */
10367
10368#ifndef GL_NV_fragment_shader_interlock
10369#define GL_NV_fragment_shader_interlock 1
10370#endif /* GL_NV_fragment_shader_interlock */
10371
10372#ifndef GL_NV_framebuffer_mixed_samples
10373#define GL_NV_framebuffer_mixed_samples 1
10374#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331
10375#define GL_COLOR_SAMPLES_NV 0x8E20
10376#define GL_DEPTH_SAMPLES_NV 0x932D
10377#define GL_STENCIL_SAMPLES_NV 0x932E
10378#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F
10379#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330
10380#define GL_COVERAGE_MODULATION_NV 0x9332
10381#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333
10382typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v);
10383typedef void (APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufSize, GLfloat *v);
10384typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components);
10385#ifdef GL_GLEXT_PROTOTYPES
10386GLAPI void APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v);
10387GLAPI void APIENTRY glGetCoverageModulationTableNV (GLsizei bufSize, GLfloat *v);
10388GLAPI void APIENTRY glCoverageModulationNV (GLenum components);
10389#endif
10390#endif /* GL_NV_framebuffer_mixed_samples */
10391
10392#ifndef GL_NV_framebuffer_multisample_coverage
10393#define GL_NV_framebuffer_multisample_coverage 1
10394#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
10395#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
10396#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
10397#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
10398typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
10399#ifdef GL_GLEXT_PROTOTYPES
10400GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
10401#endif
10402#endif /* GL_NV_framebuffer_multisample_coverage */
10403
10404#ifndef GL_NV_geometry_program4
10405#define GL_NV_geometry_program4 1
10406#define GL_GEOMETRY_PROGRAM_NV 0x8C26
10407#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
10408#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
10409typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
10410typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
10411typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
10412#ifdef GL_GLEXT_PROTOTYPES
10413GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit);
10414GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
10415GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
10416#endif
10417#endif /* GL_NV_geometry_program4 */
10418
10419#ifndef GL_NV_geometry_shader4
10420#define GL_NV_geometry_shader4 1
10421#endif /* GL_NV_geometry_shader4 */
10422
10423#ifndef GL_NV_geometry_shader_passthrough
10424#define GL_NV_geometry_shader_passthrough 1
10425#endif /* GL_NV_geometry_shader_passthrough */
10426
10427#ifndef GL_NV_gpu_multicast
10428#define GL_NV_gpu_multicast 1
10429#define GL_PER_GPU_STORAGE_BIT_NV 0x0800
10430#define GL_MULTICAST_GPUS_NV 0x92BA
10431#define GL_RENDER_GPU_MASK_NV 0x9558
10432#define GL_PER_GPU_STORAGE_NV 0x9548
10433#define GL_MULTICAST_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9549
10434typedef void (APIENTRYP PFNGLRENDERGPUMASKNVPROC) (GLbitfield mask);
10435typedef void (APIENTRYP PFNGLMULTICASTBUFFERSUBDATANVPROC) (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
10436typedef void (APIENTRYP PFNGLMULTICASTCOPYBUFFERSUBDATANVPROC) (GLuint readGPU, GLbitfield writeGPUMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
10437typedef void (APIENTRYP PFNGLMULTICASTCOPYIMAGESUBDATANVPROC) (GLuint srcGPU, GLbitfield dstGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
10438typedef void (APIENTRYP PFNGLMULTICASTBLITFRAMEBUFFERNVPROC) (GLuint srcGPU, GLuint dstGPU, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
10439typedef void (APIENTRYP PFNGLMULTICASTFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
10440typedef void (APIENTRYP PFNGLMULTICASTBARRIERNVPROC) (void);
10441typedef void (APIENTRYP PFNGLMULTICASTWAITSYNCNVPROC) (GLuint signalGPU, GLbitfield waitGPUMask);
10442typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTIVNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLint *params);
10443typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTUIVNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLuint *params);
10444typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTI64VNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLint64 *params);
10445typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTUI64VNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLuint64 *params);
10446#ifdef GL_GLEXT_PROTOTYPES
10447GLAPI void APIENTRY glRenderGPUMaskNV (GLbitfield mask);
10448GLAPI void APIENTRY glMulticastBufferSubDataNV (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
10449GLAPI void APIENTRY glMulticastCopyBufferSubDataNV (GLuint readGPU, GLbitfield writeGPUMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
10450GLAPI void APIENTRY glMulticastCopyImageSubDataNV (GLuint srcGPU, GLbitfield dstGPUMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
10451GLAPI void APIENTRY glMulticastBlitFramebufferNV (GLuint srcGPU, GLuint dstGPU, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
10452GLAPI void APIENTRY glMulticastFramebufferSampleLocationsfvNV (GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
10453GLAPI void APIENTRY glMulticastBarrierNV (void);
10454GLAPI void APIENTRY glMulticastWaitSyncNV (GLuint signalGPU, GLbitfield waitGPUMask);
10455GLAPI void APIENTRY glMulticastGetQueryObjectivNV (GLuint gpu, GLuint id, GLenum pname, GLint *params);
10456GLAPI void APIENTRY glMulticastGetQueryObjectuivNV (GLuint gpu, GLuint id, GLenum pname, GLuint *params);
10457GLAPI void APIENTRY glMulticastGetQueryObjecti64vNV (GLuint gpu, GLuint id, GLenum pname, GLint64 *params);
10458GLAPI void APIENTRY glMulticastGetQueryObjectui64vNV (GLuint gpu, GLuint id, GLenum pname, GLuint64 *params);
10459#endif
10460#endif /* GL_NV_gpu_multicast */
10461
10462#ifndef GL_NV_gpu_program4
10463#define GL_NV_gpu_program4 1
10464#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
10465#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
10466#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
10467#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
10468#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
10469#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
10470#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
10471#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
10472typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
10473typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
10474typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
10475typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10476typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
10477typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
10478typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
10479typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
10480typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
10481typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10482typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
10483typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
10484typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
10485typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
10486typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
10487typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
10488#ifdef GL_GLEXT_PROTOTYPES
10489GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
10490GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
10491GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
10492GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10493GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
10494GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
10495GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
10496GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
10497GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
10498GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10499GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
10500GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
10501GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params);
10502GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params);
10503GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params);
10504GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params);
10505#endif
10506#endif /* GL_NV_gpu_program4 */
10507
10508#ifndef GL_NV_gpu_program5
10509#define GL_NV_gpu_program5 1
10510#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A
10511#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B
10512#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C
10513#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D
10514#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E
10515#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F
10516#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44
10517#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45
10518typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params);
10519typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param);
10520#ifdef GL_GLEXT_PROTOTYPES
10521GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params);
10522GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param);
10523#endif
10524#endif /* GL_NV_gpu_program5 */
10525
10526#ifndef GL_NV_gpu_program5_mem_extended
10527#define GL_NV_gpu_program5_mem_extended 1
10528#endif /* GL_NV_gpu_program5_mem_extended */
10529
10530#ifndef GL_NV_gpu_shader5
10531#define GL_NV_gpu_shader5 1
10532#endif /* GL_NV_gpu_shader5 */
10533
10534#ifndef GL_NV_half_float
10535#define GL_NV_half_float 1
10536typedef unsigned short GLhalfNV;
10537#define GL_HALF_FLOAT_NV 0x140B
10538typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
10539typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
10540typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
10541typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
10542typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
10543typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
10544typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
10545typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
10546typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
10547typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
10548typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
10549typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
10550typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
10551typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
10552typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
10553typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
10554typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
10555typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
10556typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
10557typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
10558typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
10559typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
10560typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
10561typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
10562typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
10563typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
10564typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
10565typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
10566typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
10567typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
10568typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
10569typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
10570typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
10571typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
10572typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
10573typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
10574typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
10575typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
10576typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
10577typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
10578typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
10579typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
10580typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
10581typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
10582typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
10583typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
10584#ifdef GL_GLEXT_PROTOTYPES
10585GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);
10586GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);
10587GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z);
10588GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v);
10589GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
10590GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v);
10591GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
10592GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v);
10593GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
10594GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v);
10595GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
10596GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v);
10597GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s);
10598GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v);
10599GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t);
10600GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v);
10601GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r);
10602GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v);
10603GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
10604GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v);
10605GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s);
10606GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v);
10607GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t);
10608GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v);
10609GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
10610GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);
10611GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
10612GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);
10613GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);
10614GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);
10615GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
10616GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);
10617GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);
10618GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);
10619GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);
10620GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);
10621GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);
10622GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v);
10623GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
10624GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v);
10625GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
10626GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v);
10627GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
10628GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
10629GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
10630GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
10631#endif
10632#endif /* GL_NV_half_float */
10633
10634#ifndef GL_NV_internalformat_sample_query
10635#define GL_NV_internalformat_sample_query 1
10636#define GL_MULTISAMPLES_NV 0x9371
10637#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372
10638#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373
10639#define GL_CONFORMANT_NV 0x9374
10640typedef void (APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint *params);
10641#ifdef GL_GLEXT_PROTOTYPES
10642GLAPI void APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint *params);
10643#endif
10644#endif /* GL_NV_internalformat_sample_query */
10645
10646#ifndef GL_NV_light_max_exponent
10647#define GL_NV_light_max_exponent 1
10648#define GL_MAX_SHININESS_NV 0x8504
10649#define GL_MAX_SPOT_EXPONENT_NV 0x8505
10650#endif /* GL_NV_light_max_exponent */
10651
10652#ifndef GL_NV_memory_attachment
10653#define GL_NV_memory_attachment 1
10654#define GL_ATTACHED_MEMORY_OBJECT_NV 0x95A4
10655#define GL_ATTACHED_MEMORY_OFFSET_NV 0x95A5
10656#define GL_MEMORY_ATTACHABLE_ALIGNMENT_NV 0x95A6
10657#define GL_MEMORY_ATTACHABLE_SIZE_NV 0x95A7
10658#define GL_MEMORY_ATTACHABLE_NV 0x95A8
10659#define GL_DETACHED_MEMORY_INCARNATION_NV 0x95A9
10660#define GL_DETACHED_TEXTURES_NV 0x95AA
10661#define GL_DETACHED_BUFFERS_NV 0x95AB
10662#define GL_MAX_DETACHED_TEXTURES_NV 0x95AC
10663#define GL_MAX_DETACHED_BUFFERS_NV 0x95AD
10664typedef void (APIENTRYP PFNGLGETMEMORYOBJECTDETACHEDRESOURCESUIVNVPROC) (GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params);
10665typedef void (APIENTRYP PFNGLRESETMEMORYOBJECTPARAMETERNVPROC) (GLuint memory, GLenum pname);
10666typedef void (APIENTRYP PFNGLTEXATTACHMEMORYNVPROC) (GLenum target, GLuint memory, GLuint64 offset);
10667typedef void (APIENTRYP PFNGLBUFFERATTACHMEMORYNVPROC) (GLenum target, GLuint memory, GLuint64 offset);
10668typedef void (APIENTRYP PFNGLTEXTUREATTACHMEMORYNVPROC) (GLuint texture, GLuint memory, GLuint64 offset);
10669typedef void (APIENTRYP PFNGLNAMEDBUFFERATTACHMEMORYNVPROC) (GLuint buffer, GLuint memory, GLuint64 offset);
10670#ifdef GL_GLEXT_PROTOTYPES
10671GLAPI void APIENTRY glGetMemoryObjectDetachedResourcesuivNV (GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params);
10672GLAPI void APIENTRY glResetMemoryObjectParameterNV (GLuint memory, GLenum pname);
10673GLAPI void APIENTRY glTexAttachMemoryNV (GLenum target, GLuint memory, GLuint64 offset);
10674GLAPI void APIENTRY glBufferAttachMemoryNV (GLenum target, GLuint memory, GLuint64 offset);
10675GLAPI void APIENTRY glTextureAttachMemoryNV (GLuint texture, GLuint memory, GLuint64 offset);
10676GLAPI void APIENTRY glNamedBufferAttachMemoryNV (GLuint buffer, GLuint memory, GLuint64 offset);
10677#endif
10678#endif /* GL_NV_memory_attachment */
10679
10680#ifndef GL_NV_memory_object_sparse
10681#define GL_NV_memory_object_sparse 1
10682typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTMEMNVPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit);
10683typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTMEMNVPROC) (GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit);
10684typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTMEMNVPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit);
10685typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTMEMNVPROC) (GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit);
10686#ifdef GL_GLEXT_PROTOTYPES
10687GLAPI void APIENTRY glBufferPageCommitmentMemNV (GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit);
10688GLAPI void APIENTRY glTexPageCommitmentMemNV (GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit);
10689GLAPI void APIENTRY glNamedBufferPageCommitmentMemNV (GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit);
10690GLAPI void APIENTRY glTexturePageCommitmentMemNV (GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit);
10691#endif
10692#endif /* GL_NV_memory_object_sparse */
10693
10694#ifndef GL_NV_mesh_shader
10695#define GL_NV_mesh_shader 1
10696#define GL_MESH_SHADER_NV 0x9559
10697#define GL_TASK_SHADER_NV 0x955A
10698#define GL_MAX_MESH_UNIFORM_BLOCKS_NV 0x8E60
10699#define GL_MAX_MESH_TEXTURE_IMAGE_UNITS_NV 0x8E61
10700#define GL_MAX_MESH_IMAGE_UNIFORMS_NV 0x8E62
10701#define GL_MAX_MESH_UNIFORM_COMPONENTS_NV 0x8E63
10702#define GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_NV 0x8E64
10703#define GL_MAX_MESH_ATOMIC_COUNTERS_NV 0x8E65
10704#define GL_MAX_MESH_SHADER_STORAGE_BLOCKS_NV 0x8E66
10705#define GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_NV 0x8E67
10706#define GL_MAX_TASK_UNIFORM_BLOCKS_NV 0x8E68
10707#define GL_MAX_TASK_TEXTURE_IMAGE_UNITS_NV 0x8E69
10708#define GL_MAX_TASK_IMAGE_UNIFORMS_NV 0x8E6A
10709#define GL_MAX_TASK_UNIFORM_COMPONENTS_NV 0x8E6B
10710#define GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_NV 0x8E6C
10711#define GL_MAX_TASK_ATOMIC_COUNTERS_NV 0x8E6D
10712#define GL_MAX_TASK_SHADER_STORAGE_BLOCKS_NV 0x8E6E
10713#define GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_NV 0x8E6F
10714#define GL_MAX_MESH_WORK_GROUP_INVOCATIONS_NV 0x95A2
10715#define GL_MAX_TASK_WORK_GROUP_INVOCATIONS_NV 0x95A3
10716#define GL_MAX_MESH_TOTAL_MEMORY_SIZE_NV 0x9536
10717#define GL_MAX_TASK_TOTAL_MEMORY_SIZE_NV 0x9537
10718#define GL_MAX_MESH_OUTPUT_VERTICES_NV 0x9538
10719#define GL_MAX_MESH_OUTPUT_PRIMITIVES_NV 0x9539
10720#define GL_MAX_TASK_OUTPUT_COUNT_NV 0x953A
10721#define GL_MAX_DRAW_MESH_TASKS_COUNT_NV 0x953D
10722#define GL_MAX_MESH_VIEWS_NV 0x9557
10723#define GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_NV 0x92DF
10724#define GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_NV 0x9543
10725#define GL_MAX_MESH_WORK_GROUP_SIZE_NV 0x953B
10726#define GL_MAX_TASK_WORK_GROUP_SIZE_NV 0x953C
10727#define GL_MESH_WORK_GROUP_SIZE_NV 0x953E
10728#define GL_TASK_WORK_GROUP_SIZE_NV 0x953F
10729#define GL_MESH_VERTICES_OUT_NV 0x9579
10730#define GL_MESH_PRIMITIVES_OUT_NV 0x957A
10731#define GL_MESH_OUTPUT_TYPE_NV 0x957B
10732#define GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_NV 0x959C
10733#define GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_NV 0x959D
10734#define GL_REFERENCED_BY_MESH_SHADER_NV 0x95A0
10735#define GL_REFERENCED_BY_TASK_SHADER_NV 0x95A1
10736#define GL_MESH_SHADER_BIT_NV 0x00000040
10737#define GL_TASK_SHADER_BIT_NV 0x00000080
10738#define GL_MESH_SUBROUTINE_NV 0x957C
10739#define GL_TASK_SUBROUTINE_NV 0x957D
10740#define GL_MESH_SUBROUTINE_UNIFORM_NV 0x957E
10741#define GL_TASK_SUBROUTINE_UNIFORM_NV 0x957F
10742#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_NV 0x959E
10743#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_NV 0x959F
10744typedef void (APIENTRYP PFNGLDRAWMESHTASKSNVPROC) (GLuint first, GLuint count);
10745typedef void (APIENTRYP PFNGLDRAWMESHTASKSINDIRECTNVPROC) (GLintptr indirect);
10746typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTNVPROC) (GLintptr indirect, GLsizei drawcount, GLsizei stride);
10747typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTCOUNTNVPROC) (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
10748#ifdef GL_GLEXT_PROTOTYPES
10749GLAPI void APIENTRY glDrawMeshTasksNV (GLuint first, GLuint count);
10750GLAPI void APIENTRY glDrawMeshTasksIndirectNV (GLintptr indirect);
10751GLAPI void APIENTRY glMultiDrawMeshTasksIndirectNV (GLintptr indirect, GLsizei drawcount, GLsizei stride);
10752GLAPI void APIENTRY glMultiDrawMeshTasksIndirectCountNV (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
10753#endif
10754#endif /* GL_NV_mesh_shader */
10755
10756#ifndef GL_NV_multisample_coverage
10757#define GL_NV_multisample_coverage 1
10758#endif /* GL_NV_multisample_coverage */
10759
10760#ifndef GL_NV_multisample_filter_hint
10761#define GL_NV_multisample_filter_hint 1
10762#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
10763#endif /* GL_NV_multisample_filter_hint */
10764
10765#ifndef GL_NV_occlusion_query
10766#define GL_NV_occlusion_query 1
10767#define GL_PIXEL_COUNTER_BITS_NV 0x8864
10768#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
10769#define GL_PIXEL_COUNT_NV 0x8866
10770#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
10771typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
10772typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
10773typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
10774typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
10775typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
10776typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
10777typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
10778#ifdef GL_GLEXT_PROTOTYPES
10779GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids);
10780GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids);
10781GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id);
10782GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id);
10783GLAPI void APIENTRY glEndOcclusionQueryNV (void);
10784GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params);
10785GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params);
10786#endif
10787#endif /* GL_NV_occlusion_query */
10788
10789#ifndef GL_NV_packed_depth_stencil
10790#define GL_NV_packed_depth_stencil 1
10791#define GL_DEPTH_STENCIL_NV 0x84F9
10792#define GL_UNSIGNED_INT_24_8_NV 0x84FA
10793#endif /* GL_NV_packed_depth_stencil */
10794
10795#ifndef GL_NV_parameter_buffer_object
10796#define GL_NV_parameter_buffer_object 1
10797#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
10798#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
10799#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
10800#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
10801#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
10802typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
10803typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
10804typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
10805#ifdef GL_GLEXT_PROTOTYPES
10806GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
10807GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
10808GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
10809#endif
10810#endif /* GL_NV_parameter_buffer_object */
10811
10812#ifndef GL_NV_parameter_buffer_object2
10813#define GL_NV_parameter_buffer_object2 1
10814#endif /* GL_NV_parameter_buffer_object2 */
10815
10816#ifndef GL_NV_path_rendering
10817#define GL_NV_path_rendering 1
10818#define GL_PATH_FORMAT_SVG_NV 0x9070
10819#define GL_PATH_FORMAT_PS_NV 0x9071
10820#define GL_STANDARD_FONT_NAME_NV 0x9072
10821#define GL_SYSTEM_FONT_NAME_NV 0x9073
10822#define GL_FILE_NAME_NV 0x9074
10823#define GL_PATH_STROKE_WIDTH_NV 0x9075
10824#define GL_PATH_END_CAPS_NV 0x9076
10825#define GL_PATH_INITIAL_END_CAP_NV 0x9077
10826#define GL_PATH_TERMINAL_END_CAP_NV 0x9078
10827#define GL_PATH_JOIN_STYLE_NV 0x9079
10828#define GL_PATH_MITER_LIMIT_NV 0x907A
10829#define GL_PATH_DASH_CAPS_NV 0x907B
10830#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C
10831#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D
10832#define GL_PATH_DASH_OFFSET_NV 0x907E
10833#define GL_PATH_CLIENT_LENGTH_NV 0x907F
10834#define GL_PATH_FILL_MODE_NV 0x9080
10835#define GL_PATH_FILL_MASK_NV 0x9081
10836#define GL_PATH_FILL_COVER_MODE_NV 0x9082
10837#define GL_PATH_STROKE_COVER_MODE_NV 0x9083
10838#define GL_PATH_STROKE_MASK_NV 0x9084
10839#define GL_COUNT_UP_NV 0x9088
10840#define GL_COUNT_DOWN_NV 0x9089
10841#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A
10842#define GL_CONVEX_HULL_NV 0x908B
10843#define GL_BOUNDING_BOX_NV 0x908D
10844#define GL_TRANSLATE_X_NV 0x908E
10845#define GL_TRANSLATE_Y_NV 0x908F
10846#define GL_TRANSLATE_2D_NV 0x9090
10847#define GL_TRANSLATE_3D_NV 0x9091
10848#define GL_AFFINE_2D_NV 0x9092
10849#define GL_AFFINE_3D_NV 0x9094
10850#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096
10851#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098
10852#define GL_UTF8_NV 0x909A
10853#define GL_UTF16_NV 0x909B
10854#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
10855#define GL_PATH_COMMAND_COUNT_NV 0x909D
10856#define GL_PATH_COORD_COUNT_NV 0x909E
10857#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F
10858#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0
10859#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1
10860#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2
10861#define GL_SQUARE_NV 0x90A3
10862#define GL_ROUND_NV 0x90A4
10863#define GL_TRIANGULAR_NV 0x90A5
10864#define GL_BEVEL_NV 0x90A6
10865#define GL_MITER_REVERT_NV 0x90A7
10866#define GL_MITER_TRUNCATE_NV 0x90A8
10867#define GL_SKIP_MISSING_GLYPH_NV 0x90A9
10868#define GL_USE_MISSING_GLYPH_NV 0x90AA
10869#define GL_PATH_ERROR_POSITION_NV 0x90AB
10870#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
10871#define GL_ADJACENT_PAIRS_NV 0x90AE
10872#define GL_FIRST_TO_REST_NV 0x90AF
10873#define GL_PATH_GEN_MODE_NV 0x90B0
10874#define GL_PATH_GEN_COEFF_NV 0x90B1
10875#define GL_PATH_GEN_COMPONENTS_NV 0x90B3
10876#define GL_PATH_STENCIL_FUNC_NV 0x90B7
10877#define GL_PATH_STENCIL_REF_NV 0x90B8
10878#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9
10879#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
10880#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
10881#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF
10882#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4
10883#define GL_MOVE_TO_RESETS_NV 0x90B5
10884#define GL_MOVE_TO_CONTINUES_NV 0x90B6
10885#define GL_CLOSE_PATH_NV 0x00
10886#define GL_MOVE_TO_NV 0x02
10887#define GL_RELATIVE_MOVE_TO_NV 0x03
10888#define GL_LINE_TO_NV 0x04
10889#define GL_RELATIVE_LINE_TO_NV 0x05
10890#define GL_HORIZONTAL_LINE_TO_NV 0x06
10891#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
10892#define GL_VERTICAL_LINE_TO_NV 0x08
10893#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09
10894#define GL_QUADRATIC_CURVE_TO_NV 0x0A
10895#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
10896#define GL_CUBIC_CURVE_TO_NV 0x0C
10897#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D
10898#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E
10899#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
10900#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10
10901#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
10902#define GL_SMALL_CCW_ARC_TO_NV 0x12
10903#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13
10904#define GL_SMALL_CW_ARC_TO_NV 0x14
10905#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15
10906#define GL_LARGE_CCW_ARC_TO_NV 0x16
10907#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17
10908#define GL_LARGE_CW_ARC_TO_NV 0x18
10909#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19
10910#define GL_RESTART_PATH_NV 0xF0
10911#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2
10912#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4
10913#define GL_RECT_NV 0xF6
10914#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8
10915#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA
10916#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC
10917#define GL_ARC_TO_NV 0xFE
10918#define GL_RELATIVE_ARC_TO_NV 0xFF
10919#define GL_BOLD_BIT_NV 0x01
10920#define GL_ITALIC_BIT_NV 0x02
10921#define GL_GLYPH_WIDTH_BIT_NV 0x01
10922#define GL_GLYPH_HEIGHT_BIT_NV 0x02
10923#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
10924#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
10925#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
10926#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
10927#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
10928#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
10929#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100
10930#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000
10931#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000
10932#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000
10933#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000
10934#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000
10935#define GL_FONT_ASCENDER_BIT_NV 0x00200000
10936#define GL_FONT_DESCENDER_BIT_NV 0x00400000
10937#define GL_FONT_HEIGHT_BIT_NV 0x00800000
10938#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000
10939#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000
10940#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
10941#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
10942#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
10943#define GL_ROUNDED_RECT_NV 0xE8
10944#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9
10945#define GL_ROUNDED_RECT2_NV 0xEA
10946#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB
10947#define GL_ROUNDED_RECT4_NV 0xEC
10948#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED
10949#define GL_ROUNDED_RECT8_NV 0xEE
10950#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF
10951#define GL_RELATIVE_RECT_NV 0xF7
10952#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368
10953#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369
10954#define GL_FONT_UNAVAILABLE_NV 0x936A
10955#define GL_FONT_UNINTELLIGIBLE_NV 0x936B
10956#define GL_CONIC_CURVE_TO_NV 0x1A
10957#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B
10958#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000
10959#define GL_STANDARD_FONT_FORMAT_NV 0x936C
10960#define GL_2_BYTES_NV 0x1407
10961#define GL_3_BYTES_NV 0x1408
10962#define GL_4_BYTES_NV 0x1409
10963#define GL_EYE_LINEAR_NV 0x2400
10964#define GL_OBJECT_LINEAR_NV 0x2401
10965#define GL_CONSTANT_NV 0x8576
10966#define GL_PATH_FOG_GEN_MODE_NV 0x90AC
10967#define GL_PRIMARY_COLOR_NV 0x852C
10968#define GL_SECONDARY_COLOR_NV 0x852D
10969#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
10970#define GL_PATH_PROJECTION_NV 0x1701
10971#define GL_PATH_MODELVIEW_NV 0x1700
10972#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3
10973#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6
10974#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36
10975#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3
10976#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4
10977#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7
10978#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38
10979#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4
10980#define GL_FRAGMENT_INPUT_NV 0x936D
10981typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);
10982typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
10983typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path);
10984typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
10985typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
10986typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
10987typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
10988typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);
10989typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
10990typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
10991typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
10992typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
10993typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
10994typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
10995typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);
10996typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
10997typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);
10998typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
10999typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
11000typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
11001typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);
11002typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
11003typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
11004typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
11005typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
11006typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
11007typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
11008typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
11009typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
11010typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
11011typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);
11012typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);
11013typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);
11014typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);
11015typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);
11016typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
11017typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
11018typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
11019typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
11020typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
11021typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
11022typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
11023typedef void (APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m);
11024typedef void (APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
11025typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
11026typedef void (APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m);
11027typedef void (APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
11028typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
11029typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
11030typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode);
11031typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
11032typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
11033typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint *baseAndCount);
11034typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
11035typedef GLenum (APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
11036typedef void (APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
11037typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLfloat *params);
11038typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
11039typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
11040typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);
11041typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);
11042typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);
11043typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);
11044typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);
11045#ifdef GL_GLEXT_PROTOTYPES
11046GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);
11047GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);
11048GLAPI GLboolean APIENTRY glIsPathNV (GLuint path);
11049GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
11050GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
11051GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
11052GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
11053GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString);
11054GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
11055GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
11056GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
11057GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);
11058GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
11059GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
11060GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);
11061GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);
11062GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);
11063GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);
11064GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
11065GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);
11066GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);
11067GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);
11068GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);
11069GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
11070GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
11071GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);
11072GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);
11073GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);
11074GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
11075GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
11076GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);
11077GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);
11078GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);
11079GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);
11080GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);
11081GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
11082GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
11083GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
11084GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);
11085GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);
11086GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);
11087GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
11088GLAPI void APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m);
11089GLAPI void APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m);
11090GLAPI void APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m);
11091GLAPI void APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m);
11092GLAPI void APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m);
11093GLAPI void APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m);
11094GLAPI void APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
11095GLAPI void APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode);
11096GLAPI void APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
11097GLAPI void APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
11098GLAPI GLenum APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint *baseAndCount);
11099GLAPI GLenum APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
11100GLAPI GLenum APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
11101GLAPI void APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
11102GLAPI void APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLfloat *params);
11103GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
11104GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
11105GLAPI void APIENTRY glPathFogGenNV (GLenum genMode);
11106GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);
11107GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);
11108GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);
11109GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);
11110#endif
11111#endif /* GL_NV_path_rendering */
11112
11113#ifndef GL_NV_path_rendering_shared_edge
11114#define GL_NV_path_rendering_shared_edge 1
11115#define GL_SHARED_EDGE_NV 0xC0
11116#endif /* GL_NV_path_rendering_shared_edge */
11117
11118#ifndef GL_NV_pixel_data_range
11119#define GL_NV_pixel_data_range 1
11120#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
11121#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
11122#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
11123#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
11124#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
11125#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
11126typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer);
11127typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
11128#ifdef GL_GLEXT_PROTOTYPES
11129GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer);
11130GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target);
11131#endif
11132#endif /* GL_NV_pixel_data_range */
11133
11134#ifndef GL_NV_point_sprite
11135#define GL_NV_point_sprite 1
11136#define GL_POINT_SPRITE_NV 0x8861
11137#define GL_COORD_REPLACE_NV 0x8862
11138#define GL_POINT_SPRITE_R_MODE_NV 0x8863
11139typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
11140typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
11141#ifdef GL_GLEXT_PROTOTYPES
11142GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param);
11143GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params);
11144#endif
11145#endif /* GL_NV_point_sprite */
11146
11147#ifndef GL_NV_present_video
11148#define GL_NV_present_video 1
11149#define GL_FRAME_NV 0x8E26
11150#define GL_FIELDS_NV 0x8E27
11151#define GL_CURRENT_TIME_NV 0x8E28
11152#define GL_NUM_FILL_STREAMS_NV 0x8E29
11153#define GL_PRESENT_TIME_NV 0x8E2A
11154#define GL_PRESENT_DURATION_NV 0x8E2B
11155typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
11156typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
11157typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);
11158typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);
11159typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);
11160typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);
11161#ifdef GL_GLEXT_PROTOTYPES
11162GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
11163GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
11164GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params);
11165GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params);
11166GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params);
11167GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params);
11168#endif
11169#endif /* GL_NV_present_video */
11170
11171#ifndef GL_NV_primitive_restart
11172#define GL_NV_primitive_restart 1
11173#define GL_PRIMITIVE_RESTART_NV 0x8558
11174#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
11175typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
11176typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
11177#ifdef GL_GLEXT_PROTOTYPES
11178GLAPI void APIENTRY glPrimitiveRestartNV (void);
11179GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index);
11180#endif
11181#endif /* GL_NV_primitive_restart */
11182
11183#ifndef GL_NV_primitive_shading_rate
11184#define GL_NV_primitive_shading_rate 1
11185#define GL_SHADING_RATE_IMAGE_PER_PRIMITIVE_NV 0x95B1
11186#define GL_SHADING_RATE_IMAGE_PALETTE_COUNT_NV 0x95B2
11187#endif /* GL_NV_primitive_shading_rate */
11188
11189#ifndef GL_NV_query_resource
11190#define GL_NV_query_resource 1
11191#define GL_QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV 0x9540
11192#define GL_QUERY_RESOURCE_MEMTYPE_VIDMEM_NV 0x9542
11193#define GL_QUERY_RESOURCE_SYS_RESERVED_NV 0x9544
11194#define GL_QUERY_RESOURCE_TEXTURE_NV 0x9545
11195#define GL_QUERY_RESOURCE_RENDERBUFFER_NV 0x9546
11196#define GL_QUERY_RESOURCE_BUFFEROBJECT_NV 0x9547
11197typedef GLint (APIENTRYP PFNGLQUERYRESOURCENVPROC) (GLenum queryType, GLint tagId, GLuint count, GLint *buffer);
11198#ifdef GL_GLEXT_PROTOTYPES
11199GLAPI GLint APIENTRY glQueryResourceNV (GLenum queryType, GLint tagId, GLuint count, GLint *buffer);
11200#endif
11201#endif /* GL_NV_query_resource */
11202
11203#ifndef GL_NV_query_resource_tag
11204#define GL_NV_query_resource_tag 1
11205typedef void (APIENTRYP PFNGLGENQUERYRESOURCETAGNVPROC) (GLsizei n, GLint *tagIds);
11206typedef void (APIENTRYP PFNGLDELETEQUERYRESOURCETAGNVPROC) (GLsizei n, const GLint *tagIds);
11207typedef void (APIENTRYP PFNGLQUERYRESOURCETAGNVPROC) (GLint tagId, const GLchar *tagString);
11208#ifdef GL_GLEXT_PROTOTYPES
11209GLAPI void APIENTRY glGenQueryResourceTagNV (GLsizei n, GLint *tagIds);
11210GLAPI void APIENTRY glDeleteQueryResourceTagNV (GLsizei n, const GLint *tagIds);
11211GLAPI void APIENTRY glQueryResourceTagNV (GLint tagId, const GLchar *tagString);
11212#endif
11213#endif /* GL_NV_query_resource_tag */
11214
11215#ifndef GL_NV_register_combiners
11216#define GL_NV_register_combiners 1
11217#define GL_REGISTER_COMBINERS_NV 0x8522
11218#define GL_VARIABLE_A_NV 0x8523
11219#define GL_VARIABLE_B_NV 0x8524
11220#define GL_VARIABLE_C_NV 0x8525
11221#define GL_VARIABLE_D_NV 0x8526
11222#define GL_VARIABLE_E_NV 0x8527
11223#define GL_VARIABLE_F_NV 0x8528
11224#define GL_VARIABLE_G_NV 0x8529
11225#define GL_CONSTANT_COLOR0_NV 0x852A
11226#define GL_CONSTANT_COLOR1_NV 0x852B
11227#define GL_SPARE0_NV 0x852E
11228#define GL_SPARE1_NV 0x852F
11229#define GL_DISCARD_NV 0x8530
11230#define GL_E_TIMES_F_NV 0x8531
11231#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
11232#define GL_UNSIGNED_IDENTITY_NV 0x8536
11233#define GL_UNSIGNED_INVERT_NV 0x8537
11234#define GL_EXPAND_NORMAL_NV 0x8538
11235#define GL_EXPAND_NEGATE_NV 0x8539
11236#define GL_HALF_BIAS_NORMAL_NV 0x853A
11237#define GL_HALF_BIAS_NEGATE_NV 0x853B
11238#define GL_SIGNED_IDENTITY_NV 0x853C
11239#define GL_SIGNED_NEGATE_NV 0x853D
11240#define GL_SCALE_BY_TWO_NV 0x853E
11241#define GL_SCALE_BY_FOUR_NV 0x853F
11242#define GL_SCALE_BY_ONE_HALF_NV 0x8540
11243#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
11244#define GL_COMBINER_INPUT_NV 0x8542
11245#define GL_COMBINER_MAPPING_NV 0x8543
11246#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
11247#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
11248#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
11249#define GL_COMBINER_MUX_SUM_NV 0x8547
11250#define GL_COMBINER_SCALE_NV 0x8548
11251#define GL_COMBINER_BIAS_NV 0x8549
11252#define GL_COMBINER_AB_OUTPUT_NV 0x854A
11253#define GL_COMBINER_CD_OUTPUT_NV 0x854B
11254#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
11255#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
11256#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
11257#define GL_COLOR_SUM_CLAMP_NV 0x854F
11258#define GL_COMBINER0_NV 0x8550
11259#define GL_COMBINER1_NV 0x8551
11260#define GL_COMBINER2_NV 0x8552
11261#define GL_COMBINER3_NV 0x8553
11262#define GL_COMBINER4_NV 0x8554
11263#define GL_COMBINER5_NV 0x8555
11264#define GL_COMBINER6_NV 0x8556
11265#define GL_COMBINER7_NV 0x8557
11266typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
11267typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
11268typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
11269typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
11270typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
11271typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
11272typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
11273typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
11274typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
11275typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
11276typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
11277typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
11278typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
11279#ifdef GL_GLEXT_PROTOTYPES
11280GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params);
11281GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param);
11282GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params);
11283GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param);
11284GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
11285GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
11286GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
11287GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
11288GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
11289GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
11290GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params);
11291GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params);
11292GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params);
11293#endif
11294#endif /* GL_NV_register_combiners */
11295
11296#ifndef GL_NV_register_combiners2
11297#define GL_NV_register_combiners2 1
11298#define GL_PER_STAGE_CONSTANTS_NV 0x8535
11299typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
11300typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
11301#ifdef GL_GLEXT_PROTOTYPES
11302GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params);
11303GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params);
11304#endif
11305#endif /* GL_NV_register_combiners2 */
11306
11307#ifndef GL_NV_representative_fragment_test
11308#define GL_NV_representative_fragment_test 1
11309#define GL_REPRESENTATIVE_FRAGMENT_TEST_NV 0x937F
11310#endif /* GL_NV_representative_fragment_test */
11311
11312#ifndef GL_NV_robustness_video_memory_purge
11313#define GL_NV_robustness_video_memory_purge 1
11314#define GL_PURGED_CONTEXT_RESET_NV 0x92BB
11315#endif /* GL_NV_robustness_video_memory_purge */
11316
11317#ifndef GL_NV_sample_locations
11318#define GL_NV_sample_locations 1
11319#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
11320#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E
11321#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F
11322#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340
11323#define GL_SAMPLE_LOCATION_NV 0x8E50
11324#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341
11325#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342
11326#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343
11327typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v);
11328typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
11329typedef void (APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void);
11330#ifdef GL_GLEXT_PROTOTYPES
11331GLAPI void APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v);
11332GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
11333GLAPI void APIENTRY glResolveDepthValuesNV (void);
11334#endif
11335#endif /* GL_NV_sample_locations */
11336
11337#ifndef GL_NV_sample_mask_override_coverage
11338#define GL_NV_sample_mask_override_coverage 1
11339#endif /* GL_NV_sample_mask_override_coverage */
11340
11341#ifndef GL_NV_scissor_exclusive
11342#define GL_NV_scissor_exclusive 1
11343#define GL_SCISSOR_TEST_EXCLUSIVE_NV 0x9555
11344#define GL_SCISSOR_BOX_EXCLUSIVE_NV 0x9556
11345typedef void (APIENTRYP PFNGLSCISSOREXCLUSIVENVPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
11346typedef void (APIENTRYP PFNGLSCISSOREXCLUSIVEARRAYVNVPROC) (GLuint first, GLsizei count, const GLint *v);
11347#ifdef GL_GLEXT_PROTOTYPES
11348GLAPI void APIENTRY glScissorExclusiveNV (GLint x, GLint y, GLsizei width, GLsizei height);
11349GLAPI void APIENTRY glScissorExclusiveArrayvNV (GLuint first, GLsizei count, const GLint *v);
11350#endif
11351#endif /* GL_NV_scissor_exclusive */
11352
11353#ifndef GL_NV_shader_atomic_counters
11354#define GL_NV_shader_atomic_counters 1
11355#endif /* GL_NV_shader_atomic_counters */
11356
11357#ifndef GL_NV_shader_atomic_float
11358#define GL_NV_shader_atomic_float 1
11359#endif /* GL_NV_shader_atomic_float */
11360
11361#ifndef GL_NV_shader_atomic_float64
11362#define GL_NV_shader_atomic_float64 1
11363#endif /* GL_NV_shader_atomic_float64 */
11364
11365#ifndef GL_NV_shader_atomic_fp16_vector
11366#define GL_NV_shader_atomic_fp16_vector 1
11367#endif /* GL_NV_shader_atomic_fp16_vector */
11368
11369#ifndef GL_NV_shader_atomic_int64
11370#define GL_NV_shader_atomic_int64 1
11371#endif /* GL_NV_shader_atomic_int64 */
11372
11373#ifndef GL_NV_shader_buffer_load
11374#define GL_NV_shader_buffer_load 1
11375#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D
11376#define GL_GPU_ADDRESS_NV 0x8F34
11377#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35
11378typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
11379typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);
11380typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);
11381typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
11382typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);
11383typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);
11384typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);
11385typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);
11386typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);
11387typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
11388typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
11389typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
11390typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
11391#ifdef GL_GLEXT_PROTOTYPES
11392GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access);
11393GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target);
11394GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target);
11395GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access);
11396GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer);
11397GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer);
11398GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params);
11399GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params);
11400GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);
11401GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);
11402GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
11403GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);
11404GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
11405#endif
11406#endif /* GL_NV_shader_buffer_load */
11407
11408#ifndef GL_NV_shader_buffer_store
11409#define GL_NV_shader_buffer_store 1
11410#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010
11411#endif /* GL_NV_shader_buffer_store */
11412
11413#ifndef GL_NV_shader_storage_buffer_object
11414#define GL_NV_shader_storage_buffer_object 1
11415#endif /* GL_NV_shader_storage_buffer_object */
11416
11417#ifndef GL_NV_shader_subgroup_partitioned
11418#define GL_NV_shader_subgroup_partitioned 1
11419#define GL_SUBGROUP_FEATURE_PARTITIONED_BIT_NV 0x00000100
11420#endif /* GL_NV_shader_subgroup_partitioned */
11421
11422#ifndef GL_NV_shader_texture_footprint
11423#define GL_NV_shader_texture_footprint 1
11424#endif /* GL_NV_shader_texture_footprint */
11425
11426#ifndef GL_NV_shader_thread_group
11427#define GL_NV_shader_thread_group 1
11428#define GL_WARP_SIZE_NV 0x9339
11429#define GL_WARPS_PER_SM_NV 0x933A
11430#define GL_SM_COUNT_NV 0x933B
11431#endif /* GL_NV_shader_thread_group */
11432
11433#ifndef GL_NV_shader_thread_shuffle
11434#define GL_NV_shader_thread_shuffle 1
11435#endif /* GL_NV_shader_thread_shuffle */
11436
11437#ifndef GL_NV_shading_rate_image
11438#define GL_NV_shading_rate_image 1
11439#define GL_SHADING_RATE_IMAGE_NV 0x9563
11440#define GL_SHADING_RATE_NO_INVOCATIONS_NV 0x9564
11441#define GL_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV 0x9565
11442#define GL_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV 0x9566
11443#define GL_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV 0x9567
11444#define GL_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV 0x9568
11445#define GL_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV 0x9569
11446#define GL_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV 0x956A
11447#define GL_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV 0x956B
11448#define GL_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV 0x956C
11449#define GL_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV 0x956D
11450#define GL_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV 0x956E
11451#define GL_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV 0x956F
11452#define GL_SHADING_RATE_IMAGE_BINDING_NV 0x955B
11453#define GL_SHADING_RATE_IMAGE_TEXEL_WIDTH_NV 0x955C
11454#define GL_SHADING_RATE_IMAGE_TEXEL_HEIGHT_NV 0x955D
11455#define GL_SHADING_RATE_IMAGE_PALETTE_SIZE_NV 0x955E
11456#define GL_MAX_COARSE_FRAGMENT_SAMPLES_NV 0x955F
11457#define GL_SHADING_RATE_SAMPLE_ORDER_DEFAULT_NV 0x95AE
11458#define GL_SHADING_RATE_SAMPLE_ORDER_PIXEL_MAJOR_NV 0x95AF
11459#define GL_SHADING_RATE_SAMPLE_ORDER_SAMPLE_MAJOR_NV 0x95B0
11460typedef void (APIENTRYP PFNGLBINDSHADINGRATEIMAGENVPROC) (GLuint texture);
11461typedef void (APIENTRYP PFNGLGETSHADINGRATEIMAGEPALETTENVPROC) (GLuint viewport, GLuint entry, GLenum *rate);
11462typedef void (APIENTRYP PFNGLGETSHADINGRATESAMPLELOCATIONIVNVPROC) (GLenum rate, GLuint samples, GLuint index, GLint *location);
11463typedef void (APIENTRYP PFNGLSHADINGRATEIMAGEBARRIERNVPROC) (GLboolean synchronize);
11464typedef void (APIENTRYP PFNGLSHADINGRATEIMAGEPALETTENVPROC) (GLuint viewport, GLuint first, GLsizei count, const GLenum *rates);
11465typedef void (APIENTRYP PFNGLSHADINGRATESAMPLEORDERNVPROC) (GLenum order);
11466typedef void (APIENTRYP PFNGLSHADINGRATESAMPLEORDERCUSTOMNVPROC) (GLenum rate, GLuint samples, const GLint *locations);
11467#ifdef GL_GLEXT_PROTOTYPES
11468GLAPI void APIENTRY glBindShadingRateImageNV (GLuint texture);
11469GLAPI void APIENTRY glGetShadingRateImagePaletteNV (GLuint viewport, GLuint entry, GLenum *rate);
11470GLAPI void APIENTRY glGetShadingRateSampleLocationivNV (GLenum rate, GLuint samples, GLuint index, GLint *location);
11471GLAPI void APIENTRY glShadingRateImageBarrierNV (GLboolean synchronize);
11472GLAPI void APIENTRY glShadingRateImagePaletteNV (GLuint viewport, GLuint first, GLsizei count, const GLenum *rates);
11473GLAPI void APIENTRY glShadingRateSampleOrderNV (GLenum order);
11474GLAPI void APIENTRY glShadingRateSampleOrderCustomNV (GLenum rate, GLuint samples, const GLint *locations);
11475#endif
11476#endif /* GL_NV_shading_rate_image */
11477
11478#ifndef GL_NV_stereo_view_rendering
11479#define GL_NV_stereo_view_rendering 1
11480#endif /* GL_NV_stereo_view_rendering */
11481
11482#ifndef GL_NV_tessellation_program5
11483#define GL_NV_tessellation_program5 1
11484#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
11485#define GL_TESS_CONTROL_PROGRAM_NV 0x891E
11486#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F
11487#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74
11488#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75
11489#endif /* GL_NV_tessellation_program5 */
11490
11491#ifndef GL_NV_texgen_emboss
11492#define GL_NV_texgen_emboss 1
11493#define GL_EMBOSS_LIGHT_NV 0x855D
11494#define GL_EMBOSS_CONSTANT_NV 0x855E
11495#define GL_EMBOSS_MAP_NV 0x855F
11496#endif /* GL_NV_texgen_emboss */
11497
11498#ifndef GL_NV_texgen_reflection
11499#define GL_NV_texgen_reflection 1
11500#define GL_NORMAL_MAP_NV 0x8511
11501#define GL_REFLECTION_MAP_NV 0x8512
11502#endif /* GL_NV_texgen_reflection */
11503
11504#ifndef GL_NV_texture_barrier
11505#define GL_NV_texture_barrier 1
11506typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);
11507#ifdef GL_GLEXT_PROTOTYPES
11508GLAPI void APIENTRY glTextureBarrierNV (void);
11509#endif
11510#endif /* GL_NV_texture_barrier */
11511
11512#ifndef GL_NV_texture_compression_vtc
11513#define GL_NV_texture_compression_vtc 1
11514#endif /* GL_NV_texture_compression_vtc */
11515
11516#ifndef GL_NV_texture_env_combine4
11517#define GL_NV_texture_env_combine4 1
11518#define GL_COMBINE4_NV 0x8503
11519#define GL_SOURCE3_RGB_NV 0x8583
11520#define GL_SOURCE3_ALPHA_NV 0x858B
11521#define GL_OPERAND3_RGB_NV 0x8593
11522#define GL_OPERAND3_ALPHA_NV 0x859B
11523#endif /* GL_NV_texture_env_combine4 */
11524
11525#ifndef GL_NV_texture_expand_normal
11526#define GL_NV_texture_expand_normal 1
11527#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
11528#endif /* GL_NV_texture_expand_normal */
11529
11530#ifndef GL_NV_texture_multisample
11531#define GL_NV_texture_multisample 1
11532#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045
11533#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046
11534typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
11535typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
11536typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
11537typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
11538typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
11539typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
11540#ifdef GL_GLEXT_PROTOTYPES
11541GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
11542GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
11543GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
11544GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
11545GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
11546GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
11547#endif
11548#endif /* GL_NV_texture_multisample */
11549
11550#ifndef GL_NV_texture_rectangle
11551#define GL_NV_texture_rectangle 1
11552#define GL_TEXTURE_RECTANGLE_NV 0x84F5
11553#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
11554#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
11555#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
11556#endif /* GL_NV_texture_rectangle */
11557
11558#ifndef GL_NV_texture_rectangle_compressed
11559#define GL_NV_texture_rectangle_compressed 1
11560#endif /* GL_NV_texture_rectangle_compressed */
11561
11562#ifndef GL_NV_texture_shader
11563#define GL_NV_texture_shader 1
11564#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
11565#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
11566#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
11567#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
11568#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
11569#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
11570#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
11571#define GL_SHADER_CONSISTENT_NV 0x86DD
11572#define GL_TEXTURE_SHADER_NV 0x86DE
11573#define GL_SHADER_OPERATION_NV 0x86DF
11574#define GL_CULL_MODES_NV 0x86E0
11575#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
11576#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
11577#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
11578#define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1
11579#define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2
11580#define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3
11581#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
11582#define GL_CONST_EYE_NV 0x86E5
11583#define GL_PASS_THROUGH_NV 0x86E6
11584#define GL_CULL_FRAGMENT_NV 0x86E7
11585#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
11586#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
11587#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
11588#define GL_DOT_PRODUCT_NV 0x86EC
11589#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
11590#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
11591#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
11592#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
11593#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
11594#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
11595#define GL_HILO_NV 0x86F4
11596#define GL_DSDT_NV 0x86F5
11597#define GL_DSDT_MAG_NV 0x86F6
11598#define GL_DSDT_MAG_VIB_NV 0x86F7
11599#define GL_HILO16_NV 0x86F8
11600#define GL_SIGNED_HILO_NV 0x86F9
11601#define GL_SIGNED_HILO16_NV 0x86FA
11602#define GL_SIGNED_RGBA_NV 0x86FB
11603#define GL_SIGNED_RGBA8_NV 0x86FC
11604#define GL_SIGNED_RGB_NV 0x86FE
11605#define GL_SIGNED_RGB8_NV 0x86FF
11606#define GL_SIGNED_LUMINANCE_NV 0x8701
11607#define GL_SIGNED_LUMINANCE8_NV 0x8702
11608#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
11609#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
11610#define GL_SIGNED_ALPHA_NV 0x8705
11611#define GL_SIGNED_ALPHA8_NV 0x8706
11612#define GL_SIGNED_INTENSITY_NV 0x8707
11613#define GL_SIGNED_INTENSITY8_NV 0x8708
11614#define GL_DSDT8_NV 0x8709
11615#define GL_DSDT8_MAG8_NV 0x870A
11616#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
11617#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
11618#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
11619#define GL_HI_SCALE_NV 0x870E
11620#define GL_LO_SCALE_NV 0x870F
11621#define GL_DS_SCALE_NV 0x8710
11622#define GL_DT_SCALE_NV 0x8711
11623#define GL_MAGNITUDE_SCALE_NV 0x8712
11624#define GL_VIBRANCE_SCALE_NV 0x8713
11625#define GL_HI_BIAS_NV 0x8714
11626#define GL_LO_BIAS_NV 0x8715
11627#define GL_DS_BIAS_NV 0x8716
11628#define GL_DT_BIAS_NV 0x8717
11629#define GL_MAGNITUDE_BIAS_NV 0x8718
11630#define GL_VIBRANCE_BIAS_NV 0x8719
11631#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
11632#define GL_TEXTURE_HI_SIZE_NV 0x871B
11633#define GL_TEXTURE_LO_SIZE_NV 0x871C
11634#define GL_TEXTURE_DS_SIZE_NV 0x871D
11635#define GL_TEXTURE_DT_SIZE_NV 0x871E
11636#define GL_TEXTURE_MAG_SIZE_NV 0x871F
11637#endif /* GL_NV_texture_shader */
11638
11639#ifndef GL_NV_texture_shader2
11640#define GL_NV_texture_shader2 1
11641#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
11642#endif /* GL_NV_texture_shader2 */
11643
11644#ifndef GL_NV_texture_shader3
11645#define GL_NV_texture_shader3 1
11646#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
11647#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
11648#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
11649#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
11650#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
11651#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
11652#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
11653#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
11654#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
11655#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
11656#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
11657#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
11658#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
11659#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
11660#define GL_HILO8_NV 0x885E
11661#define GL_SIGNED_HILO8_NV 0x885F
11662#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
11663#endif /* GL_NV_texture_shader3 */
11664
11665#ifndef GL_NV_timeline_semaphore
11666#define GL_NV_timeline_semaphore 1
11667#define GL_TIMELINE_SEMAPHORE_VALUE_NV 0x9595
11668#define GL_SEMAPHORE_TYPE_NV 0x95B3
11669#define GL_SEMAPHORE_TYPE_BINARY_NV 0x95B4
11670#define GL_SEMAPHORE_TYPE_TIMELINE_NV 0x95B5
11671#define GL_MAX_TIMELINE_SEMAPHORE_VALUE_DIFFERENCE_NV 0x95B6
11672typedef void (APIENTRYP PFNGLCREATESEMAPHORESNVPROC) (GLsizei n, GLuint *semaphores);
11673typedef void (APIENTRYP PFNGLSEMAPHOREPARAMETERIVNVPROC) (GLuint semaphore, GLenum pname, const GLint *params);
11674typedef void (APIENTRYP PFNGLGETSEMAPHOREPARAMETERIVNVPROC) (GLuint semaphore, GLenum pname, GLint *params);
11675#ifdef GL_GLEXT_PROTOTYPES
11676GLAPI void APIENTRY glCreateSemaphoresNV (GLsizei n, GLuint *semaphores);
11677GLAPI void APIENTRY glSemaphoreParameterivNV (GLuint semaphore, GLenum pname, const GLint *params);
11678GLAPI void APIENTRY glGetSemaphoreParameterivNV (GLuint semaphore, GLenum pname, GLint *params);
11679#endif
11680#endif /* GL_NV_timeline_semaphore */
11681
11682#ifndef GL_NV_transform_feedback
11683#define GL_NV_transform_feedback 1
11684#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
11685#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
11686#define GL_TEXTURE_COORD_NV 0x8C79
11687#define GL_CLIP_DISTANCE_NV 0x8C7A
11688#define GL_VERTEX_ID_NV 0x8C7B
11689#define GL_PRIMITIVE_ID_NV 0x8C7C
11690#define GL_GENERIC_ATTRIB_NV 0x8C7D
11691#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
11692#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
11693#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
11694#define GL_ACTIVE_VARYINGS_NV 0x8C81
11695#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
11696#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
11697#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
11698#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
11699#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
11700#define GL_PRIMITIVES_GENERATED_NV 0x8C87
11701#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
11702#define GL_RASTERIZER_DISCARD_NV 0x8C89
11703#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A
11704#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
11705#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
11706#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
11707#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
11708#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
11709#define GL_LAYER_NV 0x8DAA
11710#define GL_NEXT_BUFFER_NV -2
11711#define GL_SKIP_COMPONENTS4_NV -3
11712#define GL_SKIP_COMPONENTS3_NV -4
11713#define GL_SKIP_COMPONENTS2_NV -5
11714#define GL_SKIP_COMPONENTS1_NV -6
11715typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
11716typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
11717typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLenum bufferMode);
11718typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
11719typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
11720typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
11721typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
11722typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
11723typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
11724typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
11725typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
11726typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
11727#ifdef GL_GLEXT_PROTOTYPES
11728GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode);
11729GLAPI void APIENTRY glEndTransformFeedbackNV (void);
11730GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLsizei count, const GLint *attribs, GLenum bufferMode);
11731GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
11732GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
11733GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer);
11734GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
11735GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name);
11736GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name);
11737GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
11738GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location);
11739GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
11740#endif
11741#endif /* GL_NV_transform_feedback */
11742
11743#ifndef GL_NV_transform_feedback2
11744#define GL_NV_transform_feedback2 1
11745#define GL_TRANSFORM_FEEDBACK_NV 0x8E22
11746#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23
11747#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24
11748#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25
11749typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);
11750typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);
11751typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);
11752typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);
11753typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);
11754typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
11755typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
11756#ifdef GL_GLEXT_PROTOTYPES
11757GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id);
11758GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids);
11759GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids);
11760GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id);
11761GLAPI void APIENTRY glPauseTransformFeedbackNV (void);
11762GLAPI void APIENTRY glResumeTransformFeedbackNV (void);
11763GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);
11764#endif
11765#endif /* GL_NV_transform_feedback2 */
11766
11767#ifndef GL_NV_uniform_buffer_unified_memory
11768#define GL_NV_uniform_buffer_unified_memory 1
11769#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E
11770#define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F
11771#define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370
11772#endif /* GL_NV_uniform_buffer_unified_memory */
11773
11774#ifndef GL_NV_vdpau_interop
11775#define GL_NV_vdpau_interop 1
11776typedef GLintptr GLvdpauSurfaceNV;
11777#define GL_SURFACE_STATE_NV 0x86EB
11778#define GL_SURFACE_REGISTERED_NV 0x86FD
11779#define GL_SURFACE_MAPPED_NV 0x8700
11780#define GL_WRITE_DISCARD_NV 0x88BE
11781typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress);
11782typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);
11783typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
11784typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
11785typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);
11786typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);
11787typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
11788typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);
11789typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
11790typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
11791#ifdef GL_GLEXT_PROTOTYPES
11792GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress);
11793GLAPI void APIENTRY glVDPAUFiniNV (void);
11794GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
11795GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
11796GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);
11797GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);
11798GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
11799GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);
11800GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
11801GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
11802#endif
11803#endif /* GL_NV_vdpau_interop */
11804
11805#ifndef GL_NV_vdpau_interop2
11806#define GL_NV_vdpau_interop2 1
11807typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACEWITHPICTURESTRUCTURENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames, GLboolean isFrameStructure);
11808#ifdef GL_GLEXT_PROTOTYPES
11809GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceWithPictureStructureNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames, GLboolean isFrameStructure);
11810#endif
11811#endif /* GL_NV_vdpau_interop2 */
11812
11813#ifndef GL_NV_vertex_array_range
11814#define GL_NV_vertex_array_range 1
11815#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
11816#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
11817#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
11818#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
11819#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
11820typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
11821typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer);
11822#ifdef GL_GLEXT_PROTOTYPES
11823GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
11824GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer);
11825#endif
11826#endif /* GL_NV_vertex_array_range */
11827
11828#ifndef GL_NV_vertex_array_range2
11829#define GL_NV_vertex_array_range2 1
11830#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
11831#endif /* GL_NV_vertex_array_range2 */
11832
11833#ifndef GL_NV_vertex_attrib_integer_64bit
11834#define GL_NV_vertex_attrib_integer_64bit 1
11835typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);
11836typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);
11837typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
11838typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
11839typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v);
11840typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v);
11841typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v);
11842typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v);
11843typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);
11844typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);
11845typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
11846typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
11847typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
11848typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
11849typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
11850typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
11851typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params);
11852typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
11853typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
11854#ifdef GL_GLEXT_PROTOTYPES
11855GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x);
11856GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y);
11857GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
11858GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
11859GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v);
11860GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v);
11861GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v);
11862GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v);
11863GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x);
11864GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y);
11865GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
11866GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
11867GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v);
11868GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v);
11869GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v);
11870GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v);
11871GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params);
11872GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params);
11873GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
11874#endif
11875#endif /* GL_NV_vertex_attrib_integer_64bit */
11876
11877#ifndef GL_NV_vertex_buffer_unified_memory
11878#define GL_NV_vertex_buffer_unified_memory 1
11879#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E
11880#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F
11881#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20
11882#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21
11883#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22
11884#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23
11885#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24
11886#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25
11887#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26
11888#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27
11889#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28
11890#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29
11891#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A
11892#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B
11893#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C
11894#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D
11895#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E
11896#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F
11897#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30
11898#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31
11899#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32
11900#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33
11901#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40
11902#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41
11903#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42
11904typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
11905typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
11906typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);
11907typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
11908typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);
11909typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
11910typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);
11911typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
11912typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);
11913typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
11914typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
11915typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
11916#ifdef GL_GLEXT_PROTOTYPES
11917GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
11918GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride);
11919GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride);
11920GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride);
11921GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride);
11922GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride);
11923GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride);
11924GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride);
11925GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride);
11926GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
11927GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
11928GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result);
11929#endif
11930#endif /* GL_NV_vertex_buffer_unified_memory */
11931
11932#ifndef GL_NV_vertex_program
11933#define GL_NV_vertex_program 1
11934#define GL_VERTEX_PROGRAM_NV 0x8620
11935#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
11936#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
11937#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
11938#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
11939#define GL_CURRENT_ATTRIB_NV 0x8626
11940#define GL_PROGRAM_LENGTH_NV 0x8627
11941#define GL_PROGRAM_STRING_NV 0x8628
11942#define GL_MODELVIEW_PROJECTION_NV 0x8629
11943#define GL_IDENTITY_NV 0x862A
11944#define GL_INVERSE_NV 0x862B
11945#define GL_TRANSPOSE_NV 0x862C
11946#define GL_INVERSE_TRANSPOSE_NV 0x862D
11947#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
11948#define GL_MAX_TRACK_MATRICES_NV 0x862F
11949#define GL_MATRIX0_NV 0x8630
11950#define GL_MATRIX1_NV 0x8631
11951#define GL_MATRIX2_NV 0x8632
11952#define GL_MATRIX3_NV 0x8633
11953#define GL_MATRIX4_NV 0x8634
11954#define GL_MATRIX5_NV 0x8635
11955#define GL_MATRIX6_NV 0x8636
11956#define GL_MATRIX7_NV 0x8637
11957#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
11958#define GL_CURRENT_MATRIX_NV 0x8641
11959#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
11960#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
11961#define GL_PROGRAM_PARAMETER_NV 0x8644
11962#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
11963#define GL_PROGRAM_TARGET_NV 0x8646
11964#define GL_PROGRAM_RESIDENT_NV 0x8647
11965#define GL_TRACK_MATRIX_NV 0x8648
11966#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
11967#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
11968#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
11969#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
11970#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
11971#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
11972#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
11973#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
11974#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
11975#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
11976#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
11977#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
11978#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
11979#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
11980#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
11981#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
11982#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
11983#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
11984#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
11985#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
11986#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
11987#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
11988#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
11989#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
11990#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
11991#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
11992#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
11993#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
11994#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
11995#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
11996#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
11997#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
11998#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
11999#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
12000#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
12001#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
12002#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
12003#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
12004#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
12005#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
12006#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
12007#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
12008#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
12009#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
12010#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
12011#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
12012#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
12013#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
12014#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
12015#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
12016#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
12017typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
12018typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
12019typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
12020typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
12021typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
12022typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
12023typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
12024typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
12025typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
12026typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
12027typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
12028typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
12029typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
12030typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer);
12031typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
12032typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
12033typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
12034typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
12035typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
12036typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
12037typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
12038typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
12039typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
12040typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
12041typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
12042typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
12043typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
12044typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
12045typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
12046typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
12047typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
12048typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
12049typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
12050typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
12051typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
12052typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
12053typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
12054typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
12055typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
12056typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
12057typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
12058typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
12059typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
12060typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
12061typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
12062typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
12063typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
12064typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
12065typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
12066typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
12067typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
12068typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
12069typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
12070typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
12071typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
12072typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
12073typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
12074typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
12075typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
12076typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
12077typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
12078typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
12079typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
12080typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
12081#ifdef GL_GLEXT_PROTOTYPES
12082GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences);
12083GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id);
12084GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs);
12085GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params);
12086GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs);
12087GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params);
12088GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
12089GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params);
12090GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program);
12091GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params);
12092GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params);
12093GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params);
12094GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params);
12095GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer);
12096GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id);
12097GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
12098GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
12099GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v);
12100GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
12101GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v);
12102GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
12103GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
12104GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs);
12105GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform);
12106GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
12107GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x);
12108GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v);
12109GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x);
12110GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v);
12111GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x);
12112GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v);
12113GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y);
12114GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v);
12115GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y);
12116GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v);
12117GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y);
12118GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v);
12119GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z);
12120GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v);
12121GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z);
12122GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v);
12123GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z);
12124GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v);
12125GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
12126GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v);
12127GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
12128GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v);
12129GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
12130GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v);
12131GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
12132GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v);
12133GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v);
12134GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v);
12135GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v);
12136GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v);
12137GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v);
12138GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v);
12139GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v);
12140GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v);
12141GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v);
12142GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v);
12143GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v);
12144GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v);
12145GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v);
12146#endif
12147#endif /* GL_NV_vertex_program */
12148
12149#ifndef GL_NV_vertex_program1_1
12150#define GL_NV_vertex_program1_1 1
12151#endif /* GL_NV_vertex_program1_1 */
12152
12153#ifndef GL_NV_vertex_program2
12154#define GL_NV_vertex_program2 1
12155#endif /* GL_NV_vertex_program2 */
12156
12157#ifndef GL_NV_vertex_program2_option
12158#define GL_NV_vertex_program2_option 1
12159#endif /* GL_NV_vertex_program2_option */
12160
12161#ifndef GL_NV_vertex_program3
12162#define GL_NV_vertex_program3 1
12163#endif /* GL_NV_vertex_program3 */
12164
12165#ifndef GL_NV_vertex_program4
12166#define GL_NV_vertex_program4 1
12167#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
12168#endif /* GL_NV_vertex_program4 */
12169
12170#ifndef GL_NV_video_capture
12171#define GL_NV_video_capture 1
12172#define GL_VIDEO_BUFFER_NV 0x9020
12173#define GL_VIDEO_BUFFER_BINDING_NV 0x9021
12174#define GL_FIELD_UPPER_NV 0x9022
12175#define GL_FIELD_LOWER_NV 0x9023
12176#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024
12177#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025
12178#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026
12179#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027
12180#define GL_VIDEO_BUFFER_PITCH_NV 0x9028
12181#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029
12182#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A
12183#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B
12184#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C
12185#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D
12186#define GL_PARTIAL_SUCCESS_NV 0x902E
12187#define GL_SUCCESS_NV 0x902F
12188#define GL_FAILURE_NV 0x9030
12189#define GL_YCBYCR8_422_NV 0x9031
12190#define GL_YCBAYCR8A_4224_NV 0x9032
12191#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033
12192#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034
12193#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035
12194#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036
12195#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037
12196#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038
12197#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039
12198#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A
12199#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B
12200#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C
12201typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
12202typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
12203typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
12204typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
12205typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);
12206typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
12207typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
12208typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
12209typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
12210typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
12211typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
12212typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
12213#ifdef GL_GLEXT_PROTOTYPES
12214GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot);
12215GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
12216GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
12217GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot);
12218GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params);
12219GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
12220GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
12221GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
12222GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
12223GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
12224GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
12225GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
12226#endif
12227#endif /* GL_NV_video_capture */
12228
12229#ifndef GL_NV_viewport_array2
12230#define GL_NV_viewport_array2 1
12231#endif /* GL_NV_viewport_array2 */
12232
12233#ifndef GL_NV_viewport_swizzle
12234#define GL_NV_viewport_swizzle 1
12235#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350
12236#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351
12237#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352
12238#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353
12239#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354
12240#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355
12241#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356
12242#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357
12243#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358
12244#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359
12245#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A
12246#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B
12247typedef void (APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew);
12248#ifdef GL_GLEXT_PROTOTYPES
12249GLAPI void APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew);
12250#endif
12251#endif /* GL_NV_viewport_swizzle */
12252
12253#ifndef GL_OML_interlace
12254#define GL_OML_interlace 1
12255#define GL_INTERLACE_OML 0x8980
12256#define GL_INTERLACE_READ_OML 0x8981
12257#endif /* GL_OML_interlace */
12258
12259#ifndef GL_OML_resample
12260#define GL_OML_resample 1
12261#define GL_PACK_RESAMPLE_OML 0x8984
12262#define GL_UNPACK_RESAMPLE_OML 0x8985
12263#define GL_RESAMPLE_REPLICATE_OML 0x8986
12264#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
12265#define GL_RESAMPLE_AVERAGE_OML 0x8988
12266#define GL_RESAMPLE_DECIMATE_OML 0x8989
12267#endif /* GL_OML_resample */
12268
12269#ifndef GL_OML_subsample
12270#define GL_OML_subsample 1
12271#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
12272#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
12273#endif /* GL_OML_subsample */
12274
12275#ifndef GL_OVR_multiview
12276#define GL_OVR_multiview 1
12277#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630
12278#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632
12279#define GL_MAX_VIEWS_OVR 0x9631
12280#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633
12281typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
12282#ifdef GL_GLEXT_PROTOTYPES
12283GLAPI void APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
12284#endif
12285#endif /* GL_OVR_multiview */
12286
12287#ifndef GL_OVR_multiview2
12288#define GL_OVR_multiview2 1
12289#endif /* GL_OVR_multiview2 */
12290
12291#ifndef GL_PGI_misc_hints
12292#define GL_PGI_misc_hints 1
12293#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
12294#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
12295#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
12296#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
12297#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
12298#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
12299#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
12300#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
12301#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
12302#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
12303#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
12304#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
12305#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
12306#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
12307#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
12308#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
12309#define GL_CLIP_NEAR_HINT_PGI 0x1A220
12310#define GL_CLIP_FAR_HINT_PGI 0x1A221
12311#define GL_WIDE_LINE_HINT_PGI 0x1A222
12312#define GL_BACK_NORMALS_HINT_PGI 0x1A223
12313typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
12314#ifdef GL_GLEXT_PROTOTYPES
12315GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode);
12316#endif
12317#endif /* GL_PGI_misc_hints */
12318
12319#ifndef GL_PGI_vertex_hints
12320#define GL_PGI_vertex_hints 1
12321#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
12322#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
12323#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
12324#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
12325#define GL_COLOR3_BIT_PGI 0x00010000
12326#define GL_COLOR4_BIT_PGI 0x00020000
12327#define GL_EDGEFLAG_BIT_PGI 0x00040000
12328#define GL_INDEX_BIT_PGI 0x00080000
12329#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
12330#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
12331#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
12332#define GL_MAT_EMISSION_BIT_PGI 0x00800000
12333#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
12334#define GL_MAT_SHININESS_BIT_PGI 0x02000000
12335#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
12336#define GL_NORMAL_BIT_PGI 0x08000000
12337#define GL_TEXCOORD1_BIT_PGI 0x10000000
12338#define GL_TEXCOORD2_BIT_PGI 0x20000000
12339#define GL_TEXCOORD3_BIT_PGI 0x40000000
12340#define GL_TEXCOORD4_BIT_PGI 0x80000000
12341#define GL_VERTEX23_BIT_PGI 0x00000004
12342#define GL_VERTEX4_BIT_PGI 0x00000008
12343#endif /* GL_PGI_vertex_hints */
12344
12345#ifndef GL_REND_screen_coordinates
12346#define GL_REND_screen_coordinates 1
12347#define GL_SCREEN_COORDINATES_REND 0x8490
12348#define GL_INVERTED_SCREEN_W_REND 0x8491
12349#endif /* GL_REND_screen_coordinates */
12350
12351#ifndef GL_S3_s3tc
12352#define GL_S3_s3tc 1
12353#define GL_RGB_S3TC 0x83A0
12354#define GL_RGB4_S3TC 0x83A1
12355#define GL_RGBA_S3TC 0x83A2
12356#define GL_RGBA4_S3TC 0x83A3
12357#define GL_RGBA_DXT5_S3TC 0x83A4
12358#define GL_RGBA4_DXT5_S3TC 0x83A5
12359#endif /* GL_S3_s3tc */
12360
12361#ifndef GL_SGIS_detail_texture
12362#define GL_SGIS_detail_texture 1
12363#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
12364#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
12365#define GL_LINEAR_DETAIL_SGIS 0x8097
12366#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
12367#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
12368#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
12369#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
12370#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
12371typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
12372typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
12373#ifdef GL_GLEXT_PROTOTYPES
12374GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
12375GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points);
12376#endif
12377#endif /* GL_SGIS_detail_texture */
12378
12379#ifndef GL_SGIS_fog_function
12380#define GL_SGIS_fog_function 1
12381#define GL_FOG_FUNC_SGIS 0x812A
12382#define GL_FOG_FUNC_POINTS_SGIS 0x812B
12383#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
12384typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
12385typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
12386#ifdef GL_GLEXT_PROTOTYPES
12387GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points);
12388GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points);
12389#endif
12390#endif /* GL_SGIS_fog_function */
12391
12392#ifndef GL_SGIS_generate_mipmap
12393#define GL_SGIS_generate_mipmap 1
12394#define GL_GENERATE_MIPMAP_SGIS 0x8191
12395#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
12396#endif /* GL_SGIS_generate_mipmap */
12397
12398#ifndef GL_SGIS_multisample
12399#define GL_SGIS_multisample 1
12400#define GL_MULTISAMPLE_SGIS 0x809D
12401#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
12402#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
12403#define GL_SAMPLE_MASK_SGIS 0x80A0
12404#define GL_1PASS_SGIS 0x80A1
12405#define GL_2PASS_0_SGIS 0x80A2
12406#define GL_2PASS_1_SGIS 0x80A3
12407#define GL_4PASS_0_SGIS 0x80A4
12408#define GL_4PASS_1_SGIS 0x80A5
12409#define GL_4PASS_2_SGIS 0x80A6
12410#define GL_4PASS_3_SGIS 0x80A7
12411#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
12412#define GL_SAMPLES_SGIS 0x80A9
12413#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
12414#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
12415#define GL_SAMPLE_PATTERN_SGIS 0x80AC
12416typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
12417typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
12418#ifdef GL_GLEXT_PROTOTYPES
12419GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert);
12420GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern);
12421#endif
12422#endif /* GL_SGIS_multisample */
12423
12424#ifndef GL_SGIS_pixel_texture
12425#define GL_SGIS_pixel_texture 1
12426#define GL_PIXEL_TEXTURE_SGIS 0x8353
12427#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
12428#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
12429#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
12430typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
12431typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
12432typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
12433typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
12434typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
12435typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
12436#ifdef GL_GLEXT_PROTOTYPES
12437GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param);
12438GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params);
12439GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param);
12440GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params);
12441GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params);
12442GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params);
12443#endif
12444#endif /* GL_SGIS_pixel_texture */
12445
12446#ifndef GL_SGIS_point_line_texgen
12447#define GL_SGIS_point_line_texgen 1
12448#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
12449#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
12450#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
12451#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
12452#define GL_EYE_POINT_SGIS 0x81F4
12453#define GL_OBJECT_POINT_SGIS 0x81F5
12454#define GL_EYE_LINE_SGIS 0x81F6
12455#define GL_OBJECT_LINE_SGIS 0x81F7
12456#endif /* GL_SGIS_point_line_texgen */
12457
12458#ifndef GL_SGIS_point_parameters
12459#define GL_SGIS_point_parameters 1
12460#define GL_POINT_SIZE_MIN_SGIS 0x8126
12461#define GL_POINT_SIZE_MAX_SGIS 0x8127
12462#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
12463#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
12464typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
12465typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
12466#ifdef GL_GLEXT_PROTOTYPES
12467GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param);
12468GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params);
12469#endif
12470#endif /* GL_SGIS_point_parameters */
12471
12472#ifndef GL_SGIS_sharpen_texture
12473#define GL_SGIS_sharpen_texture 1
12474#define GL_LINEAR_SHARPEN_SGIS 0x80AD
12475#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
12476#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
12477#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
12478typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
12479typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
12480#ifdef GL_GLEXT_PROTOTYPES
12481GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
12482GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points);
12483#endif
12484#endif /* GL_SGIS_sharpen_texture */
12485
12486#ifndef GL_SGIS_texture4D
12487#define GL_SGIS_texture4D 1
12488#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
12489#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
12490#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
12491#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
12492#define GL_TEXTURE_4D_SGIS 0x8134
12493#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
12494#define GL_TEXTURE_4DSIZE_SGIS 0x8136
12495#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
12496#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
12497#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
12498typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
12499typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
12500#ifdef GL_GLEXT_PROTOTYPES
12501GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
12502GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
12503#endif
12504#endif /* GL_SGIS_texture4D */
12505
12506#ifndef GL_SGIS_texture_border_clamp
12507#define GL_SGIS_texture_border_clamp 1
12508#define GL_CLAMP_TO_BORDER_SGIS 0x812D
12509#endif /* GL_SGIS_texture_border_clamp */
12510
12511#ifndef GL_SGIS_texture_color_mask
12512#define GL_SGIS_texture_color_mask 1
12513#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
12514typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
12515#ifdef GL_GLEXT_PROTOTYPES
12516GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
12517#endif
12518#endif /* GL_SGIS_texture_color_mask */
12519
12520#ifndef GL_SGIS_texture_edge_clamp
12521#define GL_SGIS_texture_edge_clamp 1
12522#define GL_CLAMP_TO_EDGE_SGIS 0x812F
12523#endif /* GL_SGIS_texture_edge_clamp */
12524
12525#ifndef GL_SGIS_texture_filter4
12526#define GL_SGIS_texture_filter4 1
12527#define GL_FILTER4_SGIS 0x8146
12528#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
12529typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
12530typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
12531#ifdef GL_GLEXT_PROTOTYPES
12532GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights);
12533GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
12534#endif
12535#endif /* GL_SGIS_texture_filter4 */
12536
12537#ifndef GL_SGIS_texture_lod
12538#define GL_SGIS_texture_lod 1
12539#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
12540#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
12541#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
12542#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
12543#endif /* GL_SGIS_texture_lod */
12544
12545#ifndef GL_SGIS_texture_select
12546#define GL_SGIS_texture_select 1
12547#define GL_DUAL_ALPHA4_SGIS 0x8110
12548#define GL_DUAL_ALPHA8_SGIS 0x8111
12549#define GL_DUAL_ALPHA12_SGIS 0x8112
12550#define GL_DUAL_ALPHA16_SGIS 0x8113
12551#define GL_DUAL_LUMINANCE4_SGIS 0x8114
12552#define GL_DUAL_LUMINANCE8_SGIS 0x8115
12553#define GL_DUAL_LUMINANCE12_SGIS 0x8116
12554#define GL_DUAL_LUMINANCE16_SGIS 0x8117
12555#define GL_DUAL_INTENSITY4_SGIS 0x8118
12556#define GL_DUAL_INTENSITY8_SGIS 0x8119
12557#define GL_DUAL_INTENSITY12_SGIS 0x811A
12558#define GL_DUAL_INTENSITY16_SGIS 0x811B
12559#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
12560#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
12561#define GL_QUAD_ALPHA4_SGIS 0x811E
12562#define GL_QUAD_ALPHA8_SGIS 0x811F
12563#define GL_QUAD_LUMINANCE4_SGIS 0x8120
12564#define GL_QUAD_LUMINANCE8_SGIS 0x8121
12565#define GL_QUAD_INTENSITY4_SGIS 0x8122
12566#define GL_QUAD_INTENSITY8_SGIS 0x8123
12567#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
12568#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
12569#endif /* GL_SGIS_texture_select */
12570
12571#ifndef GL_SGIX_async
12572#define GL_SGIX_async 1
12573#define GL_ASYNC_MARKER_SGIX 0x8329
12574typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
12575typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
12576typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
12577typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
12578typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
12579typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
12580#ifdef GL_GLEXT_PROTOTYPES
12581GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker);
12582GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp);
12583GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp);
12584GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range);
12585GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range);
12586GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker);
12587#endif
12588#endif /* GL_SGIX_async */
12589
12590#ifndef GL_SGIX_async_histogram
12591#define GL_SGIX_async_histogram 1
12592#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
12593#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
12594#endif /* GL_SGIX_async_histogram */
12595
12596#ifndef GL_SGIX_async_pixel
12597#define GL_SGIX_async_pixel 1
12598#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
12599#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
12600#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
12601#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
12602#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
12603#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
12604#endif /* GL_SGIX_async_pixel */
12605
12606#ifndef GL_SGIX_blend_alpha_minmax
12607#define GL_SGIX_blend_alpha_minmax 1
12608#define GL_ALPHA_MIN_SGIX 0x8320
12609#define GL_ALPHA_MAX_SGIX 0x8321
12610#endif /* GL_SGIX_blend_alpha_minmax */
12611
12612#ifndef GL_SGIX_calligraphic_fragment
12613#define GL_SGIX_calligraphic_fragment 1
12614#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
12615#endif /* GL_SGIX_calligraphic_fragment */
12616
12617#ifndef GL_SGIX_clipmap
12618#define GL_SGIX_clipmap 1
12619#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
12620#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
12621#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
12622#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
12623#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
12624#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
12625#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
12626#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
12627#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
12628#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
12629#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
12630#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
12631#endif /* GL_SGIX_clipmap */
12632
12633#ifndef GL_SGIX_convolution_accuracy
12634#define GL_SGIX_convolution_accuracy 1
12635#define GL_CONVOLUTION_HINT_SGIX 0x8316
12636#endif /* GL_SGIX_convolution_accuracy */
12637
12638#ifndef GL_SGIX_depth_pass_instrument
12639#define GL_SGIX_depth_pass_instrument 1
12640#endif /* GL_SGIX_depth_pass_instrument */
12641
12642#ifndef GL_SGIX_depth_texture
12643#define GL_SGIX_depth_texture 1
12644#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
12645#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
12646#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
12647#endif /* GL_SGIX_depth_texture */
12648
12649#ifndef GL_SGIX_flush_raster
12650#define GL_SGIX_flush_raster 1
12651typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
12652#ifdef GL_GLEXT_PROTOTYPES
12653GLAPI void APIENTRY glFlushRasterSGIX (void);
12654#endif
12655#endif /* GL_SGIX_flush_raster */
12656
12657#ifndef GL_SGIX_fog_offset
12658#define GL_SGIX_fog_offset 1
12659#define GL_FOG_OFFSET_SGIX 0x8198
12660#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
12661#endif /* GL_SGIX_fog_offset */
12662
12663#ifndef GL_SGIX_fragment_lighting
12664#define GL_SGIX_fragment_lighting 1
12665#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
12666#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
12667#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
12668#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
12669#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
12670#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
12671#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
12672#define GL_LIGHT_ENV_MODE_SGIX 0x8407
12673#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
12674#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
12675#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
12676#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
12677#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
12678#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
12679#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
12680#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
12681#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
12682#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
12683#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
12684#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
12685typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
12686typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
12687typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
12688typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
12689typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
12690typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
12691typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
12692typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
12693typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
12694typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
12695typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
12696typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
12697typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
12698typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
12699typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
12700typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
12701typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
12702typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
12703#ifdef GL_GLEXT_PROTOTYPES
12704GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode);
12705GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param);
12706GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params);
12707GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param);
12708GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params);
12709GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param);
12710GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params);
12711GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param);
12712GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params);
12713GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param);
12714GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params);
12715GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param);
12716GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params);
12717GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params);
12718GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params);
12719GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params);
12720GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params);
12721GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param);
12722#endif
12723#endif /* GL_SGIX_fragment_lighting */
12724
12725#ifndef GL_SGIX_framezoom
12726#define GL_SGIX_framezoom 1
12727#define GL_FRAMEZOOM_SGIX 0x818B
12728#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
12729#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
12730typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
12731#ifdef GL_GLEXT_PROTOTYPES
12732GLAPI void APIENTRY glFrameZoomSGIX (GLint factor);
12733#endif
12734#endif /* GL_SGIX_framezoom */
12735
12736#ifndef GL_SGIX_igloo_interface
12737#define GL_SGIX_igloo_interface 1
12738typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params);
12739#ifdef GL_GLEXT_PROTOTYPES
12740GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params);
12741#endif
12742#endif /* GL_SGIX_igloo_interface */
12743
12744#ifndef GL_SGIX_instruments
12745#define GL_SGIX_instruments 1
12746#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
12747#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
12748typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
12749typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
12750typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
12751typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
12752typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
12753typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
12754#ifdef GL_GLEXT_PROTOTYPES
12755GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
12756GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer);
12757GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p);
12758GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker);
12759GLAPI void APIENTRY glStartInstrumentsSGIX (void);
12760GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker);
12761#endif
12762#endif /* GL_SGIX_instruments */
12763
12764#ifndef GL_SGIX_interlace
12765#define GL_SGIX_interlace 1
12766#define GL_INTERLACE_SGIX 0x8094
12767#endif /* GL_SGIX_interlace */
12768
12769#ifndef GL_SGIX_ir_instrument1
12770#define GL_SGIX_ir_instrument1 1
12771#define GL_IR_INSTRUMENT1_SGIX 0x817F
12772#endif /* GL_SGIX_ir_instrument1 */
12773
12774#ifndef GL_SGIX_list_priority
12775#define GL_SGIX_list_priority 1
12776#define GL_LIST_PRIORITY_SGIX 0x8182
12777typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
12778typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
12779typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
12780typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
12781typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
12782typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
12783#ifdef GL_GLEXT_PROTOTYPES
12784GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params);
12785GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params);
12786GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param);
12787GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params);
12788GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param);
12789GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params);
12790#endif
12791#endif /* GL_SGIX_list_priority */
12792
12793#ifndef GL_SGIX_pixel_texture
12794#define GL_SGIX_pixel_texture 1
12795#define GL_PIXEL_TEX_GEN_SGIX 0x8139
12796#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
12797typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
12798#ifdef GL_GLEXT_PROTOTYPES
12799GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode);
12800#endif
12801#endif /* GL_SGIX_pixel_texture */
12802
12803#ifndef GL_SGIX_pixel_tiles
12804#define GL_SGIX_pixel_tiles 1
12805#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
12806#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
12807#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
12808#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
12809#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
12810#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
12811#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
12812#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
12813#endif /* GL_SGIX_pixel_tiles */
12814
12815#ifndef GL_SGIX_polynomial_ffd
12816#define GL_SGIX_polynomial_ffd 1
12817#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
12818#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
12819#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
12820#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
12821#define GL_DEFORMATIONS_MASK_SGIX 0x8196
12822#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
12823typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
12824typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
12825typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
12826typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
12827#ifdef GL_GLEXT_PROTOTYPES
12828GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
12829GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
12830GLAPI void APIENTRY glDeformSGIX (GLbitfield mask);
12831GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask);
12832#endif
12833#endif /* GL_SGIX_polynomial_ffd */
12834
12835#ifndef GL_SGIX_reference_plane
12836#define GL_SGIX_reference_plane 1
12837#define GL_REFERENCE_PLANE_SGIX 0x817D
12838#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
12839typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
12840#ifdef GL_GLEXT_PROTOTYPES
12841GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);
12842#endif
12843#endif /* GL_SGIX_reference_plane */
12844
12845#ifndef GL_SGIX_resample
12846#define GL_SGIX_resample 1
12847#define GL_PACK_RESAMPLE_SGIX 0x842E
12848#define GL_UNPACK_RESAMPLE_SGIX 0x842F
12849#define GL_RESAMPLE_REPLICATE_SGIX 0x8433
12850#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434
12851#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
12852#endif /* GL_SGIX_resample */
12853
12854#ifndef GL_SGIX_scalebias_hint
12855#define GL_SGIX_scalebias_hint 1
12856#define GL_SCALEBIAS_HINT_SGIX 0x8322
12857#endif /* GL_SGIX_scalebias_hint */
12858
12859#ifndef GL_SGIX_shadow
12860#define GL_SGIX_shadow 1
12861#define GL_TEXTURE_COMPARE_SGIX 0x819A
12862#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
12863#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
12864#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
12865#endif /* GL_SGIX_shadow */
12866
12867#ifndef GL_SGIX_shadow_ambient
12868#define GL_SGIX_shadow_ambient 1
12869#define GL_SHADOW_AMBIENT_SGIX 0x80BF
12870#endif /* GL_SGIX_shadow_ambient */
12871
12872#ifndef GL_SGIX_sprite
12873#define GL_SGIX_sprite 1
12874#define GL_SPRITE_SGIX 0x8148
12875#define GL_SPRITE_MODE_SGIX 0x8149
12876#define GL_SPRITE_AXIS_SGIX 0x814A
12877#define GL_SPRITE_TRANSLATION_SGIX 0x814B
12878#define GL_SPRITE_AXIAL_SGIX 0x814C
12879#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
12880#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
12881typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
12882typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
12883typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
12884typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
12885#ifdef GL_GLEXT_PROTOTYPES
12886GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param);
12887GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params);
12888GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param);
12889GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params);
12890#endif
12891#endif /* GL_SGIX_sprite */
12892
12893#ifndef GL_SGIX_subsample
12894#define GL_SGIX_subsample 1
12895#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
12896#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
12897#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
12898#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
12899#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
12900#endif /* GL_SGIX_subsample */
12901
12902#ifndef GL_SGIX_tag_sample_buffer
12903#define GL_SGIX_tag_sample_buffer 1
12904typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
12905#ifdef GL_GLEXT_PROTOTYPES
12906GLAPI void APIENTRY glTagSampleBufferSGIX (void);
12907#endif
12908#endif /* GL_SGIX_tag_sample_buffer */
12909
12910#ifndef GL_SGIX_texture_add_env
12911#define GL_SGIX_texture_add_env 1
12912#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
12913#endif /* GL_SGIX_texture_add_env */
12914
12915#ifndef GL_SGIX_texture_coordinate_clamp
12916#define GL_SGIX_texture_coordinate_clamp 1
12917#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
12918#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
12919#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
12920#endif /* GL_SGIX_texture_coordinate_clamp */
12921
12922#ifndef GL_SGIX_texture_lod_bias
12923#define GL_SGIX_texture_lod_bias 1
12924#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
12925#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
12926#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
12927#endif /* GL_SGIX_texture_lod_bias */
12928
12929#ifndef GL_SGIX_texture_multi_buffer
12930#define GL_SGIX_texture_multi_buffer 1
12931#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
12932#endif /* GL_SGIX_texture_multi_buffer */
12933
12934#ifndef GL_SGIX_texture_scale_bias
12935#define GL_SGIX_texture_scale_bias 1
12936#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
12937#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
12938#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
12939#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
12940#endif /* GL_SGIX_texture_scale_bias */
12941
12942#ifndef GL_SGIX_vertex_preclip
12943#define GL_SGIX_vertex_preclip 1
12944#define GL_VERTEX_PRECLIP_SGIX 0x83EE
12945#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
12946#endif /* GL_SGIX_vertex_preclip */
12947
12948#ifndef GL_SGIX_ycrcb
12949#define GL_SGIX_ycrcb 1
12950#define GL_YCRCB_422_SGIX 0x81BB
12951#define GL_YCRCB_444_SGIX 0x81BC
12952#endif /* GL_SGIX_ycrcb */
12953
12954#ifndef GL_SGIX_ycrcb_subsample
12955#define GL_SGIX_ycrcb_subsample 1
12956#endif /* GL_SGIX_ycrcb_subsample */
12957
12958#ifndef GL_SGIX_ycrcba
12959#define GL_SGIX_ycrcba 1
12960#define GL_YCRCB_SGIX 0x8318
12961#define GL_YCRCBA_SGIX 0x8319
12962#endif /* GL_SGIX_ycrcba */
12963
12964#ifndef GL_SGI_color_matrix
12965#define GL_SGI_color_matrix 1
12966#define GL_COLOR_MATRIX_SGI 0x80B1
12967#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
12968#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
12969#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
12970#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
12971#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
12972#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
12973#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
12974#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
12975#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
12976#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
12977#endif /* GL_SGI_color_matrix */
12978
12979#ifndef GL_SGI_color_table
12980#define GL_SGI_color_table 1
12981#define GL_COLOR_TABLE_SGI 0x80D0
12982#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
12983#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
12984#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
12985#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
12986#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
12987#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
12988#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
12989#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
12990#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
12991#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
12992#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
12993#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
12994#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
12995#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
12996#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
12997typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
12998typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
12999typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
13000typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
13001typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table);
13002typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
13003typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
13004#ifdef GL_GLEXT_PROTOTYPES
13005GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
13006GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params);
13007GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params);
13008GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
13009GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table);
13010GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params);
13011GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params);
13012#endif
13013#endif /* GL_SGI_color_table */
13014
13015#ifndef GL_SGI_texture_color_table
13016#define GL_SGI_texture_color_table 1
13017#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
13018#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
13019#endif /* GL_SGI_texture_color_table */
13020
13021#ifndef GL_SUNX_constant_data
13022#define GL_SUNX_constant_data 1
13023#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
13024#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
13025typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
13026#ifdef GL_GLEXT_PROTOTYPES
13027GLAPI void APIENTRY glFinishTextureSUNX (void);
13028#endif
13029#endif /* GL_SUNX_constant_data */
13030
13031#ifndef GL_SUN_convolution_border_modes
13032#define GL_SUN_convolution_border_modes 1
13033#define GL_WRAP_BORDER_SUN 0x81D4
13034#endif /* GL_SUN_convolution_border_modes */
13035
13036#ifndef GL_SUN_global_alpha
13037#define GL_SUN_global_alpha 1
13038#define GL_GLOBAL_ALPHA_SUN 0x81D9
13039#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
13040typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
13041typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
13042typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
13043typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
13044typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
13045typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
13046typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
13047typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
13048#ifdef GL_GLEXT_PROTOTYPES
13049GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor);
13050GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor);
13051GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor);
13052GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor);
13053GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor);
13054GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor);
13055GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor);
13056GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor);
13057#endif
13058#endif /* GL_SUN_global_alpha */
13059
13060#ifndef GL_SUN_mesh_array
13061#define GL_SUN_mesh_array 1
13062#define GL_QUAD_MESH_SUN 0x8614
13063#define GL_TRIANGLE_MESH_SUN 0x8615
13064typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
13065#ifdef GL_GLEXT_PROTOTYPES
13066GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width);
13067#endif
13068#endif /* GL_SUN_mesh_array */
13069
13070#ifndef GL_SUN_slice_accum
13071#define GL_SUN_slice_accum 1
13072#define GL_SLICE_ACCUM_SUN 0x85CC
13073#endif /* GL_SUN_slice_accum */
13074
13075#ifndef GL_SUN_triangle_list
13076#define GL_SUN_triangle_list 1
13077#define GL_RESTART_SUN 0x0001
13078#define GL_REPLACE_MIDDLE_SUN 0x0002
13079#define GL_REPLACE_OLDEST_SUN 0x0003
13080#define GL_TRIANGLE_LIST_SUN 0x81D7
13081#define GL_REPLACEMENT_CODE_SUN 0x81D8
13082#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
13083#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
13084#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
13085#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
13086#define GL_R1UI_V3F_SUN 0x85C4
13087#define GL_R1UI_C4UB_V3F_SUN 0x85C5
13088#define GL_R1UI_C3F_V3F_SUN 0x85C6
13089#define GL_R1UI_N3F_V3F_SUN 0x85C7
13090#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
13091#define GL_R1UI_T2F_V3F_SUN 0x85C9
13092#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
13093#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
13094typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
13095typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
13096typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
13097typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
13098typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
13099typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
13100typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer);
13101#ifdef GL_GLEXT_PROTOTYPES
13102GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code);
13103GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code);
13104GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code);
13105GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code);
13106GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code);
13107GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code);
13108GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer);
13109#endif
13110#endif /* GL_SUN_triangle_list */
13111
13112#ifndef GL_SUN_vertex
13113#define GL_SUN_vertex 1
13114typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
13115typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
13116typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
13117typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
13118typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
13119typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
13120typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13121typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
13122typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13123typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
13124typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
13125typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
13126typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
13127typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
13128typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
13129typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
13130typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
13131typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
13132typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13133typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
13134typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13135typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
13136typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
13137typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
13138typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
13139typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
13140typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
13141typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
13142typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
13143typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
13144typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13145typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
13146typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13147typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
13148typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
13149typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
13150typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13151typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
13152typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13153typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
13154#ifdef GL_GLEXT_PROTOTYPES
13155GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
13156GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v);
13157GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
13158GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v);
13159GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
13160GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v);
13161GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13162GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v);
13163GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13164GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v);
13165GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
13166GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v);
13167GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
13168GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v);
13169GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
13170GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
13171GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
13172GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
13173GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13174GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
13175GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13176GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
13177GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
13178GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
13179GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
13180GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v);
13181GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
13182GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v);
13183GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
13184GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v);
13185GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13186GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v);
13187GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13188GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
13189GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
13190GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
13191GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13192GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
13193GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
13194GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
13195#endif
13196#endif /* GL_SUN_vertex */
13197
13198#ifndef GL_WIN_phong_shading
13199#define GL_WIN_phong_shading 1
13200#define GL_PHONG_WIN 0x80EA
13201#define GL_PHONG_HINT_WIN 0x80EB
13202#endif /* GL_WIN_phong_shading */
13203
13204#ifndef GL_WIN_specular_fog
13205#define GL_WIN_specular_fog 1
13206#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
13207#endif /* GL_WIN_specular_fog */
13208
13209#ifdef __cplusplus
13210}
13211#endif
13212
13213#endif
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles.h
new file mode 100644
index 0000000..4fb9a4b
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles.h
@@ -0,0 +1,38 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/*
23 * This is a simple file to encapsulate the OpenGL ES 1.X API headers.
24 */
25
26#include <SDL3/SDL_platform_defines.h>
27
28#ifdef SDL_PLATFORM_IOS
29#include <OpenGLES/ES1/gl.h>
30#include <OpenGLES/ES1/glext.h>
31#else
32#include <GLES/gl.h>
33#include <GLES/glext.h>
34#endif
35
36#ifndef APIENTRY
37#define APIENTRY
38#endif
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2.h
new file mode 100644
index 0000000..365898a
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2.h
@@ -0,0 +1,51 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/*
23 * This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
24 */
25
26#include <SDL3/SDL_platform_defines.h>
27
28#if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
29
30#ifdef SDL_PLATFORM_IOS
31#include <OpenGLES/ES2/gl.h>
32#include <OpenGLES/ES2/glext.h>
33#else
34#include <GLES2/gl2platform.h>
35#include <GLES2/gl2.h>
36#include <GLES2/gl2ext.h>
37#endif
38
39#else /* _MSC_VER */
40
41/* OpenGL ES2 headers for Visual Studio */
42#include <SDL3/SDL_opengles2_khrplatform.h>
43#include <SDL3/SDL_opengles2_gl2platform.h>
44#include <SDL3/SDL_opengles2_gl2.h>
45#include <SDL3/SDL_opengles2_gl2ext.h>
46
47#endif /* _MSC_VER */
48
49#ifndef APIENTRY
50#define APIENTRY GL_APIENTRY
51#endif
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2.h
new file mode 100644
index 0000000..d13622a
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2.h
@@ -0,0 +1,656 @@
1#ifndef __gles2_gl2_h_
2#define __gles2_gl2_h_ 1
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/*
9** Copyright 2013-2020 The Khronos Group Inc.
10** SPDX-License-Identifier: MIT
11**
12** This header is generated from the Khronos OpenGL / OpenGL ES XML
13** API Registry. The current version of the Registry, generator scripts
14** used to make the header, and the header can be found at
15** https://github.com/KhronosGroup/OpenGL-Registry
16*/
17
18/*#include <GLES2/gl2platform.h>*/
19
20#ifndef GL_APIENTRYP
21#define GL_APIENTRYP GL_APIENTRY*
22#endif
23
24#ifndef GL_GLES_PROTOTYPES
25#define GL_GLES_PROTOTYPES 1
26#endif
27
28/* Generated on date 20220530 */
29
30/* Generated C header for:
31 * API: gles2
32 * Profile: common
33 * Versions considered: 2\.[0-9]
34 * Versions emitted: .*
35 * Default extensions included: None
36 * Additional extensions included: _nomatch_^
37 * Extensions removed: _nomatch_^
38 */
39
40#ifndef GL_ES_VERSION_2_0
41#define GL_ES_VERSION_2_0 1
42/*#include <KHR/khrplatform.h>*/
43typedef khronos_int8_t GLbyte;
44typedef khronos_float_t GLclampf;
45typedef khronos_int32_t GLfixed;
46typedef khronos_int16_t GLshort;
47typedef khronos_uint16_t GLushort;
48typedef void GLvoid;
49typedef struct __GLsync *GLsync;
50typedef khronos_int64_t GLint64;
51typedef khronos_uint64_t GLuint64;
52typedef unsigned int GLenum;
53typedef unsigned int GLuint;
54typedef char GLchar;
55typedef khronos_float_t GLfloat;
56typedef khronos_ssize_t GLsizeiptr;
57typedef khronos_intptr_t GLintptr;
58typedef unsigned int GLbitfield;
59typedef int GLint;
60typedef unsigned char GLboolean;
61typedef int GLsizei;
62typedef khronos_uint8_t GLubyte;
63#define GL_DEPTH_BUFFER_BIT 0x00000100
64#define GL_STENCIL_BUFFER_BIT 0x00000400
65#define GL_COLOR_BUFFER_BIT 0x00004000
66#define GL_FALSE 0
67#define GL_TRUE 1
68#define GL_POINTS 0x0000
69#define GL_LINES 0x0001
70#define GL_LINE_LOOP 0x0002
71#define GL_LINE_STRIP 0x0003
72#define GL_TRIANGLES 0x0004
73#define GL_TRIANGLE_STRIP 0x0005
74#define GL_TRIANGLE_FAN 0x0006
75#define GL_ZERO 0
76#define GL_ONE 1
77#define GL_SRC_COLOR 0x0300
78#define GL_ONE_MINUS_SRC_COLOR 0x0301
79#define GL_SRC_ALPHA 0x0302
80#define GL_ONE_MINUS_SRC_ALPHA 0x0303
81#define GL_DST_ALPHA 0x0304
82#define GL_ONE_MINUS_DST_ALPHA 0x0305
83#define GL_DST_COLOR 0x0306
84#define GL_ONE_MINUS_DST_COLOR 0x0307
85#define GL_SRC_ALPHA_SATURATE 0x0308
86#define GL_FUNC_ADD 0x8006
87#define GL_BLEND_EQUATION 0x8009
88#define GL_BLEND_EQUATION_RGB 0x8009
89#define GL_BLEND_EQUATION_ALPHA 0x883D
90#define GL_FUNC_SUBTRACT 0x800A
91#define GL_FUNC_REVERSE_SUBTRACT 0x800B
92#define GL_BLEND_DST_RGB 0x80C8
93#define GL_BLEND_SRC_RGB 0x80C9
94#define GL_BLEND_DST_ALPHA 0x80CA
95#define GL_BLEND_SRC_ALPHA 0x80CB
96#define GL_CONSTANT_COLOR 0x8001
97#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
98#define GL_CONSTANT_ALPHA 0x8003
99#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
100#define GL_BLEND_COLOR 0x8005
101#define GL_ARRAY_BUFFER 0x8892
102#define GL_ELEMENT_ARRAY_BUFFER 0x8893
103#define GL_ARRAY_BUFFER_BINDING 0x8894
104#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
105#define GL_STREAM_DRAW 0x88E0
106#define GL_STATIC_DRAW 0x88E4
107#define GL_DYNAMIC_DRAW 0x88E8
108#define GL_BUFFER_SIZE 0x8764
109#define GL_BUFFER_USAGE 0x8765
110#define GL_CURRENT_VERTEX_ATTRIB 0x8626
111#define GL_FRONT 0x0404
112#define GL_BACK 0x0405
113#define GL_FRONT_AND_BACK 0x0408
114#define GL_TEXTURE_2D 0x0DE1
115#define GL_CULL_FACE 0x0B44
116#define GL_BLEND 0x0BE2
117#define GL_DITHER 0x0BD0
118#define GL_STENCIL_TEST 0x0B90
119#define GL_DEPTH_TEST 0x0B71
120#define GL_SCISSOR_TEST 0x0C11
121#define GL_POLYGON_OFFSET_FILL 0x8037
122#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
123#define GL_SAMPLE_COVERAGE 0x80A0
124#define GL_NO_ERROR 0
125#define GL_INVALID_ENUM 0x0500
126#define GL_INVALID_VALUE 0x0501
127#define GL_INVALID_OPERATION 0x0502
128#define GL_OUT_OF_MEMORY 0x0505
129#define GL_CW 0x0900
130#define GL_CCW 0x0901
131#define GL_LINE_WIDTH 0x0B21
132#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
133#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
134#define GL_CULL_FACE_MODE 0x0B45
135#define GL_FRONT_FACE 0x0B46
136#define GL_DEPTH_RANGE 0x0B70
137#define GL_DEPTH_WRITEMASK 0x0B72
138#define GL_DEPTH_CLEAR_VALUE 0x0B73
139#define GL_DEPTH_FUNC 0x0B74
140#define GL_STENCIL_CLEAR_VALUE 0x0B91
141#define GL_STENCIL_FUNC 0x0B92
142#define GL_STENCIL_FAIL 0x0B94
143#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
144#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
145#define GL_STENCIL_REF 0x0B97
146#define GL_STENCIL_VALUE_MASK 0x0B93
147#define GL_STENCIL_WRITEMASK 0x0B98
148#define GL_STENCIL_BACK_FUNC 0x8800
149#define GL_STENCIL_BACK_FAIL 0x8801
150#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
151#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
152#define GL_STENCIL_BACK_REF 0x8CA3
153#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
154#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
155#define GL_VIEWPORT 0x0BA2
156#define GL_SCISSOR_BOX 0x0C10
157#define GL_COLOR_CLEAR_VALUE 0x0C22
158#define GL_COLOR_WRITEMASK 0x0C23
159#define GL_UNPACK_ALIGNMENT 0x0CF5
160#define GL_PACK_ALIGNMENT 0x0D05
161#define GL_MAX_TEXTURE_SIZE 0x0D33
162#define GL_MAX_VIEWPORT_DIMS 0x0D3A
163#define GL_SUBPIXEL_BITS 0x0D50
164#define GL_RED_BITS 0x0D52
165#define GL_GREEN_BITS 0x0D53
166#define GL_BLUE_BITS 0x0D54
167#define GL_ALPHA_BITS 0x0D55
168#define GL_DEPTH_BITS 0x0D56
169#define GL_STENCIL_BITS 0x0D57
170#define GL_POLYGON_OFFSET_UNITS 0x2A00
171#define GL_POLYGON_OFFSET_FACTOR 0x8038
172#define GL_TEXTURE_BINDING_2D 0x8069
173#define GL_SAMPLE_BUFFERS 0x80A8
174#define GL_SAMPLES 0x80A9
175#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
176#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
177#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
178#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
179#define GL_DONT_CARE 0x1100
180#define GL_FASTEST 0x1101
181#define GL_NICEST 0x1102
182#define GL_GENERATE_MIPMAP_HINT 0x8192
183#define GL_BYTE 0x1400
184#define GL_UNSIGNED_BYTE 0x1401
185#define GL_SHORT 0x1402
186#define GL_UNSIGNED_SHORT 0x1403
187#define GL_INT 0x1404
188#define GL_UNSIGNED_INT 0x1405
189#define GL_FLOAT 0x1406
190#define GL_FIXED 0x140C
191#define GL_DEPTH_COMPONENT 0x1902
192#define GL_ALPHA 0x1906
193#define GL_RGB 0x1907
194#define GL_RGBA 0x1908
195#define GL_LUMINANCE 0x1909
196#define GL_LUMINANCE_ALPHA 0x190A
197#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
198#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
199#define GL_UNSIGNED_SHORT_5_6_5 0x8363
200#define GL_FRAGMENT_SHADER 0x8B30
201#define GL_VERTEX_SHADER 0x8B31
202#define GL_MAX_VERTEX_ATTRIBS 0x8869
203#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
204#define GL_MAX_VARYING_VECTORS 0x8DFC
205#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
206#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
207#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
208#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
209#define GL_SHADER_TYPE 0x8B4F
210#define GL_DELETE_STATUS 0x8B80
211#define GL_LINK_STATUS 0x8B82
212#define GL_VALIDATE_STATUS 0x8B83
213#define GL_ATTACHED_SHADERS 0x8B85
214#define GL_ACTIVE_UNIFORMS 0x8B86
215#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
216#define GL_ACTIVE_ATTRIBUTES 0x8B89
217#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
218#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
219#define GL_CURRENT_PROGRAM 0x8B8D
220#define GL_NEVER 0x0200
221#define GL_LESS 0x0201
222#define GL_EQUAL 0x0202
223#define GL_LEQUAL 0x0203
224#define GL_GREATER 0x0204
225#define GL_NOTEQUAL 0x0205
226#define GL_GEQUAL 0x0206
227#define GL_ALWAYS 0x0207
228#define GL_KEEP 0x1E00
229#define GL_REPLACE 0x1E01
230#define GL_INCR 0x1E02
231#define GL_DECR 0x1E03
232#define GL_INVERT 0x150A
233#define GL_INCR_WRAP 0x8507
234#define GL_DECR_WRAP 0x8508
235#define GL_VENDOR 0x1F00
236#define GL_RENDERER 0x1F01
237#define GL_VERSION 0x1F02
238#define GL_EXTENSIONS 0x1F03
239#define GL_NEAREST 0x2600
240#define GL_LINEAR 0x2601
241#define GL_NEAREST_MIPMAP_NEAREST 0x2700
242#define GL_LINEAR_MIPMAP_NEAREST 0x2701
243#define GL_NEAREST_MIPMAP_LINEAR 0x2702
244#define GL_LINEAR_MIPMAP_LINEAR 0x2703
245#define GL_TEXTURE_MAG_FILTER 0x2800
246#define GL_TEXTURE_MIN_FILTER 0x2801
247#define GL_TEXTURE_WRAP_S 0x2802
248#define GL_TEXTURE_WRAP_T 0x2803
249#define GL_TEXTURE 0x1702
250#define GL_TEXTURE_CUBE_MAP 0x8513
251#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
252#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
253#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
254#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
255#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
256#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
257#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
258#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
259#define GL_TEXTURE0 0x84C0
260#define GL_TEXTURE1 0x84C1
261#define GL_TEXTURE2 0x84C2
262#define GL_TEXTURE3 0x84C3
263#define GL_TEXTURE4 0x84C4
264#define GL_TEXTURE5 0x84C5
265#define GL_TEXTURE6 0x84C6
266#define GL_TEXTURE7 0x84C7
267#define GL_TEXTURE8 0x84C8
268#define GL_TEXTURE9 0x84C9
269#define GL_TEXTURE10 0x84CA
270#define GL_TEXTURE11 0x84CB
271#define GL_TEXTURE12 0x84CC
272#define GL_TEXTURE13 0x84CD
273#define GL_TEXTURE14 0x84CE
274#define GL_TEXTURE15 0x84CF
275#define GL_TEXTURE16 0x84D0
276#define GL_TEXTURE17 0x84D1
277#define GL_TEXTURE18 0x84D2
278#define GL_TEXTURE19 0x84D3
279#define GL_TEXTURE20 0x84D4
280#define GL_TEXTURE21 0x84D5
281#define GL_TEXTURE22 0x84D6
282#define GL_TEXTURE23 0x84D7
283#define GL_TEXTURE24 0x84D8
284#define GL_TEXTURE25 0x84D9
285#define GL_TEXTURE26 0x84DA
286#define GL_TEXTURE27 0x84DB
287#define GL_TEXTURE28 0x84DC
288#define GL_TEXTURE29 0x84DD
289#define GL_TEXTURE30 0x84DE
290#define GL_TEXTURE31 0x84DF
291#define GL_ACTIVE_TEXTURE 0x84E0
292#define GL_REPEAT 0x2901
293#define GL_CLAMP_TO_EDGE 0x812F
294#define GL_MIRRORED_REPEAT 0x8370
295#define GL_FLOAT_VEC2 0x8B50
296#define GL_FLOAT_VEC3 0x8B51
297#define GL_FLOAT_VEC4 0x8B52
298#define GL_INT_VEC2 0x8B53
299#define GL_INT_VEC3 0x8B54
300#define GL_INT_VEC4 0x8B55
301#define GL_BOOL 0x8B56
302#define GL_BOOL_VEC2 0x8B57
303#define GL_BOOL_VEC3 0x8B58
304#define GL_BOOL_VEC4 0x8B59
305#define GL_FLOAT_MAT2 0x8B5A
306#define GL_FLOAT_MAT3 0x8B5B
307#define GL_FLOAT_MAT4 0x8B5C
308#define GL_SAMPLER_2D 0x8B5E
309#define GL_SAMPLER_CUBE 0x8B60
310#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
311#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
312#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
313#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
314#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
315#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
316#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
317#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
318#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
319#define GL_COMPILE_STATUS 0x8B81
320#define GL_INFO_LOG_LENGTH 0x8B84
321#define GL_SHADER_SOURCE_LENGTH 0x8B88
322#define GL_SHADER_COMPILER 0x8DFA
323#define GL_SHADER_BINARY_FORMATS 0x8DF8
324#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
325#define GL_LOW_FLOAT 0x8DF0
326#define GL_MEDIUM_FLOAT 0x8DF1
327#define GL_HIGH_FLOAT 0x8DF2
328#define GL_LOW_INT 0x8DF3
329#define GL_MEDIUM_INT 0x8DF4
330#define GL_HIGH_INT 0x8DF5
331#define GL_FRAMEBUFFER 0x8D40
332#define GL_RENDERBUFFER 0x8D41
333#define GL_RGBA4 0x8056
334#define GL_RGB5_A1 0x8057
335#define GL_RGB565 0x8D62
336#define GL_DEPTH_COMPONENT16 0x81A5
337#define GL_STENCIL_INDEX8 0x8D48
338#define GL_RENDERBUFFER_WIDTH 0x8D42
339#define GL_RENDERBUFFER_HEIGHT 0x8D43
340#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
341#define GL_RENDERBUFFER_RED_SIZE 0x8D50
342#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
343#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
344#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
345#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
346#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
347#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
348#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
349#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
350#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
351#define GL_COLOR_ATTACHMENT0 0x8CE0
352#define GL_DEPTH_ATTACHMENT 0x8D00
353#define GL_STENCIL_ATTACHMENT 0x8D20
354#define GL_NONE 0
355#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
356#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
357#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
358#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
359#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
360#define GL_FRAMEBUFFER_BINDING 0x8CA6
361#define GL_RENDERBUFFER_BINDING 0x8CA7
362#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
363#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
364typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
365typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
366typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
367typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
368typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
369typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
370typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
371typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
372typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
373typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
374typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor);
375typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
376typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
377typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
378typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
379typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
380typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
381typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
382typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s);
383typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
384typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
385typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
386typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
387typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
388typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
389typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
390typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
391typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode);
392typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
393typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
394typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
395typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
396typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
397typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
398typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func);
399typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag);
400typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
401typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
402typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap);
403typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
404typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count);
405typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices);
406typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap);
407typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
408typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void);
409typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void);
410typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
411typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
412typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode);
413typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
414typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
415typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
416typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
417typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
418typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
419typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
420typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
421typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
422typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data);
423typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
424typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void);
425typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data);
426typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
427typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data);
428typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
429typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
430typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
431typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
432typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
433typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
434typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
435typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
436typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
437typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
438typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
439typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
440typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
441typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
442typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
443typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
444typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode);
445typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
446typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
447typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
448typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
449typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
450typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
451typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture);
452typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width);
453typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
454typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
455typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units);
456typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
457typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
458typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
459typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
460typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
461typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
462typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
463typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask);
464typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
465typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask);
466typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
467typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass);
468typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
469typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
470typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param);
471typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
472typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
473typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
474typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
475typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
476typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
477typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
478typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
479typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
480typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
481typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
482typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
483typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
484typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
485typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
486typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
487typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
488typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
489typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
490typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
491typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
492typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
493typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
494typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
495typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
496typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
497typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
498typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
499typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
500typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
501typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
502typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
503typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
504typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
505typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
506#if GL_GLES_PROTOTYPES
507GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
508GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
509GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
510GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
511GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
512GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
513GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
514GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
515GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
516GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
517GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
518GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
519GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
520GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
521GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
522GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
523GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
524GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
525GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
526GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
527GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
528GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
529GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
530GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
531GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
532GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
533GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
534GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
535GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
536GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
537GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
538GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
539GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
540GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
541GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
542GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
543GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
544GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
545GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
546GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
547GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
548GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
549GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
550GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
551GL_APICALL void GL_APIENTRY glFinish (void);
552GL_APICALL void GL_APIENTRY glFlush (void);
553GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
554GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
555GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
556GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
557GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
558GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
559GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
560GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
561GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
562GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
563GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
564GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
565GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
566GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
567GL_APICALL GLenum GL_APIENTRY glGetError (void);
568GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
569GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
570GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
571GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
572GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
573GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
574GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
575GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
576GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
577GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
578GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
579GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
580GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
581GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
582GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
583GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
584GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
585GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
586GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
587GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
588GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
589GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
590GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
591GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
592GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
593GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
594GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
595GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
596GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
597GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
598GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
599GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
600GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
601GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
602GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
603GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
604GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
605GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
606GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
607GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
608GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
609GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
610GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
611GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
612GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
613GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
614GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
615GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
616GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
617GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
618GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
619GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
620GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
621GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
622GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
623GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
624GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
625GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
626GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
627GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
628GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
629GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
630GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
631GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
632GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
633GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
634GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
635GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
636GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
637GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
638GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
639GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
640GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
641GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
642GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
643GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
644GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
645GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
646GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
647GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
648GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
649#endif
650#endif /* GL_ES_VERSION_2_0 */
651
652#ifdef __cplusplus
653}
654#endif
655
656#endif
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2ext.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2ext.h
new file mode 100644
index 0000000..9448ce0
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2ext.h
@@ -0,0 +1,4033 @@
1#ifndef __gles2_gl2ext_h_
2#define __gles2_gl2ext_h_ 1
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/*
9** Copyright 2013-2020 The Khronos Group Inc.
10** SPDX-License-Identifier: MIT
11**
12** This header is generated from the Khronos OpenGL / OpenGL ES XML
13** API Registry. The current version of the Registry, generator scripts
14** used to make the header, and the header can be found at
15** https://github.com/KhronosGroup/OpenGL-Registry
16*/
17
18#ifndef GL_APIENTRYP
19#define GL_APIENTRYP GL_APIENTRY*
20#endif
21
22/* Generated on date 20220530 */
23
24/* Generated C header for:
25 * API: gles2
26 * Profile: common
27 * Versions considered: 2\.[0-9]
28 * Versions emitted: _nomatch_^
29 * Default extensions included: gles2
30 * Additional extensions included: _nomatch_^
31 * Extensions removed: _nomatch_^
32 */
33
34#ifndef GL_KHR_blend_equation_advanced
35#define GL_KHR_blend_equation_advanced 1
36#define GL_MULTIPLY_KHR 0x9294
37#define GL_SCREEN_KHR 0x9295
38#define GL_OVERLAY_KHR 0x9296
39#define GL_DARKEN_KHR 0x9297
40#define GL_LIGHTEN_KHR 0x9298
41#define GL_COLORDODGE_KHR 0x9299
42#define GL_COLORBURN_KHR 0x929A
43#define GL_HARDLIGHT_KHR 0x929B
44#define GL_SOFTLIGHT_KHR 0x929C
45#define GL_DIFFERENCE_KHR 0x929E
46#define GL_EXCLUSION_KHR 0x92A0
47#define GL_HSL_HUE_KHR 0x92AD
48#define GL_HSL_SATURATION_KHR 0x92AE
49#define GL_HSL_COLOR_KHR 0x92AF
50#define GL_HSL_LUMINOSITY_KHR 0x92B0
51typedef void (GL_APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void);
52#ifdef GL_GLEXT_PROTOTYPES
53GL_APICALL void GL_APIENTRY glBlendBarrierKHR (void);
54#endif
55#endif /* GL_KHR_blend_equation_advanced */
56
57#ifndef GL_KHR_blend_equation_advanced_coherent
58#define GL_KHR_blend_equation_advanced_coherent 1
59#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
60#endif /* GL_KHR_blend_equation_advanced_coherent */
61
62#ifndef GL_KHR_context_flush_control
63#define GL_KHR_context_flush_control 1
64#define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB
65#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x82FC
66#endif /* GL_KHR_context_flush_control */
67
68#ifndef GL_KHR_debug
69#define GL_KHR_debug 1
70typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
71#define GL_SAMPLER 0x82E6
72#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242
73#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243
74#define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244
75#define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245
76#define GL_DEBUG_SOURCE_API_KHR 0x8246
77#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247
78#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248
79#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249
80#define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A
81#define GL_DEBUG_SOURCE_OTHER_KHR 0x824B
82#define GL_DEBUG_TYPE_ERROR_KHR 0x824C
83#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D
84#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E
85#define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F
86#define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250
87#define GL_DEBUG_TYPE_OTHER_KHR 0x8251
88#define GL_DEBUG_TYPE_MARKER_KHR 0x8268
89#define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269
90#define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A
91#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B
92#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C
93#define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D
94#define GL_BUFFER_KHR 0x82E0
95#define GL_SHADER_KHR 0x82E1
96#define GL_PROGRAM_KHR 0x82E2
97#define GL_VERTEX_ARRAY_KHR 0x8074
98#define GL_QUERY_KHR 0x82E3
99#define GL_PROGRAM_PIPELINE_KHR 0x82E4
100#define GL_SAMPLER_KHR 0x82E6
101#define GL_MAX_LABEL_LENGTH_KHR 0x82E8
102#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143
103#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144
104#define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145
105#define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146
106#define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147
107#define GL_DEBUG_SEVERITY_LOW_KHR 0x9148
108#define GL_DEBUG_OUTPUT_KHR 0x92E0
109#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002
110#define GL_STACK_OVERFLOW_KHR 0x0503
111#define GL_STACK_UNDERFLOW_KHR 0x0504
112typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
113typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
114typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
115typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
116typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
117typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);
118typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
119typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
120typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
121typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
122typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params);
123#ifdef GL_GLEXT_PROTOTYPES
124GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
125GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
126GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);
127GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
128GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);
129GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);
130GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
131GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
132GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);
133GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
134GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params);
135#endif
136#endif /* GL_KHR_debug */
137
138#ifndef GL_KHR_no_error
139#define GL_KHR_no_error 1
140#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
141#endif /* GL_KHR_no_error */
142
143#ifndef GL_KHR_parallel_shader_compile
144#define GL_KHR_parallel_shader_compile 1
145#define GL_MAX_SHADER_COMPILER_THREADS_KHR 0x91B0
146#define GL_COMPLETION_STATUS_KHR 0x91B1
147typedef void (GL_APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSKHRPROC) (GLuint count);
148#ifdef GL_GLEXT_PROTOTYPES
149GL_APICALL void GL_APIENTRY glMaxShaderCompilerThreadsKHR (GLuint count);
150#endif
151#endif /* GL_KHR_parallel_shader_compile */
152
153#ifndef GL_KHR_robust_buffer_access_behavior
154#define GL_KHR_robust_buffer_access_behavior 1
155#endif /* GL_KHR_robust_buffer_access_behavior */
156
157#ifndef GL_KHR_robustness
158#define GL_KHR_robustness 1
159#define GL_CONTEXT_ROBUST_ACCESS_KHR 0x90F3
160#define GL_LOSE_CONTEXT_ON_RESET_KHR 0x8252
161#define GL_GUILTY_CONTEXT_RESET_KHR 0x8253
162#define GL_INNOCENT_CONTEXT_RESET_KHR 0x8254
163#define GL_UNKNOWN_CONTEXT_RESET_KHR 0x8255
164#define GL_RESET_NOTIFICATION_STRATEGY_KHR 0x8256
165#define GL_NO_RESET_NOTIFICATION_KHR 0x8261
166#define GL_CONTEXT_LOST_KHR 0x0507
167typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC) (void);
168typedef void (GL_APIENTRYP PFNGLREADNPIXELSKHRPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
169typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
170typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
171typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
172#ifdef GL_GLEXT_PROTOTYPES
173GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusKHR (void);
174GL_APICALL void GL_APIENTRY glReadnPixelsKHR (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
175GL_APICALL void GL_APIENTRY glGetnUniformfvKHR (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
176GL_APICALL void GL_APIENTRY glGetnUniformivKHR (GLuint program, GLint location, GLsizei bufSize, GLint *params);
177GL_APICALL void GL_APIENTRY glGetnUniformuivKHR (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
178#endif
179#endif /* GL_KHR_robustness */
180
181#ifndef GL_KHR_shader_subgroup
182#define GL_KHR_shader_subgroup 1
183#define GL_SUBGROUP_SIZE_KHR 0x9532
184#define GL_SUBGROUP_SUPPORTED_STAGES_KHR 0x9533
185#define GL_SUBGROUP_SUPPORTED_FEATURES_KHR 0x9534
186#define GL_SUBGROUP_QUAD_ALL_STAGES_KHR 0x9535
187#define GL_SUBGROUP_FEATURE_BASIC_BIT_KHR 0x00000001
188#define GL_SUBGROUP_FEATURE_VOTE_BIT_KHR 0x00000002
189#define GL_SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR 0x00000004
190#define GL_SUBGROUP_FEATURE_BALLOT_BIT_KHR 0x00000008
191#define GL_SUBGROUP_FEATURE_SHUFFLE_BIT_KHR 0x00000010
192#define GL_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR 0x00000020
193#define GL_SUBGROUP_FEATURE_CLUSTERED_BIT_KHR 0x00000040
194#define GL_SUBGROUP_FEATURE_QUAD_BIT_KHR 0x00000080
195#endif /* GL_KHR_shader_subgroup */
196
197#ifndef GL_KHR_texture_compression_astc_hdr
198#define GL_KHR_texture_compression_astc_hdr 1
199#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
200#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
201#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
202#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
203#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
204#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
205#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
206#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
207#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
208#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
209#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
210#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
211#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
212#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
213#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
214#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
215#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
216#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
217#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
218#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
219#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
220#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
221#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
222#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
223#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
224#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
225#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
226#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
227#endif /* GL_KHR_texture_compression_astc_hdr */
228
229#ifndef GL_KHR_texture_compression_astc_ldr
230#define GL_KHR_texture_compression_astc_ldr 1
231#endif /* GL_KHR_texture_compression_astc_ldr */
232
233#ifndef GL_KHR_texture_compression_astc_sliced_3d
234#define GL_KHR_texture_compression_astc_sliced_3d 1
235#endif /* GL_KHR_texture_compression_astc_sliced_3d */
236
237#ifndef GL_OES_EGL_image
238#define GL_OES_EGL_image 1
239typedef void *GLeglImageOES;
240typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
241typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
242#ifdef GL_GLEXT_PROTOTYPES
243GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
244GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
245#endif
246#endif /* GL_OES_EGL_image */
247
248#ifndef GL_OES_EGL_image_external
249#define GL_OES_EGL_image_external 1
250#define GL_TEXTURE_EXTERNAL_OES 0x8D65
251#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
252#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
253#define GL_SAMPLER_EXTERNAL_OES 0x8D66
254#endif /* GL_OES_EGL_image_external */
255
256#ifndef GL_OES_EGL_image_external_essl3
257#define GL_OES_EGL_image_external_essl3 1
258#endif /* GL_OES_EGL_image_external_essl3 */
259
260#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture
261#define GL_OES_compressed_ETC1_RGB8_sub_texture 1
262#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */
263
264#ifndef GL_OES_compressed_ETC1_RGB8_texture
265#define GL_OES_compressed_ETC1_RGB8_texture 1
266#define GL_ETC1_RGB8_OES 0x8D64
267#endif /* GL_OES_compressed_ETC1_RGB8_texture */
268
269#ifndef GL_OES_compressed_paletted_texture
270#define GL_OES_compressed_paletted_texture 1
271#define GL_PALETTE4_RGB8_OES 0x8B90
272#define GL_PALETTE4_RGBA8_OES 0x8B91
273#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
274#define GL_PALETTE4_RGBA4_OES 0x8B93
275#define GL_PALETTE4_RGB5_A1_OES 0x8B94
276#define GL_PALETTE8_RGB8_OES 0x8B95
277#define GL_PALETTE8_RGBA8_OES 0x8B96
278#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
279#define GL_PALETTE8_RGBA4_OES 0x8B98
280#define GL_PALETTE8_RGB5_A1_OES 0x8B99
281#endif /* GL_OES_compressed_paletted_texture */
282
283#ifndef GL_OES_copy_image
284#define GL_OES_copy_image 1
285typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAOESPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
286#ifdef GL_GLEXT_PROTOTYPES
287GL_APICALL void GL_APIENTRY glCopyImageSubDataOES (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
288#endif
289#endif /* GL_OES_copy_image */
290
291#ifndef GL_OES_depth24
292#define GL_OES_depth24 1
293#define GL_DEPTH_COMPONENT24_OES 0x81A6
294#endif /* GL_OES_depth24 */
295
296#ifndef GL_OES_depth32
297#define GL_OES_depth32 1
298#define GL_DEPTH_COMPONENT32_OES 0x81A7
299#endif /* GL_OES_depth32 */
300
301#ifndef GL_OES_depth_texture
302#define GL_OES_depth_texture 1
303#endif /* GL_OES_depth_texture */
304
305#ifndef GL_OES_draw_buffers_indexed
306#define GL_OES_draw_buffers_indexed 1
307#define GL_MIN 0x8007
308#define GL_MAX 0x8008
309typedef void (GL_APIENTRYP PFNGLENABLEIOESPROC) (GLenum target, GLuint index);
310typedef void (GL_APIENTRYP PFNGLDISABLEIOESPROC) (GLenum target, GLuint index);
311typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIOESPROC) (GLuint buf, GLenum mode);
312typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIOESPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
313typedef void (GL_APIENTRYP PFNGLBLENDFUNCIOESPROC) (GLuint buf, GLenum src, GLenum dst);
314typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIOESPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
315typedef void (GL_APIENTRYP PFNGLCOLORMASKIOESPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
316typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIOESPROC) (GLenum target, GLuint index);
317#ifdef GL_GLEXT_PROTOTYPES
318GL_APICALL void GL_APIENTRY glEnableiOES (GLenum target, GLuint index);
319GL_APICALL void GL_APIENTRY glDisableiOES (GLenum target, GLuint index);
320GL_APICALL void GL_APIENTRY glBlendEquationiOES (GLuint buf, GLenum mode);
321GL_APICALL void GL_APIENTRY glBlendEquationSeparateiOES (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
322GL_APICALL void GL_APIENTRY glBlendFunciOES (GLuint buf, GLenum src, GLenum dst);
323GL_APICALL void GL_APIENTRY glBlendFuncSeparateiOES (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
324GL_APICALL void GL_APIENTRY glColorMaskiOES (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
325GL_APICALL GLboolean GL_APIENTRY glIsEnablediOES (GLenum target, GLuint index);
326#endif
327#endif /* GL_OES_draw_buffers_indexed */
328
329#ifndef GL_OES_draw_elements_base_vertex
330#define GL_OES_draw_elements_base_vertex 1
331typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
332typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
333typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
334typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
335#ifdef GL_GLEXT_PROTOTYPES
336GL_APICALL void GL_APIENTRY glDrawElementsBaseVertexOES (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
337GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertexOES (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
338GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexOES (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
339GL_APICALL void GL_APIENTRY glMultiDrawElementsBaseVertexEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
340#endif
341#endif /* GL_OES_draw_elements_base_vertex */
342
343#ifndef GL_OES_element_index_uint
344#define GL_OES_element_index_uint 1
345#endif /* GL_OES_element_index_uint */
346
347#ifndef GL_OES_fbo_render_mipmap
348#define GL_OES_fbo_render_mipmap 1
349#endif /* GL_OES_fbo_render_mipmap */
350
351#ifndef GL_OES_fragment_precision_high
352#define GL_OES_fragment_precision_high 1
353#endif /* GL_OES_fragment_precision_high */
354
355#ifndef GL_OES_geometry_point_size
356#define GL_OES_geometry_point_size 1
357#endif /* GL_OES_geometry_point_size */
358
359#ifndef GL_OES_geometry_shader
360#define GL_OES_geometry_shader 1
361#define GL_GEOMETRY_SHADER_OES 0x8DD9
362#define GL_GEOMETRY_SHADER_BIT_OES 0x00000004
363#define GL_GEOMETRY_LINKED_VERTICES_OUT_OES 0x8916
364#define GL_GEOMETRY_LINKED_INPUT_TYPE_OES 0x8917
365#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_OES 0x8918
366#define GL_GEOMETRY_SHADER_INVOCATIONS_OES 0x887F
367#define GL_LAYER_PROVOKING_VERTEX_OES 0x825E
368#define GL_LINES_ADJACENCY_OES 0x000A
369#define GL_LINE_STRIP_ADJACENCY_OES 0x000B
370#define GL_TRIANGLES_ADJACENCY_OES 0x000C
371#define GL_TRIANGLE_STRIP_ADJACENCY_OES 0x000D
372#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_OES 0x8DDF
373#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_OES 0x8A2C
374#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_OES 0x8A32
375#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_OES 0x9123
376#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES 0x9124
377#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_OES 0x8DE0
378#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_OES 0x8DE1
379#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_OES 0x8E5A
380#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_OES 0x8C29
381#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES 0x92CF
382#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_OES 0x92D5
383#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_OES 0x90CD
384#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_OES 0x90D7
385#define GL_FIRST_VERTEX_CONVENTION_OES 0x8E4D
386#define GL_LAST_VERTEX_CONVENTION_OES 0x8E4E
387#define GL_UNDEFINED_VERTEX_OES 0x8260
388#define GL_PRIMITIVES_GENERATED_OES 0x8C87
389#define GL_FRAMEBUFFER_DEFAULT_LAYERS_OES 0x9312
390#define GL_MAX_FRAMEBUFFER_LAYERS_OES 0x9317
391#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_OES 0x8DA8
392#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_OES 0x8DA7
393#define GL_REFERENCED_BY_GEOMETRY_SHADER_OES 0x9309
394typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREOESPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
395#ifdef GL_GLEXT_PROTOTYPES
396GL_APICALL void GL_APIENTRY glFramebufferTextureOES (GLenum target, GLenum attachment, GLuint texture, GLint level);
397#endif
398#endif /* GL_OES_geometry_shader */
399
400#ifndef GL_OES_get_program_binary
401#define GL_OES_get_program_binary 1
402#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
403#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
404#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
405typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
406typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
407#ifdef GL_GLEXT_PROTOTYPES
408GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
409GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
410#endif
411#endif /* GL_OES_get_program_binary */
412
413#ifndef GL_OES_gpu_shader5
414#define GL_OES_gpu_shader5 1
415#endif /* GL_OES_gpu_shader5 */
416
417#ifndef GL_OES_mapbuffer
418#define GL_OES_mapbuffer 1
419#define GL_WRITE_ONLY_OES 0x88B9
420#define GL_BUFFER_ACCESS_OES 0x88BB
421#define GL_BUFFER_MAPPED_OES 0x88BC
422#define GL_BUFFER_MAP_POINTER_OES 0x88BD
423typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
424typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
425typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params);
426#ifdef GL_GLEXT_PROTOTYPES
427GL_APICALL void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
428GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
429GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params);
430#endif
431#endif /* GL_OES_mapbuffer */
432
433#ifndef GL_OES_packed_depth_stencil
434#define GL_OES_packed_depth_stencil 1
435#define GL_DEPTH_STENCIL_OES 0x84F9
436#define GL_UNSIGNED_INT_24_8_OES 0x84FA
437#define GL_DEPTH24_STENCIL8_OES 0x88F0
438#endif /* GL_OES_packed_depth_stencil */
439
440#ifndef GL_OES_primitive_bounding_box
441#define GL_OES_primitive_bounding_box 1
442#define GL_PRIMITIVE_BOUNDING_BOX_OES 0x92BE
443typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXOESPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
444#ifdef GL_GLEXT_PROTOTYPES
445GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxOES (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
446#endif
447#endif /* GL_OES_primitive_bounding_box */
448
449#ifndef GL_OES_required_internalformat
450#define GL_OES_required_internalformat 1
451#define GL_ALPHA8_OES 0x803C
452#define GL_DEPTH_COMPONENT16_OES 0x81A5
453#define GL_LUMINANCE4_ALPHA4_OES 0x8043
454#define GL_LUMINANCE8_ALPHA8_OES 0x8045
455#define GL_LUMINANCE8_OES 0x8040
456#define GL_RGBA4_OES 0x8056
457#define GL_RGB5_A1_OES 0x8057
458#define GL_RGB565_OES 0x8D62
459#define GL_RGB8_OES 0x8051
460#define GL_RGBA8_OES 0x8058
461#define GL_RGB10_EXT 0x8052
462#define GL_RGB10_A2_EXT 0x8059
463#endif /* GL_OES_required_internalformat */
464
465#ifndef GL_OES_rgb8_rgba8
466#define GL_OES_rgb8_rgba8 1
467#endif /* GL_OES_rgb8_rgba8 */
468
469#ifndef GL_OES_sample_shading
470#define GL_OES_sample_shading 1
471#define GL_SAMPLE_SHADING_OES 0x8C36
472#define GL_MIN_SAMPLE_SHADING_VALUE_OES 0x8C37
473typedef void (GL_APIENTRYP PFNGLMINSAMPLESHADINGOESPROC) (GLfloat value);
474#ifdef GL_GLEXT_PROTOTYPES
475GL_APICALL void GL_APIENTRY glMinSampleShadingOES (GLfloat value);
476#endif
477#endif /* GL_OES_sample_shading */
478
479#ifndef GL_OES_sample_variables
480#define GL_OES_sample_variables 1
481#endif /* GL_OES_sample_variables */
482
483#ifndef GL_OES_shader_image_atomic
484#define GL_OES_shader_image_atomic 1
485#endif /* GL_OES_shader_image_atomic */
486
487#ifndef GL_OES_shader_io_blocks
488#define GL_OES_shader_io_blocks 1
489#endif /* GL_OES_shader_io_blocks */
490
491#ifndef GL_OES_shader_multisample_interpolation
492#define GL_OES_shader_multisample_interpolation 1
493#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5B
494#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5C
495#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES 0x8E5D
496#endif /* GL_OES_shader_multisample_interpolation */
497
498#ifndef GL_OES_standard_derivatives
499#define GL_OES_standard_derivatives 1
500#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
501#endif /* GL_OES_standard_derivatives */
502
503#ifndef GL_OES_stencil1
504#define GL_OES_stencil1 1
505#define GL_STENCIL_INDEX1_OES 0x8D46
506#endif /* GL_OES_stencil1 */
507
508#ifndef GL_OES_stencil4
509#define GL_OES_stencil4 1
510#define GL_STENCIL_INDEX4_OES 0x8D47
511#endif /* GL_OES_stencil4 */
512
513#ifndef GL_OES_surfaceless_context
514#define GL_OES_surfaceless_context 1
515#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219
516#endif /* GL_OES_surfaceless_context */
517
518#ifndef GL_OES_tessellation_point_size
519#define GL_OES_tessellation_point_size 1
520#endif /* GL_OES_tessellation_point_size */
521
522#ifndef GL_OES_tessellation_shader
523#define GL_OES_tessellation_shader 1
524#define GL_PATCHES_OES 0x000E
525#define GL_PATCH_VERTICES_OES 0x8E72
526#define GL_TESS_CONTROL_OUTPUT_VERTICES_OES 0x8E75
527#define GL_TESS_GEN_MODE_OES 0x8E76
528#define GL_TESS_GEN_SPACING_OES 0x8E77
529#define GL_TESS_GEN_VERTEX_ORDER_OES 0x8E78
530#define GL_TESS_GEN_POINT_MODE_OES 0x8E79
531#define GL_ISOLINES_OES 0x8E7A
532#define GL_QUADS_OES 0x0007
533#define GL_FRACTIONAL_ODD_OES 0x8E7B
534#define GL_FRACTIONAL_EVEN_OES 0x8E7C
535#define GL_MAX_PATCH_VERTICES_OES 0x8E7D
536#define GL_MAX_TESS_GEN_LEVEL_OES 0x8E7E
537#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_OES 0x8E7F
538#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E80
539#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_OES 0x8E81
540#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_OES 0x8E82
541#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES 0x8E83
542#define GL_MAX_TESS_PATCH_COMPONENTS_OES 0x8E84
543#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_OES 0x8E85
544#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_OES 0x8E86
545#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_OES 0x8E89
546#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_OES 0x8E8A
547#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_OES 0x886C
548#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_OES 0x886D
549#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES 0x8E1E
550#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E1F
551#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES 0x92CD
552#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_OES 0x92CE
553#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES 0x92D3
554#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_OES 0x92D4
555#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_OES 0x90CB
556#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_OES 0x90CC
557#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES 0x90D8
558#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES 0x90D9
559#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED_OES 0x8221
560#define GL_IS_PER_PATCH_OES 0x92E7
561#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES 0x9307
562#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_OES 0x9308
563#define GL_TESS_CONTROL_SHADER_OES 0x8E88
564#define GL_TESS_EVALUATION_SHADER_OES 0x8E87
565#define GL_TESS_CONTROL_SHADER_BIT_OES 0x00000008
566#define GL_TESS_EVALUATION_SHADER_BIT_OES 0x00000010
567typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIOESPROC) (GLenum pname, GLint value);
568#ifdef GL_GLEXT_PROTOTYPES
569GL_APICALL void GL_APIENTRY glPatchParameteriOES (GLenum pname, GLint value);
570#endif
571#endif /* GL_OES_tessellation_shader */
572
573#ifndef GL_OES_texture_3D
574#define GL_OES_texture_3D 1
575#define GL_TEXTURE_WRAP_R_OES 0x8072
576#define GL_TEXTURE_3D_OES 0x806F
577#define GL_TEXTURE_BINDING_3D_OES 0x806A
578#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
579#define GL_SAMPLER_3D_OES 0x8B5F
580#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
581typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
582typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
583typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
584typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
585typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
586typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
587#ifdef GL_GLEXT_PROTOTYPES
588GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
589GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
590GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
591GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
592GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
593GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
594#endif
595#endif /* GL_OES_texture_3D */
596
597#ifndef GL_OES_texture_border_clamp
598#define GL_OES_texture_border_clamp 1
599#define GL_TEXTURE_BORDER_COLOR_OES 0x1004
600#define GL_CLAMP_TO_BORDER_OES 0x812D
601typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, const GLint *params);
602typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, const GLuint *params);
603typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, GLint *params);
604typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, GLuint *params);
605typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, const GLint *param);
606typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, const GLuint *param);
607typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, GLint *params);
608typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, GLuint *params);
609#ifdef GL_GLEXT_PROTOTYPES
610GL_APICALL void GL_APIENTRY glTexParameterIivOES (GLenum target, GLenum pname, const GLint *params);
611GL_APICALL void GL_APIENTRY glTexParameterIuivOES (GLenum target, GLenum pname, const GLuint *params);
612GL_APICALL void GL_APIENTRY glGetTexParameterIivOES (GLenum target, GLenum pname, GLint *params);
613GL_APICALL void GL_APIENTRY glGetTexParameterIuivOES (GLenum target, GLenum pname, GLuint *params);
614GL_APICALL void GL_APIENTRY glSamplerParameterIivOES (GLuint sampler, GLenum pname, const GLint *param);
615GL_APICALL void GL_APIENTRY glSamplerParameterIuivOES (GLuint sampler, GLenum pname, const GLuint *param);
616GL_APICALL void GL_APIENTRY glGetSamplerParameterIivOES (GLuint sampler, GLenum pname, GLint *params);
617GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivOES (GLuint sampler, GLenum pname, GLuint *params);
618#endif
619#endif /* GL_OES_texture_border_clamp */
620
621#ifndef GL_OES_texture_buffer
622#define GL_OES_texture_buffer 1
623#define GL_TEXTURE_BUFFER_OES 0x8C2A
624#define GL_TEXTURE_BUFFER_BINDING_OES 0x8C2A
625#define GL_MAX_TEXTURE_BUFFER_SIZE_OES 0x8C2B
626#define GL_TEXTURE_BINDING_BUFFER_OES 0x8C2C
627#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_OES 0x8C2D
628#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_OES 0x919F
629#define GL_SAMPLER_BUFFER_OES 0x8DC2
630#define GL_INT_SAMPLER_BUFFER_OES 0x8DD0
631#define GL_UNSIGNED_INT_SAMPLER_BUFFER_OES 0x8DD8
632#define GL_IMAGE_BUFFER_OES 0x9051
633#define GL_INT_IMAGE_BUFFER_OES 0x905C
634#define GL_UNSIGNED_INT_IMAGE_BUFFER_OES 0x9067
635#define GL_TEXTURE_BUFFER_OFFSET_OES 0x919D
636#define GL_TEXTURE_BUFFER_SIZE_OES 0x919E
637typedef void (GL_APIENTRYP PFNGLTEXBUFFEROESPROC) (GLenum target, GLenum internalformat, GLuint buffer);
638typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEOESPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
639#ifdef GL_GLEXT_PROTOTYPES
640GL_APICALL void GL_APIENTRY glTexBufferOES (GLenum target, GLenum internalformat, GLuint buffer);
641GL_APICALL void GL_APIENTRY glTexBufferRangeOES (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
642#endif
643#endif /* GL_OES_texture_buffer */
644
645#ifndef GL_OES_texture_compression_astc
646#define GL_OES_texture_compression_astc 1
647#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0
648#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1
649#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2
650#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3
651#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4
652#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5
653#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6
654#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7
655#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8
656#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9
657#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0
658#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1
659#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2
660#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3
661#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4
662#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5
663#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6
664#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7
665#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8
666#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9
667#endif /* GL_OES_texture_compression_astc */
668
669#ifndef GL_OES_texture_cube_map_array
670#define GL_OES_texture_cube_map_array 1
671#define GL_TEXTURE_CUBE_MAP_ARRAY_OES 0x9009
672#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_OES 0x900A
673#define GL_SAMPLER_CUBE_MAP_ARRAY_OES 0x900C
674#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_OES 0x900D
675#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_OES 0x900E
676#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_OES 0x900F
677#define GL_IMAGE_CUBE_MAP_ARRAY_OES 0x9054
678#define GL_INT_IMAGE_CUBE_MAP_ARRAY_OES 0x905F
679#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_OES 0x906A
680#endif /* GL_OES_texture_cube_map_array */
681
682#ifndef GL_OES_texture_float
683#define GL_OES_texture_float 1
684#endif /* GL_OES_texture_float */
685
686#ifndef GL_OES_texture_float_linear
687#define GL_OES_texture_float_linear 1
688#endif /* GL_OES_texture_float_linear */
689
690#ifndef GL_OES_texture_half_float
691#define GL_OES_texture_half_float 1
692#define GL_HALF_FLOAT_OES 0x8D61
693#endif /* GL_OES_texture_half_float */
694
695#ifndef GL_OES_texture_half_float_linear
696#define GL_OES_texture_half_float_linear 1
697#endif /* GL_OES_texture_half_float_linear */
698
699#ifndef GL_OES_texture_npot
700#define GL_OES_texture_npot 1
701#endif /* GL_OES_texture_npot */
702
703#ifndef GL_OES_texture_stencil8
704#define GL_OES_texture_stencil8 1
705#define GL_STENCIL_INDEX_OES 0x1901
706#define GL_STENCIL_INDEX8_OES 0x8D48
707#endif /* GL_OES_texture_stencil8 */
708
709#ifndef GL_OES_texture_storage_multisample_2d_array
710#define GL_OES_texture_storage_multisample_2d_array 1
711#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES 0x9102
712#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES 0x9105
713#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910B
714#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910C
715#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910D
716typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
717#ifdef GL_GLEXT_PROTOTYPES
718GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
719#endif
720#endif /* GL_OES_texture_storage_multisample_2d_array */
721
722#ifndef GL_OES_texture_view
723#define GL_OES_texture_view 1
724#define GL_TEXTURE_VIEW_MIN_LEVEL_OES 0x82DB
725#define GL_TEXTURE_VIEW_NUM_LEVELS_OES 0x82DC
726#define GL_TEXTURE_VIEW_MIN_LAYER_OES 0x82DD
727#define GL_TEXTURE_VIEW_NUM_LAYERS_OES 0x82DE
728#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
729typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWOESPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
730#ifdef GL_GLEXT_PROTOTYPES
731GL_APICALL void GL_APIENTRY glTextureViewOES (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
732#endif
733#endif /* GL_OES_texture_view */
734
735#ifndef GL_OES_vertex_array_object
736#define GL_OES_vertex_array_object 1
737#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
738typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
739typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
740typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
741typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
742#ifdef GL_GLEXT_PROTOTYPES
743GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
744GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
745GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
746GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
747#endif
748#endif /* GL_OES_vertex_array_object */
749
750#ifndef GL_OES_vertex_half_float
751#define GL_OES_vertex_half_float 1
752#endif /* GL_OES_vertex_half_float */
753
754#ifndef GL_OES_vertex_type_10_10_10_2
755#define GL_OES_vertex_type_10_10_10_2 1
756#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
757#define GL_INT_10_10_10_2_OES 0x8DF7
758#endif /* GL_OES_vertex_type_10_10_10_2 */
759
760#ifndef GL_OES_viewport_array
761#define GL_OES_viewport_array 1
762#define GL_MAX_VIEWPORTS_OES 0x825B
763#define GL_VIEWPORT_SUBPIXEL_BITS_OES 0x825C
764#define GL_VIEWPORT_BOUNDS_RANGE_OES 0x825D
765#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX_OES 0x825F
766typedef void (GL_APIENTRYP PFNGLVIEWPORTARRAYVOESPROC) (GLuint first, GLsizei count, const GLfloat *v);
767typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFOESPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
768typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFVOESPROC) (GLuint index, const GLfloat *v);
769typedef void (GL_APIENTRYP PFNGLSCISSORARRAYVOESPROC) (GLuint first, GLsizei count, const GLint *v);
770typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDOESPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
771typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDVOESPROC) (GLuint index, const GLint *v);
772typedef void (GL_APIENTRYP PFNGLDEPTHRANGEARRAYFVOESPROC) (GLuint first, GLsizei count, const GLfloat *v);
773typedef void (GL_APIENTRYP PFNGLDEPTHRANGEINDEXEDFOESPROC) (GLuint index, GLfloat n, GLfloat f);
774typedef void (GL_APIENTRYP PFNGLGETFLOATI_VOESPROC) (GLenum target, GLuint index, GLfloat *data);
775#ifdef GL_GLEXT_PROTOTYPES
776GL_APICALL void GL_APIENTRY glViewportArrayvOES (GLuint first, GLsizei count, const GLfloat *v);
777GL_APICALL void GL_APIENTRY glViewportIndexedfOES (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
778GL_APICALL void GL_APIENTRY glViewportIndexedfvOES (GLuint index, const GLfloat *v);
779GL_APICALL void GL_APIENTRY glScissorArrayvOES (GLuint first, GLsizei count, const GLint *v);
780GL_APICALL void GL_APIENTRY glScissorIndexedOES (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
781GL_APICALL void GL_APIENTRY glScissorIndexedvOES (GLuint index, const GLint *v);
782GL_APICALL void GL_APIENTRY glDepthRangeArrayfvOES (GLuint first, GLsizei count, const GLfloat *v);
783GL_APICALL void GL_APIENTRY glDepthRangeIndexedfOES (GLuint index, GLfloat n, GLfloat f);
784GL_APICALL void GL_APIENTRY glGetFloati_vOES (GLenum target, GLuint index, GLfloat *data);
785#endif
786#endif /* GL_OES_viewport_array */
787
788#ifndef GL_AMD_compressed_3DC_texture
789#define GL_AMD_compressed_3DC_texture 1
790#define GL_3DC_X_AMD 0x87F9
791#define GL_3DC_XY_AMD 0x87FA
792#endif /* GL_AMD_compressed_3DC_texture */
793
794#ifndef GL_AMD_compressed_ATC_texture
795#define GL_AMD_compressed_ATC_texture 1
796#define GL_ATC_RGB_AMD 0x8C92
797#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
798#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
799#endif /* GL_AMD_compressed_ATC_texture */
800
801#ifndef GL_AMD_framebuffer_multisample_advanced
802#define GL_AMD_framebuffer_multisample_advanced 1
803#define GL_RENDERBUFFER_STORAGE_SAMPLES_AMD 0x91B2
804#define GL_MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD 0x91B3
805#define GL_MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD 0x91B4
806#define GL_MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD 0x91B5
807#define GL_NUM_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B6
808#define GL_SUPPORTED_MULTISAMPLE_MODES_AMD 0x91B7
809typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC) (GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height);
810typedef void (GL_APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEADVANCEDAMDPROC) (GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height);
811#ifdef GL_GLEXT_PROTOTYPES
812GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAdvancedAMD (GLenum target, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height);
813GL_APICALL void GL_APIENTRY glNamedRenderbufferStorageMultisampleAdvancedAMD (GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, GLenum internalformat, GLsizei width, GLsizei height);
814#endif
815#endif /* GL_AMD_framebuffer_multisample_advanced */
816
817#ifndef GL_AMD_performance_monitor
818#define GL_AMD_performance_monitor 1
819#define GL_COUNTER_TYPE_AMD 0x8BC0
820#define GL_COUNTER_RANGE_AMD 0x8BC1
821#define GL_UNSIGNED_INT64_AMD 0x8BC2
822#define GL_PERCENTAGE_AMD 0x8BC3
823#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
824#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
825#define GL_PERFMON_RESULT_AMD 0x8BC6
826typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
827typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
828typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
829typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
830typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
831typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
832typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
833typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
834typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
835typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
836typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
837#ifdef GL_GLEXT_PROTOTYPES
838GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
839GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
840GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
841GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
842GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
843GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
844GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
845GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
846GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
847GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
848GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
849#endif
850#endif /* GL_AMD_performance_monitor */
851
852#ifndef GL_AMD_program_binary_Z400
853#define GL_AMD_program_binary_Z400 1
854#define GL_Z400_BINARY_AMD 0x8740
855#endif /* GL_AMD_program_binary_Z400 */
856
857#ifndef GL_ANDROID_extension_pack_es31a
858#define GL_ANDROID_extension_pack_es31a 1
859#endif /* GL_ANDROID_extension_pack_es31a */
860
861#ifndef GL_ANGLE_depth_texture
862#define GL_ANGLE_depth_texture 1
863#endif /* GL_ANGLE_depth_texture */
864
865#ifndef GL_ANGLE_framebuffer_blit
866#define GL_ANGLE_framebuffer_blit 1
867#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
868#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
869#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
870#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
871typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
872#ifdef GL_GLEXT_PROTOTYPES
873GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
874#endif
875#endif /* GL_ANGLE_framebuffer_blit */
876
877#ifndef GL_ANGLE_framebuffer_multisample
878#define GL_ANGLE_framebuffer_multisample 1
879#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
880#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
881#define GL_MAX_SAMPLES_ANGLE 0x8D57
882typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
883#ifdef GL_GLEXT_PROTOTYPES
884GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
885#endif
886#endif /* GL_ANGLE_framebuffer_multisample */
887
888#ifndef GL_ANGLE_instanced_arrays
889#define GL_ANGLE_instanced_arrays 1
890#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
891typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
892typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
893typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
894#ifdef GL_GLEXT_PROTOTYPES
895GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
896GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
897GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
898#endif
899#endif /* GL_ANGLE_instanced_arrays */
900
901#ifndef GL_ANGLE_pack_reverse_row_order
902#define GL_ANGLE_pack_reverse_row_order 1
903#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
904#endif /* GL_ANGLE_pack_reverse_row_order */
905
906#ifndef GL_ANGLE_program_binary
907#define GL_ANGLE_program_binary 1
908#define GL_PROGRAM_BINARY_ANGLE 0x93A6
909#endif /* GL_ANGLE_program_binary */
910
911#ifndef GL_ANGLE_texture_compression_dxt3
912#define GL_ANGLE_texture_compression_dxt3 1
913#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
914#endif /* GL_ANGLE_texture_compression_dxt3 */
915
916#ifndef GL_ANGLE_texture_compression_dxt5
917#define GL_ANGLE_texture_compression_dxt5 1
918#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
919#endif /* GL_ANGLE_texture_compression_dxt5 */
920
921#ifndef GL_ANGLE_texture_usage
922#define GL_ANGLE_texture_usage 1
923#define GL_TEXTURE_USAGE_ANGLE 0x93A2
924#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
925#endif /* GL_ANGLE_texture_usage */
926
927#ifndef GL_ANGLE_translated_shader_source
928#define GL_ANGLE_translated_shader_source 1
929#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
930typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
931#ifdef GL_GLEXT_PROTOTYPES
932GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
933#endif
934#endif /* GL_ANGLE_translated_shader_source */
935
936#ifndef GL_APPLE_clip_distance
937#define GL_APPLE_clip_distance 1
938#define GL_MAX_CLIP_DISTANCES_APPLE 0x0D32
939#define GL_CLIP_DISTANCE0_APPLE 0x3000
940#define GL_CLIP_DISTANCE1_APPLE 0x3001
941#define GL_CLIP_DISTANCE2_APPLE 0x3002
942#define GL_CLIP_DISTANCE3_APPLE 0x3003
943#define GL_CLIP_DISTANCE4_APPLE 0x3004
944#define GL_CLIP_DISTANCE5_APPLE 0x3005
945#define GL_CLIP_DISTANCE6_APPLE 0x3006
946#define GL_CLIP_DISTANCE7_APPLE 0x3007
947#endif /* GL_APPLE_clip_distance */
948
949#ifndef GL_APPLE_color_buffer_packed_float
950#define GL_APPLE_color_buffer_packed_float 1
951#endif /* GL_APPLE_color_buffer_packed_float */
952
953#ifndef GL_APPLE_copy_texture_levels
954#define GL_APPLE_copy_texture_levels 1
955typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
956#ifdef GL_GLEXT_PROTOTYPES
957GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
958#endif
959#endif /* GL_APPLE_copy_texture_levels */
960
961#ifndef GL_APPLE_framebuffer_multisample
962#define GL_APPLE_framebuffer_multisample 1
963#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
964#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
965#define GL_MAX_SAMPLES_APPLE 0x8D57
966#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
967#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
968#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
969#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
970typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
971typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
972#ifdef GL_GLEXT_PROTOTYPES
973GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
974GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
975#endif
976#endif /* GL_APPLE_framebuffer_multisample */
977
978#ifndef GL_APPLE_rgb_422
979#define GL_APPLE_rgb_422 1
980#define GL_RGB_422_APPLE 0x8A1F
981#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
982#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
983#define GL_RGB_RAW_422_APPLE 0x8A51
984#endif /* GL_APPLE_rgb_422 */
985
986#ifndef GL_APPLE_sync
987#define GL_APPLE_sync 1
988#define GL_SYNC_OBJECT_APPLE 0x8A53
989#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
990#define GL_OBJECT_TYPE_APPLE 0x9112
991#define GL_SYNC_CONDITION_APPLE 0x9113
992#define GL_SYNC_STATUS_APPLE 0x9114
993#define GL_SYNC_FLAGS_APPLE 0x9115
994#define GL_SYNC_FENCE_APPLE 0x9116
995#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
996#define GL_UNSIGNALED_APPLE 0x9118
997#define GL_SIGNALED_APPLE 0x9119
998#define GL_ALREADY_SIGNALED_APPLE 0x911A
999#define GL_TIMEOUT_EXPIRED_APPLE 0x911B
1000#define GL_CONDITION_SATISFIED_APPLE 0x911C
1001#define GL_WAIT_FAILED_APPLE 0x911D
1002#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
1003#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
1004typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
1005typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
1006typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
1007typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1008typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1009typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
1010typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
1011#ifdef GL_GLEXT_PROTOTYPES
1012GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
1013GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
1014GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
1015GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
1016GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
1017GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
1018GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
1019#endif
1020#endif /* GL_APPLE_sync */
1021
1022#ifndef GL_APPLE_texture_format_BGRA8888
1023#define GL_APPLE_texture_format_BGRA8888 1
1024#define GL_BGRA_EXT 0x80E1
1025#define GL_BGRA8_EXT 0x93A1
1026#endif /* GL_APPLE_texture_format_BGRA8888 */
1027
1028#ifndef GL_APPLE_texture_max_level
1029#define GL_APPLE_texture_max_level 1
1030#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
1031#endif /* GL_APPLE_texture_max_level */
1032
1033#ifndef GL_APPLE_texture_packed_float
1034#define GL_APPLE_texture_packed_float 1
1035#define GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE 0x8C3B
1036#define GL_UNSIGNED_INT_5_9_9_9_REV_APPLE 0x8C3E
1037#define GL_R11F_G11F_B10F_APPLE 0x8C3A
1038#define GL_RGB9_E5_APPLE 0x8C3D
1039#endif /* GL_APPLE_texture_packed_float */
1040
1041#ifndef GL_ARM_mali_program_binary
1042#define GL_ARM_mali_program_binary 1
1043#define GL_MALI_PROGRAM_BINARY_ARM 0x8F61
1044#endif /* GL_ARM_mali_program_binary */
1045
1046#ifndef GL_ARM_mali_shader_binary
1047#define GL_ARM_mali_shader_binary 1
1048#define GL_MALI_SHADER_BINARY_ARM 0x8F60
1049#endif /* GL_ARM_mali_shader_binary */
1050
1051#ifndef GL_ARM_rgba8
1052#define GL_ARM_rgba8 1
1053#endif /* GL_ARM_rgba8 */
1054
1055#ifndef GL_ARM_shader_framebuffer_fetch
1056#define GL_ARM_shader_framebuffer_fetch 1
1057#define GL_FETCH_PER_SAMPLE_ARM 0x8F65
1058#define GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM 0x8F66
1059#endif /* GL_ARM_shader_framebuffer_fetch */
1060
1061#ifndef GL_ARM_shader_framebuffer_fetch_depth_stencil
1062#define GL_ARM_shader_framebuffer_fetch_depth_stencil 1
1063#endif /* GL_ARM_shader_framebuffer_fetch_depth_stencil */
1064
1065#ifndef GL_ARM_texture_unnormalized_coordinates
1066#define GL_ARM_texture_unnormalized_coordinates 1
1067#define GL_TEXTURE_UNNORMALIZED_COORDINATES_ARM 0x8F6A
1068#endif /* GL_ARM_texture_unnormalized_coordinates */
1069
1070#ifndef GL_DMP_program_binary
1071#define GL_DMP_program_binary 1
1072#define GL_SMAPHS30_PROGRAM_BINARY_DMP 0x9251
1073#define GL_SMAPHS_PROGRAM_BINARY_DMP 0x9252
1074#define GL_DMP_PROGRAM_BINARY_DMP 0x9253
1075#endif /* GL_DMP_program_binary */
1076
1077#ifndef GL_DMP_shader_binary
1078#define GL_DMP_shader_binary 1
1079#define GL_SHADER_BINARY_DMP 0x9250
1080#endif /* GL_DMP_shader_binary */
1081
1082#ifndef GL_EXT_EGL_image_array
1083#define GL_EXT_EGL_image_array 1
1084#endif /* GL_EXT_EGL_image_array */
1085
1086#ifndef GL_EXT_EGL_image_storage
1087#define GL_EXT_EGL_image_storage 1
1088typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC) (GLenum target, GLeglImageOES image, const GLint* attrib_list);
1089typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC) (GLuint texture, GLeglImageOES image, const GLint* attrib_list);
1090#ifdef GL_GLEXT_PROTOTYPES
1091GL_APICALL void GL_APIENTRY glEGLImageTargetTexStorageEXT (GLenum target, GLeglImageOES image, const GLint* attrib_list);
1092GL_APICALL void GL_APIENTRY glEGLImageTargetTextureStorageEXT (GLuint texture, GLeglImageOES image, const GLint* attrib_list);
1093#endif
1094#endif /* GL_EXT_EGL_image_storage */
1095
1096#ifndef GL_EXT_EGL_image_storage_compression
1097#define GL_EXT_EGL_image_storage_compression 1
1098#define GL_SURFACE_COMPRESSION_EXT 0x96C0
1099#define GL_SURFACE_COMPRESSION_FIXED_RATE_NONE_EXT 0x96C1
1100#define GL_SURFACE_COMPRESSION_FIXED_RATE_DEFAULT_EXT 0x96C2
1101#endif /* GL_EXT_EGL_image_storage_compression */
1102
1103#ifndef GL_EXT_YUV_target
1104#define GL_EXT_YUV_target 1
1105#define GL_SAMPLER_EXTERNAL_2D_Y2Y_EXT 0x8BE7
1106#endif /* GL_EXT_YUV_target */
1107
1108#ifndef GL_EXT_base_instance
1109#define GL_EXT_base_instance 1
1110typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
1111typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
1112typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
1113#ifdef GL_GLEXT_PROTOTYPES
1114GL_APICALL void GL_APIENTRY glDrawArraysInstancedBaseInstanceEXT (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
1115GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseInstanceEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
1116GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexBaseInstanceEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
1117#endif
1118#endif /* GL_EXT_base_instance */
1119
1120#ifndef GL_EXT_blend_func_extended
1121#define GL_EXT_blend_func_extended 1
1122#define GL_SRC1_COLOR_EXT 0x88F9
1123#define GL_SRC1_ALPHA_EXT 0x8589
1124#define GL_ONE_MINUS_SRC1_COLOR_EXT 0x88FA
1125#define GL_ONE_MINUS_SRC1_ALPHA_EXT 0x88FB
1126#define GL_SRC_ALPHA_SATURATE_EXT 0x0308
1127#define GL_LOCATION_INDEX_EXT 0x930F
1128#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT 0x88FC
1129typedef void (GL_APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDEXTPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
1130typedef void (GL_APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
1131typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC) (GLuint program, GLenum programInterface, const GLchar *name);
1132typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATAINDEXEXTPROC) (GLuint program, const GLchar *name);
1133#ifdef GL_GLEXT_PROTOTYPES
1134GL_APICALL void GL_APIENTRY glBindFragDataLocationIndexedEXT (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
1135GL_APICALL void GL_APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);
1136GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocationIndexEXT (GLuint program, GLenum programInterface, const GLchar *name);
1137GL_APICALL GLint GL_APIENTRY glGetFragDataIndexEXT (GLuint program, const GLchar *name);
1138#endif
1139#endif /* GL_EXT_blend_func_extended */
1140
1141#ifndef GL_EXT_blend_minmax
1142#define GL_EXT_blend_minmax 1
1143#define GL_MIN_EXT 0x8007
1144#define GL_MAX_EXT 0x8008
1145#endif /* GL_EXT_blend_minmax */
1146
1147#ifndef GL_EXT_buffer_storage
1148#define GL_EXT_buffer_storage 1
1149#define GL_MAP_READ_BIT 0x0001
1150#define GL_MAP_WRITE_BIT 0x0002
1151#define GL_MAP_PERSISTENT_BIT_EXT 0x0040
1152#define GL_MAP_COHERENT_BIT_EXT 0x0080
1153#define GL_DYNAMIC_STORAGE_BIT_EXT 0x0100
1154#define GL_CLIENT_STORAGE_BIT_EXT 0x0200
1155#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT 0x00004000
1156#define GL_BUFFER_IMMUTABLE_STORAGE_EXT 0x821F
1157#define GL_BUFFER_STORAGE_FLAGS_EXT 0x8220
1158typedef void (GL_APIENTRYP PFNGLBUFFERSTORAGEEXTPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
1159#ifdef GL_GLEXT_PROTOTYPES
1160GL_APICALL void GL_APIENTRY glBufferStorageEXT (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
1161#endif
1162#endif /* GL_EXT_buffer_storage */
1163
1164#ifndef GL_EXT_clear_texture
1165#define GL_EXT_clear_texture 1
1166typedef void (GL_APIENTRYP PFNGLCLEARTEXIMAGEEXTPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
1167typedef void (GL_APIENTRYP PFNGLCLEARTEXSUBIMAGEEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
1168#ifdef GL_GLEXT_PROTOTYPES
1169GL_APICALL void GL_APIENTRY glClearTexImageEXT (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
1170GL_APICALL void GL_APIENTRY glClearTexSubImageEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
1171#endif
1172#endif /* GL_EXT_clear_texture */
1173
1174#ifndef GL_EXT_clip_control
1175#define GL_EXT_clip_control 1
1176#define GL_LOWER_LEFT_EXT 0x8CA1
1177#define GL_UPPER_LEFT_EXT 0x8CA2
1178#define GL_NEGATIVE_ONE_TO_ONE_EXT 0x935E
1179#define GL_ZERO_TO_ONE_EXT 0x935F
1180#define GL_CLIP_ORIGIN_EXT 0x935C
1181#define GL_CLIP_DEPTH_MODE_EXT 0x935D
1182typedef void (GL_APIENTRYP PFNGLCLIPCONTROLEXTPROC) (GLenum origin, GLenum depth);
1183#ifdef GL_GLEXT_PROTOTYPES
1184GL_APICALL void GL_APIENTRY glClipControlEXT (GLenum origin, GLenum depth);
1185#endif
1186#endif /* GL_EXT_clip_control */
1187
1188#ifndef GL_EXT_clip_cull_distance
1189#define GL_EXT_clip_cull_distance 1
1190#define GL_MAX_CLIP_DISTANCES_EXT 0x0D32
1191#define GL_MAX_CULL_DISTANCES_EXT 0x82F9
1192#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES_EXT 0x82FA
1193#define GL_CLIP_DISTANCE0_EXT 0x3000
1194#define GL_CLIP_DISTANCE1_EXT 0x3001
1195#define GL_CLIP_DISTANCE2_EXT 0x3002
1196#define GL_CLIP_DISTANCE3_EXT 0x3003
1197#define GL_CLIP_DISTANCE4_EXT 0x3004
1198#define GL_CLIP_DISTANCE5_EXT 0x3005
1199#define GL_CLIP_DISTANCE6_EXT 0x3006
1200#define GL_CLIP_DISTANCE7_EXT 0x3007
1201#endif /* GL_EXT_clip_cull_distance */
1202
1203#ifndef GL_EXT_color_buffer_float
1204#define GL_EXT_color_buffer_float 1
1205#endif /* GL_EXT_color_buffer_float */
1206
1207#ifndef GL_EXT_color_buffer_half_float
1208#define GL_EXT_color_buffer_half_float 1
1209#define GL_RGBA16F_EXT 0x881A
1210#define GL_RGB16F_EXT 0x881B
1211#define GL_RG16F_EXT 0x822F
1212#define GL_R16F_EXT 0x822D
1213#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
1214#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
1215#endif /* GL_EXT_color_buffer_half_float */
1216
1217#ifndef GL_EXT_conservative_depth
1218#define GL_EXT_conservative_depth 1
1219#endif /* GL_EXT_conservative_depth */
1220
1221#ifndef GL_EXT_copy_image
1222#define GL_EXT_copy_image 1
1223typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
1224#ifdef GL_GLEXT_PROTOTYPES
1225GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
1226#endif
1227#endif /* GL_EXT_copy_image */
1228
1229#ifndef GL_EXT_debug_label
1230#define GL_EXT_debug_label 1
1231#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
1232#define GL_PROGRAM_OBJECT_EXT 0x8B40
1233#define GL_SHADER_OBJECT_EXT 0x8B48
1234#define GL_BUFFER_OBJECT_EXT 0x9151
1235#define GL_QUERY_OBJECT_EXT 0x9153
1236#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
1237#define GL_TRANSFORM_FEEDBACK 0x8E22
1238typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
1239typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
1240#ifdef GL_GLEXT_PROTOTYPES
1241GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
1242GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
1243#endif
1244#endif /* GL_EXT_debug_label */
1245
1246#ifndef GL_EXT_debug_marker
1247#define GL_EXT_debug_marker 1
1248typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
1249typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
1250typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
1251#ifdef GL_GLEXT_PROTOTYPES
1252GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
1253GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
1254GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
1255#endif
1256#endif /* GL_EXT_debug_marker */
1257
1258#ifndef GL_EXT_depth_clamp
1259#define GL_EXT_depth_clamp 1
1260#define GL_DEPTH_CLAMP_EXT 0x864F
1261#endif /* GL_EXT_depth_clamp */
1262
1263#ifndef GL_EXT_discard_framebuffer
1264#define GL_EXT_discard_framebuffer 1
1265#define GL_COLOR_EXT 0x1800
1266#define GL_DEPTH_EXT 0x1801
1267#define GL_STENCIL_EXT 0x1802
1268typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
1269#ifdef GL_GLEXT_PROTOTYPES
1270GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
1271#endif
1272#endif /* GL_EXT_discard_framebuffer */
1273
1274#ifndef GL_EXT_disjoint_timer_query
1275#define GL_EXT_disjoint_timer_query 1
1276#define GL_QUERY_COUNTER_BITS_EXT 0x8864
1277#define GL_CURRENT_QUERY_EXT 0x8865
1278#define GL_QUERY_RESULT_EXT 0x8866
1279#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
1280#define GL_TIME_ELAPSED_EXT 0x88BF
1281#define GL_TIMESTAMP_EXT 0x8E28
1282#define GL_GPU_DISJOINT_EXT 0x8FBB
1283typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
1284typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
1285typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
1286typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
1287typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
1288typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
1289typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
1290typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
1291typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
1292typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
1293typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
1294typedef void (GL_APIENTRYP PFNGLGETINTEGER64VEXTPROC) (GLenum pname, GLint64 *data);
1295#ifdef GL_GLEXT_PROTOTYPES
1296GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
1297GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
1298GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
1299GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
1300GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
1301GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);
1302GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
1303GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);
1304GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
1305GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
1306GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
1307GL_APICALL void GL_APIENTRY glGetInteger64vEXT (GLenum pname, GLint64 *data);
1308#endif
1309#endif /* GL_EXT_disjoint_timer_query */
1310
1311#ifndef GL_EXT_draw_buffers
1312#define GL_EXT_draw_buffers 1
1313#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
1314#define GL_MAX_DRAW_BUFFERS_EXT 0x8824
1315#define GL_DRAW_BUFFER0_EXT 0x8825
1316#define GL_DRAW_BUFFER1_EXT 0x8826
1317#define GL_DRAW_BUFFER2_EXT 0x8827
1318#define GL_DRAW_BUFFER3_EXT 0x8828
1319#define GL_DRAW_BUFFER4_EXT 0x8829
1320#define GL_DRAW_BUFFER5_EXT 0x882A
1321#define GL_DRAW_BUFFER6_EXT 0x882B
1322#define GL_DRAW_BUFFER7_EXT 0x882C
1323#define GL_DRAW_BUFFER8_EXT 0x882D
1324#define GL_DRAW_BUFFER9_EXT 0x882E
1325#define GL_DRAW_BUFFER10_EXT 0x882F
1326#define GL_DRAW_BUFFER11_EXT 0x8830
1327#define GL_DRAW_BUFFER12_EXT 0x8831
1328#define GL_DRAW_BUFFER13_EXT 0x8832
1329#define GL_DRAW_BUFFER14_EXT 0x8833
1330#define GL_DRAW_BUFFER15_EXT 0x8834
1331#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
1332#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
1333#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
1334#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
1335#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
1336#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
1337#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
1338#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
1339#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
1340#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
1341#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
1342#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
1343#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
1344#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
1345#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
1346#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
1347typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
1348#ifdef GL_GLEXT_PROTOTYPES
1349GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
1350#endif
1351#endif /* GL_EXT_draw_buffers */
1352
1353#ifndef GL_EXT_draw_buffers_indexed
1354#define GL_EXT_draw_buffers_indexed 1
1355typedef void (GL_APIENTRYP PFNGLENABLEIEXTPROC) (GLenum target, GLuint index);
1356typedef void (GL_APIENTRYP PFNGLDISABLEIEXTPROC) (GLenum target, GLuint index);
1357typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode);
1358typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
1359typedef void (GL_APIENTRYP PFNGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst);
1360typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
1361typedef void (GL_APIENTRYP PFNGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
1362typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIEXTPROC) (GLenum target, GLuint index);
1363#ifdef GL_GLEXT_PROTOTYPES
1364GL_APICALL void GL_APIENTRY glEnableiEXT (GLenum target, GLuint index);
1365GL_APICALL void GL_APIENTRY glDisableiEXT (GLenum target, GLuint index);
1366GL_APICALL void GL_APIENTRY glBlendEquationiEXT (GLuint buf, GLenum mode);
1367GL_APICALL void GL_APIENTRY glBlendEquationSeparateiEXT (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
1368GL_APICALL void GL_APIENTRY glBlendFunciEXT (GLuint buf, GLenum src, GLenum dst);
1369GL_APICALL void GL_APIENTRY glBlendFuncSeparateiEXT (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
1370GL_APICALL void GL_APIENTRY glColorMaskiEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
1371GL_APICALL GLboolean GL_APIENTRY glIsEnablediEXT (GLenum target, GLuint index);
1372#endif
1373#endif /* GL_EXT_draw_buffers_indexed */
1374
1375#ifndef GL_EXT_draw_elements_base_vertex
1376#define GL_EXT_draw_elements_base_vertex 1
1377typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1378typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1379typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
1380#ifdef GL_GLEXT_PROTOTYPES
1381GL_APICALL void GL_APIENTRY glDrawElementsBaseVertexEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1382GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertexEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1383GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
1384#endif
1385#endif /* GL_EXT_draw_elements_base_vertex */
1386
1387#ifndef GL_EXT_draw_instanced
1388#define GL_EXT_draw_instanced 1
1389typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
1390typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
1391#ifdef GL_GLEXT_PROTOTYPES
1392GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
1393GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
1394#endif
1395#endif /* GL_EXT_draw_instanced */
1396
1397#ifndef GL_EXT_draw_transform_feedback
1398#define GL_EXT_draw_transform_feedback 1
1399typedef void (GL_APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKEXTPROC) (GLenum mode, GLuint id);
1400typedef void (GL_APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDEXTPROC) (GLenum mode, GLuint id, GLsizei instancecount);
1401#ifdef GL_GLEXT_PROTOTYPES
1402GL_APICALL void GL_APIENTRY glDrawTransformFeedbackEXT (GLenum mode, GLuint id);
1403GL_APICALL void GL_APIENTRY glDrawTransformFeedbackInstancedEXT (GLenum mode, GLuint id, GLsizei instancecount);
1404#endif
1405#endif /* GL_EXT_draw_transform_feedback */
1406
1407#ifndef GL_EXT_external_buffer
1408#define GL_EXT_external_buffer 1
1409typedef void *GLeglClientBufferEXT;
1410typedef void (GL_APIENTRYP PFNGLBUFFERSTORAGEEXTERNALEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags);
1411typedef void (GL_APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTERNALEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags);
1412#ifdef GL_GLEXT_PROTOTYPES
1413GL_APICALL void GL_APIENTRY glBufferStorageExternalEXT (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags);
1414GL_APICALL void GL_APIENTRY glNamedBufferStorageExternalEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags);
1415#endif
1416#endif /* GL_EXT_external_buffer */
1417
1418#ifndef GL_EXT_float_blend
1419#define GL_EXT_float_blend 1
1420#endif /* GL_EXT_float_blend */
1421
1422#ifndef GL_EXT_fragment_shading_rate
1423#define GL_EXT_fragment_shading_rate 1
1424#define GL_SHADING_RATE_1X1_PIXELS_EXT 0x96A6
1425#define GL_SHADING_RATE_1X2_PIXELS_EXT 0x96A7
1426#define GL_SHADING_RATE_2X1_PIXELS_EXT 0x96A8
1427#define GL_SHADING_RATE_2X2_PIXELS_EXT 0x96A9
1428#define GL_SHADING_RATE_1X4_PIXELS_EXT 0x96AA
1429#define GL_SHADING_RATE_4X1_PIXELS_EXT 0x96AB
1430#define GL_SHADING_RATE_4X2_PIXELS_EXT 0x96AC
1431#define GL_SHADING_RATE_2X4_PIXELS_EXT 0x96AD
1432#define GL_SHADING_RATE_4X4_PIXELS_EXT 0x96AE
1433#define GL_SHADING_RATE_EXT 0x96D0
1434#define GL_SHADING_RATE_ATTACHMENT_EXT 0x96D1
1435#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT 0x96D2
1436#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT 0x96D3
1437#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT 0x96D4
1438#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT 0x96D5
1439#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT 0x96D6
1440#define GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT 0x96D7
1441#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT 0x96D8
1442#define GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT 0x96D9
1443#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT 0x96DA
1444#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT 0x96DB
1445#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT 0x96DC
1446#define GL_FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT 0x96DD
1447#define GL_FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT 0x96DE
1448#define GL_FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_DEFAULT_FRAMEBUFFER_SUPPORTED_EXT 0x96DF
1449#define GL_FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT 0x8F6F
1450typedef void (GL_APIENTRYP PFNGLGETFRAGMENTSHADINGRATESEXTPROC) (GLsizei samples, GLsizei maxCount, GLsizei *count, GLenum *shadingRates);
1451typedef void (GL_APIENTRYP PFNGLSHADINGRATEEXTPROC) (GLenum rate);
1452typedef void (GL_APIENTRYP PFNGLSHADINGRATECOMBINEROPSEXTPROC) (GLenum combinerOp0, GLenum combinerOp1);
1453typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERSHADINGRATEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint baseLayer, GLsizei numLayers, GLsizei texelWidth, GLsizei texelHeight);
1454#ifdef GL_GLEXT_PROTOTYPES
1455GL_APICALL void GL_APIENTRY glGetFragmentShadingRatesEXT (GLsizei samples, GLsizei maxCount, GLsizei *count, GLenum *shadingRates);
1456GL_APICALL void GL_APIENTRY glShadingRateEXT (GLenum rate);
1457GL_APICALL void GL_APIENTRY glShadingRateCombinerOpsEXT (GLenum combinerOp0, GLenum combinerOp1);
1458GL_APICALL void GL_APIENTRY glFramebufferShadingRateEXT (GLenum target, GLenum attachment, GLuint texture, GLint baseLayer, GLsizei numLayers, GLsizei texelWidth, GLsizei texelHeight);
1459#endif
1460#endif /* GL_EXT_fragment_shading_rate */
1461
1462#ifndef GL_EXT_geometry_point_size
1463#define GL_EXT_geometry_point_size 1
1464#endif /* GL_EXT_geometry_point_size */
1465
1466#ifndef GL_EXT_geometry_shader
1467#define GL_EXT_geometry_shader 1
1468#define GL_GEOMETRY_SHADER_EXT 0x8DD9
1469#define GL_GEOMETRY_SHADER_BIT_EXT 0x00000004
1470#define GL_GEOMETRY_LINKED_VERTICES_OUT_EXT 0x8916
1471#define GL_GEOMETRY_LINKED_INPUT_TYPE_EXT 0x8917
1472#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT 0x8918
1473#define GL_GEOMETRY_SHADER_INVOCATIONS_EXT 0x887F
1474#define GL_LAYER_PROVOKING_VERTEX_EXT 0x825E
1475#define GL_LINES_ADJACENCY_EXT 0x000A
1476#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
1477#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
1478#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
1479#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
1480#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT 0x8A2C
1481#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8A32
1482#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT 0x9123
1483#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT 0x9124
1484#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
1485#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
1486#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT 0x8E5A
1487#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
1488#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT 0x92CF
1489#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT 0x92D5
1490#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT 0x90CD
1491#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT 0x90D7
1492#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
1493#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
1494#define GL_UNDEFINED_VERTEX_EXT 0x8260
1495#define GL_PRIMITIVES_GENERATED_EXT 0x8C87
1496#define GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT 0x9312
1497#define GL_MAX_FRAMEBUFFER_LAYERS_EXT 0x9317
1498#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
1499#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
1500#define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309
1501typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
1502#ifdef GL_GLEXT_PROTOTYPES
1503GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
1504#endif
1505#endif /* GL_EXT_geometry_shader */
1506
1507#ifndef GL_EXT_gpu_shader5
1508#define GL_EXT_gpu_shader5 1
1509#endif /* GL_EXT_gpu_shader5 */
1510
1511#ifndef GL_EXT_instanced_arrays
1512#define GL_EXT_instanced_arrays 1
1513#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT 0x88FE
1514typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor);
1515#ifdef GL_GLEXT_PROTOTYPES
1516GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT (GLuint index, GLuint divisor);
1517#endif
1518#endif /* GL_EXT_instanced_arrays */
1519
1520#ifndef GL_EXT_map_buffer_range
1521#define GL_EXT_map_buffer_range 1
1522#define GL_MAP_READ_BIT_EXT 0x0001
1523#define GL_MAP_WRITE_BIT_EXT 0x0002
1524#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
1525#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
1526#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
1527#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
1528typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1529typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
1530#ifdef GL_GLEXT_PROTOTYPES
1531GL_APICALL void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1532GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
1533#endif
1534#endif /* GL_EXT_map_buffer_range */
1535
1536#ifndef GL_EXT_memory_object
1537#define GL_EXT_memory_object 1
1538#define GL_TEXTURE_TILING_EXT 0x9580
1539#define GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581
1540#define GL_PROTECTED_MEMORY_OBJECT_EXT 0x959B
1541#define GL_NUM_TILING_TYPES_EXT 0x9582
1542#define GL_TILING_TYPES_EXT 0x9583
1543#define GL_OPTIMAL_TILING_EXT 0x9584
1544#define GL_LINEAR_TILING_EXT 0x9585
1545#define GL_NUM_DEVICE_UUIDS_EXT 0x9596
1546#define GL_DEVICE_UUID_EXT 0x9597
1547#define GL_DRIVER_UUID_EXT 0x9598
1548#define GL_UUID_SIZE_EXT 16
1549typedef void (GL_APIENTRYP PFNGLGETUNSIGNEDBYTEVEXTPROC) (GLenum pname, GLubyte *data);
1550typedef void (GL_APIENTRYP PFNGLGETUNSIGNEDBYTEI_VEXTPROC) (GLenum target, GLuint index, GLubyte *data);
1551typedef void (GL_APIENTRYP PFNGLDELETEMEMORYOBJECTSEXTPROC) (GLsizei n, const GLuint *memoryObjects);
1552typedef GLboolean (GL_APIENTRYP PFNGLISMEMORYOBJECTEXTPROC) (GLuint memoryObject);
1553typedef void (GL_APIENTRYP PFNGLCREATEMEMORYOBJECTSEXTPROC) (GLsizei n, GLuint *memoryObjects);
1554typedef void (GL_APIENTRYP PFNGLMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, const GLint *params);
1555typedef void (GL_APIENTRYP PFNGLGETMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, GLint *params);
1556typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset);
1557typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM2DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
1558typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset);
1559typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM3DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
1560typedef void (GL_APIENTRYP PFNGLBUFFERSTORAGEMEMEXTPROC) (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset);
1561typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM2DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset);
1562typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM2DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
1563typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM3DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset);
1564typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM3DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
1565typedef void (GL_APIENTRYP PFNGLNAMEDBUFFERSTORAGEMEMEXTPROC) (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset);
1566#ifdef GL_GLEXT_PROTOTYPES
1567GL_APICALL void GL_APIENTRY glGetUnsignedBytevEXT (GLenum pname, GLubyte *data);
1568GL_APICALL void GL_APIENTRY glGetUnsignedBytei_vEXT (GLenum target, GLuint index, GLubyte *data);
1569GL_APICALL void GL_APIENTRY glDeleteMemoryObjectsEXT (GLsizei n, const GLuint *memoryObjects);
1570GL_APICALL GLboolean GL_APIENTRY glIsMemoryObjectEXT (GLuint memoryObject);
1571GL_APICALL void GL_APIENTRY glCreateMemoryObjectsEXT (GLsizei n, GLuint *memoryObjects);
1572GL_APICALL void GL_APIENTRY glMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, const GLint *params);
1573GL_APICALL void GL_APIENTRY glGetMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, GLint *params);
1574GL_APICALL void GL_APIENTRY glTexStorageMem2DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset);
1575GL_APICALL void GL_APIENTRY glTexStorageMem2DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
1576GL_APICALL void GL_APIENTRY glTexStorageMem3DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset);
1577GL_APICALL void GL_APIENTRY glTexStorageMem3DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
1578GL_APICALL void GL_APIENTRY glBufferStorageMemEXT (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset);
1579GL_APICALL void GL_APIENTRY glTextureStorageMem2DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset);
1580GL_APICALL void GL_APIENTRY glTextureStorageMem2DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
1581GL_APICALL void GL_APIENTRY glTextureStorageMem3DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset);
1582GL_APICALL void GL_APIENTRY glTextureStorageMem3DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset);
1583GL_APICALL void GL_APIENTRY glNamedBufferStorageMemEXT (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset);
1584#endif
1585#endif /* GL_EXT_memory_object */
1586
1587#ifndef GL_EXT_memory_object_fd
1588#define GL_EXT_memory_object_fd 1
1589#define GL_HANDLE_TYPE_OPAQUE_FD_EXT 0x9586
1590typedef void (GL_APIENTRYP PFNGLIMPORTMEMORYFDEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, GLint fd);
1591#ifdef GL_GLEXT_PROTOTYPES
1592GL_APICALL void GL_APIENTRY glImportMemoryFdEXT (GLuint memory, GLuint64 size, GLenum handleType, GLint fd);
1593#endif
1594#endif /* GL_EXT_memory_object_fd */
1595
1596#ifndef GL_EXT_memory_object_win32
1597#define GL_EXT_memory_object_win32 1
1598#define GL_HANDLE_TYPE_OPAQUE_WIN32_EXT 0x9587
1599#define GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT 0x9588
1600#define GL_DEVICE_LUID_EXT 0x9599
1601#define GL_DEVICE_NODE_MASK_EXT 0x959A
1602#define GL_LUID_SIZE_EXT 8
1603#define GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT 0x9589
1604#define GL_HANDLE_TYPE_D3D12_RESOURCE_EXT 0x958A
1605#define GL_HANDLE_TYPE_D3D11_IMAGE_EXT 0x958B
1606#define GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT 0x958C
1607typedef void (GL_APIENTRYP PFNGLIMPORTMEMORYWIN32HANDLEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, void *handle);
1608typedef void (GL_APIENTRYP PFNGLIMPORTMEMORYWIN32NAMEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, const void *name);
1609#ifdef GL_GLEXT_PROTOTYPES
1610GL_APICALL void GL_APIENTRY glImportMemoryWin32HandleEXT (GLuint memory, GLuint64 size, GLenum handleType, void *handle);
1611GL_APICALL void GL_APIENTRY glImportMemoryWin32NameEXT (GLuint memory, GLuint64 size, GLenum handleType, const void *name);
1612#endif
1613#endif /* GL_EXT_memory_object_win32 */
1614
1615#ifndef GL_EXT_multi_draw_arrays
1616#define GL_EXT_multi_draw_arrays 1
1617typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
1618typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
1619#ifdef GL_GLEXT_PROTOTYPES
1620GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
1621GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
1622#endif
1623#endif /* GL_EXT_multi_draw_arrays */
1624
1625#ifndef GL_EXT_multi_draw_indirect
1626#define GL_EXT_multi_draw_indirect 1
1627typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTEXTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
1628typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTEXTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
1629#ifdef GL_GLEXT_PROTOTYPES
1630GL_APICALL void GL_APIENTRY glMultiDrawArraysIndirectEXT (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
1631GL_APICALL void GL_APIENTRY glMultiDrawElementsIndirectEXT (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
1632#endif
1633#endif /* GL_EXT_multi_draw_indirect */
1634
1635#ifndef GL_EXT_multisampled_compatibility
1636#define GL_EXT_multisampled_compatibility 1
1637#define GL_MULTISAMPLE_EXT 0x809D
1638#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
1639#endif /* GL_EXT_multisampled_compatibility */
1640
1641#ifndef GL_EXT_multisampled_render_to_texture
1642#define GL_EXT_multisampled_render_to_texture 1
1643#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
1644#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
1645#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
1646#define GL_MAX_SAMPLES_EXT 0x8D57
1647typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1648typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1649#ifdef GL_GLEXT_PROTOTYPES
1650GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1651GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1652#endif
1653#endif /* GL_EXT_multisampled_render_to_texture */
1654
1655#ifndef GL_EXT_multisampled_render_to_texture2
1656#define GL_EXT_multisampled_render_to_texture2 1
1657#endif /* GL_EXT_multisampled_render_to_texture2 */
1658
1659#ifndef GL_EXT_multiview_draw_buffers
1660#define GL_EXT_multiview_draw_buffers 1
1661#define GL_COLOR_ATTACHMENT_EXT 0x90F0
1662#define GL_MULTIVIEW_EXT 0x90F1
1663#define GL_DRAW_BUFFER_EXT 0x0C01
1664#define GL_READ_BUFFER_EXT 0x0C02
1665#define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2
1666typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
1667typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
1668typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
1669#ifdef GL_GLEXT_PROTOTYPES
1670GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
1671GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
1672GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
1673#endif
1674#endif /* GL_EXT_multiview_draw_buffers */
1675
1676#ifndef GL_EXT_multiview_tessellation_geometry_shader
1677#define GL_EXT_multiview_tessellation_geometry_shader 1
1678#endif /* GL_EXT_multiview_tessellation_geometry_shader */
1679
1680#ifndef GL_EXT_multiview_texture_multisample
1681#define GL_EXT_multiview_texture_multisample 1
1682#endif /* GL_EXT_multiview_texture_multisample */
1683
1684#ifndef GL_EXT_multiview_timer_query
1685#define GL_EXT_multiview_timer_query 1
1686#endif /* GL_EXT_multiview_timer_query */
1687
1688#ifndef GL_EXT_occlusion_query_boolean
1689#define GL_EXT_occlusion_query_boolean 1
1690#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
1691#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
1692#endif /* GL_EXT_occlusion_query_boolean */
1693
1694#ifndef GL_EXT_polygon_offset_clamp
1695#define GL_EXT_polygon_offset_clamp 1
1696#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B
1697typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp);
1698#ifdef GL_GLEXT_PROTOTYPES
1699GL_APICALL void GL_APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp);
1700#endif
1701#endif /* GL_EXT_polygon_offset_clamp */
1702
1703#ifndef GL_EXT_post_depth_coverage
1704#define GL_EXT_post_depth_coverage 1
1705#endif /* GL_EXT_post_depth_coverage */
1706
1707#ifndef GL_EXT_primitive_bounding_box
1708#define GL_EXT_primitive_bounding_box 1
1709#define GL_PRIMITIVE_BOUNDING_BOX_EXT 0x92BE
1710typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
1711#ifdef GL_GLEXT_PROTOTYPES
1712GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
1713#endif
1714#endif /* GL_EXT_primitive_bounding_box */
1715
1716#ifndef GL_EXT_protected_textures
1717#define GL_EXT_protected_textures 1
1718#define GL_CONTEXT_FLAG_PROTECTED_CONTENT_BIT_EXT 0x00000010
1719#define GL_TEXTURE_PROTECTED_EXT 0x8BFA
1720#endif /* GL_EXT_protected_textures */
1721
1722#ifndef GL_EXT_pvrtc_sRGB
1723#define GL_EXT_pvrtc_sRGB 1
1724#define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54
1725#define GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55
1726#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56
1727#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57
1728#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0
1729#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1
1730#endif /* GL_EXT_pvrtc_sRGB */
1731
1732#ifndef GL_EXT_raster_multisample
1733#define GL_EXT_raster_multisample 1
1734#define GL_RASTER_MULTISAMPLE_EXT 0x9327
1735#define GL_RASTER_SAMPLES_EXT 0x9328
1736#define GL_MAX_RASTER_SAMPLES_EXT 0x9329
1737#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A
1738#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B
1739#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C
1740typedef void (GL_APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations);
1741#ifdef GL_GLEXT_PROTOTYPES
1742GL_APICALL void GL_APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations);
1743#endif
1744#endif /* GL_EXT_raster_multisample */
1745
1746#ifndef GL_EXT_read_format_bgra
1747#define GL_EXT_read_format_bgra 1
1748#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
1749#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
1750#endif /* GL_EXT_read_format_bgra */
1751
1752#ifndef GL_EXT_render_snorm
1753#define GL_EXT_render_snorm 1
1754#define GL_R8_SNORM 0x8F94
1755#define GL_RG8_SNORM 0x8F95
1756#define GL_RGBA8_SNORM 0x8F97
1757#define GL_R16_SNORM_EXT 0x8F98
1758#define GL_RG16_SNORM_EXT 0x8F99
1759#define GL_RGBA16_SNORM_EXT 0x8F9B
1760#endif /* GL_EXT_render_snorm */
1761
1762#ifndef GL_EXT_robustness
1763#define GL_EXT_robustness 1
1764#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
1765#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
1766#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
1767#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
1768#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
1769#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
1770#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
1771typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
1772typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
1773typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
1774typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
1775#ifdef GL_GLEXT_PROTOTYPES
1776GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
1777GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
1778GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
1779GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
1780#endif
1781#endif /* GL_EXT_robustness */
1782
1783#ifndef GL_EXT_sRGB
1784#define GL_EXT_sRGB 1
1785#define GL_SRGB_EXT 0x8C40
1786#define GL_SRGB_ALPHA_EXT 0x8C42
1787#define GL_SRGB8_ALPHA8_EXT 0x8C43
1788#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
1789#endif /* GL_EXT_sRGB */
1790
1791#ifndef GL_EXT_sRGB_write_control
1792#define GL_EXT_sRGB_write_control 1
1793#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
1794#endif /* GL_EXT_sRGB_write_control */
1795
1796#ifndef GL_EXT_semaphore
1797#define GL_EXT_semaphore 1
1798#define GL_LAYOUT_GENERAL_EXT 0x958D
1799#define GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E
1800#define GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F
1801#define GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590
1802#define GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591
1803#define GL_LAYOUT_TRANSFER_SRC_EXT 0x9592
1804#define GL_LAYOUT_TRANSFER_DST_EXT 0x9593
1805#define GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT 0x9530
1806#define GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT 0x9531
1807typedef void (GL_APIENTRYP PFNGLGENSEMAPHORESEXTPROC) (GLsizei n, GLuint *semaphores);
1808typedef void (GL_APIENTRYP PFNGLDELETESEMAPHORESEXTPROC) (GLsizei n, const GLuint *semaphores);
1809typedef GLboolean (GL_APIENTRYP PFNGLISSEMAPHOREEXTPROC) (GLuint semaphore);
1810typedef void (GL_APIENTRYP PFNGLSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, const GLuint64 *params);
1811typedef void (GL_APIENTRYP PFNGLGETSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, GLuint64 *params);
1812typedef void (GL_APIENTRYP PFNGLWAITSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts);
1813typedef void (GL_APIENTRYP PFNGLSIGNALSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts);
1814#ifdef GL_GLEXT_PROTOTYPES
1815GL_APICALL void GL_APIENTRY glGenSemaphoresEXT (GLsizei n, GLuint *semaphores);
1816GL_APICALL void GL_APIENTRY glDeleteSemaphoresEXT (GLsizei n, const GLuint *semaphores);
1817GL_APICALL GLboolean GL_APIENTRY glIsSemaphoreEXT (GLuint semaphore);
1818GL_APICALL void GL_APIENTRY glSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, const GLuint64 *params);
1819GL_APICALL void GL_APIENTRY glGetSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, GLuint64 *params);
1820GL_APICALL void GL_APIENTRY glWaitSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts);
1821GL_APICALL void GL_APIENTRY glSignalSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts);
1822#endif
1823#endif /* GL_EXT_semaphore */
1824
1825#ifndef GL_EXT_semaphore_fd
1826#define GL_EXT_semaphore_fd 1
1827typedef void (GL_APIENTRYP PFNGLIMPORTSEMAPHOREFDEXTPROC) (GLuint semaphore, GLenum handleType, GLint fd);
1828#ifdef GL_GLEXT_PROTOTYPES
1829GL_APICALL void GL_APIENTRY glImportSemaphoreFdEXT (GLuint semaphore, GLenum handleType, GLint fd);
1830#endif
1831#endif /* GL_EXT_semaphore_fd */
1832
1833#ifndef GL_EXT_semaphore_win32
1834#define GL_EXT_semaphore_win32 1
1835#define GL_HANDLE_TYPE_D3D12_FENCE_EXT 0x9594
1836#define GL_D3D12_FENCE_VALUE_EXT 0x9595
1837typedef void (GL_APIENTRYP PFNGLIMPORTSEMAPHOREWIN32HANDLEEXTPROC) (GLuint semaphore, GLenum handleType, void *handle);
1838typedef void (GL_APIENTRYP PFNGLIMPORTSEMAPHOREWIN32NAMEEXTPROC) (GLuint semaphore, GLenum handleType, const void *name);
1839#ifdef GL_GLEXT_PROTOTYPES
1840GL_APICALL void GL_APIENTRY glImportSemaphoreWin32HandleEXT (GLuint semaphore, GLenum handleType, void *handle);
1841GL_APICALL void GL_APIENTRY glImportSemaphoreWin32NameEXT (GLuint semaphore, GLenum handleType, const void *name);
1842#endif
1843#endif /* GL_EXT_semaphore_win32 */
1844
1845#ifndef GL_EXT_separate_depth_stencil
1846#define GL_EXT_separate_depth_stencil 1
1847#endif /* GL_EXT_separate_depth_stencil */
1848
1849#ifndef GL_EXT_separate_shader_objects
1850#define GL_EXT_separate_shader_objects 1
1851#define GL_ACTIVE_PROGRAM_EXT 0x8259
1852#define GL_VERTEX_SHADER_BIT_EXT 0x00000001
1853#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
1854#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
1855#define GL_PROGRAM_SEPARABLE_EXT 0x8258
1856#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
1857typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
1858typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1859typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
1860typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
1861typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
1862typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1863typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
1864typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1865typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
1866typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
1867typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1868typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
1869typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1870typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
1871typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1872typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
1873typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1874typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
1875typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1876typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
1877typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1878typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
1879typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1880typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
1881typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1882typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1883typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1884typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1885typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
1886typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1887typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
1888typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
1889typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
1890typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1891typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1892typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1893typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1894typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1895typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1896typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1897typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1898typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1899typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1900typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1901#ifdef GL_GLEXT_PROTOTYPES
1902GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
1903GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
1904GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
1905GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
1906GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
1907GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1908GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
1909GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
1910GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
1911GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
1912GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1913GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
1914GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1915GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
1916GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1917GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
1918GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1919GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
1920GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1921GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
1922GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1923GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
1924GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1925GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
1926GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1927GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1928GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1929GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1930GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
1931GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
1932GL_APICALL void GL_APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
1933GL_APICALL void GL_APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
1934GL_APICALL void GL_APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
1935GL_APICALL void GL_APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1936GL_APICALL void GL_APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
1937GL_APICALL void GL_APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
1938GL_APICALL void GL_APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
1939GL_APICALL void GL_APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
1940GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1941GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1942GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1943GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1944GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1945GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1946#endif
1947#endif /* GL_EXT_separate_shader_objects */
1948
1949#ifndef GL_EXT_shader_framebuffer_fetch
1950#define GL_EXT_shader_framebuffer_fetch 1
1951#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
1952#endif /* GL_EXT_shader_framebuffer_fetch */
1953
1954#ifndef GL_EXT_shader_framebuffer_fetch_non_coherent
1955#define GL_EXT_shader_framebuffer_fetch_non_coherent 1
1956typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFETCHBARRIEREXTPROC) (void);
1957#ifdef GL_GLEXT_PROTOTYPES
1958GL_APICALL void GL_APIENTRY glFramebufferFetchBarrierEXT (void);
1959#endif
1960#endif /* GL_EXT_shader_framebuffer_fetch_non_coherent */
1961
1962#ifndef GL_EXT_shader_group_vote
1963#define GL_EXT_shader_group_vote 1
1964#endif /* GL_EXT_shader_group_vote */
1965
1966#ifndef GL_EXT_shader_implicit_conversions
1967#define GL_EXT_shader_implicit_conversions 1
1968#endif /* GL_EXT_shader_implicit_conversions */
1969
1970#ifndef GL_EXT_shader_integer_mix
1971#define GL_EXT_shader_integer_mix 1
1972#endif /* GL_EXT_shader_integer_mix */
1973
1974#ifndef GL_EXT_shader_io_blocks
1975#define GL_EXT_shader_io_blocks 1
1976#endif /* GL_EXT_shader_io_blocks */
1977
1978#ifndef GL_EXT_shader_non_constant_global_initializers
1979#define GL_EXT_shader_non_constant_global_initializers 1
1980#endif /* GL_EXT_shader_non_constant_global_initializers */
1981
1982#ifndef GL_EXT_shader_pixel_local_storage
1983#define GL_EXT_shader_pixel_local_storage 1
1984#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63
1985#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT 0x8F67
1986#define GL_SHADER_PIXEL_LOCAL_STORAGE_EXT 0x8F64
1987#endif /* GL_EXT_shader_pixel_local_storage */
1988
1989#ifndef GL_EXT_shader_pixel_local_storage2
1990#define GL_EXT_shader_pixel_local_storage2 1
1991#define GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_FAST_SIZE_EXT 0x9650
1992#define GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_SIZE_EXT 0x9651
1993#define GL_FRAMEBUFFER_INCOMPLETE_INSUFFICIENT_SHADER_COMBINED_LOCAL_STORAGE_EXT 0x9652
1994typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target, GLsizei size);
1995typedef GLsizei (GL_APIENTRYP PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target);
1996typedef void (GL_APIENTRYP PFNGLCLEARPIXELLOCALSTORAGEUIEXTPROC) (GLsizei offset, GLsizei n, const GLuint *values);
1997#ifdef GL_GLEXT_PROTOTYPES
1998GL_APICALL void GL_APIENTRY glFramebufferPixelLocalStorageSizeEXT (GLuint target, GLsizei size);
1999GL_APICALL GLsizei GL_APIENTRY glGetFramebufferPixelLocalStorageSizeEXT (GLuint target);
2000GL_APICALL void GL_APIENTRY glClearPixelLocalStorageuiEXT (GLsizei offset, GLsizei n, const GLuint *values);
2001#endif
2002#endif /* GL_EXT_shader_pixel_local_storage2 */
2003
2004#ifndef GL_EXT_shader_samples_identical
2005#define GL_EXT_shader_samples_identical 1
2006#endif /* GL_EXT_shader_samples_identical */
2007
2008#ifndef GL_EXT_shader_texture_lod
2009#define GL_EXT_shader_texture_lod 1
2010#endif /* GL_EXT_shader_texture_lod */
2011
2012#ifndef GL_EXT_shadow_samplers
2013#define GL_EXT_shadow_samplers 1
2014#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
2015#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
2016#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
2017#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
2018#endif /* GL_EXT_shadow_samplers */
2019
2020#ifndef GL_EXT_sparse_texture
2021#define GL_EXT_sparse_texture 1
2022#define GL_TEXTURE_SPARSE_EXT 0x91A6
2023#define GL_VIRTUAL_PAGE_SIZE_INDEX_EXT 0x91A7
2024#define GL_NUM_SPARSE_LEVELS_EXT 0x91AA
2025#define GL_NUM_VIRTUAL_PAGE_SIZES_EXT 0x91A8
2026#define GL_VIRTUAL_PAGE_SIZE_X_EXT 0x9195
2027#define GL_VIRTUAL_PAGE_SIZE_Y_EXT 0x9196
2028#define GL_VIRTUAL_PAGE_SIZE_Z_EXT 0x9197
2029#define GL_TEXTURE_2D_ARRAY 0x8C1A
2030#define GL_TEXTURE_3D 0x806F
2031#define GL_MAX_SPARSE_TEXTURE_SIZE_EXT 0x9198
2032#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_EXT 0x9199
2033#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_EXT 0x919A
2034#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_EXT 0x91A9
2035typedef void (GL_APIENTRYP PFNGLTEXPAGECOMMITMENTEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
2036#ifdef GL_GLEXT_PROTOTYPES
2037GL_APICALL void GL_APIENTRY glTexPageCommitmentEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
2038#endif
2039#endif /* GL_EXT_sparse_texture */
2040
2041#ifndef GL_EXT_sparse_texture2
2042#define GL_EXT_sparse_texture2 1
2043#endif /* GL_EXT_sparse_texture2 */
2044
2045#ifndef GL_EXT_tessellation_point_size
2046#define GL_EXT_tessellation_point_size 1
2047#endif /* GL_EXT_tessellation_point_size */
2048
2049#ifndef GL_EXT_tessellation_shader
2050#define GL_EXT_tessellation_shader 1
2051#define GL_PATCHES_EXT 0x000E
2052#define GL_PATCH_VERTICES_EXT 0x8E72
2053#define GL_TESS_CONTROL_OUTPUT_VERTICES_EXT 0x8E75
2054#define GL_TESS_GEN_MODE_EXT 0x8E76
2055#define GL_TESS_GEN_SPACING_EXT 0x8E77
2056#define GL_TESS_GEN_VERTEX_ORDER_EXT 0x8E78
2057#define GL_TESS_GEN_POINT_MODE_EXT 0x8E79
2058#define GL_ISOLINES_EXT 0x8E7A
2059#define GL_QUADS_EXT 0x0007
2060#define GL_FRACTIONAL_ODD_EXT 0x8E7B
2061#define GL_FRACTIONAL_EVEN_EXT 0x8E7C
2062#define GL_MAX_PATCH_VERTICES_EXT 0x8E7D
2063#define GL_MAX_TESS_GEN_LEVEL_EXT 0x8E7E
2064#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E7F
2065#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E80
2066#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT 0x8E81
2067#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT 0x8E82
2068#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT 0x8E83
2069#define GL_MAX_TESS_PATCH_COMPONENTS_EXT 0x8E84
2070#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT 0x8E85
2071#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT 0x8E86
2072#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT 0x8E89
2073#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT 0x8E8A
2074#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT 0x886C
2075#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT 0x886D
2076#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E1E
2077#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E1F
2078#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT 0x92CD
2079#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT 0x92CE
2080#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT 0x92D3
2081#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT 0x92D4
2082#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT 0x90CB
2083#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT 0x90CC
2084#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT 0x90D8
2085#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT 0x90D9
2086#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
2087#define GL_IS_PER_PATCH_EXT 0x92E7
2088#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT 0x9307
2089#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT 0x9308
2090#define GL_TESS_CONTROL_SHADER_EXT 0x8E88
2091#define GL_TESS_EVALUATION_SHADER_EXT 0x8E87
2092#define GL_TESS_CONTROL_SHADER_BIT_EXT 0x00000008
2093#define GL_TESS_EVALUATION_SHADER_BIT_EXT 0x00000010
2094typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value);
2095#ifdef GL_GLEXT_PROTOTYPES
2096GL_APICALL void GL_APIENTRY glPatchParameteriEXT (GLenum pname, GLint value);
2097#endif
2098#endif /* GL_EXT_tessellation_shader */
2099
2100#ifndef GL_EXT_texture_border_clamp
2101#define GL_EXT_texture_border_clamp 1
2102#define GL_TEXTURE_BORDER_COLOR_EXT 0x1004
2103#define GL_CLAMP_TO_BORDER_EXT 0x812D
2104typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
2105typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
2106typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
2107typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
2108typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param);
2109typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param);
2110typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params);
2111typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params);
2112#ifdef GL_GLEXT_PROTOTYPES
2113GL_APICALL void GL_APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
2114GL_APICALL void GL_APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
2115GL_APICALL void GL_APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
2116GL_APICALL void GL_APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
2117GL_APICALL void GL_APIENTRY glSamplerParameterIivEXT (GLuint sampler, GLenum pname, const GLint *param);
2118GL_APICALL void GL_APIENTRY glSamplerParameterIuivEXT (GLuint sampler, GLenum pname, const GLuint *param);
2119GL_APICALL void GL_APIENTRY glGetSamplerParameterIivEXT (GLuint sampler, GLenum pname, GLint *params);
2120GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, GLenum pname, GLuint *params);
2121#endif
2122#endif /* GL_EXT_texture_border_clamp */
2123
2124#ifndef GL_EXT_texture_buffer
2125#define GL_EXT_texture_buffer 1
2126#define GL_TEXTURE_BUFFER_EXT 0x8C2A
2127#define GL_TEXTURE_BUFFER_BINDING_EXT 0x8C2A
2128#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
2129#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
2130#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
2131#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT 0x919F
2132#define GL_SAMPLER_BUFFER_EXT 0x8DC2
2133#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
2134#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
2135#define GL_IMAGE_BUFFER_EXT 0x9051
2136#define GL_INT_IMAGE_BUFFER_EXT 0x905C
2137#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067
2138#define GL_TEXTURE_BUFFER_OFFSET_EXT 0x919D
2139#define GL_TEXTURE_BUFFER_SIZE_EXT 0x919E
2140typedef void (GL_APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
2141typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2142#ifdef GL_GLEXT_PROTOTYPES
2143GL_APICALL void GL_APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
2144GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2145#endif
2146#endif /* GL_EXT_texture_buffer */
2147
2148#ifndef GL_EXT_texture_compression_astc_decode_mode
2149#define GL_EXT_texture_compression_astc_decode_mode 1
2150#define GL_TEXTURE_ASTC_DECODE_PRECISION_EXT 0x8F69
2151#endif /* GL_EXT_texture_compression_astc_decode_mode */
2152
2153#ifndef GL_EXT_texture_compression_bptc
2154#define GL_EXT_texture_compression_bptc 1
2155#define GL_COMPRESSED_RGBA_BPTC_UNORM_EXT 0x8E8C
2156#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT 0x8E8D
2157#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT 0x8E8E
2158#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT 0x8E8F
2159#endif /* GL_EXT_texture_compression_bptc */
2160
2161#ifndef GL_EXT_texture_compression_dxt1
2162#define GL_EXT_texture_compression_dxt1 1
2163#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
2164#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
2165#endif /* GL_EXT_texture_compression_dxt1 */
2166
2167#ifndef GL_EXT_texture_compression_rgtc
2168#define GL_EXT_texture_compression_rgtc 1
2169#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
2170#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
2171#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
2172#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
2173#endif /* GL_EXT_texture_compression_rgtc */
2174
2175#ifndef GL_EXT_texture_compression_s3tc
2176#define GL_EXT_texture_compression_s3tc 1
2177#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
2178#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
2179#endif /* GL_EXT_texture_compression_s3tc */
2180
2181#ifndef GL_EXT_texture_compression_s3tc_srgb
2182#define GL_EXT_texture_compression_s3tc_srgb 1
2183#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
2184#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
2185#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
2186#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
2187#endif /* GL_EXT_texture_compression_s3tc_srgb */
2188
2189#ifndef GL_EXT_texture_cube_map_array
2190#define GL_EXT_texture_cube_map_array 1
2191#define GL_TEXTURE_CUBE_MAP_ARRAY_EXT 0x9009
2192#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT 0x900A
2193#define GL_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900C
2194#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT 0x900D
2195#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900E
2196#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900F
2197#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
2198#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
2199#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
2200#endif /* GL_EXT_texture_cube_map_array */
2201
2202#ifndef GL_EXT_texture_filter_anisotropic
2203#define GL_EXT_texture_filter_anisotropic 1
2204#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
2205#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
2206#endif /* GL_EXT_texture_filter_anisotropic */
2207
2208#ifndef GL_EXT_texture_filter_minmax
2209#define GL_EXT_texture_filter_minmax 1
2210#define GL_TEXTURE_REDUCTION_MODE_EXT 0x9366
2211#define GL_WEIGHTED_AVERAGE_EXT 0x9367
2212#endif /* GL_EXT_texture_filter_minmax */
2213
2214#ifndef GL_EXT_texture_format_BGRA8888
2215#define GL_EXT_texture_format_BGRA8888 1
2216#endif /* GL_EXT_texture_format_BGRA8888 */
2217
2218#ifndef GL_EXT_texture_format_sRGB_override
2219#define GL_EXT_texture_format_sRGB_override 1
2220#define GL_TEXTURE_FORMAT_SRGB_OVERRIDE_EXT 0x8FBF
2221#endif /* GL_EXT_texture_format_sRGB_override */
2222
2223#ifndef GL_EXT_texture_mirror_clamp_to_edge
2224#define GL_EXT_texture_mirror_clamp_to_edge 1
2225#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
2226#endif /* GL_EXT_texture_mirror_clamp_to_edge */
2227
2228#ifndef GL_EXT_texture_norm16
2229#define GL_EXT_texture_norm16 1
2230#define GL_R16_EXT 0x822A
2231#define GL_RG16_EXT 0x822C
2232#define GL_RGBA16_EXT 0x805B
2233#define GL_RGB16_EXT 0x8054
2234#define GL_RGB16_SNORM_EXT 0x8F9A
2235#endif /* GL_EXT_texture_norm16 */
2236
2237#ifndef GL_EXT_texture_query_lod
2238#define GL_EXT_texture_query_lod 1
2239#endif /* GL_EXT_texture_query_lod */
2240
2241#ifndef GL_EXT_texture_rg
2242#define GL_EXT_texture_rg 1
2243#define GL_RED_EXT 0x1903
2244#define GL_RG_EXT 0x8227
2245#define GL_R8_EXT 0x8229
2246#define GL_RG8_EXT 0x822B
2247#endif /* GL_EXT_texture_rg */
2248
2249#ifndef GL_EXT_texture_sRGB_R8
2250#define GL_EXT_texture_sRGB_R8 1
2251#define GL_SR8_EXT 0x8FBD
2252#endif /* GL_EXT_texture_sRGB_R8 */
2253
2254#ifndef GL_EXT_texture_sRGB_RG8
2255#define GL_EXT_texture_sRGB_RG8 1
2256#define GL_SRG8_EXT 0x8FBE
2257#endif /* GL_EXT_texture_sRGB_RG8 */
2258
2259#ifndef GL_EXT_texture_sRGB_decode
2260#define GL_EXT_texture_sRGB_decode 1
2261#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
2262#define GL_DECODE_EXT 0x8A49
2263#define GL_SKIP_DECODE_EXT 0x8A4A
2264#endif /* GL_EXT_texture_sRGB_decode */
2265
2266#ifndef GL_EXT_texture_shadow_lod
2267#define GL_EXT_texture_shadow_lod 1
2268#endif /* GL_EXT_texture_shadow_lod */
2269
2270#ifndef GL_EXT_texture_storage
2271#define GL_EXT_texture_storage 1
2272#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
2273#define GL_ALPHA8_EXT 0x803C
2274#define GL_LUMINANCE8_EXT 0x8040
2275#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
2276#define GL_RGBA32F_EXT 0x8814
2277#define GL_RGB32F_EXT 0x8815
2278#define GL_ALPHA32F_EXT 0x8816
2279#define GL_LUMINANCE32F_EXT 0x8818
2280#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
2281#define GL_ALPHA16F_EXT 0x881C
2282#define GL_LUMINANCE16F_EXT 0x881E
2283#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
2284#define GL_R32F_EXT 0x822E
2285#define GL_RG32F_EXT 0x8230
2286typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2287typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2288typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2289typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2290typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2291typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2292#ifdef GL_GLEXT_PROTOTYPES
2293GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2294GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2295GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2296GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2297GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2298GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2299#endif
2300#endif /* GL_EXT_texture_storage */
2301
2302#ifndef GL_EXT_texture_storage_compression
2303#define GL_EXT_texture_storage_compression 1
2304#define GL_NUM_SURFACE_COMPRESSION_FIXED_RATES_EXT 0x8F6E
2305#define GL_SURFACE_COMPRESSION_FIXED_RATE_1BPC_EXT 0x96C4
2306#define GL_SURFACE_COMPRESSION_FIXED_RATE_2BPC_EXT 0x96C5
2307#define GL_SURFACE_COMPRESSION_FIXED_RATE_3BPC_EXT 0x96C6
2308#define GL_SURFACE_COMPRESSION_FIXED_RATE_4BPC_EXT 0x96C7
2309#define GL_SURFACE_COMPRESSION_FIXED_RATE_5BPC_EXT 0x96C8
2310#define GL_SURFACE_COMPRESSION_FIXED_RATE_6BPC_EXT 0x96C9
2311#define GL_SURFACE_COMPRESSION_FIXED_RATE_7BPC_EXT 0x96CA
2312#define GL_SURFACE_COMPRESSION_FIXED_RATE_8BPC_EXT 0x96CB
2313#define GL_SURFACE_COMPRESSION_FIXED_RATE_9BPC_EXT 0x96CC
2314#define GL_SURFACE_COMPRESSION_FIXED_RATE_10BPC_EXT 0x96CD
2315#define GL_SURFACE_COMPRESSION_FIXED_RATE_11BPC_EXT 0x96CE
2316#define GL_SURFACE_COMPRESSION_FIXED_RATE_12BPC_EXT 0x96CF
2317typedef void (GL_APIENTRYP PFNGLTEXSTORAGEATTRIBS2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, const GLint* attrib_list);
2318typedef void (GL_APIENTRYP PFNGLTEXSTORAGEATTRIBS3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, const GLint* attrib_list);
2319#ifdef GL_GLEXT_PROTOTYPES
2320GL_APICALL void GL_APIENTRY glTexStorageAttribs2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, const GLint* attrib_list);
2321GL_APICALL void GL_APIENTRY glTexStorageAttribs3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, const GLint* attrib_list);
2322#endif
2323#endif /* GL_EXT_texture_storage_compression */
2324
2325#ifndef GL_EXT_texture_type_2_10_10_10_REV
2326#define GL_EXT_texture_type_2_10_10_10_REV 1
2327#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
2328#endif /* GL_EXT_texture_type_2_10_10_10_REV */
2329
2330#ifndef GL_EXT_texture_view
2331#define GL_EXT_texture_view 1
2332#define GL_TEXTURE_VIEW_MIN_LEVEL_EXT 0x82DB
2333#define GL_TEXTURE_VIEW_NUM_LEVELS_EXT 0x82DC
2334#define GL_TEXTURE_VIEW_MIN_LAYER_EXT 0x82DD
2335#define GL_TEXTURE_VIEW_NUM_LAYERS_EXT 0x82DE
2336typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
2337#ifdef GL_GLEXT_PROTOTYPES
2338GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
2339#endif
2340#endif /* GL_EXT_texture_view */
2341
2342#ifndef GL_EXT_unpack_subimage
2343#define GL_EXT_unpack_subimage 1
2344#define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2
2345#define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3
2346#define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4
2347#endif /* GL_EXT_unpack_subimage */
2348
2349#ifndef GL_EXT_win32_keyed_mutex
2350#define GL_EXT_win32_keyed_mutex 1
2351typedef GLboolean (GL_APIENTRYP PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key, GLuint timeout);
2352typedef GLboolean (GL_APIENTRYP PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key);
2353#ifdef GL_GLEXT_PROTOTYPES
2354GL_APICALL GLboolean GL_APIENTRY glAcquireKeyedMutexWin32EXT (GLuint memory, GLuint64 key, GLuint timeout);
2355GL_APICALL GLboolean GL_APIENTRY glReleaseKeyedMutexWin32EXT (GLuint memory, GLuint64 key);
2356#endif
2357#endif /* GL_EXT_win32_keyed_mutex */
2358
2359#ifndef GL_EXT_window_rectangles
2360#define GL_EXT_window_rectangles 1
2361#define GL_INCLUSIVE_EXT 0x8F10
2362#define GL_EXCLUSIVE_EXT 0x8F11
2363#define GL_WINDOW_RECTANGLE_EXT 0x8F12
2364#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13
2365#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14
2366#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15
2367typedef void (GL_APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box);
2368#ifdef GL_GLEXT_PROTOTYPES
2369GL_APICALL void GL_APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box);
2370#endif
2371#endif /* GL_EXT_window_rectangles */
2372
2373#ifndef GL_FJ_shader_binary_GCCSO
2374#define GL_FJ_shader_binary_GCCSO 1
2375#define GL_GCCSO_SHADER_BINARY_FJ 0x9260
2376#endif /* GL_FJ_shader_binary_GCCSO */
2377
2378#ifndef GL_IMG_bindless_texture
2379#define GL_IMG_bindless_texture 1
2380typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLEIMGPROC) (GLuint texture);
2381typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEIMGPROC) (GLuint texture, GLuint sampler);
2382typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64IMGPROC) (GLint location, GLuint64 value);
2383typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64VIMGPROC) (GLint location, GLsizei count, const GLuint64 *value);
2384typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64IMGPROC) (GLuint program, GLint location, GLuint64 value);
2385typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VIMGPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
2386#ifdef GL_GLEXT_PROTOTYPES
2387GL_APICALL GLuint64 GL_APIENTRY glGetTextureHandleIMG (GLuint texture);
2388GL_APICALL GLuint64 GL_APIENTRY glGetTextureSamplerHandleIMG (GLuint texture, GLuint sampler);
2389GL_APICALL void GL_APIENTRY glUniformHandleui64IMG (GLint location, GLuint64 value);
2390GL_APICALL void GL_APIENTRY glUniformHandleui64vIMG (GLint location, GLsizei count, const GLuint64 *value);
2391GL_APICALL void GL_APIENTRY glProgramUniformHandleui64IMG (GLuint program, GLint location, GLuint64 value);
2392GL_APICALL void GL_APIENTRY glProgramUniformHandleui64vIMG (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
2393#endif
2394#endif /* GL_IMG_bindless_texture */
2395
2396#ifndef GL_IMG_framebuffer_downsample
2397#define GL_IMG_framebuffer_downsample 1
2398#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_AND_DOWNSAMPLE_IMG 0x913C
2399#define GL_NUM_DOWNSAMPLE_SCALES_IMG 0x913D
2400#define GL_DOWNSAMPLE_SCALES_IMG 0x913E
2401#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SCALE_IMG 0x913F
2402typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DDOWNSAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint xscale, GLint yscale);
2403typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERDOWNSAMPLEIMGPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer, GLint xscale, GLint yscale);
2404#ifdef GL_GLEXT_PROTOTYPES
2405GL_APICALL void GL_APIENTRY glFramebufferTexture2DDownsampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint xscale, GLint yscale);
2406GL_APICALL void GL_APIENTRY glFramebufferTextureLayerDownsampleIMG (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer, GLint xscale, GLint yscale);
2407#endif
2408#endif /* GL_IMG_framebuffer_downsample */
2409
2410#ifndef GL_IMG_multisampled_render_to_texture
2411#define GL_IMG_multisampled_render_to_texture 1
2412#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
2413#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
2414#define GL_MAX_SAMPLES_IMG 0x9135
2415#define GL_TEXTURE_SAMPLES_IMG 0x9136
2416typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
2417typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
2418#ifdef GL_GLEXT_PROTOTYPES
2419GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
2420GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
2421#endif
2422#endif /* GL_IMG_multisampled_render_to_texture */
2423
2424#ifndef GL_IMG_program_binary
2425#define GL_IMG_program_binary 1
2426#define GL_SGX_PROGRAM_BINARY_IMG 0x9130
2427#endif /* GL_IMG_program_binary */
2428
2429#ifndef GL_IMG_read_format
2430#define GL_IMG_read_format 1
2431#define GL_BGRA_IMG 0x80E1
2432#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
2433#endif /* GL_IMG_read_format */
2434
2435#ifndef GL_IMG_shader_binary
2436#define GL_IMG_shader_binary 1
2437#define GL_SGX_BINARY_IMG 0x8C0A
2438#endif /* GL_IMG_shader_binary */
2439
2440#ifndef GL_IMG_texture_compression_pvrtc
2441#define GL_IMG_texture_compression_pvrtc 1
2442#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
2443#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
2444#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
2445#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
2446#endif /* GL_IMG_texture_compression_pvrtc */
2447
2448#ifndef GL_IMG_texture_compression_pvrtc2
2449#define GL_IMG_texture_compression_pvrtc2 1
2450#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
2451#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
2452#endif /* GL_IMG_texture_compression_pvrtc2 */
2453
2454#ifndef GL_IMG_texture_filter_cubic
2455#define GL_IMG_texture_filter_cubic 1
2456#define GL_CUBIC_IMG 0x9139
2457#define GL_CUBIC_MIPMAP_NEAREST_IMG 0x913A
2458#define GL_CUBIC_MIPMAP_LINEAR_IMG 0x913B
2459#endif /* GL_IMG_texture_filter_cubic */
2460
2461#ifndef GL_INTEL_blackhole_render
2462#define GL_INTEL_blackhole_render 1
2463#define GL_BLACKHOLE_RENDER_INTEL 0x83FC
2464#endif /* GL_INTEL_blackhole_render */
2465
2466#ifndef GL_INTEL_conservative_rasterization
2467#define GL_INTEL_conservative_rasterization 1
2468#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE
2469#endif /* GL_INTEL_conservative_rasterization */
2470
2471#ifndef GL_INTEL_framebuffer_CMAA
2472#define GL_INTEL_framebuffer_CMAA 1
2473typedef void (GL_APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC) (void);
2474#ifdef GL_GLEXT_PROTOTYPES
2475GL_APICALL void GL_APIENTRY glApplyFramebufferAttachmentCMAAINTEL (void);
2476#endif
2477#endif /* GL_INTEL_framebuffer_CMAA */
2478
2479#ifndef GL_INTEL_performance_query
2480#define GL_INTEL_performance_query 1
2481#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000
2482#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001
2483#define GL_PERFQUERY_WAIT_INTEL 0x83FB
2484#define GL_PERFQUERY_FLUSH_INTEL 0x83FA
2485#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9
2486#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0
2487#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
2488#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
2489#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
2490#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4
2491#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
2492#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
2493#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
2494#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
2495#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
2496#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
2497#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
2498#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
2499#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
2500#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
2501typedef void (GL_APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
2502typedef void (GL_APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
2503typedef void (GL_APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
2504typedef void (GL_APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
2505typedef void (GL_APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
2506typedef void (GL_APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
2507typedef void (GL_APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
2508typedef void (GL_APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten);
2509typedef void (GL_APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
2510typedef void (GL_APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
2511#ifdef GL_GLEXT_PROTOTYPES
2512GL_APICALL void GL_APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
2513GL_APICALL void GL_APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
2514GL_APICALL void GL_APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
2515GL_APICALL void GL_APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
2516GL_APICALL void GL_APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
2517GL_APICALL void GL_APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
2518GL_APICALL void GL_APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
2519GL_APICALL void GL_APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten);
2520GL_APICALL void GL_APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
2521GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
2522#endif
2523#endif /* GL_INTEL_performance_query */
2524
2525#ifndef GL_MESA_bgra
2526#define GL_MESA_bgra 1
2527#define GL_BGR_EXT 0x80E0
2528#endif /* GL_MESA_bgra */
2529
2530#ifndef GL_MESA_framebuffer_flip_x
2531#define GL_MESA_framebuffer_flip_x 1
2532#define GL_FRAMEBUFFER_FLIP_X_MESA 0x8BBC
2533#endif /* GL_MESA_framebuffer_flip_x */
2534
2535#ifndef GL_MESA_framebuffer_flip_y
2536#define GL_MESA_framebuffer_flip_y 1
2537#define GL_FRAMEBUFFER_FLIP_Y_MESA 0x8BBB
2538typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPARAMETERIMESAPROC) (GLenum target, GLenum pname, GLint param);
2539typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVMESAPROC) (GLenum target, GLenum pname, GLint *params);
2540#ifdef GL_GLEXT_PROTOTYPES
2541GL_APICALL void GL_APIENTRY glFramebufferParameteriMESA (GLenum target, GLenum pname, GLint param);
2542GL_APICALL void GL_APIENTRY glGetFramebufferParameterivMESA (GLenum target, GLenum pname, GLint *params);
2543#endif
2544#endif /* GL_MESA_framebuffer_flip_y */
2545
2546#ifndef GL_MESA_framebuffer_swap_xy
2547#define GL_MESA_framebuffer_swap_xy 1
2548#define GL_FRAMEBUFFER_SWAP_XY_MESA 0x8BBD
2549#endif /* GL_MESA_framebuffer_swap_xy */
2550
2551#ifndef GL_MESA_program_binary_formats
2552#define GL_MESA_program_binary_formats 1
2553#define GL_PROGRAM_BINARY_FORMAT_MESA 0x875F
2554#endif /* GL_MESA_program_binary_formats */
2555
2556#ifndef GL_MESA_shader_integer_functions
2557#define GL_MESA_shader_integer_functions 1
2558#endif /* GL_MESA_shader_integer_functions */
2559
2560#ifndef GL_NVX_blend_equation_advanced_multi_draw_buffers
2561#define GL_NVX_blend_equation_advanced_multi_draw_buffers 1
2562#endif /* GL_NVX_blend_equation_advanced_multi_draw_buffers */
2563
2564#ifndef GL_NV_bindless_texture
2565#define GL_NV_bindless_texture 1
2566typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
2567typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
2568typedef void (GL_APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
2569typedef void (GL_APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);
2570typedef GLuint64 (GL_APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
2571typedef void (GL_APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);
2572typedef void (GL_APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);
2573typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);
2574typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);
2575typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);
2576typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
2577typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
2578typedef GLboolean (GL_APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);
2579#ifdef GL_GLEXT_PROTOTYPES
2580GL_APICALL GLuint64 GL_APIENTRY glGetTextureHandleNV (GLuint texture);
2581GL_APICALL GLuint64 GL_APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);
2582GL_APICALL void GL_APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);
2583GL_APICALL void GL_APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);
2584GL_APICALL GLuint64 GL_APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
2585GL_APICALL void GL_APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);
2586GL_APICALL void GL_APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);
2587GL_APICALL void GL_APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);
2588GL_APICALL void GL_APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);
2589GL_APICALL void GL_APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);
2590GL_APICALL void GL_APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
2591GL_APICALL GLboolean GL_APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);
2592GL_APICALL GLboolean GL_APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
2593#endif
2594#endif /* GL_NV_bindless_texture */
2595
2596#ifndef GL_NV_blend_equation_advanced
2597#define GL_NV_blend_equation_advanced 1
2598#define GL_BLEND_OVERLAP_NV 0x9281
2599#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280
2600#define GL_BLUE_NV 0x1905
2601#define GL_COLORBURN_NV 0x929A
2602#define GL_COLORDODGE_NV 0x9299
2603#define GL_CONJOINT_NV 0x9284
2604#define GL_CONTRAST_NV 0x92A1
2605#define GL_DARKEN_NV 0x9297
2606#define GL_DIFFERENCE_NV 0x929E
2607#define GL_DISJOINT_NV 0x9283
2608#define GL_DST_ATOP_NV 0x928F
2609#define GL_DST_IN_NV 0x928B
2610#define GL_DST_NV 0x9287
2611#define GL_DST_OUT_NV 0x928D
2612#define GL_DST_OVER_NV 0x9289
2613#define GL_EXCLUSION_NV 0x92A0
2614#define GL_GREEN_NV 0x1904
2615#define GL_HARDLIGHT_NV 0x929B
2616#define GL_HARDMIX_NV 0x92A9
2617#define GL_HSL_COLOR_NV 0x92AF
2618#define GL_HSL_HUE_NV 0x92AD
2619#define GL_HSL_LUMINOSITY_NV 0x92B0
2620#define GL_HSL_SATURATION_NV 0x92AE
2621#define GL_INVERT_OVG_NV 0x92B4
2622#define GL_INVERT_RGB_NV 0x92A3
2623#define GL_LIGHTEN_NV 0x9298
2624#define GL_LINEARBURN_NV 0x92A5
2625#define GL_LINEARDODGE_NV 0x92A4
2626#define GL_LINEARLIGHT_NV 0x92A7
2627#define GL_MINUS_CLAMPED_NV 0x92B3
2628#define GL_MINUS_NV 0x929F
2629#define GL_MULTIPLY_NV 0x9294
2630#define GL_OVERLAY_NV 0x9296
2631#define GL_PINLIGHT_NV 0x92A8
2632#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2
2633#define GL_PLUS_CLAMPED_NV 0x92B1
2634#define GL_PLUS_DARKER_NV 0x9292
2635#define GL_PLUS_NV 0x9291
2636#define GL_RED_NV 0x1903
2637#define GL_SCREEN_NV 0x9295
2638#define GL_SOFTLIGHT_NV 0x929C
2639#define GL_SRC_ATOP_NV 0x928E
2640#define GL_SRC_IN_NV 0x928A
2641#define GL_SRC_NV 0x9286
2642#define GL_SRC_OUT_NV 0x928C
2643#define GL_SRC_OVER_NV 0x9288
2644#define GL_UNCORRELATED_NV 0x9282
2645#define GL_VIVIDLIGHT_NV 0x92A6
2646#define GL_XOR_NV 0x1506
2647typedef void (GL_APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
2648typedef void (GL_APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
2649#ifdef GL_GLEXT_PROTOTYPES
2650GL_APICALL void GL_APIENTRY glBlendParameteriNV (GLenum pname, GLint value);
2651GL_APICALL void GL_APIENTRY glBlendBarrierNV (void);
2652#endif
2653#endif /* GL_NV_blend_equation_advanced */
2654
2655#ifndef GL_NV_blend_equation_advanced_coherent
2656#define GL_NV_blend_equation_advanced_coherent 1
2657#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285
2658#endif /* GL_NV_blend_equation_advanced_coherent */
2659
2660#ifndef GL_NV_blend_minmax_factor
2661#define GL_NV_blend_minmax_factor 1
2662#define GL_FACTOR_MIN_AMD 0x901C
2663#define GL_FACTOR_MAX_AMD 0x901D
2664#endif /* GL_NV_blend_minmax_factor */
2665
2666#ifndef GL_NV_clip_space_w_scaling
2667#define GL_NV_clip_space_w_scaling 1
2668#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C
2669#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D
2670#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E
2671typedef void (GL_APIENTRYP PFNGLVIEWPORTPOSITIONWSCALENVPROC) (GLuint index, GLfloat xcoeff, GLfloat ycoeff);
2672#ifdef GL_GLEXT_PROTOTYPES
2673GL_APICALL void GL_APIENTRY glViewportPositionWScaleNV (GLuint index, GLfloat xcoeff, GLfloat ycoeff);
2674#endif
2675#endif /* GL_NV_clip_space_w_scaling */
2676
2677#ifndef GL_NV_compute_shader_derivatives
2678#define GL_NV_compute_shader_derivatives 1
2679#endif /* GL_NV_compute_shader_derivatives */
2680
2681#ifndef GL_NV_conditional_render
2682#define GL_NV_conditional_render 1
2683#define GL_QUERY_WAIT_NV 0x8E13
2684#define GL_QUERY_NO_WAIT_NV 0x8E14
2685#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15
2686#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16
2687typedef void (GL_APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
2688typedef void (GL_APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
2689#ifdef GL_GLEXT_PROTOTYPES
2690GL_APICALL void GL_APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);
2691GL_APICALL void GL_APIENTRY glEndConditionalRenderNV (void);
2692#endif
2693#endif /* GL_NV_conditional_render */
2694
2695#ifndef GL_NV_conservative_raster
2696#define GL_NV_conservative_raster 1
2697#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346
2698#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347
2699#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348
2700#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349
2701typedef void (GL_APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits);
2702#ifdef GL_GLEXT_PROTOTYPES
2703GL_APICALL void GL_APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits);
2704#endif
2705#endif /* GL_NV_conservative_raster */
2706
2707#ifndef GL_NV_conservative_raster_pre_snap
2708#define GL_NV_conservative_raster_pre_snap 1
2709#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV 0x9550
2710#endif /* GL_NV_conservative_raster_pre_snap */
2711
2712#ifndef GL_NV_conservative_raster_pre_snap_triangles
2713#define GL_NV_conservative_raster_pre_snap_triangles 1
2714#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D
2715#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E
2716#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F
2717typedef void (GL_APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param);
2718#ifdef GL_GLEXT_PROTOTYPES
2719GL_APICALL void GL_APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param);
2720#endif
2721#endif /* GL_NV_conservative_raster_pre_snap_triangles */
2722
2723#ifndef GL_NV_copy_buffer
2724#define GL_NV_copy_buffer 1
2725#define GL_COPY_READ_BUFFER_NV 0x8F36
2726#define GL_COPY_WRITE_BUFFER_NV 0x8F37
2727typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATANVPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
2728#ifdef GL_GLEXT_PROTOTYPES
2729GL_APICALL void GL_APIENTRY glCopyBufferSubDataNV (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
2730#endif
2731#endif /* GL_NV_copy_buffer */
2732
2733#ifndef GL_NV_coverage_sample
2734#define GL_NV_coverage_sample 1
2735#define GL_COVERAGE_COMPONENT_NV 0x8ED0
2736#define GL_COVERAGE_COMPONENT4_NV 0x8ED1
2737#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
2738#define GL_COVERAGE_BUFFERS_NV 0x8ED3
2739#define GL_COVERAGE_SAMPLES_NV 0x8ED4
2740#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
2741#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
2742#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
2743#define GL_COVERAGE_BUFFER_BIT_NV 0x00008000
2744typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
2745typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
2746#ifdef GL_GLEXT_PROTOTYPES
2747GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
2748GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
2749#endif
2750#endif /* GL_NV_coverage_sample */
2751
2752#ifndef GL_NV_depth_nonlinear
2753#define GL_NV_depth_nonlinear 1
2754#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
2755#endif /* GL_NV_depth_nonlinear */
2756
2757#ifndef GL_NV_draw_buffers
2758#define GL_NV_draw_buffers 1
2759#define GL_MAX_DRAW_BUFFERS_NV 0x8824
2760#define GL_DRAW_BUFFER0_NV 0x8825
2761#define GL_DRAW_BUFFER1_NV 0x8826
2762#define GL_DRAW_BUFFER2_NV 0x8827
2763#define GL_DRAW_BUFFER3_NV 0x8828
2764#define GL_DRAW_BUFFER4_NV 0x8829
2765#define GL_DRAW_BUFFER5_NV 0x882A
2766#define GL_DRAW_BUFFER6_NV 0x882B
2767#define GL_DRAW_BUFFER7_NV 0x882C
2768#define GL_DRAW_BUFFER8_NV 0x882D
2769#define GL_DRAW_BUFFER9_NV 0x882E
2770#define GL_DRAW_BUFFER10_NV 0x882F
2771#define GL_DRAW_BUFFER11_NV 0x8830
2772#define GL_DRAW_BUFFER12_NV 0x8831
2773#define GL_DRAW_BUFFER13_NV 0x8832
2774#define GL_DRAW_BUFFER14_NV 0x8833
2775#define GL_DRAW_BUFFER15_NV 0x8834
2776#define GL_COLOR_ATTACHMENT0_NV 0x8CE0
2777#define GL_COLOR_ATTACHMENT1_NV 0x8CE1
2778#define GL_COLOR_ATTACHMENT2_NV 0x8CE2
2779#define GL_COLOR_ATTACHMENT3_NV 0x8CE3
2780#define GL_COLOR_ATTACHMENT4_NV 0x8CE4
2781#define GL_COLOR_ATTACHMENT5_NV 0x8CE5
2782#define GL_COLOR_ATTACHMENT6_NV 0x8CE6
2783#define GL_COLOR_ATTACHMENT7_NV 0x8CE7
2784#define GL_COLOR_ATTACHMENT8_NV 0x8CE8
2785#define GL_COLOR_ATTACHMENT9_NV 0x8CE9
2786#define GL_COLOR_ATTACHMENT10_NV 0x8CEA
2787#define GL_COLOR_ATTACHMENT11_NV 0x8CEB
2788#define GL_COLOR_ATTACHMENT12_NV 0x8CEC
2789#define GL_COLOR_ATTACHMENT13_NV 0x8CED
2790#define GL_COLOR_ATTACHMENT14_NV 0x8CEE
2791#define GL_COLOR_ATTACHMENT15_NV 0x8CEF
2792typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
2793#ifdef GL_GLEXT_PROTOTYPES
2794GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
2795#endif
2796#endif /* GL_NV_draw_buffers */
2797
2798#ifndef GL_NV_draw_instanced
2799#define GL_NV_draw_instanced 1
2800typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
2801typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
2802#ifdef GL_GLEXT_PROTOTYPES
2803GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
2804GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
2805#endif
2806#endif /* GL_NV_draw_instanced */
2807
2808#ifndef GL_NV_draw_vulkan_image
2809#define GL_NV_draw_vulkan_image 1
2810typedef void (GL_APIENTRY *GLVULKANPROCNV)(void);
2811typedef void (GL_APIENTRYP PFNGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
2812typedef GLVULKANPROCNV (GL_APIENTRYP PFNGLGETVKPROCADDRNVPROC) (const GLchar *name);
2813typedef void (GL_APIENTRYP PFNGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore);
2814typedef void (GL_APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore);
2815typedef void (GL_APIENTRYP PFNGLSIGNALVKFENCENVPROC) (GLuint64 vkFence);
2816#ifdef GL_GLEXT_PROTOTYPES
2817GL_APICALL void GL_APIENTRY glDrawVkImageNV (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
2818GL_APICALL GLVULKANPROCNV GL_APIENTRY glGetVkProcAddrNV (const GLchar *name);
2819GL_APICALL void GL_APIENTRY glWaitVkSemaphoreNV (GLuint64 vkSemaphore);
2820GL_APICALL void GL_APIENTRY glSignalVkSemaphoreNV (GLuint64 vkSemaphore);
2821GL_APICALL void GL_APIENTRY glSignalVkFenceNV (GLuint64 vkFence);
2822#endif
2823#endif /* GL_NV_draw_vulkan_image */
2824
2825#ifndef GL_NV_explicit_attrib_location
2826#define GL_NV_explicit_attrib_location 1
2827#endif /* GL_NV_explicit_attrib_location */
2828
2829#ifndef GL_NV_fbo_color_attachments
2830#define GL_NV_fbo_color_attachments 1
2831#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
2832#endif /* GL_NV_fbo_color_attachments */
2833
2834#ifndef GL_NV_fence
2835#define GL_NV_fence 1
2836#define GL_ALL_COMPLETED_NV 0x84F2
2837#define GL_FENCE_STATUS_NV 0x84F3
2838#define GL_FENCE_CONDITION_NV 0x84F4
2839typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
2840typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
2841typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
2842typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
2843typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
2844typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
2845typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
2846#ifdef GL_GLEXT_PROTOTYPES
2847GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
2848GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
2849GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
2850GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
2851GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
2852GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
2853GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
2854#endif
2855#endif /* GL_NV_fence */
2856
2857#ifndef GL_NV_fill_rectangle
2858#define GL_NV_fill_rectangle 1
2859#define GL_FILL_RECTANGLE_NV 0x933C
2860#endif /* GL_NV_fill_rectangle */
2861
2862#ifndef GL_NV_fragment_coverage_to_color
2863#define GL_NV_fragment_coverage_to_color 1
2864#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD
2865#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE
2866typedef void (GL_APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color);
2867#ifdef GL_GLEXT_PROTOTYPES
2868GL_APICALL void GL_APIENTRY glFragmentCoverageColorNV (GLuint color);
2869#endif
2870#endif /* GL_NV_fragment_coverage_to_color */
2871
2872#ifndef GL_NV_fragment_shader_barycentric
2873#define GL_NV_fragment_shader_barycentric 1
2874#endif /* GL_NV_fragment_shader_barycentric */
2875
2876#ifndef GL_NV_fragment_shader_interlock
2877#define GL_NV_fragment_shader_interlock 1
2878#endif /* GL_NV_fragment_shader_interlock */
2879
2880#ifndef GL_NV_framebuffer_blit
2881#define GL_NV_framebuffer_blit 1
2882#define GL_READ_FRAMEBUFFER_NV 0x8CA8
2883#define GL_DRAW_FRAMEBUFFER_NV 0x8CA9
2884#define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6
2885#define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA
2886typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
2887#ifdef GL_GLEXT_PROTOTYPES
2888GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
2889#endif
2890#endif /* GL_NV_framebuffer_blit */
2891
2892#ifndef GL_NV_framebuffer_mixed_samples
2893#define GL_NV_framebuffer_mixed_samples 1
2894#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331
2895#define GL_COLOR_SAMPLES_NV 0x8E20
2896#define GL_DEPTH_SAMPLES_NV 0x932D
2897#define GL_STENCIL_SAMPLES_NV 0x932E
2898#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F
2899#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330
2900#define GL_COVERAGE_MODULATION_NV 0x9332
2901#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333
2902typedef void (GL_APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v);
2903typedef void (GL_APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufSize, GLfloat *v);
2904typedef void (GL_APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components);
2905#ifdef GL_GLEXT_PROTOTYPES
2906GL_APICALL void GL_APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v);
2907GL_APICALL void GL_APIENTRY glGetCoverageModulationTableNV (GLsizei bufSize, GLfloat *v);
2908GL_APICALL void GL_APIENTRY glCoverageModulationNV (GLenum components);
2909#endif
2910#endif /* GL_NV_framebuffer_mixed_samples */
2911
2912#ifndef GL_NV_framebuffer_multisample
2913#define GL_NV_framebuffer_multisample 1
2914#define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB
2915#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56
2916#define GL_MAX_SAMPLES_NV 0x8D57
2917typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
2918#ifdef GL_GLEXT_PROTOTYPES
2919GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
2920#endif
2921#endif /* GL_NV_framebuffer_multisample */
2922
2923#ifndef GL_NV_generate_mipmap_sRGB
2924#define GL_NV_generate_mipmap_sRGB 1
2925#endif /* GL_NV_generate_mipmap_sRGB */
2926
2927#ifndef GL_NV_geometry_shader_passthrough
2928#define GL_NV_geometry_shader_passthrough 1
2929#endif /* GL_NV_geometry_shader_passthrough */
2930
2931#ifndef GL_NV_gpu_shader5
2932#define GL_NV_gpu_shader5 1
2933typedef khronos_int64_t GLint64EXT;
2934typedef khronos_uint64_t GLuint64EXT;
2935#define GL_INT64_NV 0x140E
2936#define GL_UNSIGNED_INT64_NV 0x140F
2937#define GL_INT8_NV 0x8FE0
2938#define GL_INT8_VEC2_NV 0x8FE1
2939#define GL_INT8_VEC3_NV 0x8FE2
2940#define GL_INT8_VEC4_NV 0x8FE3
2941#define GL_INT16_NV 0x8FE4
2942#define GL_INT16_VEC2_NV 0x8FE5
2943#define GL_INT16_VEC3_NV 0x8FE6
2944#define GL_INT16_VEC4_NV 0x8FE7
2945#define GL_INT64_VEC2_NV 0x8FE9
2946#define GL_INT64_VEC3_NV 0x8FEA
2947#define GL_INT64_VEC4_NV 0x8FEB
2948#define GL_UNSIGNED_INT8_NV 0x8FEC
2949#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED
2950#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE
2951#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF
2952#define GL_UNSIGNED_INT16_NV 0x8FF0
2953#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
2954#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
2955#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
2956#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5
2957#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6
2958#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7
2959#define GL_FLOAT16_NV 0x8FF8
2960#define GL_FLOAT16_VEC2_NV 0x8FF9
2961#define GL_FLOAT16_VEC3_NV 0x8FFA
2962#define GL_FLOAT16_VEC4_NV 0x8FFB
2963#define GL_PATCHES 0x000E
2964typedef void (GL_APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
2965typedef void (GL_APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
2966typedef void (GL_APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
2967typedef void (GL_APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
2968typedef void (GL_APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
2969typedef void (GL_APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
2970typedef void (GL_APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
2971typedef void (GL_APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
2972typedef void (GL_APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
2973typedef void (GL_APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
2974typedef void (GL_APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
2975typedef void (GL_APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
2976typedef void (GL_APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
2977typedef void (GL_APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
2978typedef void (GL_APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
2979typedef void (GL_APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
2980typedef void (GL_APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);
2981typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
2982typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
2983typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
2984typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
2985typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
2986typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
2987typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
2988typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
2989typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
2990typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
2991typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
2992typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
2993typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
2994typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
2995typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
2996typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
2997#ifdef GL_GLEXT_PROTOTYPES
2998GL_APICALL void GL_APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);
2999GL_APICALL void GL_APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);
3000GL_APICALL void GL_APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
3001GL_APICALL void GL_APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
3002GL_APICALL void GL_APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
3003GL_APICALL void GL_APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
3004GL_APICALL void GL_APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
3005GL_APICALL void GL_APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
3006GL_APICALL void GL_APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);
3007GL_APICALL void GL_APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);
3008GL_APICALL void GL_APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
3009GL_APICALL void GL_APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
3010GL_APICALL void GL_APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
3011GL_APICALL void GL_APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
3012GL_APICALL void GL_APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
3013GL_APICALL void GL_APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
3014GL_APICALL void GL_APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);
3015GL_APICALL void GL_APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);
3016GL_APICALL void GL_APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
3017GL_APICALL void GL_APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
3018GL_APICALL void GL_APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
3019GL_APICALL void GL_APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
3020GL_APICALL void GL_APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
3021GL_APICALL void GL_APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
3022GL_APICALL void GL_APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
3023GL_APICALL void GL_APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);
3024GL_APICALL void GL_APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
3025GL_APICALL void GL_APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
3026GL_APICALL void GL_APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
3027GL_APICALL void GL_APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
3028GL_APICALL void GL_APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
3029GL_APICALL void GL_APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
3030GL_APICALL void GL_APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
3031#endif
3032#endif /* GL_NV_gpu_shader5 */
3033
3034#ifndef GL_NV_image_formats
3035#define GL_NV_image_formats 1
3036#endif /* GL_NV_image_formats */
3037
3038#ifndef GL_NV_instanced_arrays
3039#define GL_NV_instanced_arrays 1
3040#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE
3041typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);
3042#ifdef GL_GLEXT_PROTOTYPES
3043GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);
3044#endif
3045#endif /* GL_NV_instanced_arrays */
3046
3047#ifndef GL_NV_internalformat_sample_query
3048#define GL_NV_internalformat_sample_query 1
3049#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
3050#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
3051#define GL_MULTISAMPLES_NV 0x9371
3052#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372
3053#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373
3054#define GL_CONFORMANT_NV 0x9374
3055typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint *params);
3056#ifdef GL_GLEXT_PROTOTYPES
3057GL_APICALL void GL_APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei count, GLint *params);
3058#endif
3059#endif /* GL_NV_internalformat_sample_query */
3060
3061#ifndef GL_NV_memory_attachment
3062#define GL_NV_memory_attachment 1
3063#define GL_ATTACHED_MEMORY_OBJECT_NV 0x95A4
3064#define GL_ATTACHED_MEMORY_OFFSET_NV 0x95A5
3065#define GL_MEMORY_ATTACHABLE_ALIGNMENT_NV 0x95A6
3066#define GL_MEMORY_ATTACHABLE_SIZE_NV 0x95A7
3067#define GL_MEMORY_ATTACHABLE_NV 0x95A8
3068#define GL_DETACHED_MEMORY_INCARNATION_NV 0x95A9
3069#define GL_DETACHED_TEXTURES_NV 0x95AA
3070#define GL_DETACHED_BUFFERS_NV 0x95AB
3071#define GL_MAX_DETACHED_TEXTURES_NV 0x95AC
3072#define GL_MAX_DETACHED_BUFFERS_NV 0x95AD
3073typedef void (GL_APIENTRYP PFNGLGETMEMORYOBJECTDETACHEDRESOURCESUIVNVPROC) (GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params);
3074typedef void (GL_APIENTRYP PFNGLRESETMEMORYOBJECTPARAMETERNVPROC) (GLuint memory, GLenum pname);
3075typedef void (GL_APIENTRYP PFNGLTEXATTACHMEMORYNVPROC) (GLenum target, GLuint memory, GLuint64 offset);
3076typedef void (GL_APIENTRYP PFNGLBUFFERATTACHMEMORYNVPROC) (GLenum target, GLuint memory, GLuint64 offset);
3077typedef void (GL_APIENTRYP PFNGLTEXTUREATTACHMEMORYNVPROC) (GLuint texture, GLuint memory, GLuint64 offset);
3078typedef void (GL_APIENTRYP PFNGLNAMEDBUFFERATTACHMEMORYNVPROC) (GLuint buffer, GLuint memory, GLuint64 offset);
3079#ifdef GL_GLEXT_PROTOTYPES
3080GL_APICALL void GL_APIENTRY glGetMemoryObjectDetachedResourcesuivNV (GLuint memory, GLenum pname, GLint first, GLsizei count, GLuint *params);
3081GL_APICALL void GL_APIENTRY glResetMemoryObjectParameterNV (GLuint memory, GLenum pname);
3082GL_APICALL void GL_APIENTRY glTexAttachMemoryNV (GLenum target, GLuint memory, GLuint64 offset);
3083GL_APICALL void GL_APIENTRY glBufferAttachMemoryNV (GLenum target, GLuint memory, GLuint64 offset);
3084GL_APICALL void GL_APIENTRY glTextureAttachMemoryNV (GLuint texture, GLuint memory, GLuint64 offset);
3085GL_APICALL void GL_APIENTRY glNamedBufferAttachMemoryNV (GLuint buffer, GLuint memory, GLuint64 offset);
3086#endif
3087#endif /* GL_NV_memory_attachment */
3088
3089#ifndef GL_NV_memory_object_sparse
3090#define GL_NV_memory_object_sparse 1
3091typedef void (GL_APIENTRYP PFNGLBUFFERPAGECOMMITMENTMEMNVPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit);
3092typedef void (GL_APIENTRYP PFNGLTEXPAGECOMMITMENTMEMNVPROC) (GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit);
3093typedef void (GL_APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTMEMNVPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit);
3094typedef void (GL_APIENTRYP PFNGLTEXTUREPAGECOMMITMENTMEMNVPROC) (GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit);
3095#ifdef GL_GLEXT_PROTOTYPES
3096GL_APICALL void GL_APIENTRY glBufferPageCommitmentMemNV (GLenum target, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit);
3097GL_APICALL void GL_APIENTRY glTexPageCommitmentMemNV (GLenum target, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit);
3098GL_APICALL void GL_APIENTRY glNamedBufferPageCommitmentMemNV (GLuint buffer, GLintptr offset, GLsizeiptr size, GLuint memory, GLuint64 memOffset, GLboolean commit);
3099GL_APICALL void GL_APIENTRY glTexturePageCommitmentMemNV (GLuint texture, GLint layer, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLboolean commit);
3100#endif
3101#endif /* GL_NV_memory_object_sparse */
3102
3103#ifndef GL_NV_mesh_shader
3104#define GL_NV_mesh_shader 1
3105#define GL_MESH_SHADER_NV 0x9559
3106#define GL_TASK_SHADER_NV 0x955A
3107#define GL_MAX_MESH_UNIFORM_BLOCKS_NV 0x8E60
3108#define GL_MAX_MESH_TEXTURE_IMAGE_UNITS_NV 0x8E61
3109#define GL_MAX_MESH_IMAGE_UNIFORMS_NV 0x8E62
3110#define GL_MAX_MESH_UNIFORM_COMPONENTS_NV 0x8E63
3111#define GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_NV 0x8E64
3112#define GL_MAX_MESH_ATOMIC_COUNTERS_NV 0x8E65
3113#define GL_MAX_MESH_SHADER_STORAGE_BLOCKS_NV 0x8E66
3114#define GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_NV 0x8E67
3115#define GL_MAX_TASK_UNIFORM_BLOCKS_NV 0x8E68
3116#define GL_MAX_TASK_TEXTURE_IMAGE_UNITS_NV 0x8E69
3117#define GL_MAX_TASK_IMAGE_UNIFORMS_NV 0x8E6A
3118#define GL_MAX_TASK_UNIFORM_COMPONENTS_NV 0x8E6B
3119#define GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_NV 0x8E6C
3120#define GL_MAX_TASK_ATOMIC_COUNTERS_NV 0x8E6D
3121#define GL_MAX_TASK_SHADER_STORAGE_BLOCKS_NV 0x8E6E
3122#define GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_NV 0x8E6F
3123#define GL_MAX_MESH_WORK_GROUP_INVOCATIONS_NV 0x95A2
3124#define GL_MAX_TASK_WORK_GROUP_INVOCATIONS_NV 0x95A3
3125#define GL_MAX_MESH_TOTAL_MEMORY_SIZE_NV 0x9536
3126#define GL_MAX_TASK_TOTAL_MEMORY_SIZE_NV 0x9537
3127#define GL_MAX_MESH_OUTPUT_VERTICES_NV 0x9538
3128#define GL_MAX_MESH_OUTPUT_PRIMITIVES_NV 0x9539
3129#define GL_MAX_TASK_OUTPUT_COUNT_NV 0x953A
3130#define GL_MAX_DRAW_MESH_TASKS_COUNT_NV 0x953D
3131#define GL_MAX_MESH_VIEWS_NV 0x9557
3132#define GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_NV 0x92DF
3133#define GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_NV 0x9543
3134#define GL_MAX_MESH_WORK_GROUP_SIZE_NV 0x953B
3135#define GL_MAX_TASK_WORK_GROUP_SIZE_NV 0x953C
3136#define GL_MESH_WORK_GROUP_SIZE_NV 0x953E
3137#define GL_TASK_WORK_GROUP_SIZE_NV 0x953F
3138#define GL_MESH_VERTICES_OUT_NV 0x9579
3139#define GL_MESH_PRIMITIVES_OUT_NV 0x957A
3140#define GL_MESH_OUTPUT_TYPE_NV 0x957B
3141#define GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_NV 0x959C
3142#define GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_NV 0x959D
3143#define GL_REFERENCED_BY_MESH_SHADER_NV 0x95A0
3144#define GL_REFERENCED_BY_TASK_SHADER_NV 0x95A1
3145#define GL_MESH_SHADER_BIT_NV 0x00000040
3146#define GL_TASK_SHADER_BIT_NV 0x00000080
3147#define GL_MESH_SUBROUTINE_NV 0x957C
3148#define GL_TASK_SUBROUTINE_NV 0x957D
3149#define GL_MESH_SUBROUTINE_UNIFORM_NV 0x957E
3150#define GL_TASK_SUBROUTINE_UNIFORM_NV 0x957F
3151#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_NV 0x959E
3152#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_NV 0x959F
3153typedef void (GL_APIENTRYP PFNGLDRAWMESHTASKSNVPROC) (GLuint first, GLuint count);
3154typedef void (GL_APIENTRYP PFNGLDRAWMESHTASKSINDIRECTNVPROC) (GLintptr indirect);
3155typedef void (GL_APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTNVPROC) (GLintptr indirect, GLsizei drawcount, GLsizei stride);
3156typedef void (GL_APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTCOUNTNVPROC) (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3157#ifdef GL_GLEXT_PROTOTYPES
3158GL_APICALL void GL_APIENTRY glDrawMeshTasksNV (GLuint first, GLuint count);
3159GL_APICALL void GL_APIENTRY glDrawMeshTasksIndirectNV (GLintptr indirect);
3160GL_APICALL void GL_APIENTRY glMultiDrawMeshTasksIndirectNV (GLintptr indirect, GLsizei drawcount, GLsizei stride);
3161GL_APICALL void GL_APIENTRY glMultiDrawMeshTasksIndirectCountNV (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3162#endif
3163#endif /* GL_NV_mesh_shader */
3164
3165#ifndef GL_NV_non_square_matrices
3166#define GL_NV_non_square_matrices 1
3167#define GL_FLOAT_MAT2x3_NV 0x8B65
3168#define GL_FLOAT_MAT2x4_NV 0x8B66
3169#define GL_FLOAT_MAT3x2_NV 0x8B67
3170#define GL_FLOAT_MAT3x4_NV 0x8B68
3171#define GL_FLOAT_MAT4x2_NV 0x8B69
3172#define GL_FLOAT_MAT4x3_NV 0x8B6A
3173typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3174typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3175typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3176typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3177typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3178typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3179#ifdef GL_GLEXT_PROTOTYPES
3180GL_APICALL void GL_APIENTRY glUniformMatrix2x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3181GL_APICALL void GL_APIENTRY glUniformMatrix3x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3182GL_APICALL void GL_APIENTRY glUniformMatrix2x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3183GL_APICALL void GL_APIENTRY glUniformMatrix4x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3184GL_APICALL void GL_APIENTRY glUniformMatrix3x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3185GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3186#endif
3187#endif /* GL_NV_non_square_matrices */
3188
3189#ifndef GL_NV_path_rendering
3190#define GL_NV_path_rendering 1
3191typedef double GLdouble;
3192#define GL_PATH_FORMAT_SVG_NV 0x9070
3193#define GL_PATH_FORMAT_PS_NV 0x9071
3194#define GL_STANDARD_FONT_NAME_NV 0x9072
3195#define GL_SYSTEM_FONT_NAME_NV 0x9073
3196#define GL_FILE_NAME_NV 0x9074
3197#define GL_PATH_STROKE_WIDTH_NV 0x9075
3198#define GL_PATH_END_CAPS_NV 0x9076
3199#define GL_PATH_INITIAL_END_CAP_NV 0x9077
3200#define GL_PATH_TERMINAL_END_CAP_NV 0x9078
3201#define GL_PATH_JOIN_STYLE_NV 0x9079
3202#define GL_PATH_MITER_LIMIT_NV 0x907A
3203#define GL_PATH_DASH_CAPS_NV 0x907B
3204#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C
3205#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D
3206#define GL_PATH_DASH_OFFSET_NV 0x907E
3207#define GL_PATH_CLIENT_LENGTH_NV 0x907F
3208#define GL_PATH_FILL_MODE_NV 0x9080
3209#define GL_PATH_FILL_MASK_NV 0x9081
3210#define GL_PATH_FILL_COVER_MODE_NV 0x9082
3211#define GL_PATH_STROKE_COVER_MODE_NV 0x9083
3212#define GL_PATH_STROKE_MASK_NV 0x9084
3213#define GL_COUNT_UP_NV 0x9088
3214#define GL_COUNT_DOWN_NV 0x9089
3215#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A
3216#define GL_CONVEX_HULL_NV 0x908B
3217#define GL_BOUNDING_BOX_NV 0x908D
3218#define GL_TRANSLATE_X_NV 0x908E
3219#define GL_TRANSLATE_Y_NV 0x908F
3220#define GL_TRANSLATE_2D_NV 0x9090
3221#define GL_TRANSLATE_3D_NV 0x9091
3222#define GL_AFFINE_2D_NV 0x9092
3223#define GL_AFFINE_3D_NV 0x9094
3224#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096
3225#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098
3226#define GL_UTF8_NV 0x909A
3227#define GL_UTF16_NV 0x909B
3228#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
3229#define GL_PATH_COMMAND_COUNT_NV 0x909D
3230#define GL_PATH_COORD_COUNT_NV 0x909E
3231#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F
3232#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0
3233#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1
3234#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2
3235#define GL_SQUARE_NV 0x90A3
3236#define GL_ROUND_NV 0x90A4
3237#define GL_TRIANGULAR_NV 0x90A5
3238#define GL_BEVEL_NV 0x90A6
3239#define GL_MITER_REVERT_NV 0x90A7
3240#define GL_MITER_TRUNCATE_NV 0x90A8
3241#define GL_SKIP_MISSING_GLYPH_NV 0x90A9
3242#define GL_USE_MISSING_GLYPH_NV 0x90AA
3243#define GL_PATH_ERROR_POSITION_NV 0x90AB
3244#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
3245#define GL_ADJACENT_PAIRS_NV 0x90AE
3246#define GL_FIRST_TO_REST_NV 0x90AF
3247#define GL_PATH_GEN_MODE_NV 0x90B0
3248#define GL_PATH_GEN_COEFF_NV 0x90B1
3249#define GL_PATH_GEN_COMPONENTS_NV 0x90B3
3250#define GL_PATH_STENCIL_FUNC_NV 0x90B7
3251#define GL_PATH_STENCIL_REF_NV 0x90B8
3252#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9
3253#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
3254#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
3255#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF
3256#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4
3257#define GL_MOVE_TO_RESETS_NV 0x90B5
3258#define GL_MOVE_TO_CONTINUES_NV 0x90B6
3259#define GL_CLOSE_PATH_NV 0x00
3260#define GL_MOVE_TO_NV 0x02
3261#define GL_RELATIVE_MOVE_TO_NV 0x03
3262#define GL_LINE_TO_NV 0x04
3263#define GL_RELATIVE_LINE_TO_NV 0x05
3264#define GL_HORIZONTAL_LINE_TO_NV 0x06
3265#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
3266#define GL_VERTICAL_LINE_TO_NV 0x08
3267#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09
3268#define GL_QUADRATIC_CURVE_TO_NV 0x0A
3269#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
3270#define GL_CUBIC_CURVE_TO_NV 0x0C
3271#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D
3272#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E
3273#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
3274#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10
3275#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
3276#define GL_SMALL_CCW_ARC_TO_NV 0x12
3277#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13
3278#define GL_SMALL_CW_ARC_TO_NV 0x14
3279#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15
3280#define GL_LARGE_CCW_ARC_TO_NV 0x16
3281#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17
3282#define GL_LARGE_CW_ARC_TO_NV 0x18
3283#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19
3284#define GL_RESTART_PATH_NV 0xF0
3285#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2
3286#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4
3287#define GL_RECT_NV 0xF6
3288#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8
3289#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA
3290#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC
3291#define GL_ARC_TO_NV 0xFE
3292#define GL_RELATIVE_ARC_TO_NV 0xFF
3293#define GL_BOLD_BIT_NV 0x01
3294#define GL_ITALIC_BIT_NV 0x02
3295#define GL_GLYPH_WIDTH_BIT_NV 0x01
3296#define GL_GLYPH_HEIGHT_BIT_NV 0x02
3297#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
3298#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
3299#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
3300#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
3301#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
3302#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
3303#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100
3304#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000
3305#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000
3306#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000
3307#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000
3308#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000
3309#define GL_FONT_ASCENDER_BIT_NV 0x00200000
3310#define GL_FONT_DESCENDER_BIT_NV 0x00400000
3311#define GL_FONT_HEIGHT_BIT_NV 0x00800000
3312#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000
3313#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000
3314#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
3315#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
3316#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
3317#define GL_ROUNDED_RECT_NV 0xE8
3318#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9
3319#define GL_ROUNDED_RECT2_NV 0xEA
3320#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB
3321#define GL_ROUNDED_RECT4_NV 0xEC
3322#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED
3323#define GL_ROUNDED_RECT8_NV 0xEE
3324#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF
3325#define GL_RELATIVE_RECT_NV 0xF7
3326#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368
3327#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369
3328#define GL_FONT_UNAVAILABLE_NV 0x936A
3329#define GL_FONT_UNINTELLIGIBLE_NV 0x936B
3330#define GL_CONIC_CURVE_TO_NV 0x1A
3331#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B
3332#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000
3333#define GL_STANDARD_FONT_FORMAT_NV 0x936C
3334#define GL_PATH_PROJECTION_NV 0x1701
3335#define GL_PATH_MODELVIEW_NV 0x1700
3336#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3
3337#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6
3338#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36
3339#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3
3340#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4
3341#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7
3342#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38
3343#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4
3344#define GL_FRAGMENT_INPUT_NV 0x936D
3345typedef GLuint (GL_APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);
3346typedef void (GL_APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
3347typedef GLboolean (GL_APIENTRYP PFNGLISPATHNVPROC) (GLuint path);
3348typedef void (GL_APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
3349typedef void (GL_APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
3350typedef void (GL_APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
3351typedef void (GL_APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
3352typedef void (GL_APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);
3353typedef void (GL_APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
3354typedef void (GL_APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
3355typedef void (GL_APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
3356typedef void (GL_APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
3357typedef void (GL_APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
3358typedef void (GL_APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
3359typedef void (GL_APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);
3360typedef void (GL_APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
3361typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);
3362typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
3363typedef void (GL_APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
3364typedef void (GL_APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
3365typedef void (GL_APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);
3366typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
3367typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
3368typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
3369typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
3370typedef void (GL_APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
3371typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
3372typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
3373typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
3374typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
3375typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);
3376typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);
3377typedef void (GL_APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);
3378typedef void (GL_APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);
3379typedef void (GL_APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);
3380typedef void (GL_APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
3381typedef void (GL_APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
3382typedef void (GL_APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
3383typedef GLboolean (GL_APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
3384typedef GLboolean (GL_APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
3385typedef GLfloat (GL_APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
3386typedef GLboolean (GL_APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
3387typedef void (GL_APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m);
3388typedef void (GL_APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
3389typedef void (GL_APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
3390typedef void (GL_APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m);
3391typedef void (GL_APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
3392typedef void (GL_APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
3393typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
3394typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode);
3395typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
3396typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
3397typedef GLenum (GL_APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint *baseAndCount);
3398typedef GLenum (GL_APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
3399typedef GLenum (GL_APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
3400typedef void (GL_APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
3401typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLfloat *params);
3402typedef void (GL_APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
3403typedef void (GL_APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);
3404typedef void (GL_APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
3405typedef void (GL_APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
3406typedef void (GL_APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);
3407typedef void (GL_APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);
3408typedef void (GL_APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
3409typedef void (GL_APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
3410typedef void (GL_APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);
3411typedef void (GL_APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);
3412typedef void (GL_APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
3413typedef void (GL_APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);
3414typedef void (GL_APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);
3415typedef void (GL_APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
3416typedef void (GL_APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
3417typedef void (GL_APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
3418typedef void (GL_APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
3419typedef void (GL_APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
3420typedef void (GL_APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
3421#ifdef GL_GLEXT_PROTOTYPES
3422GL_APICALL GLuint GL_APIENTRY glGenPathsNV (GLsizei range);
3423GL_APICALL void GL_APIENTRY glDeletePathsNV (GLuint path, GLsizei range);
3424GL_APICALL GLboolean GL_APIENTRY glIsPathNV (GLuint path);
3425GL_APICALL void GL_APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
3426GL_APICALL void GL_APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
3427GL_APICALL void GL_APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
3428GL_APICALL void GL_APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
3429GL_APICALL void GL_APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString);
3430GL_APICALL void GL_APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
3431GL_APICALL void GL_APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
3432GL_APICALL void GL_APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
3433GL_APICALL void GL_APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);
3434GL_APICALL void GL_APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
3435GL_APICALL void GL_APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
3436GL_APICALL void GL_APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);
3437GL_APICALL void GL_APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);
3438GL_APICALL void GL_APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);
3439GL_APICALL void GL_APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);
3440GL_APICALL void GL_APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
3441GL_APICALL void GL_APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);
3442GL_APICALL void GL_APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);
3443GL_APICALL void GL_APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);
3444GL_APICALL void GL_APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);
3445GL_APICALL void GL_APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
3446GL_APICALL void GL_APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
3447GL_APICALL void GL_APIENTRY glPathCoverDepthFuncNV (GLenum func);
3448GL_APICALL void GL_APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);
3449GL_APICALL void GL_APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);
3450GL_APICALL void GL_APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
3451GL_APICALL void GL_APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
3452GL_APICALL void GL_APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);
3453GL_APICALL void GL_APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);
3454GL_APICALL void GL_APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);
3455GL_APICALL void GL_APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);
3456GL_APICALL void GL_APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);
3457GL_APICALL void GL_APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
3458GL_APICALL void GL_APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
3459GL_APICALL void GL_APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
3460GL_APICALL GLboolean GL_APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);
3461GL_APICALL GLboolean GL_APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);
3462GL_APICALL GLfloat GL_APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);
3463GL_APICALL GLboolean GL_APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
3464GL_APICALL void GL_APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m);
3465GL_APICALL void GL_APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m);
3466GL_APICALL void GL_APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m);
3467GL_APICALL void GL_APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m);
3468GL_APICALL void GL_APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m);
3469GL_APICALL void GL_APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m);
3470GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
3471GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode);
3472GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
3473GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
3474GL_APICALL GLenum GL_APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint *baseAndCount);
3475GL_APICALL GLenum GL_APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
3476GL_APICALL GLenum GL_APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
3477GL_APICALL void GL_APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
3478GL_APICALL void GL_APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLfloat *params);
3479GL_APICALL void GL_APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
3480GL_APICALL void GL_APIENTRY glMatrixLoadIdentityEXT (GLenum mode);
3481GL_APICALL void GL_APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);
3482GL_APICALL void GL_APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);
3483GL_APICALL void GL_APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);
3484GL_APICALL void GL_APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);
3485GL_APICALL void GL_APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);
3486GL_APICALL void GL_APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);
3487GL_APICALL void GL_APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);
3488GL_APICALL void GL_APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);
3489GL_APICALL void GL_APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
3490GL_APICALL void GL_APIENTRY glMatrixPopEXT (GLenum mode);
3491GL_APICALL void GL_APIENTRY glMatrixPushEXT (GLenum mode);
3492GL_APICALL void GL_APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
3493GL_APICALL void GL_APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
3494GL_APICALL void GL_APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
3495GL_APICALL void GL_APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
3496GL_APICALL void GL_APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
3497GL_APICALL void GL_APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
3498#endif
3499#endif /* GL_NV_path_rendering */
3500
3501#ifndef GL_NV_path_rendering_shared_edge
3502#define GL_NV_path_rendering_shared_edge 1
3503#define GL_SHARED_EDGE_NV 0xC0
3504#endif /* GL_NV_path_rendering_shared_edge */
3505
3506#ifndef GL_NV_pixel_buffer_object
3507#define GL_NV_pixel_buffer_object 1
3508#define GL_PIXEL_PACK_BUFFER_NV 0x88EB
3509#define GL_PIXEL_UNPACK_BUFFER_NV 0x88EC
3510#define GL_PIXEL_PACK_BUFFER_BINDING_NV 0x88ED
3511#define GL_PIXEL_UNPACK_BUFFER_BINDING_NV 0x88EF
3512#endif /* GL_NV_pixel_buffer_object */
3513
3514#ifndef GL_NV_polygon_mode
3515#define GL_NV_polygon_mode 1
3516#define GL_POLYGON_MODE_NV 0x0B40
3517#define GL_POLYGON_OFFSET_POINT_NV 0x2A01
3518#define GL_POLYGON_OFFSET_LINE_NV 0x2A02
3519#define GL_POINT_NV 0x1B00
3520#define GL_LINE_NV 0x1B01
3521#define GL_FILL_NV 0x1B02
3522typedef void (GL_APIENTRYP PFNGLPOLYGONMODENVPROC) (GLenum face, GLenum mode);
3523#ifdef GL_GLEXT_PROTOTYPES
3524GL_APICALL void GL_APIENTRY glPolygonModeNV (GLenum face, GLenum mode);
3525#endif
3526#endif /* GL_NV_polygon_mode */
3527
3528#ifndef GL_NV_primitive_shading_rate
3529#define GL_NV_primitive_shading_rate 1
3530#define GL_SHADING_RATE_IMAGE_PER_PRIMITIVE_NV 0x95B1
3531#define GL_SHADING_RATE_IMAGE_PALETTE_COUNT_NV 0x95B2
3532#endif /* GL_NV_primitive_shading_rate */
3533
3534#ifndef GL_NV_read_buffer
3535#define GL_NV_read_buffer 1
3536#define GL_READ_BUFFER_NV 0x0C02
3537typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
3538#ifdef GL_GLEXT_PROTOTYPES
3539GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
3540#endif
3541#endif /* GL_NV_read_buffer */
3542
3543#ifndef GL_NV_read_buffer_front
3544#define GL_NV_read_buffer_front 1
3545#endif /* GL_NV_read_buffer_front */
3546
3547#ifndef GL_NV_read_depth
3548#define GL_NV_read_depth 1
3549#endif /* GL_NV_read_depth */
3550
3551#ifndef GL_NV_read_depth_stencil
3552#define GL_NV_read_depth_stencil 1
3553#endif /* GL_NV_read_depth_stencil */
3554
3555#ifndef GL_NV_read_stencil
3556#define GL_NV_read_stencil 1
3557#endif /* GL_NV_read_stencil */
3558
3559#ifndef GL_NV_representative_fragment_test
3560#define GL_NV_representative_fragment_test 1
3561#define GL_REPRESENTATIVE_FRAGMENT_TEST_NV 0x937F
3562#endif /* GL_NV_representative_fragment_test */
3563
3564#ifndef GL_NV_sRGB_formats
3565#define GL_NV_sRGB_formats 1
3566#define GL_SLUMINANCE_NV 0x8C46
3567#define GL_SLUMINANCE_ALPHA_NV 0x8C44
3568#define GL_SRGB8_NV 0x8C41
3569#define GL_SLUMINANCE8_NV 0x8C47
3570#define GL_SLUMINANCE8_ALPHA8_NV 0x8C45
3571#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C
3572#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D
3573#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E
3574#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F
3575#define GL_ETC1_SRGB8_NV 0x88EE
3576#endif /* GL_NV_sRGB_formats */
3577
3578#ifndef GL_NV_sample_locations
3579#define GL_NV_sample_locations 1
3580#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
3581#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E
3582#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F
3583#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340
3584#define GL_SAMPLE_LOCATION_NV 0x8E50
3585#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341
3586#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342
3587#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343
3588typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v);
3589typedef void (GL_APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
3590typedef void (GL_APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void);
3591#ifdef GL_GLEXT_PROTOTYPES
3592GL_APICALL void GL_APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v);
3593GL_APICALL void GL_APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
3594GL_APICALL void GL_APIENTRY glResolveDepthValuesNV (void);
3595#endif
3596#endif /* GL_NV_sample_locations */
3597
3598#ifndef GL_NV_sample_mask_override_coverage
3599#define GL_NV_sample_mask_override_coverage 1
3600#endif /* GL_NV_sample_mask_override_coverage */
3601
3602#ifndef GL_NV_scissor_exclusive
3603#define GL_NV_scissor_exclusive 1
3604#define GL_SCISSOR_TEST_EXCLUSIVE_NV 0x9555
3605#define GL_SCISSOR_BOX_EXCLUSIVE_NV 0x9556
3606typedef void (GL_APIENTRYP PFNGLSCISSOREXCLUSIVENVPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
3607typedef void (GL_APIENTRYP PFNGLSCISSOREXCLUSIVEARRAYVNVPROC) (GLuint first, GLsizei count, const GLint *v);
3608#ifdef GL_GLEXT_PROTOTYPES
3609GL_APICALL void GL_APIENTRY glScissorExclusiveNV (GLint x, GLint y, GLsizei width, GLsizei height);
3610GL_APICALL void GL_APIENTRY glScissorExclusiveArrayvNV (GLuint first, GLsizei count, const GLint *v);
3611#endif
3612#endif /* GL_NV_scissor_exclusive */
3613
3614#ifndef GL_NV_shader_atomic_fp16_vector
3615#define GL_NV_shader_atomic_fp16_vector 1
3616#endif /* GL_NV_shader_atomic_fp16_vector */
3617
3618#ifndef GL_NV_shader_noperspective_interpolation
3619#define GL_NV_shader_noperspective_interpolation 1
3620#endif /* GL_NV_shader_noperspective_interpolation */
3621
3622#ifndef GL_NV_shader_subgroup_partitioned
3623#define GL_NV_shader_subgroup_partitioned 1
3624#define GL_SUBGROUP_FEATURE_PARTITIONED_BIT_NV 0x00000100
3625#endif /* GL_NV_shader_subgroup_partitioned */
3626
3627#ifndef GL_NV_shader_texture_footprint
3628#define GL_NV_shader_texture_footprint 1
3629#endif /* GL_NV_shader_texture_footprint */
3630
3631#ifndef GL_NV_shading_rate_image
3632#define GL_NV_shading_rate_image 1
3633#define GL_SHADING_RATE_IMAGE_NV 0x9563
3634#define GL_SHADING_RATE_NO_INVOCATIONS_NV 0x9564
3635#define GL_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV 0x9565
3636#define GL_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV 0x9566
3637#define GL_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV 0x9567
3638#define GL_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV 0x9568
3639#define GL_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV 0x9569
3640#define GL_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV 0x956A
3641#define GL_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV 0x956B
3642#define GL_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV 0x956C
3643#define GL_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV 0x956D
3644#define GL_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV 0x956E
3645#define GL_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV 0x956F
3646#define GL_SHADING_RATE_IMAGE_BINDING_NV 0x955B
3647#define GL_SHADING_RATE_IMAGE_TEXEL_WIDTH_NV 0x955C
3648#define GL_SHADING_RATE_IMAGE_TEXEL_HEIGHT_NV 0x955D
3649#define GL_SHADING_RATE_IMAGE_PALETTE_SIZE_NV 0x955E
3650#define GL_MAX_COARSE_FRAGMENT_SAMPLES_NV 0x955F
3651#define GL_SHADING_RATE_SAMPLE_ORDER_DEFAULT_NV 0x95AE
3652#define GL_SHADING_RATE_SAMPLE_ORDER_PIXEL_MAJOR_NV 0x95AF
3653#define GL_SHADING_RATE_SAMPLE_ORDER_SAMPLE_MAJOR_NV 0x95B0
3654typedef void (GL_APIENTRYP PFNGLBINDSHADINGRATEIMAGENVPROC) (GLuint texture);
3655typedef void (GL_APIENTRYP PFNGLGETSHADINGRATEIMAGEPALETTENVPROC) (GLuint viewport, GLuint entry, GLenum *rate);
3656typedef void (GL_APIENTRYP PFNGLGETSHADINGRATESAMPLELOCATIONIVNVPROC) (GLenum rate, GLuint samples, GLuint index, GLint *location);
3657typedef void (GL_APIENTRYP PFNGLSHADINGRATEIMAGEBARRIERNVPROC) (GLboolean synchronize);
3658typedef void (GL_APIENTRYP PFNGLSHADINGRATEIMAGEPALETTENVPROC) (GLuint viewport, GLuint first, GLsizei count, const GLenum *rates);
3659typedef void (GL_APIENTRYP PFNGLSHADINGRATESAMPLEORDERNVPROC) (GLenum order);
3660typedef void (GL_APIENTRYP PFNGLSHADINGRATESAMPLEORDERCUSTOMNVPROC) (GLenum rate, GLuint samples, const GLint *locations);
3661#ifdef GL_GLEXT_PROTOTYPES
3662GL_APICALL void GL_APIENTRY glBindShadingRateImageNV (GLuint texture);
3663GL_APICALL void GL_APIENTRY glGetShadingRateImagePaletteNV (GLuint viewport, GLuint entry, GLenum *rate);
3664GL_APICALL void GL_APIENTRY glGetShadingRateSampleLocationivNV (GLenum rate, GLuint samples, GLuint index, GLint *location);
3665GL_APICALL void GL_APIENTRY glShadingRateImageBarrierNV (GLboolean synchronize);
3666GL_APICALL void GL_APIENTRY glShadingRateImagePaletteNV (GLuint viewport, GLuint first, GLsizei count, const GLenum *rates);
3667GL_APICALL void GL_APIENTRY glShadingRateSampleOrderNV (GLenum order);
3668GL_APICALL void GL_APIENTRY glShadingRateSampleOrderCustomNV (GLenum rate, GLuint samples, const GLint *locations);
3669#endif
3670#endif /* GL_NV_shading_rate_image */
3671
3672#ifndef GL_NV_shadow_samplers_array
3673#define GL_NV_shadow_samplers_array 1
3674#define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4
3675#endif /* GL_NV_shadow_samplers_array */
3676
3677#ifndef GL_NV_shadow_samplers_cube
3678#define GL_NV_shadow_samplers_cube 1
3679#define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5
3680#endif /* GL_NV_shadow_samplers_cube */
3681
3682#ifndef GL_NV_stereo_view_rendering
3683#define GL_NV_stereo_view_rendering 1
3684#endif /* GL_NV_stereo_view_rendering */
3685
3686#ifndef GL_NV_texture_border_clamp
3687#define GL_NV_texture_border_clamp 1
3688#define GL_TEXTURE_BORDER_COLOR_NV 0x1004
3689#define GL_CLAMP_TO_BORDER_NV 0x812D
3690#endif /* GL_NV_texture_border_clamp */
3691
3692#ifndef GL_NV_texture_compression_s3tc_update
3693#define GL_NV_texture_compression_s3tc_update 1
3694#endif /* GL_NV_texture_compression_s3tc_update */
3695
3696#ifndef GL_NV_texture_npot_2D_mipmap
3697#define GL_NV_texture_npot_2D_mipmap 1
3698#endif /* GL_NV_texture_npot_2D_mipmap */
3699
3700#ifndef GL_NV_timeline_semaphore
3701#define GL_NV_timeline_semaphore 1
3702#define GL_TIMELINE_SEMAPHORE_VALUE_NV 0x9595
3703#define GL_SEMAPHORE_TYPE_NV 0x95B3
3704#define GL_SEMAPHORE_TYPE_BINARY_NV 0x95B4
3705#define GL_SEMAPHORE_TYPE_TIMELINE_NV 0x95B5
3706#define GL_MAX_TIMELINE_SEMAPHORE_VALUE_DIFFERENCE_NV 0x95B6
3707typedef void (GL_APIENTRYP PFNGLCREATESEMAPHORESNVPROC) (GLsizei n, GLuint *semaphores);
3708typedef void (GL_APIENTRYP PFNGLSEMAPHOREPARAMETERIVNVPROC) (GLuint semaphore, GLenum pname, const GLint *params);
3709typedef void (GL_APIENTRYP PFNGLGETSEMAPHOREPARAMETERIVNVPROC) (GLuint semaphore, GLenum pname, GLint *params);
3710#ifdef GL_GLEXT_PROTOTYPES
3711GL_APICALL void GL_APIENTRY glCreateSemaphoresNV (GLsizei n, GLuint *semaphores);
3712GL_APICALL void GL_APIENTRY glSemaphoreParameterivNV (GLuint semaphore, GLenum pname, const GLint *params);
3713GL_APICALL void GL_APIENTRY glGetSemaphoreParameterivNV (GLuint semaphore, GLenum pname, GLint *params);
3714#endif
3715#endif /* GL_NV_timeline_semaphore */
3716
3717#ifndef GL_NV_viewport_array
3718#define GL_NV_viewport_array 1
3719#define GL_MAX_VIEWPORTS_NV 0x825B
3720#define GL_VIEWPORT_SUBPIXEL_BITS_NV 0x825C
3721#define GL_VIEWPORT_BOUNDS_RANGE_NV 0x825D
3722#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX_NV 0x825F
3723typedef void (GL_APIENTRYP PFNGLVIEWPORTARRAYVNVPROC) (GLuint first, GLsizei count, const GLfloat *v);
3724typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
3725typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFVNVPROC) (GLuint index, const GLfloat *v);
3726typedef void (GL_APIENTRYP PFNGLSCISSORARRAYVNVPROC) (GLuint first, GLsizei count, const GLint *v);
3727typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDNVPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
3728typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDVNVPROC) (GLuint index, const GLint *v);
3729typedef void (GL_APIENTRYP PFNGLDEPTHRANGEARRAYFVNVPROC) (GLuint first, GLsizei count, const GLfloat *v);
3730typedef void (GL_APIENTRYP PFNGLDEPTHRANGEINDEXEDFNVPROC) (GLuint index, GLfloat n, GLfloat f);
3731typedef void (GL_APIENTRYP PFNGLGETFLOATI_VNVPROC) (GLenum target, GLuint index, GLfloat *data);
3732typedef void (GL_APIENTRYP PFNGLENABLEINVPROC) (GLenum target, GLuint index);
3733typedef void (GL_APIENTRYP PFNGLDISABLEINVPROC) (GLenum target, GLuint index);
3734typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDINVPROC) (GLenum target, GLuint index);
3735#ifdef GL_GLEXT_PROTOTYPES
3736GL_APICALL void GL_APIENTRY glViewportArrayvNV (GLuint first, GLsizei count, const GLfloat *v);
3737GL_APICALL void GL_APIENTRY glViewportIndexedfNV (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
3738GL_APICALL void GL_APIENTRY glViewportIndexedfvNV (GLuint index, const GLfloat *v);
3739GL_APICALL void GL_APIENTRY glScissorArrayvNV (GLuint first, GLsizei count, const GLint *v);
3740GL_APICALL void GL_APIENTRY glScissorIndexedNV (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
3741GL_APICALL void GL_APIENTRY glScissorIndexedvNV (GLuint index, const GLint *v);
3742GL_APICALL void GL_APIENTRY glDepthRangeArrayfvNV (GLuint first, GLsizei count, const GLfloat *v);
3743GL_APICALL void GL_APIENTRY glDepthRangeIndexedfNV (GLuint index, GLfloat n, GLfloat f);
3744GL_APICALL void GL_APIENTRY glGetFloati_vNV (GLenum target, GLuint index, GLfloat *data);
3745GL_APICALL void GL_APIENTRY glEnableiNV (GLenum target, GLuint index);
3746GL_APICALL void GL_APIENTRY glDisableiNV (GLenum target, GLuint index);
3747GL_APICALL GLboolean GL_APIENTRY glIsEnablediNV (GLenum target, GLuint index);
3748#endif
3749#endif /* GL_NV_viewport_array */
3750
3751#ifndef GL_NV_viewport_array2
3752#define GL_NV_viewport_array2 1
3753#endif /* GL_NV_viewport_array2 */
3754
3755#ifndef GL_NV_viewport_swizzle
3756#define GL_NV_viewport_swizzle 1
3757#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350
3758#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351
3759#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352
3760#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353
3761#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354
3762#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355
3763#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356
3764#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357
3765#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358
3766#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359
3767#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A
3768#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B
3769typedef void (GL_APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew);
3770#ifdef GL_GLEXT_PROTOTYPES
3771GL_APICALL void GL_APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew);
3772#endif
3773#endif /* GL_NV_viewport_swizzle */
3774
3775#ifndef GL_OVR_multiview
3776#define GL_OVR_multiview 1
3777#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630
3778#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632
3779#define GL_MAX_VIEWS_OVR 0x9631
3780#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633
3781typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
3782#ifdef GL_GLEXT_PROTOTYPES
3783GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
3784#endif
3785#endif /* GL_OVR_multiview */
3786
3787#ifndef GL_OVR_multiview2
3788#define GL_OVR_multiview2 1
3789#endif /* GL_OVR_multiview2 */
3790
3791#ifndef GL_OVR_multiview_multisampled_render_to_texture
3792#define GL_OVR_multiview_multisampled_render_to_texture 1
3793typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews);
3794#ifdef GL_GLEXT_PROTOTYPES
3795GL_APICALL void GL_APIENTRY glFramebufferTextureMultisampleMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews);
3796#endif
3797#endif /* GL_OVR_multiview_multisampled_render_to_texture */
3798
3799#ifndef GL_QCOM_YUV_texture_gather
3800#define GL_QCOM_YUV_texture_gather 1
3801#endif /* GL_QCOM_YUV_texture_gather */
3802
3803#ifndef GL_QCOM_alpha_test
3804#define GL_QCOM_alpha_test 1
3805#define GL_ALPHA_TEST_QCOM 0x0BC0
3806#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
3807#define GL_ALPHA_TEST_REF_QCOM 0x0BC2
3808typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
3809#ifdef GL_GLEXT_PROTOTYPES
3810GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
3811#endif
3812#endif /* GL_QCOM_alpha_test */
3813
3814#ifndef GL_QCOM_binning_control
3815#define GL_QCOM_binning_control 1
3816#define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0
3817#define GL_CPU_OPTIMIZED_QCOM 0x8FB1
3818#define GL_GPU_OPTIMIZED_QCOM 0x8FB2
3819#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3
3820#endif /* GL_QCOM_binning_control */
3821
3822#ifndef GL_QCOM_driver_control
3823#define GL_QCOM_driver_control 1
3824typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
3825typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
3826typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
3827typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
3828#ifdef GL_GLEXT_PROTOTYPES
3829GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
3830GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
3831GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
3832GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
3833#endif
3834#endif /* GL_QCOM_driver_control */
3835
3836#ifndef GL_QCOM_extended_get
3837#define GL_QCOM_extended_get 1
3838#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
3839#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
3840#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
3841#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
3842#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
3843#define GL_TEXTURE_TYPE_QCOM 0x8BD7
3844#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
3845#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
3846#define GL_TEXTURE_TARGET_QCOM 0x8BDA
3847#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
3848#define GL_STATE_RESTORE 0x8BDC
3849typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
3850typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
3851typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
3852typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
3853typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
3854typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
3855typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
3856typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params);
3857#ifdef GL_GLEXT_PROTOTYPES
3858GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
3859GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
3860GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
3861GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
3862GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
3863GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
3864GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
3865GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params);
3866#endif
3867#endif /* GL_QCOM_extended_get */
3868
3869#ifndef GL_QCOM_extended_get2
3870#define GL_QCOM_extended_get2 1
3871typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
3872typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
3873typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
3874typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
3875#ifdef GL_GLEXT_PROTOTYPES
3876GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
3877GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
3878GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
3879GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
3880#endif
3881#endif /* GL_QCOM_extended_get2 */
3882
3883#ifndef GL_QCOM_frame_extrapolation
3884#define GL_QCOM_frame_extrapolation 1
3885typedef void (GL_APIENTRYP PFNGLEXTRAPOLATETEX2DQCOMPROC) (GLuint src1, GLuint src2, GLuint output, GLfloat scaleFactor);
3886#ifdef GL_GLEXT_PROTOTYPES
3887GL_APICALL void GL_APIENTRY glExtrapolateTex2DQCOM (GLuint src1, GLuint src2, GLuint output, GLfloat scaleFactor);
3888#endif
3889#endif /* GL_QCOM_frame_extrapolation */
3890
3891#ifndef GL_QCOM_framebuffer_foveated
3892#define GL_QCOM_framebuffer_foveated 1
3893#define GL_FOVEATION_ENABLE_BIT_QCOM 0x00000001
3894#define GL_FOVEATION_SCALED_BIN_METHOD_BIT_QCOM 0x00000002
3895typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFOVEATIONCONFIGQCOMPROC) (GLuint framebuffer, GLuint numLayers, GLuint focalPointsPerLayer, GLuint requestedFeatures, GLuint *providedFeatures);
3896typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFOVEATIONPARAMETERSQCOMPROC) (GLuint framebuffer, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea);
3897#ifdef GL_GLEXT_PROTOTYPES
3898GL_APICALL void GL_APIENTRY glFramebufferFoveationConfigQCOM (GLuint framebuffer, GLuint numLayers, GLuint focalPointsPerLayer, GLuint requestedFeatures, GLuint *providedFeatures);
3899GL_APICALL void GL_APIENTRY glFramebufferFoveationParametersQCOM (GLuint framebuffer, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea);
3900#endif
3901#endif /* GL_QCOM_framebuffer_foveated */
3902
3903#ifndef GL_QCOM_motion_estimation
3904#define GL_QCOM_motion_estimation 1
3905#define GL_MOTION_ESTIMATION_SEARCH_BLOCK_X_QCOM 0x8C90
3906#define GL_MOTION_ESTIMATION_SEARCH_BLOCK_Y_QCOM 0x8C91
3907typedef void (GL_APIENTRYP PFNGLTEXESTIMATEMOTIONQCOMPROC) (GLuint ref, GLuint target, GLuint output);
3908typedef void (GL_APIENTRYP PFNGLTEXESTIMATEMOTIONREGIONSQCOMPROC) (GLuint ref, GLuint target, GLuint output, GLuint mask);
3909#ifdef GL_GLEXT_PROTOTYPES
3910GL_APICALL void GL_APIENTRY glTexEstimateMotionQCOM (GLuint ref, GLuint target, GLuint output);
3911GL_APICALL void GL_APIENTRY glTexEstimateMotionRegionsQCOM (GLuint ref, GLuint target, GLuint output, GLuint mask);
3912#endif
3913#endif /* GL_QCOM_motion_estimation */
3914
3915#ifndef GL_QCOM_perfmon_global_mode
3916#define GL_QCOM_perfmon_global_mode 1
3917#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
3918#endif /* GL_QCOM_perfmon_global_mode */
3919
3920#ifndef GL_QCOM_render_shared_exponent
3921#define GL_QCOM_render_shared_exponent 1
3922#endif /* GL_QCOM_render_shared_exponent */
3923
3924#ifndef GL_QCOM_shader_framebuffer_fetch_noncoherent
3925#define GL_QCOM_shader_framebuffer_fetch_noncoherent 1
3926#define GL_FRAMEBUFFER_FETCH_NONCOHERENT_QCOM 0x96A2
3927typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFETCHBARRIERQCOMPROC) (void);
3928#ifdef GL_GLEXT_PROTOTYPES
3929GL_APICALL void GL_APIENTRY glFramebufferFetchBarrierQCOM (void);
3930#endif
3931#endif /* GL_QCOM_shader_framebuffer_fetch_noncoherent */
3932
3933#ifndef GL_QCOM_shader_framebuffer_fetch_rate
3934#define GL_QCOM_shader_framebuffer_fetch_rate 1
3935#endif /* GL_QCOM_shader_framebuffer_fetch_rate */
3936
3937#ifndef GL_QCOM_shading_rate
3938#define GL_QCOM_shading_rate 1
3939#define GL_SHADING_RATE_QCOM 0x96A4
3940#define GL_SHADING_RATE_PRESERVE_ASPECT_RATIO_QCOM 0x96A5
3941#define GL_SHADING_RATE_1X1_PIXELS_QCOM 0x96A6
3942#define GL_SHADING_RATE_1X2_PIXELS_QCOM 0x96A7
3943#define GL_SHADING_RATE_2X1_PIXELS_QCOM 0x96A8
3944#define GL_SHADING_RATE_2X2_PIXELS_QCOM 0x96A9
3945#define GL_SHADING_RATE_4X2_PIXELS_QCOM 0x96AC
3946#define GL_SHADING_RATE_4X4_PIXELS_QCOM 0x96AE
3947typedef void (GL_APIENTRYP PFNGLSHADINGRATEQCOMPROC) (GLenum rate);
3948#ifdef GL_GLEXT_PROTOTYPES
3949GL_APICALL void GL_APIENTRY glShadingRateQCOM (GLenum rate);
3950#endif
3951#endif /* GL_QCOM_shading_rate */
3952
3953#ifndef GL_QCOM_texture_foveated
3954#define GL_QCOM_texture_foveated 1
3955#define GL_TEXTURE_FOVEATED_FEATURE_BITS_QCOM 0x8BFB
3956#define GL_TEXTURE_FOVEATED_MIN_PIXEL_DENSITY_QCOM 0x8BFC
3957#define GL_TEXTURE_FOVEATED_FEATURE_QUERY_QCOM 0x8BFD
3958#define GL_TEXTURE_FOVEATED_NUM_FOCAL_POINTS_QUERY_QCOM 0x8BFE
3959#define GL_FRAMEBUFFER_INCOMPLETE_FOVEATION_QCOM 0x8BFF
3960typedef void (GL_APIENTRYP PFNGLTEXTUREFOVEATIONPARAMETERSQCOMPROC) (GLuint texture, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea);
3961#ifdef GL_GLEXT_PROTOTYPES
3962GL_APICALL void GL_APIENTRY glTextureFoveationParametersQCOM (GLuint texture, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea);
3963#endif
3964#endif /* GL_QCOM_texture_foveated */
3965
3966#ifndef GL_QCOM_texture_foveated2
3967#define GL_QCOM_texture_foveated2 1
3968#define GL_TEXTURE_FOVEATED_CUTOFF_DENSITY_QCOM 0x96A0
3969#endif /* GL_QCOM_texture_foveated2 */
3970
3971#ifndef GL_QCOM_texture_foveated_subsampled_layout
3972#define GL_QCOM_texture_foveated_subsampled_layout 1
3973#define GL_FOVEATION_SUBSAMPLED_LAYOUT_METHOD_BIT_QCOM 0x00000004
3974#define GL_MAX_SHADER_SUBSAMPLED_IMAGE_UNITS_QCOM 0x8FA1
3975#endif /* GL_QCOM_texture_foveated_subsampled_layout */
3976
3977#ifndef GL_QCOM_tiled_rendering
3978#define GL_QCOM_tiled_rendering 1
3979#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
3980#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
3981#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
3982#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
3983#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
3984#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
3985#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
3986#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
3987#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
3988#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
3989#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
3990#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
3991#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
3992#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
3993#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
3994#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
3995#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
3996#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
3997#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
3998#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
3999#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
4000#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
4001#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
4002#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
4003#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
4004#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
4005#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
4006#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
4007#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
4008#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
4009#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
4010#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
4011typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
4012typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
4013#ifdef GL_GLEXT_PROTOTYPES
4014GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
4015GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
4016#endif
4017#endif /* GL_QCOM_tiled_rendering */
4018
4019#ifndef GL_QCOM_writeonly_rendering
4020#define GL_QCOM_writeonly_rendering 1
4021#define GL_WRITEONLY_RENDERING_QCOM 0x8823
4022#endif /* GL_QCOM_writeonly_rendering */
4023
4024#ifndef GL_VIV_shader_binary
4025#define GL_VIV_shader_binary 1
4026#define GL_SHADER_BINARY_VIV 0x8FC4
4027#endif /* GL_VIV_shader_binary */
4028
4029#ifdef __cplusplus
4030}
4031#endif
4032
4033#endif
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2platform.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2platform.h
new file mode 100644
index 0000000..426796e
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_gl2platform.h
@@ -0,0 +1,27 @@
1#ifndef __gl2platform_h_
2#define __gl2platform_h_
3
4/*
5** Copyright 2017-2020 The Khronos Group Inc.
6** SPDX-License-Identifier: Apache-2.0
7*/
8
9/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
10 *
11 * Adopters may modify khrplatform.h and this file to suit their platform.
12 * Please contribute modifications back to Khronos as pull requests on the
13 * public github repository:
14 * https://github.com/KhronosGroup/OpenGL-Registry
15 */
16
17/*#include <KHR/khrplatform.h>*/
18
19#ifndef GL_APICALL
20#define GL_APICALL KHRONOS_APICALL
21#endif
22
23#ifndef GL_APIENTRY
24#define GL_APIENTRY KHRONOS_APIENTRY
25#endif
26
27#endif /* __gl2platform_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_khrplatform.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_khrplatform.h
new file mode 100644
index 0000000..0164644
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_opengles2_khrplatform.h
@@ -0,0 +1,311 @@
1#ifndef __khrplatform_h_
2#define __khrplatform_h_
3
4/*
5** Copyright (c) 2008-2018 The Khronos Group Inc.
6**
7** Permission is hereby granted, free of charge, to any person obtaining a
8** copy of this software and/or associated documentation files (the
9** "Materials"), to deal in the Materials without restriction, including
10** without limitation the rights to use, copy, modify, merge, publish,
11** distribute, sublicense, and/or sell copies of the Materials, and to
12** permit persons to whom the Materials are furnished to do so, subject to
13** the following conditions:
14**
15** The above copyright notice and this permission notice shall be included
16** in all copies or substantial portions of the Materials.
17**
18** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
25*/
26
27/* Khronos platform-specific types and definitions.
28 *
29 * The master copy of khrplatform.h is maintained in the Khronos EGL
30 * Registry repository at https://github.com/KhronosGroup/EGL-Registry
31 * The last semantic modification to khrplatform.h was at commit ID:
32 * 67a3e0864c2d75ea5287b9f3d2eb74a745936692
33 *
34 * Adopters may modify this file to suit their platform. Adopters are
35 * encouraged to submit platform specific modifications to the Khronos
36 * group so that they can be included in future versions of this file.
37 * Please submit changes by filing pull requests or issues on
38 * the EGL Registry repository linked above.
39 *
40 *
41 * See the Implementer's Guidelines for information about where this file
42 * should be located on your system and for more details of its use:
43 * http://www.khronos.org/registry/implementers_guide.pdf
44 *
45 * This file should be included as
46 * #include <KHR/khrplatform.h>
47 * by Khronos client API header files that use its types and defines.
48 *
49 * The types in khrplatform.h should only be used to define API-specific types.
50 *
51 * Types defined in khrplatform.h:
52 * khronos_int8_t signed 8 bit
53 * khronos_uint8_t unsigned 8 bit
54 * khronos_int16_t signed 16 bit
55 * khronos_uint16_t unsigned 16 bit
56 * khronos_int32_t signed 32 bit
57 * khronos_uint32_t unsigned 32 bit
58 * khronos_int64_t signed 64 bit
59 * khronos_uint64_t unsigned 64 bit
60 * khronos_intptr_t signed same number of bits as a pointer
61 * khronos_uintptr_t unsigned same number of bits as a pointer
62 * khronos_ssize_t signed size
63 * khronos_usize_t unsigned size
64 * khronos_float_t signed 32 bit floating point
65 * khronos_time_ns_t unsigned 64 bit time in nanoseconds
66 * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
67 * nanoseconds
68 * khronos_stime_nanoseconds_t signed time interval in nanoseconds
69 * khronos_boolean_enum_t enumerated boolean type. This should
70 * only be used as a base type when a client API's boolean type is
71 * an enum. Client APIs which use an integer or other type for
72 * booleans cannot use this as the base type for their boolean.
73 *
74 * Tokens defined in khrplatform.h:
75 *
76 * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
77 *
78 * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
79 * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
80 *
81 * Calling convention macros defined in this file:
82 * KHRONOS_APICALL
83 * KHRONOS_APIENTRY
84 * KHRONOS_APIATTRIBUTES
85 *
86 * These may be used in function prototypes as:
87 *
88 * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
89 * int arg1,
90 * int arg2) KHRONOS_APIATTRIBUTES;
91 */
92
93#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
94# define KHRONOS_STATIC 1
95#endif
96
97/*-------------------------------------------------------------------------
98 * Definition of KHRONOS_APICALL
99 *-------------------------------------------------------------------------
100 * This precedes the return type of the function in the function prototype.
101 */
102#if defined(KHRONOS_STATIC)
103 /* If the preprocessor constant KHRONOS_STATIC is defined, make the
104 * header compatible with static linking. */
105# define KHRONOS_APICALL
106#elif defined(_WIN32)
107# define KHRONOS_APICALL __declspec(dllimport)
108#elif defined (__SYMBIAN32__)
109# define KHRONOS_APICALL IMPORT_C
110#elif defined(__ANDROID__)
111# define KHRONOS_APICALL __attribute__((visibility("default")))
112#else
113# define KHRONOS_APICALL
114#endif
115
116/*-------------------------------------------------------------------------
117 * Definition of KHRONOS_APIENTRY
118 *-------------------------------------------------------------------------
119 * This follows the return type of the function and precedes the function
120 * name in the function prototype.
121 */
122#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
123 /* Win32 but not WinCE */
124# define KHRONOS_APIENTRY __stdcall
125#else
126# define KHRONOS_APIENTRY
127#endif
128
129/*-------------------------------------------------------------------------
130 * Definition of KHRONOS_APIATTRIBUTES
131 *-------------------------------------------------------------------------
132 * This follows the closing parenthesis of the function prototype arguments.
133 */
134#if defined (__ARMCC_2__)
135#define KHRONOS_APIATTRIBUTES __softfp
136#else
137#define KHRONOS_APIATTRIBUTES
138#endif
139
140/*-------------------------------------------------------------------------
141 * basic type definitions
142 *-----------------------------------------------------------------------*/
143#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
144
145
146/*
147 * Using <stdint.h>
148 */
149#include <stdint.h>
150typedef int32_t khronos_int32_t;
151typedef uint32_t khronos_uint32_t;
152typedef int64_t khronos_int64_t;
153typedef uint64_t khronos_uint64_t;
154#define KHRONOS_SUPPORT_INT64 1
155#define KHRONOS_SUPPORT_FLOAT 1
156/*
157 * To support platform where unsigned long cannot be used interchangeably with
158 * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
159 * Ideally, we could just use (u)intptr_t everywhere, but this could result in
160 * ABI breakage if khronos_uintptr_t is changed from unsigned long to
161 * unsigned long long or similar (this results in different C++ name mangling).
162 * To avoid changes for existing platforms, we restrict usage of intptr_t to
163 * platforms where the size of a pointer is larger than the size of long.
164 */
165#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
166#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
167#define KHRONOS_USE_INTPTR_T
168#endif
169#endif
170
171#elif defined(__VMS ) || defined(__sgi)
172
173/*
174 * Using <inttypes.h>
175 */
176#include <inttypes.h>
177typedef int32_t khronos_int32_t;
178typedef uint32_t khronos_uint32_t;
179typedef int64_t khronos_int64_t;
180typedef uint64_t khronos_uint64_t;
181#define KHRONOS_SUPPORT_INT64 1
182#define KHRONOS_SUPPORT_FLOAT 1
183
184#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
185
186/*
187 * Win32
188 */
189typedef __int32 khronos_int32_t;
190typedef unsigned __int32 khronos_uint32_t;
191typedef __int64 khronos_int64_t;
192typedef unsigned __int64 khronos_uint64_t;
193#define KHRONOS_SUPPORT_INT64 1
194#define KHRONOS_SUPPORT_FLOAT 1
195
196#elif defined(__sun__) || defined(__digital__)
197
198/*
199 * Sun or Digital
200 */
201typedef int khronos_int32_t;
202typedef unsigned int khronos_uint32_t;
203#if defined(__arch64__) || defined(_LP64)
204typedef long int khronos_int64_t;
205typedef unsigned long int khronos_uint64_t;
206#else
207typedef long long int khronos_int64_t;
208typedef unsigned long long int khronos_uint64_t;
209#endif /* __arch64__ */
210#define KHRONOS_SUPPORT_INT64 1
211#define KHRONOS_SUPPORT_FLOAT 1
212
213#elif 0
214
215/*
216 * Hypothetical platform with no float or int64 support
217 */
218typedef int khronos_int32_t;
219typedef unsigned int khronos_uint32_t;
220#define KHRONOS_SUPPORT_INT64 0
221#define KHRONOS_SUPPORT_FLOAT 0
222
223#else
224
225/*
226 * Generic fallback
227 */
228#include <stdint.h>
229typedef int32_t khronos_int32_t;
230typedef uint32_t khronos_uint32_t;
231typedef int64_t khronos_int64_t;
232typedef uint64_t khronos_uint64_t;
233#define KHRONOS_SUPPORT_INT64 1
234#define KHRONOS_SUPPORT_FLOAT 1
235
236#endif
237
238
239/*
240 * Types that are (so far) the same on all platforms
241 */
242typedef signed char khronos_int8_t;
243typedef unsigned char khronos_uint8_t;
244typedef signed short int khronos_int16_t;
245typedef unsigned short int khronos_uint16_t;
246
247/*
248 * Types that differ between LLP64 and LP64 architectures - in LLP64,
249 * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
250 * to be the only LLP64 architecture in current use.
251 */
252#ifdef KHRONOS_USE_INTPTR_T
253typedef intptr_t khronos_intptr_t;
254typedef uintptr_t khronos_uintptr_t;
255#elif defined(_WIN64)
256typedef signed long long int khronos_intptr_t;
257typedef unsigned long long int khronos_uintptr_t;
258#else
259typedef signed long int khronos_intptr_t;
260typedef unsigned long int khronos_uintptr_t;
261#endif
262
263#if defined(_WIN64)
264typedef signed long long int khronos_ssize_t;
265typedef unsigned long long int khronos_usize_t;
266#else
267typedef signed long int khronos_ssize_t;
268typedef unsigned long int khronos_usize_t;
269#endif
270
271#if KHRONOS_SUPPORT_FLOAT
272/*
273 * Float type
274 */
275typedef float khronos_float_t;
276#endif
277
278#if KHRONOS_SUPPORT_INT64
279/* Time types
280 *
281 * These types can be used to represent a time interval in nanoseconds or
282 * an absolute Unadjusted System Time. Unadjusted System Time is the number
283 * of nanoseconds since some arbitrary system event (e.g. since the last
284 * time the system booted). The Unadjusted System Time is an unsigned
285 * 64 bit value that wraps back to 0 every 584 years. Time intervals
286 * may be either signed or unsigned.
287 */
288typedef khronos_uint64_t khronos_utime_nanoseconds_t;
289typedef khronos_int64_t khronos_stime_nanoseconds_t;
290#endif
291
292/*
293 * Dummy value used to pad enum types to 32 bits.
294 */
295#ifndef KHRONOS_MAX_ENUM
296#define KHRONOS_MAX_ENUM 0x7FFFFFFF
297#endif
298
299/*
300 * Enumerated boolean type
301 *
302 * Values other than zero should be considered to be true. Therefore
303 * comparisons should not be made against KHRONOS_TRUE.
304 */
305typedef enum {
306 KHRONOS_FALSE = 0,
307 KHRONOS_TRUE = 1,
308 KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
309} khronos_boolean_enum_t;
310
311#endif /* __khrplatform_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_pen.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_pen.h
new file mode 100644
index 0000000..5182eeb
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_pen.h
@@ -0,0 +1,127 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryPen
24 *
25 * SDL pen event handling.
26 *
27 * SDL provides an API for pressure-sensitive pen (stylus and/or eraser)
28 * handling, e.g., for input and drawing tablets or suitably equipped mobile /
29 * tablet devices.
30 *
31 * To get started with pens, simply handle SDL_EVENT_PEN_* events. When a pen
32 * starts providing input, SDL will assign it a unique SDL_PenID, which will
33 * remain for the life of the process, as long as the pen stays connected.
34 *
35 * Pens may provide more than simple touch input; they might have other axes,
36 * such as pressure, tilt, rotation, etc.
37 */
38
39#ifndef SDL_pen_h_
40#define SDL_pen_h_
41
42#include <SDL3/SDL_stdinc.h>
43#include <SDL3/SDL_mouse.h>
44#include <SDL3/SDL_touch.h>
45
46/* Set up for C function definitions, even when using C++ */
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51/**
52 * SDL pen instance IDs.
53 *
54 * Zero is used to signify an invalid/null device.
55 *
56 * These show up in pen events when SDL sees input from them. They remain
57 * consistent as long as SDL can recognize a tool to be the same pen; but if a
58 * pen physically leaves the area and returns, it might get a new ID.
59 *
60 * \since This datatype is available since SDL 3.2.0.
61 */
62typedef Uint32 SDL_PenID;
63
64/**
65 * The SDL_MouseID for mouse events simulated with pen input.
66 *
67 * \since This macro is available since SDL 3.2.0.
68 */
69#define SDL_PEN_MOUSEID ((SDL_MouseID)-2)
70
71/**
72 * The SDL_TouchID for touch events simulated with pen input.
73 *
74 * \since This macro is available since SDL 3.2.0.
75 */
76#define SDL_PEN_TOUCHID ((SDL_TouchID)-2)
77
78
79/**
80 * Pen input flags, as reported by various pen events' `pen_state` field.
81 *
82 * \since This datatype is available since SDL 3.2.0.
83 */
84typedef Uint32 SDL_PenInputFlags;
85
86#define SDL_PEN_INPUT_DOWN (1u << 0) /**< pen is pressed down */
87#define SDL_PEN_INPUT_BUTTON_1 (1u << 1) /**< button 1 is pressed */
88#define SDL_PEN_INPUT_BUTTON_2 (1u << 2) /**< button 2 is pressed */
89#define SDL_PEN_INPUT_BUTTON_3 (1u << 3) /**< button 3 is pressed */
90#define SDL_PEN_INPUT_BUTTON_4 (1u << 4) /**< button 4 is pressed */
91#define SDL_PEN_INPUT_BUTTON_5 (1u << 5) /**< button 5 is pressed */
92#define SDL_PEN_INPUT_ERASER_TIP (1u << 30) /**< eraser tip is used */
93
94/**
95 * Pen axis indices.
96 *
97 * These are the valid values for the `axis` field in SDL_PenAxisEvent. All
98 * axes are either normalised to 0..1 or report a (positive or negative) angle
99 * in degrees, with 0.0 representing the centre. Not all pens/backends support
100 * all axes: unsupported axes are always zero.
101 *
102 * To convert angles for tilt and rotation into vector representation, use
103 * SDL_sinf on the XTILT, YTILT, or ROTATION component, for example:
104 *
105 * `SDL_sinf(xtilt * SDL_PI_F / 180.0)`.
106 *
107 * \since This enum is available since SDL 3.2.0.
108 */
109typedef enum SDL_PenAxis
110{
111 SDL_PEN_AXIS_PRESSURE, /**< Pen pressure. Unidirectional: 0 to 1.0 */
112 SDL_PEN_AXIS_XTILT, /**< Pen horizontal tilt angle. Bidirectional: -90.0 to 90.0 (left-to-right). */
113 SDL_PEN_AXIS_YTILT, /**< Pen vertical tilt angle. Bidirectional: -90.0 to 90.0 (top-to-down). */
114 SDL_PEN_AXIS_DISTANCE, /**< Pen distance to drawing surface. Unidirectional: 0.0 to 1.0 */
115 SDL_PEN_AXIS_ROTATION, /**< Pen barrel rotation. Bidirectional: -180 to 179.9 (clockwise, 0 is facing up, -180.0 is facing down). */
116 SDL_PEN_AXIS_SLIDER, /**< Pen finger wheel or slider (e.g., Airbrush Pen). Unidirectional: 0 to 1.0 */
117 SDL_PEN_AXIS_TANGENTIAL_PRESSURE, /**< Pressure from squeezing the pen ("barrel pressure"). */
118 SDL_PEN_AXIS_COUNT /**< Total known pen axis types in this version of SDL. This number may grow in future releases! */
119} SDL_PenAxis;
120
121/* Ends C function definitions when using C++ */
122#ifdef __cplusplus
123}
124#endif
125
126#endif /* SDL_pen_h_ */
127
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_pixels.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_pixels.h
new file mode 100644
index 0000000..39596c1
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_pixels.h
@@ -0,0 +1,1441 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryPixels
24 *
25 * SDL offers facilities for pixel management.
26 *
27 * Largely these facilities deal with pixel _format_: what does this set of
28 * bits represent?
29 *
30 * If you mostly want to think of a pixel as some combination of red, green,
31 * blue, and maybe alpha intensities, this is all pretty straightforward, and
32 * in many cases, is enough information to build a perfectly fine game.
33 *
34 * However, the actual definition of a pixel is more complex than that:
35 *
36 * Pixels are a representation of a color in a particular color space.
37 *
38 * The first characteristic of a color space is the color type. SDL
39 * understands two different color types, RGB and YCbCr, or in SDL also
40 * referred to as YUV.
41 *
42 * RGB colors consist of red, green, and blue channels of color that are added
43 * together to represent the colors we see on the screen.
44 *
45 * https://en.wikipedia.org/wiki/RGB_color_model
46 *
47 * YCbCr colors represent colors as a Y luma brightness component and red and
48 * blue chroma color offsets. This color representation takes advantage of the
49 * fact that the human eye is more sensitive to brightness than the color in
50 * an image. The Cb and Cr components are often compressed and have lower
51 * resolution than the luma component.
52 *
53 * https://en.wikipedia.org/wiki/YCbCr
54 *
55 * When the color information in YCbCr is compressed, the Y pixels are left at
56 * full resolution and each Cr and Cb pixel represents an average of the color
57 * information in a block of Y pixels. The chroma location determines where in
58 * that block of pixels the color information is coming from.
59 *
60 * The color range defines how much of the pixel to use when converting a
61 * pixel into a color on the display. When the full color range is used, the
62 * entire numeric range of the pixel bits is significant. When narrow color
63 * range is used, for historical reasons, the pixel uses only a portion of the
64 * numeric range to represent colors.
65 *
66 * The color primaries and white point are a definition of the colors in the
67 * color space relative to the standard XYZ color space.
68 *
69 * https://en.wikipedia.org/wiki/CIE_1931_color_space
70 *
71 * The transfer characteristic, or opto-electrical transfer function (OETF),
72 * is the way a color is converted from mathematically linear space into a
73 * non-linear output signals.
74 *
75 * https://en.wikipedia.org/wiki/Rec._709#Transfer_characteristics
76 *
77 * The matrix coefficients are used to convert between YCbCr and RGB colors.
78 */
79
80#ifndef SDL_pixels_h_
81#define SDL_pixels_h_
82
83#include <SDL3/SDL_stdinc.h>
84#include <SDL3/SDL_error.h>
85#include <SDL3/SDL_endian.h>
86
87#include <SDL3/SDL_begin_code.h>
88/* Set up for C function definitions, even when using C++ */
89#ifdef __cplusplus
90extern "C" {
91#endif
92
93/**
94 * A fully opaque 8-bit alpha value.
95 *
96 * \since This macro is available since SDL 3.2.0.
97 *
98 * \sa SDL_ALPHA_TRANSPARENT
99 */
100#define SDL_ALPHA_OPAQUE 255
101
102/**
103 * A fully opaque floating point alpha value.
104 *
105 * \since This macro is available since SDL 3.2.0.
106 *
107 * \sa SDL_ALPHA_TRANSPARENT_FLOAT
108 */
109#define SDL_ALPHA_OPAQUE_FLOAT 1.0f
110
111/**
112 * A fully transparent 8-bit alpha value.
113 *
114 * \since This macro is available since SDL 3.2.0.
115 *
116 * \sa SDL_ALPHA_OPAQUE
117 */
118#define SDL_ALPHA_TRANSPARENT 0
119
120/**
121 * A fully transparent floating point alpha value.
122 *
123 * \since This macro is available since SDL 3.2.0.
124 *
125 * \sa SDL_ALPHA_OPAQUE_FLOAT
126 */
127#define SDL_ALPHA_TRANSPARENT_FLOAT 0.0f
128
129/**
130 * Pixel type.
131 *
132 * \since This enum is available since SDL 3.2.0.
133 */
134typedef enum SDL_PixelType
135{
136 SDL_PIXELTYPE_UNKNOWN,
137 SDL_PIXELTYPE_INDEX1,
138 SDL_PIXELTYPE_INDEX4,
139 SDL_PIXELTYPE_INDEX8,
140 SDL_PIXELTYPE_PACKED8,
141 SDL_PIXELTYPE_PACKED16,
142 SDL_PIXELTYPE_PACKED32,
143 SDL_PIXELTYPE_ARRAYU8,
144 SDL_PIXELTYPE_ARRAYU16,
145 SDL_PIXELTYPE_ARRAYU32,
146 SDL_PIXELTYPE_ARRAYF16,
147 SDL_PIXELTYPE_ARRAYF32,
148 /* appended at the end for compatibility with sdl2-compat: */
149 SDL_PIXELTYPE_INDEX2
150} SDL_PixelType;
151
152/**
153 * Bitmap pixel order, high bit -> low bit.
154 *
155 * \since This enum is available since SDL 3.2.0.
156 */
157typedef enum SDL_BitmapOrder
158{
159 SDL_BITMAPORDER_NONE,
160 SDL_BITMAPORDER_4321,
161 SDL_BITMAPORDER_1234
162} SDL_BitmapOrder;
163
164/**
165 * Packed component order, high bit -> low bit.
166 *
167 * \since This enum is available since SDL 3.2.0.
168 */
169typedef enum SDL_PackedOrder
170{
171 SDL_PACKEDORDER_NONE,
172 SDL_PACKEDORDER_XRGB,
173 SDL_PACKEDORDER_RGBX,
174 SDL_PACKEDORDER_ARGB,
175 SDL_PACKEDORDER_RGBA,
176 SDL_PACKEDORDER_XBGR,
177 SDL_PACKEDORDER_BGRX,
178 SDL_PACKEDORDER_ABGR,
179 SDL_PACKEDORDER_BGRA
180} SDL_PackedOrder;
181
182/**
183 * Array component order, low byte -> high byte.
184 *
185 * \since This enum is available since SDL 3.2.0.
186 */
187typedef enum SDL_ArrayOrder
188{
189 SDL_ARRAYORDER_NONE,
190 SDL_ARRAYORDER_RGB,
191 SDL_ARRAYORDER_RGBA,
192 SDL_ARRAYORDER_ARGB,
193 SDL_ARRAYORDER_BGR,
194 SDL_ARRAYORDER_BGRA,
195 SDL_ARRAYORDER_ABGR
196} SDL_ArrayOrder;
197
198/**
199 * Packed component layout.
200 *
201 * \since This enum is available since SDL 3.2.0.
202 */
203typedef enum SDL_PackedLayout
204{
205 SDL_PACKEDLAYOUT_NONE,
206 SDL_PACKEDLAYOUT_332,
207 SDL_PACKEDLAYOUT_4444,
208 SDL_PACKEDLAYOUT_1555,
209 SDL_PACKEDLAYOUT_5551,
210 SDL_PACKEDLAYOUT_565,
211 SDL_PACKEDLAYOUT_8888,
212 SDL_PACKEDLAYOUT_2101010,
213 SDL_PACKEDLAYOUT_1010102
214} SDL_PackedLayout;
215
216/**
217 * A macro for defining custom FourCC pixel formats.
218 *
219 * For example, defining SDL_PIXELFORMAT_YV12 looks like this:
220 *
221 * ```c
222 * SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2')
223 * ```
224 *
225 * \param A the first character of the FourCC code.
226 * \param B the second character of the FourCC code.
227 * \param C the third character of the FourCC code.
228 * \param D the fourth character of the FourCC code.
229 * \returns a format value in the style of SDL_PixelFormat.
230 *
231 * \threadsafety It is safe to call this macro from any thread.
232 *
233 * \since This macro is available since SDL 3.2.0.
234 */
235#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
236
237/**
238 * A macro for defining custom non-FourCC pixel formats.
239 *
240 * For example, defining SDL_PIXELFORMAT_RGBA8888 looks like this:
241 *
242 * ```c
243 * SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA, SDL_PACKEDLAYOUT_8888, 32, 4)
244 * ```
245 *
246 * \param type the type of the new format, probably a SDL_PixelType value.
247 * \param order the order of the new format, probably a SDL_BitmapOrder,
248 * SDL_PackedOrder, or SDL_ArrayOrder value.
249 * \param layout the layout of the new format, probably an SDL_PackedLayout
250 * value or zero.
251 * \param bits the number of bits per pixel of the new format.
252 * \param bytes the number of bytes per pixel of the new format.
253 * \returns a format value in the style of SDL_PixelFormat.
254 *
255 * \threadsafety It is safe to call this macro from any thread.
256 *
257 * \since This macro is available since SDL 3.2.0.
258 */
259#define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \
260 ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \
261 ((bits) << 8) | ((bytes) << 0))
262
263/**
264 * A macro to retrieve the flags of an SDL_PixelFormat.
265 *
266 * This macro is generally not needed directly by an app, which should use
267 * specific tests, like SDL_ISPIXELFORMAT_FOURCC, instead.
268 *
269 * \param format an SDL_PixelFormat to check.
270 * \returns the flags of `format`.
271 *
272 * \threadsafety It is safe to call this macro from any thread.
273 *
274 * \since This macro is available since SDL 3.2.0.
275 */
276#define SDL_PIXELFLAG(format) (((format) >> 28) & 0x0F)
277
278/**
279 * A macro to retrieve the type of an SDL_PixelFormat.
280 *
281 * This is usually a value from the SDL_PixelType enumeration.
282 *
283 * \param format an SDL_PixelFormat to check.
284 * \returns the type of `format`.
285 *
286 * \threadsafety It is safe to call this macro from any thread.
287 *
288 * \since This macro is available since SDL 3.2.0.
289 */
290#define SDL_PIXELTYPE(format) (((format) >> 24) & 0x0F)
291
292/**
293 * A macro to retrieve the order of an SDL_PixelFormat.
294 *
295 * This is usually a value from the SDL_BitmapOrder, SDL_PackedOrder, or
296 * SDL_ArrayOrder enumerations, depending on the format type.
297 *
298 * \param format an SDL_PixelFormat to check.
299 * \returns the order of `format`.
300 *
301 * \threadsafety It is safe to call this macro from any thread.
302 *
303 * \since This macro is available since SDL 3.2.0.
304 */
305#define SDL_PIXELORDER(format) (((format) >> 20) & 0x0F)
306
307/**
308 * A macro to retrieve the layout of an SDL_PixelFormat.
309 *
310 * This is usually a value from the SDL_PackedLayout enumeration, or zero if a
311 * layout doesn't make sense for the format type.
312 *
313 * \param format an SDL_PixelFormat to check.
314 * \returns the layout of `format`.
315 *
316 * \threadsafety It is safe to call this macro from any thread.
317 *
318 * \since This macro is available since SDL 3.2.0.
319 */
320#define SDL_PIXELLAYOUT(format) (((format) >> 16) & 0x0F)
321
322/**
323 * A macro to determine an SDL_PixelFormat's bits per pixel.
324 *
325 * Note that this macro double-evaluates its parameter, so do not use
326 * expressions with side-effects here.
327 *
328 * FourCC formats will report zero here, as it rarely makes sense to measure
329 * them per-pixel.
330 *
331 * \param format an SDL_PixelFormat to check.
332 * \returns the bits-per-pixel of `format`.
333 *
334 * \threadsafety It is safe to call this macro from any thread.
335 *
336 * \since This macro is available since SDL 3.2.0.
337 *
338 * \sa SDL_BYTESPERPIXEL
339 */
340#define SDL_BITSPERPIXEL(format) \
341 (SDL_ISPIXELFORMAT_FOURCC(format) ? 0 : (((format) >> 8) & 0xFF))
342
343/**
344 * A macro to determine an SDL_PixelFormat's bytes per pixel.
345 *
346 * Note that this macro double-evaluates its parameter, so do not use
347 * expressions with side-effects here.
348 *
349 * FourCC formats do their best here, but many of them don't have a meaningful
350 * measurement of bytes per pixel.
351 *
352 * \param format an SDL_PixelFormat to check.
353 * \returns the bytes-per-pixel of `format`.
354 *
355 * \threadsafety It is safe to call this macro from any thread.
356 *
357 * \since This macro is available since SDL 3.2.0.
358 *
359 * \sa SDL_BITSPERPIXEL
360 */
361#define SDL_BYTESPERPIXEL(format) \
362 (SDL_ISPIXELFORMAT_FOURCC(format) ? \
363 ((((format) == SDL_PIXELFORMAT_YUY2) || \
364 ((format) == SDL_PIXELFORMAT_UYVY) || \
365 ((format) == SDL_PIXELFORMAT_YVYU) || \
366 ((format) == SDL_PIXELFORMAT_P010)) ? 2 : 1) : (((format) >> 0) & 0xFF))
367
368
369/**
370 * A macro to determine if an SDL_PixelFormat is an indexed format.
371 *
372 * Note that this macro double-evaluates its parameter, so do not use
373 * expressions with side-effects here.
374 *
375 * \param format an SDL_PixelFormat to check.
376 * \returns true if the format is indexed, false otherwise.
377 *
378 * \threadsafety It is safe to call this macro from any thread.
379 *
380 * \since This macro is available since SDL 3.2.0.
381 */
382#define SDL_ISPIXELFORMAT_INDEXED(format) \
383 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
384 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \
385 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX2) || \
386 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
387 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
388
389/**
390 * A macro to determine if an SDL_PixelFormat is a packed format.
391 *
392 * Note that this macro double-evaluates its parameter, so do not use
393 * expressions with side-effects here.
394 *
395 * \param format an SDL_PixelFormat to check.
396 * \returns true if the format is packed, false otherwise.
397 *
398 * \threadsafety It is safe to call this macro from any thread.
399 *
400 * \since This macro is available since SDL 3.2.0.
401 */
402#define SDL_ISPIXELFORMAT_PACKED(format) \
403 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
404 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \
405 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \
406 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32)))
407
408/**
409 * A macro to determine if an SDL_PixelFormat is an array format.
410 *
411 * Note that this macro double-evaluates its parameter, so do not use
412 * expressions with side-effects here.
413 *
414 * \param format an SDL_PixelFormat to check.
415 * \returns true if the format is an array, false otherwise.
416 *
417 * \threadsafety It is safe to call this macro from any thread.
418 *
419 * \since This macro is available since SDL 3.2.0.
420 */
421#define SDL_ISPIXELFORMAT_ARRAY(format) \
422 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
423 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || \
424 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || \
425 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU32) || \
426 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \
427 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32)))
428
429/**
430 * A macro to determine if an SDL_PixelFormat is a 10-bit format.
431 *
432 * Note that this macro double-evaluates its parameter, so do not use
433 * expressions with side-effects here.
434 *
435 * \param format an SDL_PixelFormat to check.
436 * \returns true if the format is 10-bit, false otherwise.
437 *
438 * \threadsafety It is safe to call this macro from any thread.
439 *
440 * \since This macro is available since SDL 3.2.0.
441 */
442#define SDL_ISPIXELFORMAT_10BIT(format) \
443 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
444 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32) && \
445 (SDL_PIXELLAYOUT(format) == SDL_PACKEDLAYOUT_2101010)))
446
447/**
448 * A macro to determine if an SDL_PixelFormat is a floating point format.
449 *
450 * Note that this macro double-evaluates its parameter, so do not use
451 * expressions with side-effects here.
452 *
453 * \param format an SDL_PixelFormat to check.
454 * \returns true if the format is 10-bit, false otherwise.
455 *
456 * \threadsafety It is safe to call this macro from any thread.
457 *
458 * \since This macro is available since SDL 3.2.0.
459 */
460#define SDL_ISPIXELFORMAT_FLOAT(format) \
461 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
462 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \
463 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32)))
464
465/**
466 * A macro to determine if an SDL_PixelFormat has an alpha channel.
467 *
468 * Note that this macro double-evaluates its parameter, so do not use
469 * expressions with side-effects here.
470 *
471 * \param format an SDL_PixelFormat to check.
472 * \returns true if the format has alpha, false otherwise.
473 *
474 * \threadsafety It is safe to call this macro from any thread.
475 *
476 * \since This macro is available since SDL 3.2.0.
477 */
478#define SDL_ISPIXELFORMAT_ALPHA(format) \
479 ((SDL_ISPIXELFORMAT_PACKED(format) && \
480 ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \
481 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \
482 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \
483 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \
484 (SDL_ISPIXELFORMAT_ARRAY(format) && \
485 ((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \
486 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \
487 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \
488 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA))))
489
490
491/**
492 * A macro to determine if an SDL_PixelFormat is a "FourCC" format.
493 *
494 * This covers custom and other unusual formats.
495 *
496 * Note that this macro double-evaluates its parameter, so do not use
497 * expressions with side-effects here.
498 *
499 * \param format an SDL_PixelFormat to check.
500 * \returns true if the format has alpha, false otherwise.
501 *
502 * \threadsafety It is safe to call this macro from any thread.
503 *
504 * \since This macro is available since SDL 3.2.0.
505 */
506#define SDL_ISPIXELFORMAT_FOURCC(format) /* The flag is set to 1 because 0x1? is not in the printable ASCII range */ \
507 ((format) && (SDL_PIXELFLAG(format) != 1))
508
509/* Note: If you modify this enum, update SDL_GetPixelFormatName() */
510
511/**
512 * Pixel format.
513 *
514 * SDL's pixel formats have the following naming convention:
515 *
516 * - Names with a list of components and a single bit count, such as RGB24 and
517 * ABGR32, define a platform-independent encoding into bytes in the order
518 * specified. For example, in RGB24 data, each pixel is encoded in 3 bytes
519 * (red, green, blue) in that order, and in ABGR32 data, each pixel is
520 * encoded in 4 bytes (alpha, blue, green, red) in that order. Use these
521 * names if the property of a format that is important to you is the order
522 * of the bytes in memory or on disk.
523 * - Names with a bit count per component, such as ARGB8888 and XRGB1555, are
524 * "packed" into an appropriately-sized integer in the platform's native
525 * endianness. For example, ARGB8888 is a sequence of 32-bit integers; in
526 * each integer, the most significant bits are alpha, and the least
527 * significant bits are blue. On a little-endian CPU such as x86, the least
528 * significant bits of each integer are arranged first in memory, but on a
529 * big-endian CPU such as s390x, the most significant bits are arranged
530 * first. Use these names if the property of a format that is important to
531 * you is the meaning of each bit position within a native-endianness
532 * integer.
533 * - In indexed formats such as INDEX4LSB, each pixel is represented by
534 * encoding an index into the palette into the indicated number of bits,
535 * with multiple pixels packed into each byte if appropriate. In LSB
536 * formats, the first (leftmost) pixel is stored in the least-significant
537 * bits of the byte; in MSB formats, it's stored in the most-significant
538 * bits. INDEX8 does not need LSB/MSB variants, because each pixel exactly
539 * fills one byte.
540 *
541 * The 32-bit byte-array encodings such as RGBA32 are aliases for the
542 * appropriate 8888 encoding for the current platform. For example, RGBA32 is
543 * an alias for ABGR8888 on little-endian CPUs like x86, or an alias for
544 * RGBA8888 on big-endian CPUs.
545 *
546 * \since This enum is available since SDL 3.2.0.
547 */
548typedef enum SDL_PixelFormat
549{
550 SDL_PIXELFORMAT_UNKNOWN = 0,
551 SDL_PIXELFORMAT_INDEX1LSB = 0x11100100u,
552 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0, 1, 0), */
553 SDL_PIXELFORMAT_INDEX1MSB = 0x11200100u,
554 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0, 1, 0), */
555 SDL_PIXELFORMAT_INDEX2LSB = 0x1c100200u,
556 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX2, SDL_BITMAPORDER_4321, 0, 2, 0), */
557 SDL_PIXELFORMAT_INDEX2MSB = 0x1c200200u,
558 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX2, SDL_BITMAPORDER_1234, 0, 2, 0), */
559 SDL_PIXELFORMAT_INDEX4LSB = 0x12100400u,
560 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0, 4, 0), */
561 SDL_PIXELFORMAT_INDEX4MSB = 0x12200400u,
562 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0, 4, 0), */
563 SDL_PIXELFORMAT_INDEX8 = 0x13000801u,
564 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1), */
565 SDL_PIXELFORMAT_RGB332 = 0x14110801u,
566 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_332, 8, 1), */
567 SDL_PIXELFORMAT_XRGB4444 = 0x15120c02u,
568 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_4444, 12, 2), */
569 SDL_PIXELFORMAT_XBGR4444 = 0x15520c02u,
570 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_4444, 12, 2), */
571 SDL_PIXELFORMAT_XRGB1555 = 0x15130f02u,
572 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_1555, 15, 2), */
573 SDL_PIXELFORMAT_XBGR1555 = 0x15530f02u,
574 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_1555, 15, 2), */
575 SDL_PIXELFORMAT_ARGB4444 = 0x15321002u,
576 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_4444, 16, 2), */
577 SDL_PIXELFORMAT_RGBA4444 = 0x15421002u,
578 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA, SDL_PACKEDLAYOUT_4444, 16, 2), */
579 SDL_PIXELFORMAT_ABGR4444 = 0x15721002u,
580 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_4444, 16, 2), */
581 SDL_PIXELFORMAT_BGRA4444 = 0x15821002u,
582 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA, SDL_PACKEDLAYOUT_4444, 16, 2), */
583 SDL_PIXELFORMAT_ARGB1555 = 0x15331002u,
584 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_1555, 16, 2), */
585 SDL_PIXELFORMAT_RGBA5551 = 0x15441002u,
586 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA, SDL_PACKEDLAYOUT_5551, 16, 2), */
587 SDL_PIXELFORMAT_ABGR1555 = 0x15731002u,
588 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_1555, 16, 2), */
589 SDL_PIXELFORMAT_BGRA5551 = 0x15841002u,
590 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA, SDL_PACKEDLAYOUT_5551, 16, 2), */
591 SDL_PIXELFORMAT_RGB565 = 0x15151002u,
592 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_565, 16, 2), */
593 SDL_PIXELFORMAT_BGR565 = 0x15551002u,
594 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_565, 16, 2), */
595 SDL_PIXELFORMAT_RGB24 = 0x17101803u,
596 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0, 24, 3), */
597 SDL_PIXELFORMAT_BGR24 = 0x17401803u,
598 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0, 24, 3), */
599 SDL_PIXELFORMAT_XRGB8888 = 0x16161804u,
600 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_8888, 24, 4), */
601 SDL_PIXELFORMAT_RGBX8888 = 0x16261804u,
602 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX, SDL_PACKEDLAYOUT_8888, 24, 4), */
603 SDL_PIXELFORMAT_XBGR8888 = 0x16561804u,
604 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_8888, 24, 4), */
605 SDL_PIXELFORMAT_BGRX8888 = 0x16661804u,
606 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX, SDL_PACKEDLAYOUT_8888, 24, 4), */
607 SDL_PIXELFORMAT_ARGB8888 = 0x16362004u,
608 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_8888, 32, 4), */
609 SDL_PIXELFORMAT_RGBA8888 = 0x16462004u,
610 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA, SDL_PACKEDLAYOUT_8888, 32, 4), */
611 SDL_PIXELFORMAT_ABGR8888 = 0x16762004u,
612 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_8888, 32, 4), */
613 SDL_PIXELFORMAT_BGRA8888 = 0x16862004u,
614 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA, SDL_PACKEDLAYOUT_8888, 32, 4), */
615 SDL_PIXELFORMAT_XRGB2101010 = 0x16172004u,
616 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_2101010, 32, 4), */
617 SDL_PIXELFORMAT_XBGR2101010 = 0x16572004u,
618 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_2101010, 32, 4), */
619 SDL_PIXELFORMAT_ARGB2101010 = 0x16372004u,
620 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_2101010, 32, 4), */
621 SDL_PIXELFORMAT_ABGR2101010 = 0x16772004u,
622 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_2101010, 32, 4), */
623 SDL_PIXELFORMAT_RGB48 = 0x18103006u,
624 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_RGB, 0, 48, 6), */
625 SDL_PIXELFORMAT_BGR48 = 0x18403006u,
626 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_BGR, 0, 48, 6), */
627 SDL_PIXELFORMAT_RGBA64 = 0x18204008u,
628 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_RGBA, 0, 64, 8), */
629 SDL_PIXELFORMAT_ARGB64 = 0x18304008u,
630 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_ARGB, 0, 64, 8), */
631 SDL_PIXELFORMAT_BGRA64 = 0x18504008u,
632 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_BGRA, 0, 64, 8), */
633 SDL_PIXELFORMAT_ABGR64 = 0x18604008u,
634 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_ABGR, 0, 64, 8), */
635 SDL_PIXELFORMAT_RGB48_FLOAT = 0x1a103006u,
636 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_RGB, 0, 48, 6), */
637 SDL_PIXELFORMAT_BGR48_FLOAT = 0x1a403006u,
638 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_BGR, 0, 48, 6), */
639 SDL_PIXELFORMAT_RGBA64_FLOAT = 0x1a204008u,
640 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_RGBA, 0, 64, 8), */
641 SDL_PIXELFORMAT_ARGB64_FLOAT = 0x1a304008u,
642 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_ARGB, 0, 64, 8), */
643 SDL_PIXELFORMAT_BGRA64_FLOAT = 0x1a504008u,
644 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_BGRA, 0, 64, 8), */
645 SDL_PIXELFORMAT_ABGR64_FLOAT = 0x1a604008u,
646 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_ABGR, 0, 64, 8), */
647 SDL_PIXELFORMAT_RGB96_FLOAT = 0x1b10600cu,
648 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_RGB, 0, 96, 12), */
649 SDL_PIXELFORMAT_BGR96_FLOAT = 0x1b40600cu,
650 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_BGR, 0, 96, 12), */
651 SDL_PIXELFORMAT_RGBA128_FLOAT = 0x1b208010u,
652 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_RGBA, 0, 128, 16), */
653 SDL_PIXELFORMAT_ARGB128_FLOAT = 0x1b308010u,
654 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_ARGB, 0, 128, 16), */
655 SDL_PIXELFORMAT_BGRA128_FLOAT = 0x1b508010u,
656 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_BGRA, 0, 128, 16), */
657 SDL_PIXELFORMAT_ABGR128_FLOAT = 0x1b608010u,
658 /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_ABGR, 0, 128, 16), */
659
660 SDL_PIXELFORMAT_YV12 = 0x32315659u, /**< Planar mode: Y + V + U (3 planes) */
661 /* SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'), */
662 SDL_PIXELFORMAT_IYUV = 0x56555949u, /**< Planar mode: Y + U + V (3 planes) */
663 /* SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'), */
664 SDL_PIXELFORMAT_YUY2 = 0x32595559u, /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
665 /* SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'), */
666 SDL_PIXELFORMAT_UYVY = 0x59565955u, /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
667 /* SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'), */
668 SDL_PIXELFORMAT_YVYU = 0x55595659u, /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
669 /* SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'), */
670 SDL_PIXELFORMAT_NV12 = 0x3231564eu, /**< Planar mode: Y + U/V interleaved (2 planes) */
671 /* SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'), */
672 SDL_PIXELFORMAT_NV21 = 0x3132564eu, /**< Planar mode: Y + V/U interleaved (2 planes) */
673 /* SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'), */
674 SDL_PIXELFORMAT_P010 = 0x30313050u, /**< Planar mode: Y + U/V interleaved (2 planes) */
675 /* SDL_DEFINE_PIXELFOURCC('P', '0', '1', '0'), */
676 SDL_PIXELFORMAT_EXTERNAL_OES = 0x2053454fu, /**< Android video texture format */
677 /* SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ') */
678
679 SDL_PIXELFORMAT_MJPG = 0x47504a4du, /**< Motion JPEG */
680 /* SDL_DEFINE_PIXELFOURCC('M', 'J', 'P', 'G') */
681
682 /* Aliases for RGBA byte arrays of color data, for the current platform */
683 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
684 SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
685 SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
686 SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
687 SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
688 SDL_PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_RGBX8888,
689 SDL_PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_XRGB8888,
690 SDL_PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_BGRX8888,
691 SDL_PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_XBGR8888
692 #else
693 SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
694 SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
695 SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
696 SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
697 SDL_PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_XBGR8888,
698 SDL_PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_BGRX8888,
699 SDL_PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_XRGB8888,
700 SDL_PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_RGBX8888
701 #endif
702} SDL_PixelFormat;
703
704/**
705 * Colorspace color type.
706 *
707 * \since This enum is available since SDL 3.2.0.
708 */
709typedef enum SDL_ColorType
710{
711 SDL_COLOR_TYPE_UNKNOWN = 0,
712 SDL_COLOR_TYPE_RGB = 1,
713 SDL_COLOR_TYPE_YCBCR = 2
714} SDL_ColorType;
715
716/**
717 * Colorspace color range, as described by
718 * https://www.itu.int/rec/R-REC-BT.2100-2-201807-I/en
719 *
720 * \since This enum is available since SDL 3.2.0.
721 */
722typedef enum SDL_ColorRange
723{
724 SDL_COLOR_RANGE_UNKNOWN = 0,
725 SDL_COLOR_RANGE_LIMITED = 1, /**< Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma */
726 SDL_COLOR_RANGE_FULL = 2 /**< Full range, e.g. 0-255 for 8-bit RGB and luma, and 1-255 for 8-bit chroma */
727} SDL_ColorRange;
728
729/**
730 * Colorspace color primaries, as described by
731 * https://www.itu.int/rec/T-REC-H.273-201612-S/en
732 *
733 * \since This enum is available since SDL 3.2.0.
734 */
735typedef enum SDL_ColorPrimaries
736{
737 SDL_COLOR_PRIMARIES_UNKNOWN = 0,
738 SDL_COLOR_PRIMARIES_BT709 = 1, /**< ITU-R BT.709-6 */
739 SDL_COLOR_PRIMARIES_UNSPECIFIED = 2,
740 SDL_COLOR_PRIMARIES_BT470M = 4, /**< ITU-R BT.470-6 System M */
741 SDL_COLOR_PRIMARIES_BT470BG = 5, /**< ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625 */
742 SDL_COLOR_PRIMARIES_BT601 = 6, /**< ITU-R BT.601-7 525, SMPTE 170M */
743 SDL_COLOR_PRIMARIES_SMPTE240 = 7, /**< SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601 */
744 SDL_COLOR_PRIMARIES_GENERIC_FILM = 8, /**< Generic film (color filters using Illuminant C) */
745 SDL_COLOR_PRIMARIES_BT2020 = 9, /**< ITU-R BT.2020-2 / ITU-R BT.2100-0 */
746 SDL_COLOR_PRIMARIES_XYZ = 10, /**< SMPTE ST 428-1 */
747 SDL_COLOR_PRIMARIES_SMPTE431 = 11, /**< SMPTE RP 431-2 */
748 SDL_COLOR_PRIMARIES_SMPTE432 = 12, /**< SMPTE EG 432-1 / DCI P3 */
749 SDL_COLOR_PRIMARIES_EBU3213 = 22, /**< EBU Tech. 3213-E */
750 SDL_COLOR_PRIMARIES_CUSTOM = 31
751} SDL_ColorPrimaries;
752
753/**
754 * Colorspace transfer characteristics.
755 *
756 * These are as described by https://www.itu.int/rec/T-REC-H.273-201612-S/en
757 *
758 * \since This enum is available since SDL 3.2.0.
759 */
760typedef enum SDL_TransferCharacteristics
761{
762 SDL_TRANSFER_CHARACTERISTICS_UNKNOWN = 0,
763 SDL_TRANSFER_CHARACTERISTICS_BT709 = 1, /**< Rec. ITU-R BT.709-6 / ITU-R BT1361 */
764 SDL_TRANSFER_CHARACTERISTICS_UNSPECIFIED = 2,
765 SDL_TRANSFER_CHARACTERISTICS_GAMMA22 = 4, /**< ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM */
766 SDL_TRANSFER_CHARACTERISTICS_GAMMA28 = 5, /**< ITU-R BT.470-6 System B, G */
767 SDL_TRANSFER_CHARACTERISTICS_BT601 = 6, /**< SMPTE ST 170M / ITU-R BT.601-7 525 or 625 */
768 SDL_TRANSFER_CHARACTERISTICS_SMPTE240 = 7, /**< SMPTE ST 240M */
769 SDL_TRANSFER_CHARACTERISTICS_LINEAR = 8,
770 SDL_TRANSFER_CHARACTERISTICS_LOG100 = 9,
771 SDL_TRANSFER_CHARACTERISTICS_LOG100_SQRT10 = 10,
772 SDL_TRANSFER_CHARACTERISTICS_IEC61966 = 11, /**< IEC 61966-2-4 */
773 SDL_TRANSFER_CHARACTERISTICS_BT1361 = 12, /**< ITU-R BT1361 Extended Colour Gamut */
774 SDL_TRANSFER_CHARACTERISTICS_SRGB = 13, /**< IEC 61966-2-1 (sRGB or sYCC) */
775 SDL_TRANSFER_CHARACTERISTICS_BT2020_10BIT = 14, /**< ITU-R BT2020 for 10-bit system */
776 SDL_TRANSFER_CHARACTERISTICS_BT2020_12BIT = 15, /**< ITU-R BT2020 for 12-bit system */
777 SDL_TRANSFER_CHARACTERISTICS_PQ = 16, /**< SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems */
778 SDL_TRANSFER_CHARACTERISTICS_SMPTE428 = 17, /**< SMPTE ST 428-1 */
779 SDL_TRANSFER_CHARACTERISTICS_HLG = 18, /**< ARIB STD-B67, known as "hybrid log-gamma" (HLG) */
780 SDL_TRANSFER_CHARACTERISTICS_CUSTOM = 31
781} SDL_TransferCharacteristics;
782
783/**
784 * Colorspace matrix coefficients.
785 *
786 * These are as described by https://www.itu.int/rec/T-REC-H.273-201612-S/en
787 *
788 * \since This enum is available since SDL 3.2.0.
789 */
790typedef enum SDL_MatrixCoefficients
791{
792 SDL_MATRIX_COEFFICIENTS_IDENTITY = 0,
793 SDL_MATRIX_COEFFICIENTS_BT709 = 1, /**< ITU-R BT.709-6 */
794 SDL_MATRIX_COEFFICIENTS_UNSPECIFIED = 2,
795 SDL_MATRIX_COEFFICIENTS_FCC = 4, /**< US FCC Title 47 */
796 SDL_MATRIX_COEFFICIENTS_BT470BG = 5, /**< ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601 */
797 SDL_MATRIX_COEFFICIENTS_BT601 = 6, /**< ITU-R BT.601-7 525 */
798 SDL_MATRIX_COEFFICIENTS_SMPTE240 = 7, /**< SMPTE 240M */
799 SDL_MATRIX_COEFFICIENTS_YCGCO = 8,
800 SDL_MATRIX_COEFFICIENTS_BT2020_NCL = 9, /**< ITU-R BT.2020-2 non-constant luminance */
801 SDL_MATRIX_COEFFICIENTS_BT2020_CL = 10, /**< ITU-R BT.2020-2 constant luminance */
802 SDL_MATRIX_COEFFICIENTS_SMPTE2085 = 11, /**< SMPTE ST 2085 */
803 SDL_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL = 12,
804 SDL_MATRIX_COEFFICIENTS_CHROMA_DERIVED_CL = 13,
805 SDL_MATRIX_COEFFICIENTS_ICTCP = 14, /**< ITU-R BT.2100-0 ICTCP */
806 SDL_MATRIX_COEFFICIENTS_CUSTOM = 31
807} SDL_MatrixCoefficients;
808
809/**
810 * Colorspace chroma sample location.
811 *
812 * \since This enum is available since SDL 3.2.0.
813 */
814typedef enum SDL_ChromaLocation
815{
816 SDL_CHROMA_LOCATION_NONE = 0, /**< RGB, no chroma sampling */
817 SDL_CHROMA_LOCATION_LEFT = 1, /**< In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically. */
818 SDL_CHROMA_LOCATION_CENTER = 2, /**< In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel. */
819 SDL_CHROMA_LOCATION_TOPLEFT = 3 /**< In HEVC for BT.2020 and BT.2100 content (in particular on Blu-rays), Cb and Cr are sampled at the same location as the group's top-left Y pixel ("co-sited", "co-located"). */
820} SDL_ChromaLocation;
821
822
823/* Colorspace definition */
824
825/**
826 * A macro for defining custom SDL_Colorspace formats.
827 *
828 * For example, defining SDL_COLORSPACE_SRGB looks like this:
829 *
830 * ```c
831 * SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_RGB,
832 * SDL_COLOR_RANGE_FULL,
833 * SDL_COLOR_PRIMARIES_BT709,
834 * SDL_TRANSFER_CHARACTERISTICS_SRGB,
835 * SDL_MATRIX_COEFFICIENTS_IDENTITY,
836 * SDL_CHROMA_LOCATION_NONE)
837 * ```
838 *
839 * \param type the type of the new format, probably an SDL_ColorType value.
840 * \param range the range of the new format, probably a SDL_ColorRange value.
841 * \param primaries the primaries of the new format, probably an
842 * SDL_ColorPrimaries value.
843 * \param transfer the transfer characteristics of the new format, probably an
844 * SDL_TransferCharacteristics value.
845 * \param matrix the matrix coefficients of the new format, probably an
846 * SDL_MatrixCoefficients value.
847 * \param chroma the chroma sample location of the new format, probably an
848 * SDL_ChromaLocation value.
849 * \returns a format value in the style of SDL_Colorspace.
850 *
851 * \threadsafety It is safe to call this macro from any thread.
852 *
853 * \since This macro is available since SDL 3.2.0.
854 */
855#define SDL_DEFINE_COLORSPACE(type, range, primaries, transfer, matrix, chroma) \
856 (((Uint32)(type) << 28) | ((Uint32)(range) << 24) | ((Uint32)(chroma) << 20) | \
857 ((Uint32)(primaries) << 10) | ((Uint32)(transfer) << 5) | ((Uint32)(matrix) << 0))
858
859/**
860 * A macro to retrieve the type of an SDL_Colorspace.
861 *
862 * \param cspace an SDL_Colorspace to check.
863 * \returns the SDL_ColorType for `cspace`.
864 *
865 * \threadsafety It is safe to call this macro from any thread.
866 *
867 * \since This macro is available since SDL 3.2.0.
868 */
869#define SDL_COLORSPACETYPE(cspace) (SDL_ColorType)(((cspace) >> 28) & 0x0F)
870
871/**
872 * A macro to retrieve the range of an SDL_Colorspace.
873 *
874 * \param cspace an SDL_Colorspace to check.
875 * \returns the SDL_ColorRange of `cspace`.
876 *
877 * \threadsafety It is safe to call this macro from any thread.
878 *
879 * \since This macro is available since SDL 3.2.0.
880 */
881#define SDL_COLORSPACERANGE(cspace) (SDL_ColorRange)(((cspace) >> 24) & 0x0F)
882
883/**
884 * A macro to retrieve the chroma sample location of an SDL_Colorspace.
885 *
886 * \param cspace an SDL_Colorspace to check.
887 * \returns the SDL_ChromaLocation of `cspace`.
888 *
889 * \threadsafety It is safe to call this macro from any thread.
890 *
891 * \since This macro is available since SDL 3.2.0.
892 */
893#define SDL_COLORSPACECHROMA(cspace) (SDL_ChromaLocation)(((cspace) >> 20) & 0x0F)
894
895/**
896 * A macro to retrieve the primaries of an SDL_Colorspace.
897 *
898 * \param cspace an SDL_Colorspace to check.
899 * \returns the SDL_ColorPrimaries of `cspace`.
900 *
901 * \threadsafety It is safe to call this macro from any thread.
902 *
903 * \since This macro is available since SDL 3.2.0.
904 */
905#define SDL_COLORSPACEPRIMARIES(cspace) (SDL_ColorPrimaries)(((cspace) >> 10) & 0x1F)
906
907/**
908 * A macro to retrieve the transfer characteristics of an SDL_Colorspace.
909 *
910 * \param cspace an SDL_Colorspace to check.
911 * \returns the SDL_TransferCharacteristics of `cspace`.
912 *
913 * \threadsafety It is safe to call this macro from any thread.
914 *
915 * \since This macro is available since SDL 3.2.0.
916 */
917#define SDL_COLORSPACETRANSFER(cspace) (SDL_TransferCharacteristics)(((cspace) >> 5) & 0x1F)
918
919/**
920 * A macro to retrieve the matrix coefficients of an SDL_Colorspace.
921 *
922 * \param cspace an SDL_Colorspace to check.
923 * \returns the SDL_MatrixCoefficients of `cspace`.
924 *
925 * \threadsafety It is safe to call this macro from any thread.
926 *
927 * \since This macro is available since SDL 3.2.0.
928 */
929#define SDL_COLORSPACEMATRIX(cspace) (SDL_MatrixCoefficients)((cspace) & 0x1F)
930
931/**
932 * A macro to determine if an SDL_Colorspace uses BT601 (or BT470BG) matrix
933 * coefficients.
934 *
935 * Note that this macro double-evaluates its parameter, so do not use
936 * expressions with side-effects here.
937 *
938 * \param cspace an SDL_Colorspace to check.
939 * \returns true if BT601 or BT470BG, false otherwise.
940 *
941 * \threadsafety It is safe to call this macro from any thread.
942 *
943 * \since This macro is available since SDL 3.2.0.
944 */
945#define SDL_ISCOLORSPACE_MATRIX_BT601(cspace) (SDL_COLORSPACEMATRIX(cspace) == SDL_MATRIX_COEFFICIENTS_BT601 || SDL_COLORSPACEMATRIX(cspace) == SDL_MATRIX_COEFFICIENTS_BT470BG)
946
947/**
948 * A macro to determine if an SDL_Colorspace uses BT709 matrix coefficients.
949 *
950 * \param cspace an SDL_Colorspace to check.
951 * \returns true if BT709, false otherwise.
952 *
953 * \threadsafety It is safe to call this macro from any thread.
954 *
955 * \since This macro is available since SDL 3.2.0.
956 */
957#define SDL_ISCOLORSPACE_MATRIX_BT709(cspace) (SDL_COLORSPACEMATRIX(cspace) == SDL_MATRIX_COEFFICIENTS_BT709)
958
959/**
960 * A macro to determine if an SDL_Colorspace uses BT2020_NCL matrix
961 * coefficients.
962 *
963 * \param cspace an SDL_Colorspace to check.
964 * \returns true if BT2020_NCL, false otherwise.
965 *
966 * \threadsafety It is safe to call this macro from any thread.
967 *
968 * \since This macro is available since SDL 3.2.0.
969 */
970#define SDL_ISCOLORSPACE_MATRIX_BT2020_NCL(cspace) (SDL_COLORSPACEMATRIX(cspace) == SDL_MATRIX_COEFFICIENTS_BT2020_NCL)
971
972/**
973 * A macro to determine if an SDL_Colorspace has a limited range.
974 *
975 * \param cspace an SDL_Colorspace to check.
976 * \returns true if limited range, false otherwise.
977 *
978 * \threadsafety It is safe to call this macro from any thread.
979 *
980 * \since This macro is available since SDL 3.2.0.
981 */
982#define SDL_ISCOLORSPACE_LIMITED_RANGE(cspace) (SDL_COLORSPACERANGE(cspace) != SDL_COLOR_RANGE_FULL)
983
984/**
985 * A macro to determine if an SDL_Colorspace has a full range.
986 *
987 * \param cspace an SDL_Colorspace to check.
988 * \returns true if full range, false otherwise.
989 *
990 * \threadsafety It is safe to call this macro from any thread.
991 *
992 * \since This macro is available since SDL 3.2.0.
993 */
994#define SDL_ISCOLORSPACE_FULL_RANGE(cspace) (SDL_COLORSPACERANGE(cspace) == SDL_COLOR_RANGE_FULL)
995
996/**
997 * Colorspace definitions.
998 *
999 * Since similar colorspaces may vary in their details (matrix, transfer
1000 * function, etc.), this is not an exhaustive list, but rather a
1001 * representative sample of the kinds of colorspaces supported in SDL.
1002 *
1003 * \since This enum is available since SDL 3.2.0.
1004 *
1005 * \sa SDL_ColorPrimaries
1006 * \sa SDL_ColorRange
1007 * \sa SDL_ColorType
1008 * \sa SDL_MatrixCoefficients
1009 * \sa SDL_TransferCharacteristics
1010 */
1011typedef enum SDL_Colorspace
1012{
1013 SDL_COLORSPACE_UNKNOWN = 0,
1014
1015 /* sRGB is a gamma corrected colorspace, and the default colorspace for SDL rendering and 8-bit RGB surfaces */
1016 SDL_COLORSPACE_SRGB = 0x120005a0u, /**< Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 */
1017 /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_RGB,
1018 SDL_COLOR_RANGE_FULL,
1019 SDL_COLOR_PRIMARIES_BT709,
1020 SDL_TRANSFER_CHARACTERISTICS_SRGB,
1021 SDL_MATRIX_COEFFICIENTS_IDENTITY,
1022 SDL_CHROMA_LOCATION_NONE), */
1023
1024 /* This is a linear colorspace and the default colorspace for floating point surfaces. On Windows this is the scRGB colorspace, and on Apple platforms this is kCGColorSpaceExtendedLinearSRGB for EDR content */
1025 SDL_COLORSPACE_SRGB_LINEAR = 0x12000500u, /**< Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 */
1026 /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_RGB,
1027 SDL_COLOR_RANGE_FULL,
1028 SDL_COLOR_PRIMARIES_BT709,
1029 SDL_TRANSFER_CHARACTERISTICS_LINEAR,
1030 SDL_MATRIX_COEFFICIENTS_IDENTITY,
1031 SDL_CHROMA_LOCATION_NONE), */
1032
1033 /* HDR10 is a non-linear HDR colorspace and the default colorspace for 10-bit surfaces */
1034 SDL_COLORSPACE_HDR10 = 0x12002600u, /**< Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 */
1035 /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_RGB,
1036 SDL_COLOR_RANGE_FULL,
1037 SDL_COLOR_PRIMARIES_BT2020,
1038 SDL_TRANSFER_CHARACTERISTICS_PQ,
1039 SDL_MATRIX_COEFFICIENTS_IDENTITY,
1040 SDL_CHROMA_LOCATION_NONE), */
1041
1042 SDL_COLORSPACE_JPEG = 0x220004c6u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 */
1043 /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
1044 SDL_COLOR_RANGE_FULL,
1045 SDL_COLOR_PRIMARIES_BT709,
1046 SDL_TRANSFER_CHARACTERISTICS_BT601,
1047 SDL_MATRIX_COEFFICIENTS_BT601,
1048 SDL_CHROMA_LOCATION_NONE), */
1049
1050 SDL_COLORSPACE_BT601_LIMITED = 0x211018c6u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 */
1051 /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
1052 SDL_COLOR_RANGE_LIMITED,
1053 SDL_COLOR_PRIMARIES_BT601,
1054 SDL_TRANSFER_CHARACTERISTICS_BT601,
1055 SDL_MATRIX_COEFFICIENTS_BT601,
1056 SDL_CHROMA_LOCATION_LEFT), */
1057
1058 SDL_COLORSPACE_BT601_FULL = 0x221018c6u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 */
1059 /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
1060 SDL_COLOR_RANGE_FULL,
1061 SDL_COLOR_PRIMARIES_BT601,
1062 SDL_TRANSFER_CHARACTERISTICS_BT601,
1063 SDL_MATRIX_COEFFICIENTS_BT601,
1064 SDL_CHROMA_LOCATION_LEFT), */
1065
1066 SDL_COLORSPACE_BT709_LIMITED = 0x21100421u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 */
1067 /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
1068 SDL_COLOR_RANGE_LIMITED,
1069 SDL_COLOR_PRIMARIES_BT709,
1070 SDL_TRANSFER_CHARACTERISTICS_BT709,
1071 SDL_MATRIX_COEFFICIENTS_BT709,
1072 SDL_CHROMA_LOCATION_LEFT), */
1073
1074 SDL_COLORSPACE_BT709_FULL = 0x22100421u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 */
1075 /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
1076 SDL_COLOR_RANGE_FULL,
1077 SDL_COLOR_PRIMARIES_BT709,
1078 SDL_TRANSFER_CHARACTERISTICS_BT709,
1079 SDL_MATRIX_COEFFICIENTS_BT709,
1080 SDL_CHROMA_LOCATION_LEFT), */
1081
1082 SDL_COLORSPACE_BT2020_LIMITED = 0x21102609u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 */
1083 /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
1084 SDL_COLOR_RANGE_LIMITED,
1085 SDL_COLOR_PRIMARIES_BT2020,
1086 SDL_TRANSFER_CHARACTERISTICS_PQ,
1087 SDL_MATRIX_COEFFICIENTS_BT2020_NCL,
1088 SDL_CHROMA_LOCATION_LEFT), */
1089
1090 SDL_COLORSPACE_BT2020_FULL = 0x22102609u, /**< Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 */
1091 /* SDL_DEFINE_COLORSPACE(SDL_COLOR_TYPE_YCBCR,
1092 SDL_COLOR_RANGE_FULL,
1093 SDL_COLOR_PRIMARIES_BT2020,
1094 SDL_TRANSFER_CHARACTERISTICS_PQ,
1095 SDL_MATRIX_COEFFICIENTS_BT2020_NCL,
1096 SDL_CHROMA_LOCATION_LEFT), */
1097
1098 SDL_COLORSPACE_RGB_DEFAULT = SDL_COLORSPACE_SRGB, /**< The default colorspace for RGB surfaces if no colorspace is specified */
1099 SDL_COLORSPACE_YUV_DEFAULT = SDL_COLORSPACE_JPEG /**< The default colorspace for YUV surfaces if no colorspace is specified */
1100} SDL_Colorspace;
1101
1102/**
1103 * A structure that represents a color as RGBA components.
1104 *
1105 * The bits of this structure can be directly reinterpreted as an
1106 * integer-packed color which uses the SDL_PIXELFORMAT_RGBA32 format
1107 * (SDL_PIXELFORMAT_ABGR8888 on little-endian systems and
1108 * SDL_PIXELFORMAT_RGBA8888 on big-endian systems).
1109 *
1110 * \since This struct is available since SDL 3.2.0.
1111 */
1112typedef struct SDL_Color
1113{
1114 Uint8 r;
1115 Uint8 g;
1116 Uint8 b;
1117 Uint8 a;
1118} SDL_Color;
1119
1120/**
1121 * The bits of this structure can be directly reinterpreted as a float-packed
1122 * color which uses the SDL_PIXELFORMAT_RGBA128_FLOAT format
1123 *
1124 * \since This struct is available since SDL 3.2.0.
1125 */
1126typedef struct SDL_FColor
1127{
1128 float r;
1129 float g;
1130 float b;
1131 float a;
1132} SDL_FColor;
1133
1134/**
1135 * A set of indexed colors representing a palette.
1136 *
1137 * \since This struct is available since SDL 3.2.0.
1138 *
1139 * \sa SDL_SetPaletteColors
1140 */
1141typedef struct SDL_Palette
1142{
1143 int ncolors; /**< number of elements in `colors`. */
1144 SDL_Color *colors; /**< an array of colors, `ncolors` long. */
1145 Uint32 version; /**< internal use only, do not touch. */
1146 int refcount; /**< internal use only, do not touch. */
1147} SDL_Palette;
1148
1149/**
1150 * Details about the format of a pixel.
1151 *
1152 * \since This struct is available since SDL 3.2.0.
1153 */
1154typedef struct SDL_PixelFormatDetails
1155{
1156 SDL_PixelFormat format;
1157 Uint8 bits_per_pixel;
1158 Uint8 bytes_per_pixel;
1159 Uint8 padding[2];
1160 Uint32 Rmask;
1161 Uint32 Gmask;
1162 Uint32 Bmask;
1163 Uint32 Amask;
1164 Uint8 Rbits;
1165 Uint8 Gbits;
1166 Uint8 Bbits;
1167 Uint8 Abits;
1168 Uint8 Rshift;
1169 Uint8 Gshift;
1170 Uint8 Bshift;
1171 Uint8 Ashift;
1172} SDL_PixelFormatDetails;
1173
1174/**
1175 * Get the human readable name of a pixel format.
1176 *
1177 * \param format the pixel format to query.
1178 * \returns the human readable name of the specified pixel format or
1179 * "SDL_PIXELFORMAT_UNKNOWN" if the format isn't recognized.
1180 *
1181 * \threadsafety It is safe to call this function from any thread.
1182 *
1183 * \since This function is available since SDL 3.2.0.
1184 */
1185extern SDL_DECLSPEC const char * SDLCALL SDL_GetPixelFormatName(SDL_PixelFormat format);
1186
1187/**
1188 * Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
1189 *
1190 * \param format one of the SDL_PixelFormat values.
1191 * \param bpp a bits per pixel value; usually 15, 16, or 32.
1192 * \param Rmask a pointer filled in with the red mask for the format.
1193 * \param Gmask a pointer filled in with the green mask for the format.
1194 * \param Bmask a pointer filled in with the blue mask for the format.
1195 * \param Amask a pointer filled in with the alpha mask for the format.
1196 * \returns true on success or false on failure; call SDL_GetError() for more
1197 * information.
1198 *
1199 * \threadsafety It is safe to call this function from any thread.
1200 *
1201 * \since This function is available since SDL 3.2.0.
1202 *
1203 * \sa SDL_GetPixelFormatForMasks
1204 */
1205extern SDL_DECLSPEC bool SDLCALL SDL_GetMasksForPixelFormat(SDL_PixelFormat format, int *bpp, Uint32 *Rmask, Uint32 *Gmask, Uint32 *Bmask, Uint32 *Amask);
1206
1207/**
1208 * Convert a bpp value and RGBA masks to an enumerated pixel format.
1209 *
1210 * This will return `SDL_PIXELFORMAT_UNKNOWN` if the conversion wasn't
1211 * possible.
1212 *
1213 * \param bpp a bits per pixel value; usually 15, 16, or 32.
1214 * \param Rmask the red mask for the format.
1215 * \param Gmask the green mask for the format.
1216 * \param Bmask the blue mask for the format.
1217 * \param Amask the alpha mask for the format.
1218 * \returns the SDL_PixelFormat value corresponding to the format masks, or
1219 * SDL_PIXELFORMAT_UNKNOWN if there isn't a match.
1220 *
1221 * \threadsafety It is safe to call this function from any thread.
1222 *
1223 * \since This function is available since SDL 3.2.0.
1224 *
1225 * \sa SDL_GetMasksForPixelFormat
1226 */
1227extern SDL_DECLSPEC SDL_PixelFormat SDLCALL SDL_GetPixelFormatForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
1228
1229/**
1230 * Create an SDL_PixelFormatDetails structure corresponding to a pixel format.
1231 *
1232 * Returned structure may come from a shared global cache (i.e. not newly
1233 * allocated), and hence should not be modified, especially the palette. Weird
1234 * errors such as `Blit combination not supported` may occur.
1235 *
1236 * \param format one of the SDL_PixelFormat values.
1237 * \returns a pointer to a SDL_PixelFormatDetails structure or NULL on
1238 * failure; call SDL_GetError() for more information.
1239 *
1240 * \threadsafety It is safe to call this function from any thread.
1241 *
1242 * \since This function is available since SDL 3.2.0.
1243 */
1244extern SDL_DECLSPEC const SDL_PixelFormatDetails * SDLCALL SDL_GetPixelFormatDetails(SDL_PixelFormat format);
1245
1246/**
1247 * Create a palette structure with the specified number of color entries.
1248 *
1249 * The palette entries are initialized to white.
1250 *
1251 * \param ncolors represents the number of color entries in the color palette.
1252 * \returns a new SDL_Palette structure on success or NULL on failure (e.g. if
1253 * there wasn't enough memory); call SDL_GetError() for more
1254 * information.
1255 *
1256 * \threadsafety It is safe to call this function from any thread.
1257 *
1258 * \since This function is available since SDL 3.2.0.
1259 *
1260 * \sa SDL_DestroyPalette
1261 * \sa SDL_SetPaletteColors
1262 * \sa SDL_SetSurfacePalette
1263 */
1264extern SDL_DECLSPEC SDL_Palette * SDLCALL SDL_CreatePalette(int ncolors);
1265
1266/**
1267 * Set a range of colors in a palette.
1268 *
1269 * \param palette the SDL_Palette structure to modify.
1270 * \param colors an array of SDL_Color structures to copy into the palette.
1271 * \param firstcolor the index of the first palette entry to modify.
1272 * \param ncolors the number of entries to modify.
1273 * \returns true on success or false on failure; call SDL_GetError() for more
1274 * information.
1275 *
1276 * \threadsafety It is safe to call this function from any thread, as long as
1277 * the palette is not modified or destroyed in another thread.
1278 *
1279 * \since This function is available since SDL 3.2.0.
1280 */
1281extern SDL_DECLSPEC bool SDLCALL SDL_SetPaletteColors(SDL_Palette *palette, const SDL_Color *colors, int firstcolor, int ncolors);
1282
1283/**
1284 * Free a palette created with SDL_CreatePalette().
1285 *
1286 * \param palette the SDL_Palette structure to be freed.
1287 *
1288 * \threadsafety It is safe to call this function from any thread, as long as
1289 * the palette is not modified or destroyed in another thread.
1290 *
1291 * \since This function is available since SDL 3.2.0.
1292 *
1293 * \sa SDL_CreatePalette
1294 */
1295extern SDL_DECLSPEC void SDLCALL SDL_DestroyPalette(SDL_Palette *palette);
1296
1297/**
1298 * Map an RGB triple to an opaque pixel value for a given pixel format.
1299 *
1300 * This function maps the RGB color value to the specified pixel format and
1301 * returns the pixel value best approximating the given RGB color value for
1302 * the given pixel format.
1303 *
1304 * If the format has a palette (8-bit) the index of the closest matching color
1305 * in the palette will be returned.
1306 *
1307 * If the specified pixel format has an alpha component it will be returned as
1308 * all 1 bits (fully opaque).
1309 *
1310 * If the pixel format bpp (color depth) is less than 32-bpp then the unused
1311 * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
1312 * format the return value can be assigned to a Uint16, and similarly a Uint8
1313 * for an 8-bpp format).
1314 *
1315 * \param format a pointer to SDL_PixelFormatDetails describing the pixel
1316 * format.
1317 * \param palette an optional palette for indexed formats, may be NULL.
1318 * \param r the red component of the pixel in the range 0-255.
1319 * \param g the green component of the pixel in the range 0-255.
1320 * \param b the blue component of the pixel in the range 0-255.
1321 * \returns a pixel value.
1322 *
1323 * \threadsafety It is safe to call this function from any thread, as long as
1324 * the palette is not modified.
1325 *
1326 * \since This function is available since SDL 3.2.0.
1327 *
1328 * \sa SDL_GetPixelFormatDetails
1329 * \sa SDL_GetRGB
1330 * \sa SDL_MapRGBA
1331 * \sa SDL_MapSurfaceRGB
1332 */
1333extern SDL_DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 r, Uint8 g, Uint8 b);
1334
1335/**
1336 * Map an RGBA quadruple to a pixel value for a given pixel format.
1337 *
1338 * This function maps the RGBA color value to the specified pixel format and
1339 * returns the pixel value best approximating the given RGBA color value for
1340 * the given pixel format.
1341 *
1342 * If the specified pixel format has no alpha component the alpha value will
1343 * be ignored (as it will be in formats with a palette).
1344 *
1345 * If the format has a palette (8-bit) the index of the closest matching color
1346 * in the palette will be returned.
1347 *
1348 * If the pixel format bpp (color depth) is less than 32-bpp then the unused
1349 * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
1350 * format the return value can be assigned to a Uint16, and similarly a Uint8
1351 * for an 8-bpp format).
1352 *
1353 * \param format a pointer to SDL_PixelFormatDetails describing the pixel
1354 * format.
1355 * \param palette an optional palette for indexed formats, may be NULL.
1356 * \param r the red component of the pixel in the range 0-255.
1357 * \param g the green component of the pixel in the range 0-255.
1358 * \param b the blue component of the pixel in the range 0-255.
1359 * \param a the alpha component of the pixel in the range 0-255.
1360 * \returns a pixel value.
1361 *
1362 * \threadsafety It is safe to call this function from any thread, as long as
1363 * the palette is not modified.
1364 *
1365 * \since This function is available since SDL 3.2.0.
1366 *
1367 * \sa SDL_GetPixelFormatDetails
1368 * \sa SDL_GetRGBA
1369 * \sa SDL_MapRGB
1370 * \sa SDL_MapSurfaceRGBA
1371 */
1372extern SDL_DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
1373
1374/**
1375 * Get RGB values from a pixel in the specified format.
1376 *
1377 * This function uses the entire 8-bit [0..255] range when converting color
1378 * components from pixel formats with less than 8-bits per RGB component
1379 * (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,
1380 * 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
1381 *
1382 * \param pixel a pixel value.
1383 * \param format a pointer to SDL_PixelFormatDetails describing the pixel
1384 * format.
1385 * \param palette an optional palette for indexed formats, may be NULL.
1386 * \param r a pointer filled in with the red component, may be NULL.
1387 * \param g a pointer filled in with the green component, may be NULL.
1388 * \param b a pointer filled in with the blue component, may be NULL.
1389 *
1390 * \threadsafety It is safe to call this function from any thread, as long as
1391 * the palette is not modified.
1392 *
1393 * \since This function is available since SDL 3.2.0.
1394 *
1395 * \sa SDL_GetPixelFormatDetails
1396 * \sa SDL_GetRGBA
1397 * \sa SDL_MapRGB
1398 * \sa SDL_MapRGBA
1399 */
1400extern SDL_DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 *r, Uint8 *g, Uint8 *b);
1401
1402/**
1403 * Get RGBA values from a pixel in the specified format.
1404 *
1405 * This function uses the entire 8-bit [0..255] range when converting color
1406 * components from pixel formats with less than 8-bits per RGB component
1407 * (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,
1408 * 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
1409 *
1410 * If the surface has no alpha component, the alpha will be returned as 0xff
1411 * (100% opaque).
1412 *
1413 * \param pixel a pixel value.
1414 * \param format a pointer to SDL_PixelFormatDetails describing the pixel
1415 * format.
1416 * \param palette an optional palette for indexed formats, may be NULL.
1417 * \param r a pointer filled in with the red component, may be NULL.
1418 * \param g a pointer filled in with the green component, may be NULL.
1419 * \param b a pointer filled in with the blue component, may be NULL.
1420 * \param a a pointer filled in with the alpha component, may be NULL.
1421 *
1422 * \threadsafety It is safe to call this function from any thread, as long as
1423 * the palette is not modified.
1424 *
1425 * \since This function is available since SDL 3.2.0.
1426 *
1427 * \sa SDL_GetPixelFormatDetails
1428 * \sa SDL_GetRGB
1429 * \sa SDL_MapRGB
1430 * \sa SDL_MapRGBA
1431 */
1432extern SDL_DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel, const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);
1433
1434
1435/* Ends C function definitions when using C++ */
1436#ifdef __cplusplus
1437}
1438#endif
1439#include <SDL3/SDL_close_code.h>
1440
1441#endif /* SDL_pixels_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_platform.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_platform.h
new file mode 100644
index 0000000..e40f009
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_platform.h
@@ -0,0 +1,64 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryPlatform
24 *
25 * SDL provides a means to identify the app's platform, both at compile time
26 * and runtime.
27 */
28
29#ifndef SDL_platform_h_
30#define SDL_platform_h_
31
32#include <SDL3/SDL_platform_defines.h>
33
34#include <SDL3/SDL_begin_code.h>
35/* Set up for C function definitions, even when using C++ */
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40/**
41 * Get the name of the platform.
42 *
43 * Here are the names returned for some (but not all) supported platforms:
44 *
45 * - "Windows"
46 * - "macOS"
47 * - "Linux"
48 * - "iOS"
49 * - "Android"
50 *
51 * \returns the name of the platform. If the correct platform name is not
52 * available, returns a string beginning with the text "Unknown".
53 *
54 * \since This function is available since SDL 3.2.0.
55 */
56extern SDL_DECLSPEC const char * SDLCALL SDL_GetPlatform(void);
57
58/* Ends C function definitions when using C++ */
59#ifdef __cplusplus
60}
61#endif
62#include <SDL3/SDL_close_code.h>
63
64#endif /* SDL_platform_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_platform_defines.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_platform_defines.h
new file mode 100644
index 0000000..6b240a8
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_platform_defines.h
@@ -0,0 +1,476 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: Platform */
23
24/*
25 * SDL_platform_defines.h tries to get a standard set of platform defines.
26 */
27
28#ifndef SDL_platform_defines_h_
29#define SDL_platform_defines_h_
30
31#ifdef _AIX
32
33/**
34 * A preprocessor macro that is only defined if compiling for AIX.
35 *
36 * \since This macro is available since SDL 3.2.0.
37 */
38#define SDL_PLATFORM_AIX 1
39#endif
40
41#ifdef __HAIKU__
42
43/**
44 * A preprocessor macro that is only defined if compiling for Haiku OS.
45 *
46 * \since This macro is available since SDL 3.2.0.
47 */
48#define SDL_PLATFORM_HAIKU 1
49#endif
50
51#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
52
53/**
54 * A preprocessor macro that is only defined if compiling for BSDi
55 *
56 * \since This macro is available since SDL 3.2.0.
57 */
58#define SDL_PLATFORM_BSDI 1
59#endif
60
61#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
62
63/**
64 * A preprocessor macro that is only defined if compiling for FreeBSD.
65 *
66 * \since This macro is available since SDL 3.2.0.
67 */
68#define SDL_PLATFORM_FREEBSD 1
69#endif
70
71#if defined(hpux) || defined(__hpux) || defined(__hpux__)
72
73/**
74 * A preprocessor macro that is only defined if compiling for HP-UX.
75 *
76 * \since This macro is available since SDL 3.2.0.
77 */
78#define SDL_PLATFORM_HPUX 1
79#endif
80
81#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
82
83/**
84 * A preprocessor macro that is only defined if compiling for IRIX.
85 *
86 * \since This macro is available since SDL 3.2.0.
87 */
88#define SDL_PLATFORM_IRIX 1
89#endif
90
91#if (defined(linux) || defined(__linux) || defined(__linux__))
92
93/**
94 * A preprocessor macro that is only defined if compiling for Linux.
95 *
96 * Note that Android, although ostensibly a Linux-based system, will not
97 * define this. It defines SDL_PLATFORM_ANDROID instead.
98 *
99 * \since This macro is available since SDL 3.2.0.
100 */
101#define SDL_PLATFORM_LINUX 1
102#endif
103
104#if defined(ANDROID) || defined(__ANDROID__)
105
106/**
107 * A preprocessor macro that is only defined if compiling for Android.
108 *
109 * \since This macro is available since SDL 3.2.0.
110 */
111#define SDL_PLATFORM_ANDROID 1
112#undef SDL_PLATFORM_LINUX
113#endif
114
115#if defined(__unix__) || defined(__unix) || defined(unix)
116
117/**
118 * A preprocessor macro that is only defined if compiling for a Unix-like
119 * system.
120 *
121 * Other platforms, like Linux, might define this in addition to their primary
122 * define.
123 *
124 * \since This macro is available since SDL 3.2.0.
125 */
126#define SDL_PLATFORM_UNIX 1
127#endif
128
129#ifdef __APPLE__
130
131/**
132 * A preprocessor macro that is only defined if compiling for Apple platforms.
133 *
134 * iOS, macOS, etc will additionally define a more specific platform macro.
135 *
136 * \since This macro is available since SDL 3.2.0.
137 *
138 * \sa SDL_PLATFORM_MACOS
139 * \sa SDL_PLATFORM_IOS
140 * \sa SDL_PLATFORM_TVOS
141 * \sa SDL_PLATFORM_VISIONOS
142 */
143#define SDL_PLATFORM_APPLE 1
144
145/* lets us know what version of macOS we're compiling on */
146#include <AvailabilityMacros.h>
147#ifndef __has_extension /* Older compilers don't support this */
148 #define __has_extension(x) 0
149 #include <TargetConditionals.h>
150 #undef __has_extension
151#else
152 #include <TargetConditionals.h>
153#endif
154
155/* Fix building with older SDKs that don't define these
156 See this for more information:
157 https://stackoverflow.com/questions/12132933/preprocessor-macro-for-os-x-targets
158*/
159#ifndef TARGET_OS_MACCATALYST
160 #define TARGET_OS_MACCATALYST 0
161#endif
162#ifndef TARGET_OS_IOS
163 #define TARGET_OS_IOS 0
164#endif
165#ifndef TARGET_OS_IPHONE
166 #define TARGET_OS_IPHONE 0
167#endif
168#ifndef TARGET_OS_TV
169 #define TARGET_OS_TV 0
170#endif
171#ifndef TARGET_OS_SIMULATOR
172 #define TARGET_OS_SIMULATOR 0
173#endif
174#ifndef TARGET_OS_VISION
175 #define TARGET_OS_VISION 0
176#endif
177
178#if TARGET_OS_TV
179
180/**
181 * A preprocessor macro that is only defined if compiling for tvOS.
182 *
183 * \since This macro is available since SDL 3.2.0.
184 *
185 * \sa SDL_PLATFORM_APPLE
186 */
187#define SDL_PLATFORM_TVOS 1
188#endif
189
190#if TARGET_OS_VISION
191
192/**
193 * A preprocessor macro that is only defined if compiling for VisionOS.
194 *
195 * \since This macro is available since SDL 3.2.0.
196 *
197 * \sa SDL_PLATFORM_APPLE
198 */
199#define SDL_PLATFORM_VISIONOS 1
200#endif
201
202#if TARGET_OS_IPHONE
203
204/**
205 * A preprocessor macro that is only defined if compiling for iOS.
206 *
207 * \since This macro is available since SDL 3.2.0.
208 *
209 * \sa SDL_PLATFORM_APPLE
210 */
211#define SDL_PLATFORM_IOS 1
212
213#else
214
215/**
216 * A preprocessor macro that is only defined if compiling for macOS.
217 *
218 * \since This macro is available since SDL 3.2.0.
219 *
220 * \sa SDL_PLATFORM_APPLE
221 */
222#define SDL_PLATFORM_MACOS 1
223
224#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
225 #error SDL for macOS only supports deploying on 10.7 and above.
226#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1070 */
227#endif /* TARGET_OS_IPHONE */
228#endif /* defined(__APPLE__) */
229
230#ifdef __EMSCRIPTEN__
231
232/**
233 * A preprocessor macro that is only defined if compiling for Emscripten.
234 *
235 * \since This macro is available since SDL 3.2.0.
236 */
237#define SDL_PLATFORM_EMSCRIPTEN 1
238#endif
239
240#ifdef __NetBSD__
241
242/**
243 * A preprocessor macro that is only defined if compiling for NetBSD.
244 *
245 * \since This macro is available since SDL 3.2.0.
246 */
247#define SDL_PLATFORM_NETBSD 1
248#endif
249
250#ifdef __OpenBSD__
251
252/**
253 * A preprocessor macro that is only defined if compiling for OpenBSD.
254 *
255 * \since This macro is available since SDL 3.2.0.
256 */
257#define SDL_PLATFORM_OPENBSD 1
258#endif
259
260#if defined(__OS2__) || defined(__EMX__)
261
262/**
263 * A preprocessor macro that is only defined if compiling for OS/2.
264 *
265 * \since This macro is available since SDL 3.2.0.
266 */
267#define SDL_PLATFORM_OS2 1
268#endif
269
270#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
271
272/**
273 * A preprocessor macro that is only defined if compiling for Tru64 (OSF/1).
274 *
275 * \since This macro is available since SDL 3.2.0.
276 */
277#define SDL_PLATFORM_OSF 1
278#endif
279
280#ifdef __QNXNTO__
281
282/**
283 * A preprocessor macro that is only defined if compiling for QNX Neutrino.
284 *
285 * \since This macro is available since SDL 3.2.0.
286 */
287#define SDL_PLATFORM_QNXNTO 1
288#endif
289
290#if defined(riscos) || defined(__riscos) || defined(__riscos__)
291
292/**
293 * A preprocessor macro that is only defined if compiling for RISC OS.
294 *
295 * \since This macro is available since SDL 3.2.0.
296 */
297#define SDL_PLATFORM_RISCOS 1
298#endif
299
300#if defined(__sun) && defined(__SVR4)
301
302/**
303 * A preprocessor macro that is only defined if compiling for SunOS/Solaris.
304 *
305 * \since This macro is available since SDL 3.2.0.
306 */
307#define SDL_PLATFORM_SOLARIS 1
308#endif
309
310#if defined(__CYGWIN__)
311
312/**
313 * A preprocessor macro that is only defined if compiling for Cygwin.
314 *
315 * \since This macro is available since SDL 3.2.0.
316 */
317#define SDL_PLATFORM_CYGWIN 1
318#endif
319
320#if defined(_WIN32) || defined(SDL_PLATFORM_CYGWIN)
321
322/**
323 * A preprocessor macro that is only defined if compiling for Windows.
324 *
325 * This also covers several other platforms, like Microsoft GDK, Xbox, WinRT,
326 * etc. Each will have their own more-specific platform macros, too.
327 *
328 * \since This macro is available since SDL 3.2.0.
329 *
330 * \sa SDL_PLATFORM_WIN32
331 * \sa SDL_PLATFORM_XBOXONE
332 * \sa SDL_PLATFORM_XBOXSERIES
333 * \sa SDL_PLATFORM_WINGDK
334 * \sa SDL_PLATFORM_GDK
335 */
336#define SDL_PLATFORM_WINDOWS 1
337
338/* Try to find out if we're compiling for WinRT, GDK or non-WinRT/GDK */
339#if defined(_MSC_VER) && defined(__has_include)
340 #if __has_include(<winapifamily.h>)
341 #define HAVE_WINAPIFAMILY_H 1
342 #else
343 #define HAVE_WINAPIFAMILY_H 0
344 #endif
345
346 /* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
347#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
348 #define HAVE_WINAPIFAMILY_H 1
349#else
350 #define HAVE_WINAPIFAMILY_H 0
351#endif
352
353#if HAVE_WINAPIFAMILY_H
354 #include <winapifamily.h>
355 #define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
356#else
357 #define WINAPI_FAMILY_WINRT 0
358#endif /* HAVE_WINAPIFAMILY_H */
359
360#ifdef SDL_WIKI_DOCUMENTATION_SECTION
361
362/**
363 * A preprocessor macro that defined to 1 if compiling for Windows Phone.
364 *
365 * \since This macro is available since SDL 3.2.0.
366 */
367#define SDL_WINAPI_FAMILY_PHONE (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
368
369#elif defined(HAVE_WINAPIFAMILY_H) && HAVE_WINAPIFAMILY_H
370 #define SDL_WINAPI_FAMILY_PHONE (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
371#else
372 #define SDL_WINAPI_FAMILY_PHONE 0
373#endif
374
375#if WINAPI_FAMILY_WINRT
376#error Windows RT/UWP is no longer supported in SDL
377
378#elif defined(_GAMING_DESKTOP) /* GDK project configuration always defines _GAMING_XXX */
379
380/**
381 * A preprocessor macro that is only defined if compiling for Microsoft GDK
382 * for Windows.
383 *
384 * \since This macro is available since SDL 3.2.0.
385 */
386#define SDL_PLATFORM_WINGDK 1
387
388#elif defined(_GAMING_XBOX_XBOXONE)
389
390/**
391 * A preprocessor macro that is only defined if compiling for Xbox One.
392 *
393 * \since This macro is available since SDL 3.2.0.
394 */
395#define SDL_PLATFORM_XBOXONE 1
396
397#elif defined(_GAMING_XBOX_SCARLETT)
398
399/**
400 * A preprocessor macro that is only defined if compiling for Xbox Series.
401 *
402 * \since This macro is available since SDL 3.2.0.
403 */
404#define SDL_PLATFORM_XBOXSERIES 1
405
406#else
407
408/**
409 * A preprocessor macro that is only defined if compiling for desktop Windows.
410 *
411 * Despite the "32", this also covers 64-bit Windows; as an informal
412 * convention, its system layer tends to still be referred to as "the Win32
413 * API."
414 *
415 * \since This macro is available since SDL 3.2.0.
416 */
417#define SDL_PLATFORM_WIN32 1
418
419#endif
420#endif /* defined(_WIN32) || defined(SDL_PLATFORM_CYGWIN) */
421
422
423/* This is to support generic "any GDK" separate from a platform-specific GDK */
424#if defined(SDL_PLATFORM_WINGDK) || defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
425
426/**
427 * A preprocessor macro that is only defined if compiling for Microsoft GDK on
428 * any platform.
429 *
430 * \since This macro is available since SDL 3.2.0.
431 */
432#define SDL_PLATFORM_GDK 1
433#endif
434
435#if defined(__PSP__) || defined(__psp__)
436
437/**
438 * A preprocessor macro that is only defined if compiling for Sony PSP.
439 *
440 * \since This macro is available since SDL 3.2.0.
441 */
442#define SDL_PLATFORM_PSP 1
443#endif
444
445#if defined(__PS2__) || defined(PS2)
446
447/**
448 * A preprocessor macro that is only defined if compiling for Sony PlayStation
449 * 2.
450 *
451 * \since This macro is available since SDL 3.2.0.
452 */
453#define SDL_PLATFORM_PS2 1
454#endif
455
456#if defined(__vita__) || defined(__psp2__)
457
458/**
459 * A preprocessor macro that is only defined if compiling for Sony Vita.
460 *
461 * \since This macro is available since SDL 3.2.0.
462 */
463#define SDL_PLATFORM_VITA 1
464#endif
465
466#ifdef __3DS__
467
468/**
469 * A preprocessor macro that is only defined if compiling for Nintendo 3DS.
470 *
471 * \since This macro is available since SDL 3.2.0.
472 */
473#define SDL_PLATFORM_3DS 1
474#endif
475
476#endif /* SDL_platform_defines_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_power.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_power.h
new file mode 100644
index 0000000..694fb09
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_power.h
@@ -0,0 +1,106 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#ifndef SDL_power_h_
23#define SDL_power_h_
24
25/**
26 * # CategoryPower
27 *
28 * SDL power management routines.
29 *
30 * There is a single function in this category: SDL_GetPowerInfo().
31 *
32 * This function is useful for games on the go. This allows an app to know if
33 * it's running on a draining battery, which can be useful if the app wants to
34 * reduce processing, or perhaps framerate, to extend the duration of the
35 * battery's charge. Perhaps the app just wants to show a battery meter when
36 * fullscreen, or alert the user when the power is getting extremely low, so
37 * they can save their game.
38 */
39
40#include <SDL3/SDL_stdinc.h>
41#include <SDL3/SDL_error.h>
42
43#include <SDL3/SDL_begin_code.h>
44/* Set up for C function definitions, even when using C++ */
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/**
50 * The basic state for the system's power supply.
51 *
52 * These are results returned by SDL_GetPowerInfo().
53 *
54 * \since This enum is available since SDL 3.2.0.
55 */
56typedef enum SDL_PowerState
57{
58 SDL_POWERSTATE_ERROR = -1, /**< error determining power status */
59 SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */
60 SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
61 SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */
62 SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */
63 SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */
64} SDL_PowerState;
65
66/**
67 * Get the current power supply details.
68 *
69 * You should never take a battery status as absolute truth. Batteries
70 * (especially failing batteries) are delicate hardware, and the values
71 * reported here are best estimates based on what that hardware reports. It's
72 * not uncommon for older batteries to lose stored power much faster than it
73 * reports, or completely drain when reporting it has 20 percent left, etc.
74 *
75 * Battery status can change at any time; if you are concerned with power
76 * state, you should call this function frequently, and perhaps ignore changes
77 * until they seem to be stable for a few seconds.
78 *
79 * It's possible a platform can only report battery percentage or time left
80 * but not both.
81 *
82 * On some platforms, retrieving power supply details might be expensive. If
83 * you want to display continuous status you could call this function every
84 * minute or so.
85 *
86 * \param seconds a pointer filled in with the seconds of battery life left,
87 * or NULL to ignore. This will be filled in with -1 if we
88 * can't determine a value or there is no battery.
89 * \param percent a pointer filled in with the percentage of battery life
90 * left, between 0 and 100, or NULL to ignore. This will be
91 * filled in with -1 we can't determine a value or there is no
92 * battery.
93 * \returns the current battery state or `SDL_POWERSTATE_ERROR` on failure;
94 * call SDL_GetError() for more information.
95 *
96 * \since This function is available since SDL 3.2.0.
97 */
98extern SDL_DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent);
99
100/* Ends C function definitions when using C++ */
101#ifdef __cplusplus
102}
103#endif
104#include <SDL3/SDL_close_code.h>
105
106#endif /* SDL_power_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_process.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_process.h
new file mode 100644
index 0000000..511b2f9
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_process.h
@@ -0,0 +1,430 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryProcess
24 *
25 * Process control support.
26 *
27 * These functions provide a cross-platform way to spawn and manage OS-level
28 * processes.
29 *
30 * You can create a new subprocess with SDL_CreateProcess() and optionally
31 * read and write to it using SDL_ReadProcess() or SDL_GetProcessInput() and
32 * SDL_GetProcessOutput(). If more advanced functionality like chaining input
33 * between processes is necessary, you can use
34 * SDL_CreateProcessWithProperties().
35 *
36 * You can get the status of a created process with SDL_WaitProcess(), or
37 * terminate the process with SDL_KillProcess().
38 *
39 * Don't forget to call SDL_DestroyProcess() to clean up, whether the process
40 * process was killed, terminated on its own, or is still running!
41 */
42
43#ifndef SDL_process_h_
44#define SDL_process_h_
45
46#include <SDL3/SDL_stdinc.h>
47#include <SDL3/SDL_error.h>
48#include <SDL3/SDL_iostream.h>
49#include <SDL3/SDL_properties.h>
50
51#include <SDL3/SDL_begin_code.h>
52/* Set up for C function definitions, even when using C++ */
53#ifdef __cplusplus
54extern "C" {
55#endif
56
57/**
58 * An opaque handle representing a system process.
59 *
60 * \since This datatype is available since SDL 3.2.0.
61 *
62 * \sa SDL_CreateProcess
63 */
64typedef struct SDL_Process SDL_Process;
65
66/**
67 * Create a new process.
68 *
69 * The path to the executable is supplied in args[0]. args[1..N] are
70 * additional arguments passed on the command line of the new process, and the
71 * argument list should be terminated with a NULL, e.g.:
72 *
73 * ```c
74 * const char *args[] = { "myprogram", "argument", NULL };
75 * ```
76 *
77 * Setting pipe_stdio to true is equivalent to setting
78 * `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER` and
79 * `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER` to `SDL_PROCESS_STDIO_APP`, and
80 * will allow the use of SDL_ReadProcess() or SDL_GetProcessInput() and
81 * SDL_GetProcessOutput().
82 *
83 * See SDL_CreateProcessWithProperties() for more details.
84 *
85 * \param args the path and arguments for the new process.
86 * \param pipe_stdio true to create pipes to the process's standard input and
87 * from the process's standard output, false for the process
88 * to have no input and inherit the application's standard
89 * output.
90 * \returns the newly created and running process, or NULL if the process
91 * couldn't be created.
92 *
93 * \threadsafety It is safe to call this function from any thread.
94 *
95 * \since This function is available since SDL 3.2.0.
96 *
97 * \sa SDL_CreateProcessWithProperties
98 * \sa SDL_GetProcessProperties
99 * \sa SDL_ReadProcess
100 * \sa SDL_GetProcessInput
101 * \sa SDL_GetProcessOutput
102 * \sa SDL_KillProcess
103 * \sa SDL_WaitProcess
104 * \sa SDL_DestroyProcess
105 */
106extern SDL_DECLSPEC SDL_Process * SDLCALL SDL_CreateProcess(const char * const *args, bool pipe_stdio);
107
108/**
109 * Description of where standard I/O should be directed when creating a
110 * process.
111 *
112 * If a standard I/O stream is set to SDL_PROCESS_STDIO_INHERITED, it will go
113 * to the same place as the application's I/O stream. This is the default for
114 * standard output and standard error.
115 *
116 * If a standard I/O stream is set to SDL_PROCESS_STDIO_NULL, it is connected
117 * to `NUL:` on Windows and `/dev/null` on POSIX systems. This is the default
118 * for standard input.
119 *
120 * If a standard I/O stream is set to SDL_PROCESS_STDIO_APP, it is connected
121 * to a new SDL_IOStream that is available to the application. Standard input
122 * will be available as `SDL_PROP_PROCESS_STDIN_POINTER` and allows
123 * SDL_GetProcessInput(), standard output will be available as
124 * `SDL_PROP_PROCESS_STDOUT_POINTER` and allows SDL_ReadProcess() and
125 * SDL_GetProcessOutput(), and standard error will be available as
126 * `SDL_PROP_PROCESS_STDERR_POINTER` in the properties for the created
127 * process.
128 *
129 * If a standard I/O stream is set to SDL_PROCESS_STDIO_REDIRECT, it is
130 * connected to an existing SDL_IOStream provided by the application. Standard
131 * input is provided using `SDL_PROP_PROCESS_CREATE_STDIN_POINTER`, standard
132 * output is provided using `SDL_PROP_PROCESS_CREATE_STDOUT_POINTER`, and
133 * standard error is provided using `SDL_PROP_PROCESS_CREATE_STDERR_POINTER`
134 * in the creation properties. These existing streams should be closed by the
135 * application once the new process is created.
136 *
137 * In order to use an SDL_IOStream with SDL_PROCESS_STDIO_REDIRECT, it must
138 * have `SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER` or
139 * `SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER` set. This is true for streams
140 * representing files and process I/O.
141 *
142 * \since This enum is available since SDL 3.2.0.
143 *
144 * \sa SDL_CreateProcessWithProperties
145 * \sa SDL_GetProcessProperties
146 * \sa SDL_ReadProcess
147 * \sa SDL_GetProcessInput
148 * \sa SDL_GetProcessOutput
149 */
150typedef enum SDL_ProcessIO
151{
152 SDL_PROCESS_STDIO_INHERITED, /**< The I/O stream is inherited from the application. */
153 SDL_PROCESS_STDIO_NULL, /**< The I/O stream is ignored. */
154 SDL_PROCESS_STDIO_APP, /**< The I/O stream is connected to a new SDL_IOStream that the application can read or write */
155 SDL_PROCESS_STDIO_REDIRECT /**< The I/O stream is redirected to an existing SDL_IOStream. */
156} SDL_ProcessIO;
157
158/**
159 * Create a new process with the specified properties.
160 *
161 * These are the supported properties:
162 *
163 * - `SDL_PROP_PROCESS_CREATE_ARGS_POINTER`: an array of strings containing
164 * the program to run, any arguments, and a NULL pointer, e.g. const char
165 * *args[] = { "myprogram", "argument", NULL }. This is a required property.
166 * - `SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER`: an SDL_Environment
167 * pointer. If this property is set, it will be the entire environment for
168 * the process, otherwise the current environment is used.
169 * - `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER`: an SDL_ProcessIO value describing
170 * where standard input for the process comes from, defaults to
171 * `SDL_PROCESS_STDIO_NULL`.
172 * - `SDL_PROP_PROCESS_CREATE_STDIN_POINTER`: an SDL_IOStream pointer used for
173 * standard input when `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER` is set to
174 * `SDL_PROCESS_STDIO_REDIRECT`.
175 * - `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER`: an SDL_ProcessIO value
176 * describing where standard output for the process goes to, defaults to
177 * `SDL_PROCESS_STDIO_INHERITED`.
178 * - `SDL_PROP_PROCESS_CREATE_STDOUT_POINTER`: an SDL_IOStream pointer used
179 * for standard output when `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER` is set
180 * to `SDL_PROCESS_STDIO_REDIRECT`.
181 * - `SDL_PROP_PROCESS_CREATE_STDERR_NUMBER`: an SDL_ProcessIO value
182 * describing where standard error for the process goes to, defaults to
183 * `SDL_PROCESS_STDIO_INHERITED`.
184 * - `SDL_PROP_PROCESS_CREATE_STDERR_POINTER`: an SDL_IOStream pointer used
185 * for standard error when `SDL_PROP_PROCESS_CREATE_STDERR_NUMBER` is set to
186 * `SDL_PROCESS_STDIO_REDIRECT`.
187 * - `SDL_PROP_PROCESS_CREATE_STDERR_TO_STDOUT_BOOLEAN`: true if the error
188 * output of the process should be redirected into the standard output of
189 * the process. This property has no effect if
190 * `SDL_PROP_PROCESS_CREATE_STDERR_NUMBER` is set.
191 * - `SDL_PROP_PROCESS_CREATE_BACKGROUND_BOOLEAN`: true if the process should
192 * run in the background. In this case the default input and output is
193 * `SDL_PROCESS_STDIO_NULL` and the exitcode of the process is not
194 * available, and will always be 0.
195 *
196 * On POSIX platforms, wait() and waitpid(-1, ...) should not be called, and
197 * SIGCHLD should not be ignored or handled because those would prevent SDL
198 * from properly tracking the lifetime of the underlying process. You should
199 * use SDL_WaitProcess() instead.
200 *
201 * \param props the properties to use.
202 * \returns the newly created and running process, or NULL if the process
203 * couldn't be created.
204 *
205 * \threadsafety It is safe to call this function from any thread.
206 *
207 * \since This function is available since SDL 3.2.0.
208 *
209 * \sa SDL_CreateProcess
210 * \sa SDL_GetProcessProperties
211 * \sa SDL_ReadProcess
212 * \sa SDL_GetProcessInput
213 * \sa SDL_GetProcessOutput
214 * \sa SDL_KillProcess
215 * \sa SDL_WaitProcess
216 * \sa SDL_DestroyProcess
217 */
218extern SDL_DECLSPEC SDL_Process * SDLCALL SDL_CreateProcessWithProperties(SDL_PropertiesID props);
219
220#define SDL_PROP_PROCESS_CREATE_ARGS_POINTER "SDL.process.create.args"
221#define SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER "SDL.process.create.environment"
222#define SDL_PROP_PROCESS_CREATE_STDIN_NUMBER "SDL.process.create.stdin_option"
223#define SDL_PROP_PROCESS_CREATE_STDIN_POINTER "SDL.process.create.stdin_source"
224#define SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER "SDL.process.create.stdout_option"
225#define SDL_PROP_PROCESS_CREATE_STDOUT_POINTER "SDL.process.create.stdout_source"
226#define SDL_PROP_PROCESS_CREATE_STDERR_NUMBER "SDL.process.create.stderr_option"
227#define SDL_PROP_PROCESS_CREATE_STDERR_POINTER "SDL.process.create.stderr_source"
228#define SDL_PROP_PROCESS_CREATE_STDERR_TO_STDOUT_BOOLEAN "SDL.process.create.stderr_to_stdout"
229#define SDL_PROP_PROCESS_CREATE_BACKGROUND_BOOLEAN "SDL.process.create.background"
230
231/**
232 * Get the properties associated with a process.
233 *
234 * The following read-only properties are provided by SDL:
235 *
236 * - `SDL_PROP_PROCESS_PID_NUMBER`: the process ID of the process.
237 * - `SDL_PROP_PROCESS_STDIN_POINTER`: an SDL_IOStream that can be used to
238 * write input to the process, if it was created with
239 * `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER` set to `SDL_PROCESS_STDIO_APP`.
240 * - `SDL_PROP_PROCESS_STDOUT_POINTER`: a non-blocking SDL_IOStream that can
241 * be used to read output from the process, if it was created with
242 * `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER` set to `SDL_PROCESS_STDIO_APP`.
243 * - `SDL_PROP_PROCESS_STDERR_POINTER`: a non-blocking SDL_IOStream that can
244 * be used to read error output from the process, if it was created with
245 * `SDL_PROP_PROCESS_CREATE_STDERR_NUMBER` set to `SDL_PROCESS_STDIO_APP`.
246 * - `SDL_PROP_PROCESS_BACKGROUND_BOOLEAN`: true if the process is running in
247 * the background.
248 *
249 * \param process the process to query.
250 * \returns a valid property ID on success or 0 on failure; call
251 * SDL_GetError() for more information.
252 *
253 * \threadsafety It is safe to call this function from any thread.
254 *
255 * \since This function is available since SDL 3.2.0.
256 *
257 * \sa SDL_CreateProcess
258 * \sa SDL_CreateProcessWithProperties
259 */
260extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetProcessProperties(SDL_Process *process);
261
262#define SDL_PROP_PROCESS_PID_NUMBER "SDL.process.pid"
263#define SDL_PROP_PROCESS_STDIN_POINTER "SDL.process.stdin"
264#define SDL_PROP_PROCESS_STDOUT_POINTER "SDL.process.stdout"
265#define SDL_PROP_PROCESS_STDERR_POINTER "SDL.process.stderr"
266#define SDL_PROP_PROCESS_BACKGROUND_BOOLEAN "SDL.process.background"
267
268/**
269 * Read all the output from a process.
270 *
271 * If a process was created with I/O enabled, you can use this function to
272 * read the output. This function blocks until the process is complete,
273 * capturing all output, and providing the process exit code.
274 *
275 * The data is allocated with a zero byte at the end (null terminated) for
276 * convenience. This extra byte is not included in the value reported via
277 * `datasize`.
278 *
279 * The data should be freed with SDL_free().
280 *
281 * \param process The process to read.
282 * \param datasize a pointer filled in with the number of bytes read, may be
283 * NULL.
284 * \param exitcode a pointer filled in with the process exit code if the
285 * process has exited, may be NULL.
286 * \returns the data or NULL on failure; call SDL_GetError() for more
287 * information.
288 *
289 * \threadsafety This function is not thread safe.
290 *
291 * \since This function is available since SDL 3.2.0.
292 *
293 * \sa SDL_CreateProcess
294 * \sa SDL_CreateProcessWithProperties
295 * \sa SDL_DestroyProcess
296 */
297extern SDL_DECLSPEC void * SDLCALL SDL_ReadProcess(SDL_Process *process, size_t *datasize, int *exitcode);
298
299/**
300 * Get the SDL_IOStream associated with process standard input.
301 *
302 * The process must have been created with SDL_CreateProcess() and pipe_stdio
303 * set to true, or with SDL_CreateProcessWithProperties() and
304 * `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER` set to `SDL_PROCESS_STDIO_APP`.
305 *
306 * Writing to this stream can return less data than expected if the process
307 * hasn't read its input. It may be blocked waiting for its output to be read,
308 * if so you may need to call SDL_GetProcessOutput() and read the output in
309 * parallel with writing input.
310 *
311 * \param process The process to get the input stream for.
312 * \returns the input stream or NULL on failure; call SDL_GetError() for more
313 * information.
314 *
315 * \threadsafety It is safe to call this function from any thread.
316 *
317 * \since This function is available since SDL 3.2.0.
318 *
319 * \sa SDL_CreateProcess
320 * \sa SDL_CreateProcessWithProperties
321 * \sa SDL_GetProcessOutput
322 */
323extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_GetProcessInput(SDL_Process *process);
324
325/**
326 * Get the SDL_IOStream associated with process standard output.
327 *
328 * The process must have been created with SDL_CreateProcess() and pipe_stdio
329 * set to true, or with SDL_CreateProcessWithProperties() and
330 * `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER` set to `SDL_PROCESS_STDIO_APP`.
331 *
332 * Reading from this stream can return 0 with SDL_GetIOStatus() returning
333 * SDL_IO_STATUS_NOT_READY if no output is available yet.
334 *
335 * \param process The process to get the output stream for.
336 * \returns the output stream or NULL on failure; call SDL_GetError() for more
337 * information.
338 *
339 * \threadsafety It is safe to call this function from any thread.
340 *
341 * \since This function is available since SDL 3.2.0.
342 *
343 * \sa SDL_CreateProcess
344 * \sa SDL_CreateProcessWithProperties
345 * \sa SDL_GetProcessInput
346 */
347extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_GetProcessOutput(SDL_Process *process);
348
349/**
350 * Stop a process.
351 *
352 * \param process The process to stop.
353 * \param force true to terminate the process immediately, false to try to
354 * stop the process gracefully. In general you should try to stop
355 * the process gracefully first as terminating a process may
356 * leave it with half-written data or in some other unstable
357 * state.
358 * \returns true on success or false on failure; call SDL_GetError() for more
359 * information.
360 *
361 * \threadsafety This function is not thread safe.
362 *
363 * \since This function is available since SDL 3.2.0.
364 *
365 * \sa SDL_CreateProcess
366 * \sa SDL_CreateProcessWithProperties
367 * \sa SDL_WaitProcess
368 * \sa SDL_DestroyProcess
369 */
370extern SDL_DECLSPEC bool SDLCALL SDL_KillProcess(SDL_Process *process, bool force);
371
372/**
373 * Wait for a process to finish.
374 *
375 * This can be called multiple times to get the status of a process.
376 *
377 * The exit code will be the exit code of the process if it terminates
378 * normally, a negative signal if it terminated due to a signal, or -255
379 * otherwise. It will not be changed if the process is still running.
380 *
381 * If you create a process with standard output piped to the application
382 * (`pipe_stdio` being true) then you should read all of the process output
383 * before calling SDL_WaitProcess(). If you don't do this the process might be
384 * blocked indefinitely waiting for output to be read and SDL_WaitProcess()
385 * will never return true;
386 *
387 * \param process The process to wait for.
388 * \param block If true, block until the process finishes; otherwise, report
389 * on the process' status.
390 * \param exitcode a pointer filled in with the process exit code if the
391 * process has exited, may be NULL.
392 * \returns true if the process exited, false otherwise.
393 *
394 * \threadsafety This function is not thread safe.
395 *
396 * \since This function is available since SDL 3.2.0.
397 *
398 * \sa SDL_CreateProcess
399 * \sa SDL_CreateProcessWithProperties
400 * \sa SDL_KillProcess
401 * \sa SDL_DestroyProcess
402 */
403extern SDL_DECLSPEC bool SDLCALL SDL_WaitProcess(SDL_Process *process, bool block, int *exitcode);
404
405/**
406 * Destroy a previously created process object.
407 *
408 * Note that this does not stop the process, just destroys the SDL object used
409 * to track it. If you want to stop the process you should use
410 * SDL_KillProcess().
411 *
412 * \param process The process object to destroy.
413 *
414 * \threadsafety This function is not thread safe.
415 *
416 * \since This function is available since SDL 3.2.0.
417 *
418 * \sa SDL_CreateProcess
419 * \sa SDL_CreateProcessWithProperties
420 * \sa SDL_KillProcess
421 */
422extern SDL_DECLSPEC void SDLCALL SDL_DestroyProcess(SDL_Process *process);
423
424/* Ends C function definitions when using C++ */
425#ifdef __cplusplus
426}
427#endif
428#include <SDL3/SDL_close_code.h>
429
430#endif /* SDL_process_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_properties.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_properties.h
new file mode 100644
index 0000000..1f47d5f
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_properties.h
@@ -0,0 +1,543 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryProperties
24 *
25 * A property is a variable that can be created and retrieved by name at
26 * runtime.
27 *
28 * All properties are part of a property group (SDL_PropertiesID). A property
29 * group can be created with the SDL_CreateProperties function and destroyed
30 * with the SDL_DestroyProperties function.
31 *
32 * Properties can be added to and retrieved from a property group through the
33 * following functions:
34 *
35 * - SDL_SetPointerProperty and SDL_GetPointerProperty operate on `void*`
36 * pointer types.
37 * - SDL_SetStringProperty and SDL_GetStringProperty operate on string types.
38 * - SDL_SetNumberProperty and SDL_GetNumberProperty operate on signed 64-bit
39 * integer types.
40 * - SDL_SetFloatProperty and SDL_GetFloatProperty operate on floating point
41 * types.
42 * - SDL_SetBooleanProperty and SDL_GetBooleanProperty operate on boolean
43 * types.
44 *
45 * Properties can be removed from a group by using SDL_ClearProperty.
46 */
47
48
49#ifndef SDL_properties_h_
50#define SDL_properties_h_
51
52#include <SDL3/SDL_stdinc.h>
53#include <SDL3/SDL_error.h>
54
55#include <SDL3/SDL_begin_code.h>
56/* Set up for C function definitions, even when using C++ */
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61/**
62 * SDL properties ID
63 *
64 * \since This datatype is available since SDL 3.2.0.
65 */
66typedef Uint32 SDL_PropertiesID;
67
68/**
69 * SDL property type
70 *
71 * \since This enum is available since SDL 3.2.0.
72 */
73typedef enum SDL_PropertyType
74{
75 SDL_PROPERTY_TYPE_INVALID,
76 SDL_PROPERTY_TYPE_POINTER,
77 SDL_PROPERTY_TYPE_STRING,
78 SDL_PROPERTY_TYPE_NUMBER,
79 SDL_PROPERTY_TYPE_FLOAT,
80 SDL_PROPERTY_TYPE_BOOLEAN
81} SDL_PropertyType;
82
83/**
84 * Get the global SDL properties.
85 *
86 * \returns a valid property ID on success or 0 on failure; call
87 * SDL_GetError() for more information.
88 *
89 * \since This function is available since SDL 3.2.0.
90 */
91extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGlobalProperties(void);
92
93/**
94 * Create a group of properties.
95 *
96 * All properties are automatically destroyed when SDL_Quit() is called.
97 *
98 * \returns an ID for a new group of properties, or 0 on failure; call
99 * SDL_GetError() for more information.
100 *
101 * \threadsafety It is safe to call this function from any thread.
102 *
103 * \since This function is available since SDL 3.2.0.
104 *
105 * \sa SDL_DestroyProperties
106 */
107extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_CreateProperties(void);
108
109/**
110 * Copy a group of properties.
111 *
112 * Copy all the properties from one group of properties to another, with the
113 * exception of properties requiring cleanup (set using
114 * SDL_SetPointerPropertyWithCleanup()), which will not be copied. Any
115 * property that already exists on `dst` will be overwritten.
116 *
117 * \param src the properties to copy.
118 * \param dst the destination properties.
119 * \returns true on success or false on failure; call SDL_GetError() for more
120 * information.
121 *
122 * \threadsafety It is safe to call this function from any thread.
123 *
124 * \since This function is available since SDL 3.2.0.
125 */
126extern SDL_DECLSPEC bool SDLCALL SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst);
127
128/**
129 * Lock a group of properties.
130 *
131 * Obtain a multi-threaded lock for these properties. Other threads will wait
132 * while trying to lock these properties until they are unlocked. Properties
133 * must be unlocked before they are destroyed.
134 *
135 * The lock is automatically taken when setting individual properties, this
136 * function is only needed when you want to set several properties atomically
137 * or want to guarantee that properties being queried aren't freed in another
138 * thread.
139 *
140 * \param props the properties to lock.
141 * \returns true on success or false on failure; call SDL_GetError() for more
142 * information.
143 *
144 * \threadsafety It is safe to call this function from any thread.
145 *
146 * \since This function is available since SDL 3.2.0.
147 *
148 * \sa SDL_UnlockProperties
149 */
150extern SDL_DECLSPEC bool SDLCALL SDL_LockProperties(SDL_PropertiesID props);
151
152/**
153 * Unlock a group of properties.
154 *
155 * \param props the properties to unlock.
156 *
157 * \threadsafety It is safe to call this function from any thread.
158 *
159 * \since This function is available since SDL 3.2.0.
160 *
161 * \sa SDL_LockProperties
162 */
163extern SDL_DECLSPEC void SDLCALL SDL_UnlockProperties(SDL_PropertiesID props);
164
165/**
166 * A callback used to free resources when a property is deleted.
167 *
168 * This should release any resources associated with `value` that are no
169 * longer needed.
170 *
171 * This callback is set per-property. Different properties in the same group
172 * can have different cleanup callbacks.
173 *
174 * This callback will be called _during_ SDL_SetPointerPropertyWithCleanup if
175 * the function fails for any reason.
176 *
177 * \param userdata an app-defined pointer passed to the callback.
178 * \param value the pointer assigned to the property to clean up.
179 *
180 * \threadsafety This callback may fire without any locks held; if this is a
181 * concern, the app should provide its own locking.
182 *
183 * \since This datatype is available since SDL 3.2.0.
184 *
185 * \sa SDL_SetPointerPropertyWithCleanup
186 */
187typedef void (SDLCALL *SDL_CleanupPropertyCallback)(void *userdata, void *value);
188
189/**
190 * Set a pointer property in a group of properties with a cleanup function
191 * that is called when the property is deleted.
192 *
193 * The cleanup function is also called if setting the property fails for any
194 * reason.
195 *
196 * For simply setting basic data types, like numbers, bools, or strings, use
197 * SDL_SetNumberProperty, SDL_SetBooleanProperty, or SDL_SetStringProperty
198 * instead, as those functions will handle cleanup on your behalf. This
199 * function is only for more complex, custom data.
200 *
201 * \param props the properties to modify.
202 * \param name the name of the property to modify.
203 * \param value the new value of the property, or NULL to delete the property.
204 * \param cleanup the function to call when this property is deleted, or NULL
205 * if no cleanup is necessary.
206 * \param userdata a pointer that is passed to the cleanup function.
207 * \returns true on success or false on failure; call SDL_GetError() for more
208 * information.
209 *
210 * \threadsafety It is safe to call this function from any thread.
211 *
212 * \since This function is available since SDL 3.2.0.
213 *
214 * \sa SDL_GetPointerProperty
215 * \sa SDL_SetPointerProperty
216 * \sa SDL_CleanupPropertyCallback
217 */
218extern SDL_DECLSPEC bool SDLCALL SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, SDL_CleanupPropertyCallback cleanup, void *userdata);
219
220/**
221 * Set a pointer property in a group of properties.
222 *
223 * \param props the properties to modify.
224 * \param name the name of the property to modify.
225 * \param value the new value of the property, or NULL to delete the property.
226 * \returns true on success or false on failure; call SDL_GetError() for more
227 * information.
228 *
229 * \threadsafety It is safe to call this function from any thread.
230 *
231 * \since This function is available since SDL 3.2.0.
232 *
233 * \sa SDL_GetPointerProperty
234 * \sa SDL_HasProperty
235 * \sa SDL_SetBooleanProperty
236 * \sa SDL_SetFloatProperty
237 * \sa SDL_SetNumberProperty
238 * \sa SDL_SetPointerPropertyWithCleanup
239 * \sa SDL_SetStringProperty
240 */
241extern SDL_DECLSPEC bool SDLCALL SDL_SetPointerProperty(SDL_PropertiesID props, const char *name, void *value);
242
243/**
244 * Set a string property in a group of properties.
245 *
246 * This function makes a copy of the string; the caller does not have to
247 * preserve the data after this call completes.
248 *
249 * \param props the properties to modify.
250 * \param name the name of the property to modify.
251 * \param value the new value of the property, or NULL to delete the property.
252 * \returns true on success or false on failure; call SDL_GetError() for more
253 * information.
254 *
255 * \threadsafety It is safe to call this function from any thread.
256 *
257 * \since This function is available since SDL 3.2.0.
258 *
259 * \sa SDL_GetStringProperty
260 */
261extern SDL_DECLSPEC bool SDLCALL SDL_SetStringProperty(SDL_PropertiesID props, const char *name, const char *value);
262
263/**
264 * Set an integer property in a group of properties.
265 *
266 * \param props the properties to modify.
267 * \param name the name of the property to modify.
268 * \param value the new value of the property.
269 * \returns true on success or false on failure; call SDL_GetError() for more
270 * information.
271 *
272 * \threadsafety It is safe to call this function from any thread.
273 *
274 * \since This function is available since SDL 3.2.0.
275 *
276 * \sa SDL_GetNumberProperty
277 */
278extern SDL_DECLSPEC bool SDLCALL SDL_SetNumberProperty(SDL_PropertiesID props, const char *name, Sint64 value);
279
280/**
281 * Set a floating point property in a group of properties.
282 *
283 * \param props the properties to modify.
284 * \param name the name of the property to modify.
285 * \param value the new value of the property.
286 * \returns true on success or false on failure; call SDL_GetError() for more
287 * information.
288 *
289 * \threadsafety It is safe to call this function from any thread.
290 *
291 * \since This function is available since SDL 3.2.0.
292 *
293 * \sa SDL_GetFloatProperty
294 */
295extern SDL_DECLSPEC bool SDLCALL SDL_SetFloatProperty(SDL_PropertiesID props, const char *name, float value);
296
297/**
298 * Set a boolean property in a group of properties.
299 *
300 * \param props the properties to modify.
301 * \param name the name of the property to modify.
302 * \param value the new value of the property.
303 * \returns true on success or false on failure; call SDL_GetError() for more
304 * information.
305 *
306 * \threadsafety It is safe to call this function from any thread.
307 *
308 * \since This function is available since SDL 3.2.0.
309 *
310 * \sa SDL_GetBooleanProperty
311 */
312extern SDL_DECLSPEC bool SDLCALL SDL_SetBooleanProperty(SDL_PropertiesID props, const char *name, bool value);
313
314/**
315 * Return whether a property exists in a group of properties.
316 *
317 * \param props the properties to query.
318 * \param name the name of the property to query.
319 * \returns true if the property exists, or false if it doesn't.
320 *
321 * \threadsafety It is safe to call this function from any thread.
322 *
323 * \since This function is available since SDL 3.2.0.
324 *
325 * \sa SDL_GetPropertyType
326 */
327extern SDL_DECLSPEC bool SDLCALL SDL_HasProperty(SDL_PropertiesID props, const char *name);
328
329/**
330 * Get the type of a property in a group of properties.
331 *
332 * \param props the properties to query.
333 * \param name the name of the property to query.
334 * \returns the type of the property, or SDL_PROPERTY_TYPE_INVALID if it is
335 * not set.
336 *
337 * \threadsafety It is safe to call this function from any thread.
338 *
339 * \since This function is available since SDL 3.2.0.
340 *
341 * \sa SDL_HasProperty
342 */
343extern SDL_DECLSPEC SDL_PropertyType SDLCALL SDL_GetPropertyType(SDL_PropertiesID props, const char *name);
344
345/**
346 * Get a pointer property from a group of properties.
347 *
348 * By convention, the names of properties that SDL exposes on objects will
349 * start with "SDL.", and properties that SDL uses internally will start with
350 * "SDL.internal.". These should be considered read-only and should not be
351 * modified by applications.
352 *
353 * \param props the properties to query.
354 * \param name the name of the property to query.
355 * \param default_value the default value of the property.
356 * \returns the value of the property, or `default_value` if it is not set or
357 * not a pointer property.
358 *
359 * \threadsafety It is safe to call this function from any thread, although
360 * the data returned is not protected and could potentially be
361 * freed if you call SDL_SetPointerProperty() or
362 * SDL_ClearProperty() on these properties from another thread.
363 * If you need to avoid this, use SDL_LockProperties() and
364 * SDL_UnlockProperties().
365 *
366 * \since This function is available since SDL 3.2.0.
367 *
368 * \sa SDL_GetBooleanProperty
369 * \sa SDL_GetFloatProperty
370 * \sa SDL_GetNumberProperty
371 * \sa SDL_GetPropertyType
372 * \sa SDL_GetStringProperty
373 * \sa SDL_HasProperty
374 * \sa SDL_SetPointerProperty
375 */
376extern SDL_DECLSPEC void * SDLCALL SDL_GetPointerProperty(SDL_PropertiesID props, const char *name, void *default_value);
377
378/**
379 * Get a string property from a group of properties.
380 *
381 * \param props the properties to query.
382 * \param name the name of the property to query.
383 * \param default_value the default value of the property.
384 * \returns the value of the property, or `default_value` if it is not set or
385 * not a string property.
386 *
387 * \threadsafety It is safe to call this function from any thread, although
388 * the data returned is not protected and could potentially be
389 * freed if you call SDL_SetStringProperty() or
390 * SDL_ClearProperty() on these properties from another thread.
391 * If you need to avoid this, use SDL_LockProperties() and
392 * SDL_UnlockProperties().
393 *
394 * \since This function is available since SDL 3.2.0.
395 *
396 * \sa SDL_GetPropertyType
397 * \sa SDL_HasProperty
398 * \sa SDL_SetStringProperty
399 */
400extern SDL_DECLSPEC const char * SDLCALL SDL_GetStringProperty(SDL_PropertiesID props, const char *name, const char *default_value);
401
402/**
403 * Get a number property from a group of properties.
404 *
405 * You can use SDL_GetPropertyType() to query whether the property exists and
406 * is a number property.
407 *
408 * \param props the properties to query.
409 * \param name the name of the property to query.
410 * \param default_value the default value of the property.
411 * \returns the value of the property, or `default_value` if it is not set or
412 * not a number property.
413 *
414 * \threadsafety It is safe to call this function from any thread.
415 *
416 * \since This function is available since SDL 3.2.0.
417 *
418 * \sa SDL_GetPropertyType
419 * \sa SDL_HasProperty
420 * \sa SDL_SetNumberProperty
421 */
422extern SDL_DECLSPEC Sint64 SDLCALL SDL_GetNumberProperty(SDL_PropertiesID props, const char *name, Sint64 default_value);
423
424/**
425 * Get a floating point property from a group of properties.
426 *
427 * You can use SDL_GetPropertyType() to query whether the property exists and
428 * is a floating point property.
429 *
430 * \param props the properties to query.
431 * \param name the name of the property to query.
432 * \param default_value the default value of the property.
433 * \returns the value of the property, or `default_value` if it is not set or
434 * not a float property.
435 *
436 * \threadsafety It is safe to call this function from any thread.
437 *
438 * \since This function is available since SDL 3.2.0.
439 *
440 * \sa SDL_GetPropertyType
441 * \sa SDL_HasProperty
442 * \sa SDL_SetFloatProperty
443 */
444extern SDL_DECLSPEC float SDLCALL SDL_GetFloatProperty(SDL_PropertiesID props, const char *name, float default_value);
445
446/**
447 * Get a boolean property from a group of properties.
448 *
449 * You can use SDL_GetPropertyType() to query whether the property exists and
450 * is a boolean property.
451 *
452 * \param props the properties to query.
453 * \param name the name of the property to query.
454 * \param default_value the default value of the property.
455 * \returns the value of the property, or `default_value` if it is not set or
456 * not a boolean property.
457 *
458 * \threadsafety It is safe to call this function from any thread.
459 *
460 * \since This function is available since SDL 3.2.0.
461 *
462 * \sa SDL_GetPropertyType
463 * \sa SDL_HasProperty
464 * \sa SDL_SetBooleanProperty
465 */
466extern SDL_DECLSPEC bool SDLCALL SDL_GetBooleanProperty(SDL_PropertiesID props, const char *name, bool default_value);
467
468/**
469 * Clear a property from a group of properties.
470 *
471 * \param props the properties to modify.
472 * \param name the name of the property to clear.
473 * \returns true on success or false on failure; call SDL_GetError() for more
474 * information.
475 *
476 * \threadsafety It is safe to call this function from any thread.
477 *
478 * \since This function is available since SDL 3.2.0.
479 */
480extern SDL_DECLSPEC bool SDLCALL SDL_ClearProperty(SDL_PropertiesID props, const char *name);
481
482/**
483 * A callback used to enumerate all the properties in a group of properties.
484 *
485 * This callback is called from SDL_EnumerateProperties(), and is called once
486 * per property in the set.
487 *
488 * \param userdata an app-defined pointer passed to the callback.
489 * \param props the SDL_PropertiesID that is being enumerated.
490 * \param name the next property name in the enumeration.
491 *
492 * \threadsafety SDL_EnumerateProperties holds a lock on `props` during this
493 * callback.
494 *
495 * \since This datatype is available since SDL 3.2.0.
496 *
497 * \sa SDL_EnumerateProperties
498 */
499typedef void (SDLCALL *SDL_EnumeratePropertiesCallback)(void *userdata, SDL_PropertiesID props, const char *name);
500
501/**
502 * Enumerate the properties contained in a group of properties.
503 *
504 * The callback function is called for each property in the group of
505 * properties. The properties are locked during enumeration.
506 *
507 * \param props the properties to query.
508 * \param callback the function to call for each property.
509 * \param userdata a pointer that is passed to `callback`.
510 * \returns true on success or false on failure; call SDL_GetError() for more
511 * information.
512 *
513 * \threadsafety It is safe to call this function from any thread.
514 *
515 * \since This function is available since SDL 3.2.0.
516 */
517extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateProperties(SDL_PropertiesID props, SDL_EnumeratePropertiesCallback callback, void *userdata);
518
519/**
520 * Destroy a group of properties.
521 *
522 * All properties are deleted and their cleanup functions will be called, if
523 * any.
524 *
525 * \param props the properties to destroy.
526 *
527 * \threadsafety This function should not be called while these properties are
528 * locked or other threads might be setting or getting values
529 * from these properties.
530 *
531 * \since This function is available since SDL 3.2.0.
532 *
533 * \sa SDL_CreateProperties
534 */
535extern SDL_DECLSPEC void SDLCALL SDL_DestroyProperties(SDL_PropertiesID props);
536
537/* Ends C function definitions when using C++ */
538#ifdef __cplusplus
539}
540#endif
541#include <SDL3/SDL_close_code.h>
542
543#endif /* SDL_properties_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_rect.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_rect.h
new file mode 100644
index 0000000..eb2d34a
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_rect.h
@@ -0,0 +1,507 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryRect
24 *
25 * Some helper functions for managing rectangles and 2D points, in both
26 * integer and floating point versions.
27 */
28
29#ifndef SDL_rect_h_
30#define SDL_rect_h_
31
32#include <SDL3/SDL_stdinc.h>
33#include <SDL3/SDL_error.h>
34
35#include <SDL3/SDL_begin_code.h>
36/* Set up for C function definitions, even when using C++ */
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/**
42 * The structure that defines a point (using integers).
43 *
44 * \since This struct is available since SDL 3.2.0.
45 *
46 * \sa SDL_GetRectEnclosingPoints
47 * \sa SDL_PointInRect
48 */
49typedef struct SDL_Point
50{
51 int x;
52 int y;
53} SDL_Point;
54
55/**
56 * The structure that defines a point (using floating point values).
57 *
58 * \since This struct is available since SDL 3.2.0.
59 *
60 * \sa SDL_GetRectEnclosingPointsFloat
61 * \sa SDL_PointInRectFloat
62 */
63typedef struct SDL_FPoint
64{
65 float x;
66 float y;
67} SDL_FPoint;
68
69
70/**
71 * A rectangle, with the origin at the upper left (using integers).
72 *
73 * \since This struct is available since SDL 3.2.0.
74 *
75 * \sa SDL_RectEmpty
76 * \sa SDL_RectsEqual
77 * \sa SDL_HasRectIntersection
78 * \sa SDL_GetRectIntersection
79 * \sa SDL_GetRectAndLineIntersection
80 * \sa SDL_GetRectUnion
81 * \sa SDL_GetRectEnclosingPoints
82 */
83typedef struct SDL_Rect
84{
85 int x, y;
86 int w, h;
87} SDL_Rect;
88
89
90/**
91 * A rectangle, with the origin at the upper left (using floating point
92 * values).
93 *
94 * \since This struct is available since SDL 3.2.0.
95 *
96 * \sa SDL_RectEmptyFloat
97 * \sa SDL_RectsEqualFloat
98 * \sa SDL_RectsEqualEpsilon
99 * \sa SDL_HasRectIntersectionFloat
100 * \sa SDL_GetRectIntersectionFloat
101 * \sa SDL_GetRectAndLineIntersectionFloat
102 * \sa SDL_GetRectUnionFloat
103 * \sa SDL_GetRectEnclosingPointsFloat
104 * \sa SDL_PointInRectFloat
105 */
106typedef struct SDL_FRect
107{
108 float x;
109 float y;
110 float w;
111 float h;
112} SDL_FRect;
113
114
115/**
116 * Convert an SDL_Rect to SDL_FRect
117 *
118 * \param rect a pointer to an SDL_Rect.
119 * \param frect a pointer filled in with the floating point representation of
120 * `rect`.
121 *
122 * \threadsafety It is safe to call this function from any thread.
123 *
124 * \since This function is available since SDL 3.2.0.
125 */
126SDL_FORCE_INLINE void SDL_RectToFRect(const SDL_Rect *rect, SDL_FRect *frect)
127{
128 frect->x = (float)rect->x;
129 frect->y = (float)rect->y;
130 frect->w = (float)rect->w;
131 frect->h = (float)rect->h;
132}
133
134/**
135 * Determine whether a point resides inside a rectangle.
136 *
137 * A point is considered part of a rectangle if both `p` and `r` are not NULL,
138 * and `p`'s x and y coordinates are >= to the rectangle's top left corner,
139 * and < the rectangle's x+w and y+h. So a 1x1 rectangle considers point (0,0)
140 * as "inside" and (0,1) as not.
141 *
142 * Note that this is a forced-inline function in a header, and not a public
143 * API function available in the SDL library (which is to say, the code is
144 * embedded in the calling program and the linker and dynamic loader will not
145 * be able to find this function inside SDL itself).
146 *
147 * \param p the point to test.
148 * \param r the rectangle to test.
149 * \returns true if `p` is contained by `r`, false otherwise.
150 *
151 * \threadsafety It is safe to call this function from any thread.
152 *
153 * \since This function is available since SDL 3.2.0.
154 */
155SDL_FORCE_INLINE bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
156{
157 return ( p && r && (p->x >= r->x) && (p->x < (r->x + r->w)) &&
158 (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? true : false;
159}
160
161/**
162 * Determine whether a rectangle has no area.
163 *
164 * A rectangle is considered "empty" for this function if `r` is NULL, or if
165 * `r`'s width and/or height are <= 0.
166 *
167 * Note that this is a forced-inline function in a header, and not a public
168 * API function available in the SDL library (which is to say, the code is
169 * embedded in the calling program and the linker and dynamic loader will not
170 * be able to find this function inside SDL itself).
171 *
172 * \param r the rectangle to test.
173 * \returns true if the rectangle is "empty", false otherwise.
174 *
175 * \threadsafety It is safe to call this function from any thread.
176 *
177 * \since This function is available since SDL 3.2.0.
178 */
179SDL_FORCE_INLINE bool SDL_RectEmpty(const SDL_Rect *r)
180{
181 return ((!r) || (r->w <= 0) || (r->h <= 0)) ? true : false;
182}
183
184/**
185 * Determine whether two rectangles are equal.
186 *
187 * Rectangles are considered equal if both are not NULL and each of their x,
188 * y, width and height match.
189 *
190 * Note that this is a forced-inline function in a header, and not a public
191 * API function available in the SDL library (which is to say, the code is
192 * embedded in the calling program and the linker and dynamic loader will not
193 * be able to find this function inside SDL itself).
194 *
195 * \param a the first rectangle to test.
196 * \param b the second rectangle to test.
197 * \returns true if the rectangles are equal, false otherwise.
198 *
199 * \threadsafety It is safe to call this function from any thread.
200 *
201 * \since This function is available since SDL 3.2.0.
202 */
203SDL_FORCE_INLINE bool SDL_RectsEqual(const SDL_Rect *a, const SDL_Rect *b)
204{
205 return (a && b && (a->x == b->x) && (a->y == b->y) &&
206 (a->w == b->w) && (a->h == b->h)) ? true : false;
207}
208
209/**
210 * Determine whether two rectangles intersect.
211 *
212 * If either pointer is NULL the function will return false.
213 *
214 * \param A an SDL_Rect structure representing the first rectangle.
215 * \param B an SDL_Rect structure representing the second rectangle.
216 * \returns true if there is an intersection, false otherwise.
217 *
218 * \threadsafety It is safe to call this function from any thread.
219 *
220 * \since This function is available since SDL 3.2.0.
221 *
222 * \sa SDL_GetRectIntersection
223 */
224extern SDL_DECLSPEC bool SDLCALL SDL_HasRectIntersection(const SDL_Rect *A, const SDL_Rect *B);
225
226/**
227 * Calculate the intersection of two rectangles.
228 *
229 * If `result` is NULL then this function will return false.
230 *
231 * \param A an SDL_Rect structure representing the first rectangle.
232 * \param B an SDL_Rect structure representing the second rectangle.
233 * \param result an SDL_Rect structure filled in with the intersection of
234 * rectangles `A` and `B`.
235 * \returns true if there is an intersection, false otherwise.
236 *
237 * \since This function is available since SDL 3.2.0.
238 *
239 * \sa SDL_HasRectIntersection
240 */
241extern SDL_DECLSPEC bool SDLCALL SDL_GetRectIntersection(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result);
242
243/**
244 * Calculate the union of two rectangles.
245 *
246 * \param A an SDL_Rect structure representing the first rectangle.
247 * \param B an SDL_Rect structure representing the second rectangle.
248 * \param result an SDL_Rect structure filled in with the union of rectangles
249 * `A` and `B`.
250 * \returns true on success or false on failure; call SDL_GetError() for more
251 * information.
252 *
253 * \since This function is available since SDL 3.2.0.
254 */
255extern SDL_DECLSPEC bool SDLCALL SDL_GetRectUnion(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result);
256
257/**
258 * Calculate a minimal rectangle enclosing a set of points.
259 *
260 * If `clip` is not NULL then only points inside of the clipping rectangle are
261 * considered.
262 *
263 * \param points an array of SDL_Point structures representing points to be
264 * enclosed.
265 * \param count the number of structures in the `points` array.
266 * \param clip an SDL_Rect used for clipping or NULL to enclose all points.
267 * \param result an SDL_Rect structure filled in with the minimal enclosing
268 * rectangle.
269 * \returns true if any points were enclosed or false if all the points were
270 * outside of the clipping rectangle.
271 *
272 * \since This function is available since SDL 3.2.0.
273 */
274extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPoints(const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result);
275
276/**
277 * Calculate the intersection of a rectangle and line segment.
278 *
279 * This function is used to clip a line segment to a rectangle. A line segment
280 * contained entirely within the rectangle or that does not intersect will
281 * remain unchanged. A line segment that crosses the rectangle at either or
282 * both ends will be clipped to the boundary of the rectangle and the new
283 * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
284 *
285 * \param rect an SDL_Rect structure representing the rectangle to intersect.
286 * \param X1 a pointer to the starting X-coordinate of the line.
287 * \param Y1 a pointer to the starting Y-coordinate of the line.
288 * \param X2 a pointer to the ending X-coordinate of the line.
289 * \param Y2 a pointer to the ending Y-coordinate of the line.
290 * \returns true if there is an intersection, false otherwise.
291 *
292 * \since This function is available since SDL 3.2.0.
293 */
294extern SDL_DECLSPEC bool SDLCALL SDL_GetRectAndLineIntersection(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2);
295
296
297/* SDL_FRect versions... */
298
299/**
300 * Determine whether a point resides inside a floating point rectangle.
301 *
302 * A point is considered part of a rectangle if both `p` and `r` are not NULL,
303 * and `p`'s x and y coordinates are >= to the rectangle's top left corner,
304 * and <= the rectangle's x+w and y+h. So a 1x1 rectangle considers point
305 * (0,0) and (0,1) as "inside" and (0,2) as not.
306 *
307 * Note that this is a forced-inline function in a header, and not a public
308 * API function available in the SDL library (which is to say, the code is
309 * embedded in the calling program and the linker and dynamic loader will not
310 * be able to find this function inside SDL itself).
311 *
312 * \param p the point to test.
313 * \param r the rectangle to test.
314 * \returns true if `p` is contained by `r`, false otherwise.
315 *
316 * \threadsafety It is safe to call this function from any thread.
317 *
318 * \since This function is available since SDL 3.2.0.
319 */
320SDL_FORCE_INLINE bool SDL_PointInRectFloat(const SDL_FPoint *p, const SDL_FRect *r)
321{
322 return ( p && r && (p->x >= r->x) && (p->x <= (r->x + r->w)) &&
323 (p->y >= r->y) && (p->y <= (r->y + r->h)) ) ? true : false;
324}
325
326/**
327 * Determine whether a floating point rectangle can contain any point.
328 *
329 * A rectangle is considered "empty" for this function if `r` is NULL, or if
330 * `r`'s width and/or height are < 0.0f.
331 *
332 * Note that this is a forced-inline function in a header, and not a public
333 * API function available in the SDL library (which is to say, the code is
334 * embedded in the calling program and the linker and dynamic loader will not
335 * be able to find this function inside SDL itself).
336 *
337 * \param r the rectangle to test.
338 * \returns true if the rectangle is "empty", false otherwise.
339 *
340 * \threadsafety It is safe to call this function from any thread.
341 *
342 * \since This function is available since SDL 3.2.0.
343 */
344SDL_FORCE_INLINE bool SDL_RectEmptyFloat(const SDL_FRect *r)
345{
346 return ((!r) || (r->w < 0.0f) || (r->h < 0.0f)) ? true : false;
347}
348
349/**
350 * Determine whether two floating point rectangles are equal, within some
351 * given epsilon.
352 *
353 * Rectangles are considered equal if both are not NULL and each of their x,
354 * y, width and height are within `epsilon` of each other. If you don't know
355 * what value to use for `epsilon`, you should call the SDL_RectsEqualFloat
356 * function instead.
357 *
358 * Note that this is a forced-inline function in a header, and not a public
359 * API function available in the SDL library (which is to say, the code is
360 * embedded in the calling program and the linker and dynamic loader will not
361 * be able to find this function inside SDL itself).
362 *
363 * \param a the first rectangle to test.
364 * \param b the second rectangle to test.
365 * \param epsilon the epsilon value for comparison.
366 * \returns true if the rectangles are equal, false otherwise.
367 *
368 * \threadsafety It is safe to call this function from any thread.
369 *
370 * \since This function is available since SDL 3.2.0.
371 *
372 * \sa SDL_RectsEqualFloat
373 */
374SDL_FORCE_INLINE bool SDL_RectsEqualEpsilon(const SDL_FRect *a, const SDL_FRect *b, float epsilon)
375{
376 return (a && b && ((a == b) ||
377 ((SDL_fabsf(a->x - b->x) <= epsilon) &&
378 (SDL_fabsf(a->y - b->y) <= epsilon) &&
379 (SDL_fabsf(a->w - b->w) <= epsilon) &&
380 (SDL_fabsf(a->h - b->h) <= epsilon))))
381 ? true : false;
382}
383
384/**
385 * Determine whether two floating point rectangles are equal, within a default
386 * epsilon.
387 *
388 * Rectangles are considered equal if both are not NULL and each of their x,
389 * y, width and height are within SDL_FLT_EPSILON of each other. This is often
390 * a reasonable way to compare two floating point rectangles and deal with the
391 * slight precision variations in floating point calculations that tend to pop
392 * up.
393 *
394 * Note that this is a forced-inline function in a header, and not a public
395 * API function available in the SDL library (which is to say, the code is
396 * embedded in the calling program and the linker and dynamic loader will not
397 * be able to find this function inside SDL itself).
398 *
399 * \param a the first rectangle to test.
400 * \param b the second rectangle to test.
401 * \returns true if the rectangles are equal, false otherwise.
402 *
403 * \threadsafety It is safe to call this function from any thread.
404 *
405 * \since This function is available since SDL 3.2.0.
406 *
407 * \sa SDL_RectsEqualEpsilon
408 */
409SDL_FORCE_INLINE bool SDL_RectsEqualFloat(const SDL_FRect *a, const SDL_FRect *b)
410{
411 return SDL_RectsEqualEpsilon(a, b, SDL_FLT_EPSILON);
412}
413
414/**
415 * Determine whether two rectangles intersect with float precision.
416 *
417 * If either pointer is NULL the function will return false.
418 *
419 * \param A an SDL_FRect structure representing the first rectangle.
420 * \param B an SDL_FRect structure representing the second rectangle.
421 * \returns true if there is an intersection, false otherwise.
422 *
423 * \since This function is available since SDL 3.2.0.
424 *
425 * \sa SDL_GetRectIntersection
426 */
427extern SDL_DECLSPEC bool SDLCALL SDL_HasRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B);
428
429/**
430 * Calculate the intersection of two rectangles with float precision.
431 *
432 * If `result` is NULL then this function will return false.
433 *
434 * \param A an SDL_FRect structure representing the first rectangle.
435 * \param B an SDL_FRect structure representing the second rectangle.
436 * \param result an SDL_FRect structure filled in with the intersection of
437 * rectangles `A` and `B`.
438 * \returns true if there is an intersection, false otherwise.
439 *
440 * \since This function is available since SDL 3.2.0.
441 *
442 * \sa SDL_HasRectIntersectionFloat
443 */
444extern SDL_DECLSPEC bool SDLCALL SDL_GetRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result);
445
446/**
447 * Calculate the union of two rectangles with float precision.
448 *
449 * \param A an SDL_FRect structure representing the first rectangle.
450 * \param B an SDL_FRect structure representing the second rectangle.
451 * \param result an SDL_FRect structure filled in with the union of rectangles
452 * `A` and `B`.
453 * \returns true on success or false on failure; call SDL_GetError() for more
454 * information.
455 *
456 * \since This function is available since SDL 3.2.0.
457 */
458extern SDL_DECLSPEC bool SDLCALL SDL_GetRectUnionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result);
459
460/**
461 * Calculate a minimal rectangle enclosing a set of points with float
462 * precision.
463 *
464 * If `clip` is not NULL then only points inside of the clipping rectangle are
465 * considered.
466 *
467 * \param points an array of SDL_FPoint structures representing points to be
468 * enclosed.
469 * \param count the number of structures in the `points` array.
470 * \param clip an SDL_FRect used for clipping or NULL to enclose all points.
471 * \param result an SDL_FRect structure filled in with the minimal enclosing
472 * rectangle.
473 * \returns true if any points were enclosed or false if all the points were
474 * outside of the clipping rectangle.
475 *
476 * \since This function is available since SDL 3.2.0.
477 */
478extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPointsFloat(const SDL_FPoint *points, int count, const SDL_FRect *clip, SDL_FRect *result);
479
480/**
481 * Calculate the intersection of a rectangle and line segment with float
482 * precision.
483 *
484 * This function is used to clip a line segment to a rectangle. A line segment
485 * contained entirely within the rectangle or that does not intersect will
486 * remain unchanged. A line segment that crosses the rectangle at either or
487 * both ends will be clipped to the boundary of the rectangle and the new
488 * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
489 *
490 * \param rect an SDL_FRect structure representing the rectangle to intersect.
491 * \param X1 a pointer to the starting X-coordinate of the line.
492 * \param Y1 a pointer to the starting Y-coordinate of the line.
493 * \param X2 a pointer to the ending X-coordinate of the line.
494 * \param Y2 a pointer to the ending Y-coordinate of the line.
495 * \returns true if there is an intersection, false otherwise.
496 *
497 * \since This function is available since SDL 3.2.0.
498 */
499extern SDL_DECLSPEC bool SDLCALL SDL_GetRectAndLineIntersectionFloat(const SDL_FRect *rect, float *X1, float *Y1, float *X2, float *Y2);
500
501/* Ends C function definitions when using C++ */
502#ifdef __cplusplus
503}
504#endif
505#include <SDL3/SDL_close_code.h>
506
507#endif /* SDL_rect_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_render.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_render.h
new file mode 100644
index 0000000..c9d184c
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_render.h
@@ -0,0 +1,2645 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryRender
24 *
25 * Header file for SDL 2D rendering functions.
26 *
27 * This API supports the following features:
28 *
29 * - single pixel points
30 * - single pixel lines
31 * - filled rectangles
32 * - texture images
33 * - 2D polygons
34 *
35 * The primitives may be drawn in opaque, blended, or additive modes.
36 *
37 * The texture images may be drawn in opaque, blended, or additive modes. They
38 * can have an additional color tint or alpha modulation applied to them, and
39 * may also be stretched with linear interpolation.
40 *
41 * This API is designed to accelerate simple 2D operations. You may want more
42 * functionality such as polygons and particle effects and in that case you
43 * should use SDL's OpenGL/Direct3D support, the SDL3 GPU API, or one of the
44 * many good 3D engines.
45 *
46 * These functions must be called from the main thread. See this bug for
47 * details: https://github.com/libsdl-org/SDL/issues/986
48 */
49
50#ifndef SDL_render_h_
51#define SDL_render_h_
52
53#include <SDL3/SDL_stdinc.h>
54#include <SDL3/SDL_blendmode.h>
55#include <SDL3/SDL_error.h>
56#include <SDL3/SDL_events.h>
57#include <SDL3/SDL_pixels.h>
58#include <SDL3/SDL_properties.h>
59#include <SDL3/SDL_rect.h>
60#include <SDL3/SDL_surface.h>
61#include <SDL3/SDL_video.h>
62
63#include <SDL3/SDL_begin_code.h>
64/* Set up for C function definitions, even when using C++ */
65#ifdef __cplusplus
66extern "C" {
67#endif
68
69/**
70 * The name of the software renderer.
71 *
72 * \since This macro is available since SDL 3.2.0.
73 */
74#define SDL_SOFTWARE_RENDERER "software"
75
76/**
77 * Vertex structure.
78 *
79 * \since This struct is available since SDL 3.2.0.
80 */
81typedef struct SDL_Vertex
82{
83 SDL_FPoint position; /**< Vertex position, in SDL_Renderer coordinates */
84 SDL_FColor color; /**< Vertex color */
85 SDL_FPoint tex_coord; /**< Normalized texture coordinates, if needed */
86} SDL_Vertex;
87
88/**
89 * The access pattern allowed for a texture.
90 *
91 * \since This enum is available since SDL 3.2.0.
92 */
93typedef enum SDL_TextureAccess
94{
95 SDL_TEXTUREACCESS_STATIC, /**< Changes rarely, not lockable */
96 SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
97 SDL_TEXTUREACCESS_TARGET /**< Texture can be used as a render target */
98} SDL_TextureAccess;
99
100/**
101 * How the logical size is mapped to the output.
102 *
103 * \since This enum is available since SDL 3.2.0.
104 */
105typedef enum SDL_RendererLogicalPresentation
106{
107 SDL_LOGICAL_PRESENTATION_DISABLED, /**< There is no logical size in effect */
108 SDL_LOGICAL_PRESENTATION_STRETCH, /**< The rendered content is stretched to the output resolution */
109 SDL_LOGICAL_PRESENTATION_LETTERBOX, /**< The rendered content is fit to the largest dimension and the other dimension is letterboxed with black bars */
110 SDL_LOGICAL_PRESENTATION_OVERSCAN, /**< The rendered content is fit to the smallest dimension and the other dimension extends beyond the output bounds */
111 SDL_LOGICAL_PRESENTATION_INTEGER_SCALE /**< The rendered content is scaled up by integer multiples to fit the output resolution */
112} SDL_RendererLogicalPresentation;
113
114/**
115 * A structure representing rendering state
116 *
117 * \since This struct is available since SDL 3.2.0.
118 */
119typedef struct SDL_Renderer SDL_Renderer;
120
121#ifndef SDL_INTERNAL
122
123/**
124 * An efficient driver-specific representation of pixel data
125 *
126 * \since This struct is available since SDL 3.2.0.
127 *
128 * \sa SDL_CreateTexture
129 * \sa SDL_CreateTextureFromSurface
130 * \sa SDL_CreateTextureWithProperties
131 * \sa SDL_DestroyTexture
132 */
133struct SDL_Texture
134{
135 SDL_PixelFormat format; /**< The format of the texture, read-only */
136 int w; /**< The width of the texture, read-only. */
137 int h; /**< The height of the texture, read-only. */
138
139 int refcount; /**< Application reference count, used when freeing texture */
140};
141#endif /* !SDL_INTERNAL */
142
143typedef struct SDL_Texture SDL_Texture;
144
145/* Function prototypes */
146
147/**
148 * Get the number of 2D rendering drivers available for the current display.
149 *
150 * A render driver is a set of code that handles rendering and texture
151 * management on a particular display. Normally there is only one, but some
152 * drivers may have several available with different capabilities.
153 *
154 * There may be none if SDL was compiled without render support.
155 *
156 * \returns the number of built in render drivers.
157 *
158 * \threadsafety It is safe to call this function from any thread.
159 *
160 * \since This function is available since SDL 3.2.0.
161 *
162 * \sa SDL_CreateRenderer
163 * \sa SDL_GetRenderDriver
164 */
165extern SDL_DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
166
167/**
168 * Use this function to get the name of a built in 2D rendering driver.
169 *
170 * The list of rendering drivers is given in the order that they are normally
171 * initialized by default; the drivers that seem more reasonable to choose
172 * first (as far as the SDL developers believe) are earlier in the list.
173 *
174 * The names of drivers are all simple, low-ASCII identifiers, like "opengl",
175 * "direct3d12" or "metal". These never have Unicode characters, and are not
176 * meant to be proper names.
177 *
178 * \param index the index of the rendering driver; the value ranges from 0 to
179 * SDL_GetNumRenderDrivers() - 1.
180 * \returns the name of the rendering driver at the requested index, or NULL
181 * if an invalid index was specified.
182 *
183 * \threadsafety It is safe to call this function from any thread.
184 *
185 * \since This function is available since SDL 3.2.0.
186 *
187 * \sa SDL_GetNumRenderDrivers
188 */
189extern SDL_DECLSPEC const char * SDLCALL SDL_GetRenderDriver(int index);
190
191/**
192 * Create a window and default renderer.
193 *
194 * \param title the title of the window, in UTF-8 encoding.
195 * \param width the width of the window.
196 * \param height the height of the window.
197 * \param window_flags the flags used to create the window (see
198 * SDL_CreateWindow()).
199 * \param window a pointer filled with the window, or NULL on error.
200 * \param renderer a pointer filled with the renderer, or NULL on error.
201 * \returns true on success or false on failure; call SDL_GetError() for more
202 * information.
203 *
204 * \threadsafety This function should only be called on the main thread.
205 *
206 * \since This function is available since SDL 3.2.0.
207 *
208 * \sa SDL_CreateRenderer
209 * \sa SDL_CreateWindow
210 */
211extern SDL_DECLSPEC bool SDLCALL SDL_CreateWindowAndRenderer(const char *title, int width, int height, SDL_WindowFlags window_flags, SDL_Window **window, SDL_Renderer **renderer);
212
213/**
214 * Create a 2D rendering context for a window.
215 *
216 * If you want a specific renderer, you can specify its name here. A list of
217 * available renderers can be obtained by calling SDL_GetRenderDriver()
218 * multiple times, with indices from 0 to SDL_GetNumRenderDrivers()-1. If you
219 * don't need a specific renderer, specify NULL and SDL will attempt to choose
220 * the best option for you, based on what is available on the user's system.
221 *
222 * If `name` is a comma-separated list, SDL will try each name, in the order
223 * listed, until one succeeds or all of them fail.
224 *
225 * By default the rendering size matches the window size in pixels, but you
226 * can call SDL_SetRenderLogicalPresentation() to change the content size and
227 * scaling options.
228 *
229 * \param window the window where rendering is displayed.
230 * \param name the name of the rendering driver to initialize, or NULL to let
231 * SDL choose one.
232 * \returns a valid rendering context or NULL if there was an error; call
233 * SDL_GetError() for more information.
234 *
235 * \threadsafety This function should only be called on the main thread.
236 *
237 * \since This function is available since SDL 3.2.0.
238 *
239 * \sa SDL_CreateRendererWithProperties
240 * \sa SDL_CreateSoftwareRenderer
241 * \sa SDL_DestroyRenderer
242 * \sa SDL_GetNumRenderDrivers
243 * \sa SDL_GetRenderDriver
244 * \sa SDL_GetRendererName
245 */
246extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window *window, const char *name);
247
248/**
249 * Create a 2D rendering context for a window, with the specified properties.
250 *
251 * These are the supported properties:
252 *
253 * - `SDL_PROP_RENDERER_CREATE_NAME_STRING`: the name of the rendering driver
254 * to use, if a specific one is desired
255 * - `SDL_PROP_RENDERER_CREATE_WINDOW_POINTER`: the window where rendering is
256 * displayed, required if this isn't a software renderer using a surface
257 * - `SDL_PROP_RENDERER_CREATE_SURFACE_POINTER`: the surface where rendering
258 * is displayed, if you want a software renderer without a window
259 * - `SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER`: an SDL_Colorspace
260 * value describing the colorspace for output to the display, defaults to
261 * SDL_COLORSPACE_SRGB. The direct3d11, direct3d12, and metal renderers
262 * support SDL_COLORSPACE_SRGB_LINEAR, which is a linear color space and
263 * supports HDR output. If you select SDL_COLORSPACE_SRGB_LINEAR, drawing
264 * still uses the sRGB colorspace, but values can go beyond 1.0 and float
265 * (linear) format textures can be used for HDR content.
266 * - `SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER`: non-zero if you want
267 * present synchronized with the refresh rate. This property can take any
268 * value that is supported by SDL_SetRenderVSync() for the renderer.
269 *
270 * With the vulkan renderer:
271 *
272 * - `SDL_PROP_RENDERER_CREATE_VULKAN_INSTANCE_POINTER`: the VkInstance to use
273 * with the renderer, optional.
274 * - `SDL_PROP_RENDERER_CREATE_VULKAN_SURFACE_NUMBER`: the VkSurfaceKHR to use
275 * with the renderer, optional.
276 * - `SDL_PROP_RENDERER_CREATE_VULKAN_PHYSICAL_DEVICE_POINTER`: the
277 * VkPhysicalDevice to use with the renderer, optional.
278 * - `SDL_PROP_RENDERER_CREATE_VULKAN_DEVICE_POINTER`: the VkDevice to use
279 * with the renderer, optional.
280 * - `SDL_PROP_RENDERER_CREATE_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER`: the
281 * queue family index used for rendering.
282 * - `SDL_PROP_RENDERER_CREATE_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER`: the
283 * queue family index used for presentation.
284 *
285 * \param props the properties to use.
286 * \returns a valid rendering context or NULL if there was an error; call
287 * SDL_GetError() for more information.
288 *
289 * \threadsafety This function should only be called on the main thread.
290 *
291 * \since This function is available since SDL 3.2.0.
292 *
293 * \sa SDL_CreateProperties
294 * \sa SDL_CreateRenderer
295 * \sa SDL_CreateSoftwareRenderer
296 * \sa SDL_DestroyRenderer
297 * \sa SDL_GetRendererName
298 */
299extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRendererWithProperties(SDL_PropertiesID props);
300
301#define SDL_PROP_RENDERER_CREATE_NAME_STRING "SDL.renderer.create.name"
302#define SDL_PROP_RENDERER_CREATE_WINDOW_POINTER "SDL.renderer.create.window"
303#define SDL_PROP_RENDERER_CREATE_SURFACE_POINTER "SDL.renderer.create.surface"
304#define SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER "SDL.renderer.create.output_colorspace"
305#define SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER "SDL.renderer.create.present_vsync"
306#define SDL_PROP_RENDERER_CREATE_VULKAN_INSTANCE_POINTER "SDL.renderer.create.vulkan.instance"
307#define SDL_PROP_RENDERER_CREATE_VULKAN_SURFACE_NUMBER "SDL.renderer.create.vulkan.surface"
308#define SDL_PROP_RENDERER_CREATE_VULKAN_PHYSICAL_DEVICE_POINTER "SDL.renderer.create.vulkan.physical_device"
309#define SDL_PROP_RENDERER_CREATE_VULKAN_DEVICE_POINTER "SDL.renderer.create.vulkan.device"
310#define SDL_PROP_RENDERER_CREATE_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER "SDL.renderer.create.vulkan.graphics_queue_family_index"
311#define SDL_PROP_RENDERER_CREATE_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER "SDL.renderer.create.vulkan.present_queue_family_index"
312
313/**
314 * Create a 2D software rendering context for a surface.
315 *
316 * Two other API which can be used to create SDL_Renderer:
317 * SDL_CreateRenderer() and SDL_CreateWindowAndRenderer(). These can _also_
318 * create a software renderer, but they are intended to be used with an
319 * SDL_Window as the final destination and not an SDL_Surface.
320 *
321 * \param surface the SDL_Surface structure representing the surface where
322 * rendering is done.
323 * \returns a valid rendering context or NULL if there was an error; call
324 * SDL_GetError() for more information.
325 *
326 * \threadsafety This function should only be called on the main thread.
327 *
328 * \since This function is available since SDL 3.2.0.
329 *
330 * \sa SDL_DestroyRenderer
331 */
332extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface *surface);
333
334/**
335 * Get the renderer associated with a window.
336 *
337 * \param window the window to query.
338 * \returns the rendering context on success or NULL on failure; call
339 * SDL_GetError() for more information.
340 *
341 * \threadsafety It is safe to call this function from any thread.
342 *
343 * \since This function is available since SDL 3.2.0.
344 */
345extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window *window);
346
347/**
348 * Get the window associated with a renderer.
349 *
350 * \param renderer the renderer to query.
351 * \returns the window on success or NULL on failure; call SDL_GetError() for
352 * more information.
353 *
354 * \threadsafety It is safe to call this function from any thread.
355 *
356 * \since This function is available since SDL 3.2.0.
357 */
358extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetRenderWindow(SDL_Renderer *renderer);
359
360/**
361 * Get the name of a renderer.
362 *
363 * \param renderer the rendering context.
364 * \returns the name of the selected renderer, or NULL on failure; call
365 * SDL_GetError() for more information.
366 *
367 * \threadsafety It is safe to call this function from any thread.
368 *
369 * \since This function is available since SDL 3.2.0.
370 *
371 * \sa SDL_CreateRenderer
372 * \sa SDL_CreateRendererWithProperties
373 */
374extern SDL_DECLSPEC const char * SDLCALL SDL_GetRendererName(SDL_Renderer *renderer);
375
376/**
377 * Get the properties associated with a renderer.
378 *
379 * The following read-only properties are provided by SDL:
380 *
381 * - `SDL_PROP_RENDERER_NAME_STRING`: the name of the rendering driver
382 * - `SDL_PROP_RENDERER_WINDOW_POINTER`: the window where rendering is
383 * displayed, if any
384 * - `SDL_PROP_RENDERER_SURFACE_POINTER`: the surface where rendering is
385 * displayed, if this is a software renderer without a window
386 * - `SDL_PROP_RENDERER_VSYNC_NUMBER`: the current vsync setting
387 * - `SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER`: the maximum texture width
388 * and height
389 * - `SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER`: a (const SDL_PixelFormat *)
390 * array of pixel formats, terminated with SDL_PIXELFORMAT_UNKNOWN,
391 * representing the available texture formats for this renderer.
392 * - `SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER`: an SDL_Colorspace value
393 * describing the colorspace for output to the display, defaults to
394 * SDL_COLORSPACE_SRGB.
395 * - `SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN`: true if the output colorspace is
396 * SDL_COLORSPACE_SRGB_LINEAR and the renderer is showing on a display with
397 * HDR enabled. This property can change dynamically when
398 * SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
399 * - `SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT`: the value of SDR white in the
400 * SDL_COLORSPACE_SRGB_LINEAR colorspace. When HDR is enabled, this value is
401 * automatically multiplied into the color scale. This property can change
402 * dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
403 * - `SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT`: the additional high dynamic range
404 * that can be displayed, in terms of the SDR white point. When HDR is not
405 * enabled, this will be 1.0. This property can change dynamically when
406 * SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
407 *
408 * With the direct3d renderer:
409 *
410 * - `SDL_PROP_RENDERER_D3D9_DEVICE_POINTER`: the IDirect3DDevice9 associated
411 * with the renderer
412 *
413 * With the direct3d11 renderer:
414 *
415 * - `SDL_PROP_RENDERER_D3D11_DEVICE_POINTER`: the ID3D11Device associated
416 * with the renderer
417 * - `SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER`: the IDXGISwapChain1
418 * associated with the renderer. This may change when the window is resized.
419 *
420 * With the direct3d12 renderer:
421 *
422 * - `SDL_PROP_RENDERER_D3D12_DEVICE_POINTER`: the ID3D12Device associated
423 * with the renderer
424 * - `SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER`: the IDXGISwapChain4
425 * associated with the renderer.
426 * - `SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER`: the ID3D12CommandQueue
427 * associated with the renderer
428 *
429 * With the vulkan renderer:
430 *
431 * - `SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER`: the VkInstance associated
432 * with the renderer
433 * - `SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER`: the VkSurfaceKHR associated
434 * with the renderer
435 * - `SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER`: the VkPhysicalDevice
436 * associated with the renderer
437 * - `SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER`: the VkDevice associated with
438 * the renderer
439 * - `SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER`: the queue
440 * family index used for rendering
441 * - `SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER`: the queue
442 * family index used for presentation
443 * - `SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER`: the number of
444 * swapchain images, or potential frames in flight, used by the Vulkan
445 * renderer
446 *
447 * With the gpu renderer:
448 *
449 * - `SDL_PROP_RENDERER_GPU_DEVICE_POINTER`: the SDL_GPUDevice associated with
450 * the renderer
451 *
452 * \param renderer the rendering context.
453 * \returns a valid property ID on success or 0 on failure; call
454 * SDL_GetError() for more information.
455 *
456 * \threadsafety It is safe to call this function from any thread.
457 *
458 * \since This function is available since SDL 3.2.0.
459 */
460extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetRendererProperties(SDL_Renderer *renderer);
461
462#define SDL_PROP_RENDERER_NAME_STRING "SDL.renderer.name"
463#define SDL_PROP_RENDERER_WINDOW_POINTER "SDL.renderer.window"
464#define SDL_PROP_RENDERER_SURFACE_POINTER "SDL.renderer.surface"
465#define SDL_PROP_RENDERER_VSYNC_NUMBER "SDL.renderer.vsync"
466#define SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER "SDL.renderer.max_texture_size"
467#define SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER "SDL.renderer.texture_formats"
468#define SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER "SDL.renderer.output_colorspace"
469#define SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN "SDL.renderer.HDR_enabled"
470#define SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT "SDL.renderer.SDR_white_point"
471#define SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT "SDL.renderer.HDR_headroom"
472#define SDL_PROP_RENDERER_D3D9_DEVICE_POINTER "SDL.renderer.d3d9.device"
473#define SDL_PROP_RENDERER_D3D11_DEVICE_POINTER "SDL.renderer.d3d11.device"
474#define SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER "SDL.renderer.d3d11.swap_chain"
475#define SDL_PROP_RENDERER_D3D12_DEVICE_POINTER "SDL.renderer.d3d12.device"
476#define SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER "SDL.renderer.d3d12.swap_chain"
477#define SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER "SDL.renderer.d3d12.command_queue"
478#define SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER "SDL.renderer.vulkan.instance"
479#define SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER "SDL.renderer.vulkan.surface"
480#define SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER "SDL.renderer.vulkan.physical_device"
481#define SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER "SDL.renderer.vulkan.device"
482#define SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER "SDL.renderer.vulkan.graphics_queue_family_index"
483#define SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER "SDL.renderer.vulkan.present_queue_family_index"
484#define SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER "SDL.renderer.vulkan.swapchain_image_count"
485#define SDL_PROP_RENDERER_GPU_DEVICE_POINTER "SDL.renderer.gpu.device"
486
487/**
488 * Get the output size in pixels of a rendering context.
489 *
490 * This returns the true output size in pixels, ignoring any render targets or
491 * logical size and presentation.
492 *
493 * For the output size of the current rendering target, with logical size
494 * adjustments, use SDL_GetCurrentRenderOutputSize() instead.
495 *
496 * \param renderer the rendering context.
497 * \param w a pointer filled in with the width in pixels.
498 * \param h a pointer filled in with the height in pixels.
499 * \returns true on success or false on failure; call SDL_GetError() for more
500 * information.
501 *
502 * \threadsafety This function should only be called on the main thread.
503 *
504 * \since This function is available since SDL 3.2.0.
505 *
506 * \sa SDL_GetCurrentRenderOutputSize
507 */
508extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderOutputSize(SDL_Renderer *renderer, int *w, int *h);
509
510/**
511 * Get the current output size in pixels of a rendering context.
512 *
513 * If a rendering target is active, this will return the size of the rendering
514 * target in pixels, otherwise return the value of SDL_GetRenderOutputSize().
515 *
516 * Rendering target or not, the output will be adjusted by the current logical
517 * presentation state, dictated by SDL_SetRenderLogicalPresentation().
518 *
519 * \param renderer the rendering context.
520 * \param w a pointer filled in with the current width.
521 * \param h a pointer filled in with the current height.
522 * \returns true on success or false on failure; call SDL_GetError() for more
523 * information.
524 *
525 * \threadsafety This function should only be called on the main thread.
526 *
527 * \since This function is available since SDL 3.2.0.
528 *
529 * \sa SDL_GetRenderOutputSize
530 */
531extern SDL_DECLSPEC bool SDLCALL SDL_GetCurrentRenderOutputSize(SDL_Renderer *renderer, int *w, int *h);
532
533/**
534 * Create a texture for a rendering context.
535 *
536 * The contents of a texture when first created are not defined.
537 *
538 * \param renderer the rendering context.
539 * \param format one of the enumerated values in SDL_PixelFormat.
540 * \param access one of the enumerated values in SDL_TextureAccess.
541 * \param w the width of the texture in pixels.
542 * \param h the height of the texture in pixels.
543 * \returns the created texture or NULL on failure; call SDL_GetError() for
544 * more information.
545 *
546 * \threadsafety This function should only be called on the main thread.
547 *
548 * \since This function is available since SDL 3.2.0.
549 *
550 * \sa SDL_CreateTextureFromSurface
551 * \sa SDL_CreateTextureWithProperties
552 * \sa SDL_DestroyTexture
553 * \sa SDL_GetTextureSize
554 * \sa SDL_UpdateTexture
555 */
556extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer *renderer, SDL_PixelFormat format, SDL_TextureAccess access, int w, int h);
557
558/**
559 * Create a texture from an existing surface.
560 *
561 * The surface is not modified or freed by this function.
562 *
563 * The SDL_TextureAccess hint for the created texture is
564 * `SDL_TEXTUREACCESS_STATIC`.
565 *
566 * The pixel format of the created texture may be different from the pixel
567 * format of the surface, and can be queried using the
568 * SDL_PROP_TEXTURE_FORMAT_NUMBER property.
569 *
570 * \param renderer the rendering context.
571 * \param surface the SDL_Surface structure containing pixel data used to fill
572 * the texture.
573 * \returns the created texture or NULL on failure; call SDL_GetError() for
574 * more information.
575 *
576 * \threadsafety This function should only be called on the main thread.
577 *
578 * \since This function is available since SDL 3.2.0.
579 *
580 * \sa SDL_CreateTexture
581 * \sa SDL_CreateTextureWithProperties
582 * \sa SDL_DestroyTexture
583 */
584extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface);
585
586/**
587 * Create a texture for a rendering context with the specified properties.
588 *
589 * These are the supported properties:
590 *
591 * - `SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER`: an SDL_Colorspace value
592 * describing the texture colorspace, defaults to SDL_COLORSPACE_SRGB_LINEAR
593 * for floating point textures, SDL_COLORSPACE_HDR10 for 10-bit textures,
594 * SDL_COLORSPACE_SRGB for other RGB textures and SDL_COLORSPACE_JPEG for
595 * YUV textures.
596 * - `SDL_PROP_TEXTURE_CREATE_FORMAT_NUMBER`: one of the enumerated values in
597 * SDL_PixelFormat, defaults to the best RGBA format for the renderer
598 * - `SDL_PROP_TEXTURE_CREATE_ACCESS_NUMBER`: one of the enumerated values in
599 * SDL_TextureAccess, defaults to SDL_TEXTUREACCESS_STATIC
600 * - `SDL_PROP_TEXTURE_CREATE_WIDTH_NUMBER`: the width of the texture in
601 * pixels, required
602 * - `SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER`: the height of the texture in
603 * pixels, required
604 * - `SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT`: for HDR10 and floating
605 * point textures, this defines the value of 100% diffuse white, with higher
606 * values being displayed in the High Dynamic Range headroom. This defaults
607 * to 100 for HDR10 textures and 1.0 for floating point textures.
608 * - `SDL_PROP_TEXTURE_CREATE_HDR_HEADROOM_FLOAT`: for HDR10 and floating
609 * point textures, this defines the maximum dynamic range used by the
610 * content, in terms of the SDR white point. This would be equivalent to
611 * maxCLL / SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT for HDR10 content.
612 * If this is defined, any values outside the range supported by the display
613 * will be scaled into the available HDR headroom, otherwise they are
614 * clipped.
615 *
616 * With the direct3d11 renderer:
617 *
618 * - `SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_POINTER`: the ID3D11Texture2D
619 * associated with the texture, if you want to wrap an existing texture.
620 * - `SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_U_POINTER`: the ID3D11Texture2D
621 * associated with the U plane of a YUV texture, if you want to wrap an
622 * existing texture.
623 * - `SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_V_POINTER`: the ID3D11Texture2D
624 * associated with the V plane of a YUV texture, if you want to wrap an
625 * existing texture.
626 *
627 * With the direct3d12 renderer:
628 *
629 * - `SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_POINTER`: the ID3D12Resource
630 * associated with the texture, if you want to wrap an existing texture.
631 * - `SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_U_POINTER`: the ID3D12Resource
632 * associated with the U plane of a YUV texture, if you want to wrap an
633 * existing texture.
634 * - `SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_V_POINTER`: the ID3D12Resource
635 * associated with the V plane of a YUV texture, if you want to wrap an
636 * existing texture.
637 *
638 * With the metal renderer:
639 *
640 * - `SDL_PROP_TEXTURE_CREATE_METAL_PIXELBUFFER_POINTER`: the CVPixelBufferRef
641 * associated with the texture, if you want to create a texture from an
642 * existing pixel buffer.
643 *
644 * With the opengl renderer:
645 *
646 * - `SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_NUMBER`: the GLuint texture
647 * associated with the texture, if you want to wrap an existing texture.
648 * - `SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_UV_NUMBER`: the GLuint texture
649 * associated with the UV plane of an NV12 texture, if you want to wrap an
650 * existing texture.
651 * - `SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_U_NUMBER`: the GLuint texture
652 * associated with the U plane of a YUV texture, if you want to wrap an
653 * existing texture.
654 * - `SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_V_NUMBER`: the GLuint texture
655 * associated with the V plane of a YUV texture, if you want to wrap an
656 * existing texture.
657 *
658 * With the opengles2 renderer:
659 *
660 * - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER`: the GLuint texture
661 * associated with the texture, if you want to wrap an existing texture.
662 * - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER`: the GLuint texture
663 * associated with the texture, if you want to wrap an existing texture.
664 * - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_UV_NUMBER`: the GLuint texture
665 * associated with the UV plane of an NV12 texture, if you want to wrap an
666 * existing texture.
667 * - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_U_NUMBER`: the GLuint texture
668 * associated with the U plane of a YUV texture, if you want to wrap an
669 * existing texture.
670 * - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_V_NUMBER`: the GLuint texture
671 * associated with the V plane of a YUV texture, if you want to wrap an
672 * existing texture.
673 *
674 * With the vulkan renderer:
675 *
676 * - `SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER`: the VkImage with layout
677 * VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL associated with the texture, if
678 * you want to wrap an existing texture.
679 *
680 * \param renderer the rendering context.
681 * \param props the properties to use.
682 * \returns the created texture or NULL on failure; call SDL_GetError() for
683 * more information.
684 *
685 * \threadsafety This function should only be called on the main thread.
686 *
687 * \since This function is available since SDL 3.2.0.
688 *
689 * \sa SDL_CreateProperties
690 * \sa SDL_CreateTexture
691 * \sa SDL_CreateTextureFromSurface
692 * \sa SDL_DestroyTexture
693 * \sa SDL_GetTextureSize
694 * \sa SDL_UpdateTexture
695 */
696extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureWithProperties(SDL_Renderer *renderer, SDL_PropertiesID props);
697
698#define SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER "SDL.texture.create.colorspace"
699#define SDL_PROP_TEXTURE_CREATE_FORMAT_NUMBER "SDL.texture.create.format"
700#define SDL_PROP_TEXTURE_CREATE_ACCESS_NUMBER "SDL.texture.create.access"
701#define SDL_PROP_TEXTURE_CREATE_WIDTH_NUMBER "SDL.texture.create.width"
702#define SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER "SDL.texture.create.height"
703#define SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT "SDL.texture.create.SDR_white_point"
704#define SDL_PROP_TEXTURE_CREATE_HDR_HEADROOM_FLOAT "SDL.texture.create.HDR_headroom"
705#define SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_POINTER "SDL.texture.create.d3d11.texture"
706#define SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_U_POINTER "SDL.texture.create.d3d11.texture_u"
707#define SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_V_POINTER "SDL.texture.create.d3d11.texture_v"
708#define SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_POINTER "SDL.texture.create.d3d12.texture"
709#define SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_U_POINTER "SDL.texture.create.d3d12.texture_u"
710#define SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_V_POINTER "SDL.texture.create.d3d12.texture_v"
711#define SDL_PROP_TEXTURE_CREATE_METAL_PIXELBUFFER_POINTER "SDL.texture.create.metal.pixelbuffer"
712#define SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_NUMBER "SDL.texture.create.opengl.texture"
713#define SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_UV_NUMBER "SDL.texture.create.opengl.texture_uv"
714#define SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_U_NUMBER "SDL.texture.create.opengl.texture_u"
715#define SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_V_NUMBER "SDL.texture.create.opengl.texture_v"
716#define SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER "SDL.texture.create.opengles2.texture"
717#define SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_UV_NUMBER "SDL.texture.create.opengles2.texture_uv"
718#define SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_U_NUMBER "SDL.texture.create.opengles2.texture_u"
719#define SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_V_NUMBER "SDL.texture.create.opengles2.texture_v"
720#define SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER "SDL.texture.create.vulkan.texture"
721
722/**
723 * Get the properties associated with a texture.
724 *
725 * The following read-only properties are provided by SDL:
726 *
727 * - `SDL_PROP_TEXTURE_COLORSPACE_NUMBER`: an SDL_Colorspace value describing
728 * the texture colorspace.
729 * - `SDL_PROP_TEXTURE_FORMAT_NUMBER`: one of the enumerated values in
730 * SDL_PixelFormat.
731 * - `SDL_PROP_TEXTURE_ACCESS_NUMBER`: one of the enumerated values in
732 * SDL_TextureAccess.
733 * - `SDL_PROP_TEXTURE_WIDTH_NUMBER`: the width of the texture in pixels.
734 * - `SDL_PROP_TEXTURE_HEIGHT_NUMBER`: the height of the texture in pixels.
735 * - `SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT`: for HDR10 and floating point
736 * textures, this defines the value of 100% diffuse white, with higher
737 * values being displayed in the High Dynamic Range headroom. This defaults
738 * to 100 for HDR10 textures and 1.0 for other textures.
739 * - `SDL_PROP_TEXTURE_HDR_HEADROOM_FLOAT`: for HDR10 and floating point
740 * textures, this defines the maximum dynamic range used by the content, in
741 * terms of the SDR white point. If this is defined, any values outside the
742 * range supported by the display will be scaled into the available HDR
743 * headroom, otherwise they are clipped. This defaults to 1.0 for SDR
744 * textures, 4.0 for HDR10 textures, and no default for floating point
745 * textures.
746 *
747 * With the direct3d11 renderer:
748 *
749 * - `SDL_PROP_TEXTURE_D3D11_TEXTURE_POINTER`: the ID3D11Texture2D associated
750 * with the texture
751 * - `SDL_PROP_TEXTURE_D3D11_TEXTURE_U_POINTER`: the ID3D11Texture2D
752 * associated with the U plane of a YUV texture
753 * - `SDL_PROP_TEXTURE_D3D11_TEXTURE_V_POINTER`: the ID3D11Texture2D
754 * associated with the V plane of a YUV texture
755 *
756 * With the direct3d12 renderer:
757 *
758 * - `SDL_PROP_TEXTURE_D3D12_TEXTURE_POINTER`: the ID3D12Resource associated
759 * with the texture
760 * - `SDL_PROP_TEXTURE_D3D12_TEXTURE_U_POINTER`: the ID3D12Resource associated
761 * with the U plane of a YUV texture
762 * - `SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER`: the ID3D12Resource associated
763 * with the V plane of a YUV texture
764 *
765 * With the vulkan renderer:
766 *
767 * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER`: the VkImage associated with the
768 * texture
769 *
770 * With the opengl renderer:
771 *
772 * - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER`: the GLuint texture associated
773 * with the texture
774 * - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_UV_NUMBER`: the GLuint texture
775 * associated with the UV plane of an NV12 texture
776 * - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_U_NUMBER`: the GLuint texture associated
777 * with the U plane of a YUV texture
778 * - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_V_NUMBER`: the GLuint texture associated
779 * with the V plane of a YUV texture
780 * - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET_NUMBER`: the GLenum for the
781 * texture target (`GL_TEXTURE_2D`, `GL_TEXTURE_RECTANGLE_ARB`, etc)
782 * - `SDL_PROP_TEXTURE_OPENGL_TEX_W_FLOAT`: the texture coordinate width of
783 * the texture (0.0 - 1.0)
784 * - `SDL_PROP_TEXTURE_OPENGL_TEX_H_FLOAT`: the texture coordinate height of
785 * the texture (0.0 - 1.0)
786 *
787 * With the opengles2 renderer:
788 *
789 * - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_NUMBER`: the GLuint texture
790 * associated with the texture
791 * - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_UV_NUMBER`: the GLuint texture
792 * associated with the UV plane of an NV12 texture
793 * - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER`: the GLuint texture
794 * associated with the U plane of a YUV texture
795 * - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER`: the GLuint texture
796 * associated with the V plane of a YUV texture
797 * - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER`: the GLenum for the
798 * texture target (`GL_TEXTURE_2D`, `GL_TEXTURE_EXTERNAL_OES`, etc)
799 *
800 * \param texture the texture to query.
801 * \returns a valid property ID on success or 0 on failure; call
802 * SDL_GetError() for more information.
803 *
804 * \threadsafety It is safe to call this function from any thread.
805 *
806 * \since This function is available since SDL 3.2.0.
807 */
808extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetTextureProperties(SDL_Texture *texture);
809
810#define SDL_PROP_TEXTURE_COLORSPACE_NUMBER "SDL.texture.colorspace"
811#define SDL_PROP_TEXTURE_FORMAT_NUMBER "SDL.texture.format"
812#define SDL_PROP_TEXTURE_ACCESS_NUMBER "SDL.texture.access"
813#define SDL_PROP_TEXTURE_WIDTH_NUMBER "SDL.texture.width"
814#define SDL_PROP_TEXTURE_HEIGHT_NUMBER "SDL.texture.height"
815#define SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT "SDL.texture.SDR_white_point"
816#define SDL_PROP_TEXTURE_HDR_HEADROOM_FLOAT "SDL.texture.HDR_headroom"
817#define SDL_PROP_TEXTURE_D3D11_TEXTURE_POINTER "SDL.texture.d3d11.texture"
818#define SDL_PROP_TEXTURE_D3D11_TEXTURE_U_POINTER "SDL.texture.d3d11.texture_u"
819#define SDL_PROP_TEXTURE_D3D11_TEXTURE_V_POINTER "SDL.texture.d3d11.texture_v"
820#define SDL_PROP_TEXTURE_D3D12_TEXTURE_POINTER "SDL.texture.d3d12.texture"
821#define SDL_PROP_TEXTURE_D3D12_TEXTURE_U_POINTER "SDL.texture.d3d12.texture_u"
822#define SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER "SDL.texture.d3d12.texture_v"
823#define SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER "SDL.texture.opengl.texture"
824#define SDL_PROP_TEXTURE_OPENGL_TEXTURE_UV_NUMBER "SDL.texture.opengl.texture_uv"
825#define SDL_PROP_TEXTURE_OPENGL_TEXTURE_U_NUMBER "SDL.texture.opengl.texture_u"
826#define SDL_PROP_TEXTURE_OPENGL_TEXTURE_V_NUMBER "SDL.texture.opengl.texture_v"
827#define SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET_NUMBER "SDL.texture.opengl.target"
828#define SDL_PROP_TEXTURE_OPENGL_TEX_W_FLOAT "SDL.texture.opengl.tex_w"
829#define SDL_PROP_TEXTURE_OPENGL_TEX_H_FLOAT "SDL.texture.opengl.tex_h"
830#define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_NUMBER "SDL.texture.opengles2.texture"
831#define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_UV_NUMBER "SDL.texture.opengles2.texture_uv"
832#define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER "SDL.texture.opengles2.texture_u"
833#define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER "SDL.texture.opengles2.texture_v"
834#define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER "SDL.texture.opengles2.target"
835#define SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER "SDL.texture.vulkan.texture"
836
837/**
838 * Get the renderer that created an SDL_Texture.
839 *
840 * \param texture the texture to query.
841 * \returns a pointer to the SDL_Renderer that created the texture, or NULL on
842 * failure; call SDL_GetError() for more information.
843 *
844 * \threadsafety It is safe to call this function from any thread.
845 *
846 * \since This function is available since SDL 3.2.0.
847 */
848extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_GetRendererFromTexture(SDL_Texture *texture);
849
850/**
851 * Get the size of a texture, as floating point values.
852 *
853 * \param texture the texture to query.
854 * \param w a pointer filled in with the width of the texture in pixels. This
855 * argument can be NULL if you don't need this information.
856 * \param h a pointer filled in with the height of the texture in pixels. This
857 * argument can be NULL if you don't need this information.
858 * \returns true on success or false on failure; call SDL_GetError() for more
859 * information.
860 *
861 * \threadsafety This function should only be called on the main thread.
862 *
863 * \since This function is available since SDL 3.2.0.
864 */
865extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureSize(SDL_Texture *texture, float *w, float *h);
866
867/**
868 * Set an additional color value multiplied into render copy operations.
869 *
870 * When this texture is rendered, during the copy operation each source color
871 * channel is modulated by the appropriate color value according to the
872 * following formula:
873 *
874 * `srcC = srcC * (color / 255)`
875 *
876 * Color modulation is not always supported by the renderer; it will return
877 * false if color modulation is not supported.
878 *
879 * \param texture the texture to update.
880 * \param r the red color value multiplied into copy operations.
881 * \param g the green color value multiplied into copy operations.
882 * \param b the blue color value multiplied into copy operations.
883 * \returns true on success or false on failure; call SDL_GetError() for more
884 * information.
885 *
886 * \threadsafety This function should only be called on the main thread.
887 *
888 * \since This function is available since SDL 3.2.0.
889 *
890 * \sa SDL_GetTextureColorMod
891 * \sa SDL_SetTextureAlphaMod
892 * \sa SDL_SetTextureColorModFloat
893 */
894extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureColorMod(SDL_Texture *texture, Uint8 r, Uint8 g, Uint8 b);
895
896
897/**
898 * Set an additional color value multiplied into render copy operations.
899 *
900 * When this texture is rendered, during the copy operation each source color
901 * channel is modulated by the appropriate color value according to the
902 * following formula:
903 *
904 * `srcC = srcC * color`
905 *
906 * Color modulation is not always supported by the renderer; it will return
907 * false if color modulation is not supported.
908 *
909 * \param texture the texture to update.
910 * \param r the red color value multiplied into copy operations.
911 * \param g the green color value multiplied into copy operations.
912 * \param b the blue color value multiplied into copy operations.
913 * \returns true on success or false on failure; call SDL_GetError() for more
914 * information.
915 *
916 * \threadsafety This function should only be called on the main thread.
917 *
918 * \since This function is available since SDL 3.2.0.
919 *
920 * \sa SDL_GetTextureColorModFloat
921 * \sa SDL_SetTextureAlphaModFloat
922 * \sa SDL_SetTextureColorMod
923 */
924extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureColorModFloat(SDL_Texture *texture, float r, float g, float b);
925
926
927/**
928 * Get the additional color value multiplied into render copy operations.
929 *
930 * \param texture the texture to query.
931 * \param r a pointer filled in with the current red color value.
932 * \param g a pointer filled in with the current green color value.
933 * \param b a pointer filled in with the current blue color value.
934 * \returns true on success or false on failure; call SDL_GetError() for more
935 * information.
936 *
937 * \threadsafety This function should only be called on the main thread.
938 *
939 * \since This function is available since SDL 3.2.0.
940 *
941 * \sa SDL_GetTextureAlphaMod
942 * \sa SDL_GetTextureColorModFloat
943 * \sa SDL_SetTextureColorMod
944 */
945extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureColorMod(SDL_Texture *texture, Uint8 *r, Uint8 *g, Uint8 *b);
946
947/**
948 * Get the additional color value multiplied into render copy operations.
949 *
950 * \param texture the texture to query.
951 * \param r a pointer filled in with the current red color value.
952 * \param g a pointer filled in with the current green color value.
953 * \param b a pointer filled in with the current blue color value.
954 * \returns true on success or false on failure; call SDL_GetError() for more
955 * information.
956 *
957 * \threadsafety This function should only be called on the main thread.
958 *
959 * \since This function is available since SDL 3.2.0.
960 *
961 * \sa SDL_GetTextureAlphaModFloat
962 * \sa SDL_GetTextureColorMod
963 * \sa SDL_SetTextureColorModFloat
964 */
965extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureColorModFloat(SDL_Texture *texture, float *r, float *g, float *b);
966
967/**
968 * Set an additional alpha value multiplied into render copy operations.
969 *
970 * When this texture is rendered, during the copy operation the source alpha
971 * value is modulated by this alpha value according to the following formula:
972 *
973 * `srcA = srcA * (alpha / 255)`
974 *
975 * Alpha modulation is not always supported by the renderer; it will return
976 * false if alpha modulation is not supported.
977 *
978 * \param texture the texture to update.
979 * \param alpha the source alpha value multiplied into copy operations.
980 * \returns true on success or false on failure; call SDL_GetError() for more
981 * information.
982 *
983 * \threadsafety This function should only be called on the main thread.
984 *
985 * \since This function is available since SDL 3.2.0.
986 *
987 * \sa SDL_GetTextureAlphaMod
988 * \sa SDL_SetTextureAlphaModFloat
989 * \sa SDL_SetTextureColorMod
990 */
991extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureAlphaMod(SDL_Texture *texture, Uint8 alpha);
992
993/**
994 * Set an additional alpha value multiplied into render copy operations.
995 *
996 * When this texture is rendered, during the copy operation the source alpha
997 * value is modulated by this alpha value according to the following formula:
998 *
999 * `srcA = srcA * alpha`
1000 *
1001 * Alpha modulation is not always supported by the renderer; it will return
1002 * false if alpha modulation is not supported.
1003 *
1004 * \param texture the texture to update.
1005 * \param alpha the source alpha value multiplied into copy operations.
1006 * \returns true on success or false on failure; call SDL_GetError() for more
1007 * information.
1008 *
1009 * \threadsafety This function should only be called on the main thread.
1010 *
1011 * \since This function is available since SDL 3.2.0.
1012 *
1013 * \sa SDL_GetTextureAlphaModFloat
1014 * \sa SDL_SetTextureAlphaMod
1015 * \sa SDL_SetTextureColorModFloat
1016 */
1017extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureAlphaModFloat(SDL_Texture *texture, float alpha);
1018
1019/**
1020 * Get the additional alpha value multiplied into render copy operations.
1021 *
1022 * \param texture the texture to query.
1023 * \param alpha a pointer filled in with the current alpha value.
1024 * \returns true on success or false on failure; call SDL_GetError() for more
1025 * information.
1026 *
1027 * \threadsafety This function should only be called on the main thread.
1028 *
1029 * \since This function is available since SDL 3.2.0.
1030 *
1031 * \sa SDL_GetTextureAlphaModFloat
1032 * \sa SDL_GetTextureColorMod
1033 * \sa SDL_SetTextureAlphaMod
1034 */
1035extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureAlphaMod(SDL_Texture *texture, Uint8 *alpha);
1036
1037/**
1038 * Get the additional alpha value multiplied into render copy operations.
1039 *
1040 * \param texture the texture to query.
1041 * \param alpha a pointer filled in with the current alpha value.
1042 * \returns true on success or false on failure; call SDL_GetError() for more
1043 * information.
1044 *
1045 * \threadsafety This function should only be called on the main thread.
1046 *
1047 * \since This function is available since SDL 3.2.0.
1048 *
1049 * \sa SDL_GetTextureAlphaMod
1050 * \sa SDL_GetTextureColorModFloat
1051 * \sa SDL_SetTextureAlphaModFloat
1052 */
1053extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureAlphaModFloat(SDL_Texture *texture, float *alpha);
1054
1055/**
1056 * Set the blend mode for a texture, used by SDL_RenderTexture().
1057 *
1058 * If the blend mode is not supported, the closest supported mode is chosen
1059 * and this function returns false.
1060 *
1061 * \param texture the texture to update.
1062 * \param blendMode the SDL_BlendMode to use for texture blending.
1063 * \returns true on success or false on failure; call SDL_GetError() for more
1064 * information.
1065 *
1066 * \threadsafety This function should only be called on the main thread.
1067 *
1068 * \since This function is available since SDL 3.2.0.
1069 *
1070 * \sa SDL_GetTextureBlendMode
1071 */
1072extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode blendMode);
1073
1074/**
1075 * Get the blend mode used for texture copy operations.
1076 *
1077 * \param texture the texture to query.
1078 * \param blendMode a pointer filled in with the current SDL_BlendMode.
1079 * \returns true on success or false on failure; call SDL_GetError() for more
1080 * information.
1081 *
1082 * \threadsafety This function should only be called on the main thread.
1083 *
1084 * \since This function is available since SDL 3.2.0.
1085 *
1086 * \sa SDL_SetTextureBlendMode
1087 */
1088extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode *blendMode);
1089
1090/**
1091 * Set the scale mode used for texture scale operations.
1092 *
1093 * The default texture scale mode is SDL_SCALEMODE_LINEAR.
1094 *
1095 * If the scale mode is not supported, the closest supported mode is chosen.
1096 *
1097 * \param texture the texture to update.
1098 * \param scaleMode the SDL_ScaleMode to use for texture scaling.
1099 * \returns true on success or false on failure; call SDL_GetError() for more
1100 * information.
1101 *
1102 * \threadsafety This function should only be called on the main thread.
1103 *
1104 * \since This function is available since SDL 3.2.0.
1105 *
1106 * \sa SDL_GetTextureScaleMode
1107 */
1108extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode scaleMode);
1109
1110/**
1111 * Get the scale mode used for texture scale operations.
1112 *
1113 * \param texture the texture to query.
1114 * \param scaleMode a pointer filled in with the current scale mode.
1115 * \returns true on success or false on failure; call SDL_GetError() for more
1116 * information.
1117 *
1118 * \threadsafety This function should only be called on the main thread.
1119 *
1120 * \since This function is available since SDL 3.2.0.
1121 *
1122 * \sa SDL_SetTextureScaleMode
1123 */
1124extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode *scaleMode);
1125
1126/**
1127 * Update the given texture rectangle with new pixel data.
1128 *
1129 * The pixel data must be in the pixel format of the texture, which can be
1130 * queried using the SDL_PROP_TEXTURE_FORMAT_NUMBER property.
1131 *
1132 * This is a fairly slow function, intended for use with static textures that
1133 * do not change often.
1134 *
1135 * If the texture is intended to be updated often, it is preferred to create
1136 * the texture as streaming and use the locking functions referenced below.
1137 * While this function will work with streaming textures, for optimization
1138 * reasons you may not get the pixels back if you lock the texture afterward.
1139 *
1140 * \param texture the texture to update.
1141 * \param rect an SDL_Rect structure representing the area to update, or NULL
1142 * to update the entire texture.
1143 * \param pixels the raw pixel data in the format of the texture.
1144 * \param pitch the number of bytes in a row of pixel data, including padding
1145 * between lines.
1146 * \returns true on success or false on failure; call SDL_GetError() for more
1147 * information.
1148 *
1149 * \threadsafety This function should only be called on the main thread.
1150 *
1151 * \since This function is available since SDL 3.2.0.
1152 *
1153 * \sa SDL_LockTexture
1154 * \sa SDL_UnlockTexture
1155 * \sa SDL_UpdateNVTexture
1156 * \sa SDL_UpdateYUVTexture
1157 */
1158extern SDL_DECLSPEC bool SDLCALL SDL_UpdateTexture(SDL_Texture *texture, const SDL_Rect *rect, const void *pixels, int pitch);
1159
1160/**
1161 * Update a rectangle within a planar YV12 or IYUV texture with new pixel
1162 * data.
1163 *
1164 * You can use SDL_UpdateTexture() as long as your pixel data is a contiguous
1165 * block of Y and U/V planes in the proper order, but this function is
1166 * available if your pixel data is not contiguous.
1167 *
1168 * \param texture the texture to update.
1169 * \param rect a pointer to the rectangle of pixels to update, or NULL to
1170 * update the entire texture.
1171 * \param Yplane the raw pixel data for the Y plane.
1172 * \param Ypitch the number of bytes between rows of pixel data for the Y
1173 * plane.
1174 * \param Uplane the raw pixel data for the U plane.
1175 * \param Upitch the number of bytes between rows of pixel data for the U
1176 * plane.
1177 * \param Vplane the raw pixel data for the V plane.
1178 * \param Vpitch the number of bytes between rows of pixel data for the V
1179 * plane.
1180 * \returns true on success or false on failure; call SDL_GetError() for more
1181 * information.
1182 *
1183 * \threadsafety This function should only be called on the main thread.
1184 *
1185 * \since This function is available since SDL 3.2.0.
1186 *
1187 * \sa SDL_UpdateNVTexture
1188 * \sa SDL_UpdateTexture
1189 */
1190extern SDL_DECLSPEC bool SDLCALL SDL_UpdateYUVTexture(SDL_Texture *texture,
1191 const SDL_Rect *rect,
1192 const Uint8 *Yplane, int Ypitch,
1193 const Uint8 *Uplane, int Upitch,
1194 const Uint8 *Vplane, int Vpitch);
1195
1196/**
1197 * Update a rectangle within a planar NV12 or NV21 texture with new pixels.
1198 *
1199 * You can use SDL_UpdateTexture() as long as your pixel data is a contiguous
1200 * block of NV12/21 planes in the proper order, but this function is available
1201 * if your pixel data is not contiguous.
1202 *
1203 * \param texture the texture to update.
1204 * \param rect a pointer to the rectangle of pixels to update, or NULL to
1205 * update the entire texture.
1206 * \param Yplane the raw pixel data for the Y plane.
1207 * \param Ypitch the number of bytes between rows of pixel data for the Y
1208 * plane.
1209 * \param UVplane the raw pixel data for the UV plane.
1210 * \param UVpitch the number of bytes between rows of pixel data for the UV
1211 * plane.
1212 * \returns true on success or false on failure; call SDL_GetError() for more
1213 * information.
1214 *
1215 * \threadsafety This function should only be called on the main thread.
1216 *
1217 * \since This function is available since SDL 3.2.0.
1218 *
1219 * \sa SDL_UpdateTexture
1220 * \sa SDL_UpdateYUVTexture
1221 */
1222extern SDL_DECLSPEC bool SDLCALL SDL_UpdateNVTexture(SDL_Texture *texture,
1223 const SDL_Rect *rect,
1224 const Uint8 *Yplane, int Ypitch,
1225 const Uint8 *UVplane, int UVpitch);
1226
1227/**
1228 * Lock a portion of the texture for **write-only** pixel access.
1229 *
1230 * As an optimization, the pixels made available for editing don't necessarily
1231 * contain the old texture data. This is a write-only operation, and if you
1232 * need to keep a copy of the texture data you should do that at the
1233 * application level.
1234 *
1235 * You must use SDL_UnlockTexture() to unlock the pixels and apply any
1236 * changes.
1237 *
1238 * \param texture the texture to lock for access, which was created with
1239 * `SDL_TEXTUREACCESS_STREAMING`.
1240 * \param rect an SDL_Rect structure representing the area to lock for access;
1241 * NULL to lock the entire texture.
1242 * \param pixels this is filled in with a pointer to the locked pixels,
1243 * appropriately offset by the locked area.
1244 * \param pitch this is filled in with the pitch of the locked pixels; the
1245 * pitch is the length of one row in bytes.
1246 * \returns true on success or false if the texture is not valid or was not
1247 * created with `SDL_TEXTUREACCESS_STREAMING`; call SDL_GetError()
1248 * for more information.
1249 *
1250 * \threadsafety This function should only be called on the main thread.
1251 *
1252 * \since This function is available since SDL 3.2.0.
1253 *
1254 * \sa SDL_LockTextureToSurface
1255 * \sa SDL_UnlockTexture
1256 */
1257extern SDL_DECLSPEC bool SDLCALL SDL_LockTexture(SDL_Texture *texture,
1258 const SDL_Rect *rect,
1259 void **pixels, int *pitch);
1260
1261/**
1262 * Lock a portion of the texture for **write-only** pixel access, and expose
1263 * it as a SDL surface.
1264 *
1265 * Besides providing an SDL_Surface instead of raw pixel data, this function
1266 * operates like SDL_LockTexture.
1267 *
1268 * As an optimization, the pixels made available for editing don't necessarily
1269 * contain the old texture data. This is a write-only operation, and if you
1270 * need to keep a copy of the texture data you should do that at the
1271 * application level.
1272 *
1273 * You must use SDL_UnlockTexture() to unlock the pixels and apply any
1274 * changes.
1275 *
1276 * The returned surface is freed internally after calling SDL_UnlockTexture()
1277 * or SDL_DestroyTexture(). The caller should not free it.
1278 *
1279 * \param texture the texture to lock for access, which must be created with
1280 * `SDL_TEXTUREACCESS_STREAMING`.
1281 * \param rect a pointer to the rectangle to lock for access. If the rect is
1282 * NULL, the entire texture will be locked.
1283 * \param surface a pointer to an SDL surface of size **rect**. Don't assume
1284 * any specific pixel content.
1285 * \returns true on success or false on failure; call SDL_GetError() for more
1286 * information.
1287 *
1288 * \threadsafety This function should only be called on the main thread.
1289 *
1290 * \since This function is available since SDL 3.2.0.
1291 *
1292 * \sa SDL_LockTexture
1293 * \sa SDL_UnlockTexture
1294 */
1295extern SDL_DECLSPEC bool SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect, SDL_Surface **surface);
1296
1297/**
1298 * Unlock a texture, uploading the changes to video memory, if needed.
1299 *
1300 * **Warning**: Please note that SDL_LockTexture() is intended to be
1301 * write-only; it will not guarantee the previous contents of the texture will
1302 * be provided. You must fully initialize any area of a texture that you lock
1303 * before unlocking it, as the pixels might otherwise be uninitialized memory.
1304 *
1305 * Which is to say: locking and immediately unlocking a texture can result in
1306 * corrupted textures, depending on the renderer in use.
1307 *
1308 * \param texture a texture locked by SDL_LockTexture().
1309 *
1310 * \threadsafety This function should only be called on the main thread.
1311 *
1312 * \since This function is available since SDL 3.2.0.
1313 *
1314 * \sa SDL_LockTexture
1315 */
1316extern SDL_DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture *texture);
1317
1318/**
1319 * Set a texture as the current rendering target.
1320 *
1321 * The default render target is the window for which the renderer was created.
1322 * To stop rendering to a texture and render to the window again, call this
1323 * function with a NULL `texture`.
1324 *
1325 * Viewport, cliprect, scale, and logical presentation are unique to each
1326 * render target. Get and set functions for these states apply to the current
1327 * render target set by this function, and those states persist on each target
1328 * when the current render target changes.
1329 *
1330 * \param renderer the rendering context.
1331 * \param texture the targeted texture, which must be created with the
1332 * `SDL_TEXTUREACCESS_TARGET` flag, or NULL to render to the
1333 * window instead of a texture.
1334 * \returns true on success or false on failure; call SDL_GetError() for more
1335 * information.
1336 *
1337 * \threadsafety This function should only be called on the main thread.
1338 *
1339 * \since This function is available since SDL 3.2.0.
1340 *
1341 * \sa SDL_GetRenderTarget
1342 */
1343extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture);
1344
1345/**
1346 * Get the current render target.
1347 *
1348 * The default render target is the window for which the renderer was created,
1349 * and is reported a NULL here.
1350 *
1351 * \param renderer the rendering context.
1352 * \returns the current render target or NULL for the default render target.
1353 *
1354 * \threadsafety This function should only be called on the main thread.
1355 *
1356 * \since This function is available since SDL 3.2.0.
1357 *
1358 * \sa SDL_SetRenderTarget
1359 */
1360extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer);
1361
1362/**
1363 * Set a device-independent resolution and presentation mode for rendering.
1364 *
1365 * This function sets the width and height of the logical rendering output.
1366 * The renderer will act as if the current render target is always the
1367 * requested dimensions, scaling to the actual resolution as necessary.
1368 *
1369 * This can be useful for games that expect a fixed size, but would like to
1370 * scale the output to whatever is available, regardless of how a user resizes
1371 * a window, or if the display is high DPI.
1372 *
1373 * Logical presentation can be used with both render target textures and the
1374 * renderer's window; the state is unique to each render target, and this
1375 * function sets the state for the current render target. It might be useful
1376 * to draw to a texture that matches the window dimensions with logical
1377 * presentation enabled, and then draw that texture across the entire window
1378 * with logical presentation disabled. Be careful not to render both with
1379 * logical presentation enabled, however, as this could produce
1380 * double-letterboxing, etc.
1381 *
1382 * You can disable logical coordinates by setting the mode to
1383 * SDL_LOGICAL_PRESENTATION_DISABLED, and in that case you get the full pixel
1384 * resolution of the render target; it is safe to toggle logical presentation
1385 * during the rendering of a frame: perhaps most of the rendering is done to
1386 * specific dimensions but to make fonts look sharp, the app turns off logical
1387 * presentation while drawing text, for example.
1388 *
1389 * For the renderer's window, letterboxing is drawn into the framebuffer if
1390 * logical presentation is enabled during SDL_RenderPresent; be sure to
1391 * reenable it before presenting if you were toggling it, otherwise the
1392 * letterbox areas might have artifacts from previous frames (or artifacts
1393 * from external overlays, etc). Letterboxing is never drawn into texture
1394 * render targets; be sure to call SDL_RenderClear() before drawing into the
1395 * texture so the letterboxing areas are cleared, if appropriate.
1396 *
1397 * You can convert coordinates in an event into rendering coordinates using
1398 * SDL_ConvertEventToRenderCoordinates().
1399 *
1400 * \param renderer the rendering context.
1401 * \param w the width of the logical resolution.
1402 * \param h the height of the logical resolution.
1403 * \param mode the presentation mode used.
1404 * \returns true on success or false on failure; call SDL_GetError() for more
1405 * information.
1406 *
1407 * \threadsafety This function should only be called on the main thread.
1408 *
1409 * \since This function is available since SDL 3.2.0.
1410 *
1411 * \sa SDL_ConvertEventToRenderCoordinates
1412 * \sa SDL_GetRenderLogicalPresentation
1413 * \sa SDL_GetRenderLogicalPresentationRect
1414 */
1415extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderLogicalPresentation(SDL_Renderer *renderer, int w, int h, SDL_RendererLogicalPresentation mode);
1416
1417/**
1418 * Get device independent resolution and presentation mode for rendering.
1419 *
1420 * This function gets the width and height of the logical rendering output, or
1421 * the output size in pixels if a logical resolution is not enabled.
1422 *
1423 * Each render target has its own logical presentation state. This function
1424 * gets the state for the current render target.
1425 *
1426 * \param renderer the rendering context.
1427 * \param w an int to be filled with the width.
1428 * \param h an int to be filled with the height.
1429 * \param mode the presentation mode used.
1430 * \returns true on success or false on failure; call SDL_GetError() for more
1431 * information.
1432 *
1433 * \threadsafety This function should only be called on the main thread.
1434 *
1435 * \since This function is available since SDL 3.2.0.
1436 *
1437 * \sa SDL_SetRenderLogicalPresentation
1438 */
1439extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderLogicalPresentation(SDL_Renderer *renderer, int *w, int *h, SDL_RendererLogicalPresentation *mode);
1440
1441/**
1442 * Get the final presentation rectangle for rendering.
1443 *
1444 * This function returns the calculated rectangle used for logical
1445 * presentation, based on the presentation mode and output size. If logical
1446 * presentation is disabled, it will fill the rectangle with the output size,
1447 * in pixels.
1448 *
1449 * Each render target has its own logical presentation state. This function
1450 * gets the rectangle for the current render target.
1451 *
1452 * \param renderer the rendering context.
1453 * \param rect a pointer filled in with the final presentation rectangle, may
1454 * be NULL.
1455 * \returns true on success or false on failure; call SDL_GetError() for more
1456 * information.
1457 *
1458 * \threadsafety This function should only be called on the main thread.
1459 *
1460 * \since This function is available since SDL 3.2.0.
1461 *
1462 * \sa SDL_SetRenderLogicalPresentation
1463 */
1464extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderLogicalPresentationRect(SDL_Renderer *renderer, SDL_FRect *rect);
1465
1466/**
1467 * Get a point in render coordinates when given a point in window coordinates.
1468 *
1469 * This takes into account several states:
1470 *
1471 * - The window dimensions.
1472 * - The logical presentation settings (SDL_SetRenderLogicalPresentation)
1473 * - The scale (SDL_SetRenderScale)
1474 * - The viewport (SDL_SetRenderViewport)
1475 *
1476 * \param renderer the rendering context.
1477 * \param window_x the x coordinate in window coordinates.
1478 * \param window_y the y coordinate in window coordinates.
1479 * \param x a pointer filled with the x coordinate in render coordinates.
1480 * \param y a pointer filled with the y coordinate in render coordinates.
1481 * \returns true on success or false on failure; call SDL_GetError() for more
1482 * information.
1483 *
1484 * \threadsafety This function should only be called on the main thread.
1485 *
1486 * \since This function is available since SDL 3.2.0.
1487 *
1488 * \sa SDL_SetRenderLogicalPresentation
1489 * \sa SDL_SetRenderScale
1490 */
1491extern SDL_DECLSPEC bool SDLCALL SDL_RenderCoordinatesFromWindow(SDL_Renderer *renderer, float window_x, float window_y, float *x, float *y);
1492
1493/**
1494 * Get a point in window coordinates when given a point in render coordinates.
1495 *
1496 * This takes into account several states:
1497 *
1498 * - The window dimensions.
1499 * - The logical presentation settings (SDL_SetRenderLogicalPresentation)
1500 * - The scale (SDL_SetRenderScale)
1501 * - The viewport (SDL_SetRenderViewport)
1502 *
1503 * \param renderer the rendering context.
1504 * \param x the x coordinate in render coordinates.
1505 * \param y the y coordinate in render coordinates.
1506 * \param window_x a pointer filled with the x coordinate in window
1507 * coordinates.
1508 * \param window_y a pointer filled with the y coordinate in window
1509 * coordinates.
1510 * \returns true on success or false on failure; call SDL_GetError() for more
1511 * information.
1512 *
1513 * \threadsafety This function should only be called on the main thread.
1514 *
1515 * \since This function is available since SDL 3.2.0.
1516 *
1517 * \sa SDL_SetRenderLogicalPresentation
1518 * \sa SDL_SetRenderScale
1519 * \sa SDL_SetRenderViewport
1520 */
1521extern SDL_DECLSPEC bool SDLCALL SDL_RenderCoordinatesToWindow(SDL_Renderer *renderer, float x, float y, float *window_x, float *window_y);
1522
1523/**
1524 * Convert the coordinates in an event to render coordinates.
1525 *
1526 * This takes into account several states:
1527 *
1528 * - The window dimensions.
1529 * - The logical presentation settings (SDL_SetRenderLogicalPresentation)
1530 * - The scale (SDL_SetRenderScale)
1531 * - The viewport (SDL_SetRenderViewport)
1532 *
1533 * Various event types are converted with this function: mouse, touch, pen,
1534 * etc.
1535 *
1536 * Touch coordinates are converted from normalized coordinates in the window
1537 * to non-normalized rendering coordinates.
1538 *
1539 * Relative mouse coordinates (xrel and yrel event fields) are _also_
1540 * converted. Applications that do not want these fields converted should use
1541 * SDL_RenderCoordinatesFromWindow() on the specific event fields instead of
1542 * converting the entire event structure.
1543 *
1544 * Once converted, coordinates may be outside the rendering area.
1545 *
1546 * \param renderer the rendering context.
1547 * \param event the event to modify.
1548 * \returns true on success or false on failure; call SDL_GetError() for more
1549 * information.
1550 *
1551 * \threadsafety This function should only be called on the main thread.
1552 *
1553 * \since This function is available since SDL 3.2.0.
1554 *
1555 * \sa SDL_RenderCoordinatesFromWindow
1556 */
1557extern SDL_DECLSPEC bool SDLCALL SDL_ConvertEventToRenderCoordinates(SDL_Renderer *renderer, SDL_Event *event);
1558
1559/**
1560 * Set the drawing area for rendering on the current target.
1561 *
1562 * Drawing will clip to this area (separately from any clipping done with
1563 * SDL_SetRenderClipRect), and the top left of the area will become coordinate
1564 * (0, 0) for future drawing commands.
1565 *
1566 * The area's width and height must be >= 0.
1567 *
1568 * Each render target has its own viewport. This function sets the viewport
1569 * for the current render target.
1570 *
1571 * \param renderer the rendering context.
1572 * \param rect the SDL_Rect structure representing the drawing area, or NULL
1573 * to set the viewport to the entire target.
1574 * \returns true on success or false on failure; call SDL_GetError() for more
1575 * information.
1576 *
1577 * \threadsafety This function should only be called on the main thread.
1578 *
1579 * \since This function is available since SDL 3.2.0.
1580 *
1581 * \sa SDL_GetRenderViewport
1582 * \sa SDL_RenderViewportSet
1583 */
1584extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderViewport(SDL_Renderer *renderer, const SDL_Rect *rect);
1585
1586/**
1587 * Get the drawing area for the current target.
1588 *
1589 * Each render target has its own viewport. This function gets the viewport
1590 * for the current render target.
1591 *
1592 * \param renderer the rendering context.
1593 * \param rect an SDL_Rect structure filled in with the current drawing area.
1594 * \returns true on success or false on failure; call SDL_GetError() for more
1595 * information.
1596 *
1597 * \threadsafety This function should only be called on the main thread.
1598 *
1599 * \since This function is available since SDL 3.2.0.
1600 *
1601 * \sa SDL_RenderViewportSet
1602 * \sa SDL_SetRenderViewport
1603 */
1604extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderViewport(SDL_Renderer *renderer, SDL_Rect *rect);
1605
1606/**
1607 * Return whether an explicit rectangle was set as the viewport.
1608 *
1609 * This is useful if you're saving and restoring the viewport and want to know
1610 * whether you should restore a specific rectangle or NULL.
1611 *
1612 * Each render target has its own viewport. This function checks the viewport
1613 * for the current render target.
1614 *
1615 * \param renderer the rendering context.
1616 * \returns true if the viewport was set to a specific rectangle, or false if
1617 * it was set to NULL (the entire target).
1618 *
1619 * \threadsafety This function should only be called on the main thread.
1620 *
1621 * \since This function is available since SDL 3.2.0.
1622 *
1623 * \sa SDL_GetRenderViewport
1624 * \sa SDL_SetRenderViewport
1625 */
1626extern SDL_DECLSPEC bool SDLCALL SDL_RenderViewportSet(SDL_Renderer *renderer);
1627
1628/**
1629 * Get the safe area for rendering within the current viewport.
1630 *
1631 * Some devices have portions of the screen which are partially obscured or
1632 * not interactive, possibly due to on-screen controls, curved edges, camera
1633 * notches, TV overscan, etc. This function provides the area of the current
1634 * viewport which is safe to have interactible content. You should continue
1635 * rendering into the rest of the render target, but it should not contain
1636 * visually important or interactible content.
1637 *
1638 * \param renderer the rendering context.
1639 * \param rect a pointer filled in with the area that is safe for interactive
1640 * content.
1641 * \returns true on success or false on failure; call SDL_GetError() for more
1642 * information.
1643 *
1644 * \threadsafety This function should only be called on the main thread.
1645 *
1646 * \since This function is available since SDL 3.2.0.
1647 */
1648extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderSafeArea(SDL_Renderer *renderer, SDL_Rect *rect);
1649
1650/**
1651 * Set the clip rectangle for rendering on the specified target.
1652 *
1653 * Each render target has its own clip rectangle. This function sets the
1654 * cliprect for the current render target.
1655 *
1656 * \param renderer the rendering context.
1657 * \param rect an SDL_Rect structure representing the clip area, relative to
1658 * the viewport, or NULL to disable clipping.
1659 * \returns true on success or false on failure; call SDL_GetError() for more
1660 * information.
1661 *
1662 * \threadsafety This function should only be called on the main thread.
1663 *
1664 * \since This function is available since SDL 3.2.0.
1665 *
1666 * \sa SDL_GetRenderClipRect
1667 * \sa SDL_RenderClipEnabled
1668 */
1669extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderClipRect(SDL_Renderer *renderer, const SDL_Rect *rect);
1670
1671/**
1672 * Get the clip rectangle for the current target.
1673 *
1674 * Each render target has its own clip rectangle. This function gets the
1675 * cliprect for the current render target.
1676 *
1677 * \param renderer the rendering context.
1678 * \param rect an SDL_Rect structure filled in with the current clipping area
1679 * or an empty rectangle if clipping is disabled.
1680 * \returns true on success or false on failure; call SDL_GetError() for more
1681 * information.
1682 *
1683 * \threadsafety This function should only be called on the main thread.
1684 *
1685 * \since This function is available since SDL 3.2.0.
1686 *
1687 * \sa SDL_RenderClipEnabled
1688 * \sa SDL_SetRenderClipRect
1689 */
1690extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderClipRect(SDL_Renderer *renderer, SDL_Rect *rect);
1691
1692/**
1693 * Get whether clipping is enabled on the given render target.
1694 *
1695 * Each render target has its own clip rectangle. This function checks the
1696 * cliprect for the current render target.
1697 *
1698 * \param renderer the rendering context.
1699 * \returns true if clipping is enabled or false if not; call SDL_GetError()
1700 * for more information.
1701 *
1702 * \threadsafety This function should only be called on the main thread.
1703 *
1704 * \since This function is available since SDL 3.2.0.
1705 *
1706 * \sa SDL_GetRenderClipRect
1707 * \sa SDL_SetRenderClipRect
1708 */
1709extern SDL_DECLSPEC bool SDLCALL SDL_RenderClipEnabled(SDL_Renderer *renderer);
1710
1711/**
1712 * Set the drawing scale for rendering on the current target.
1713 *
1714 * The drawing coordinates are scaled by the x/y scaling factors before they
1715 * are used by the renderer. This allows resolution independent drawing with a
1716 * single coordinate system.
1717 *
1718 * If this results in scaling or subpixel drawing by the rendering backend, it
1719 * will be handled using the appropriate quality hints. For best results use
1720 * integer scaling factors.
1721 *
1722 * Each render target has its own scale. This function sets the scale for the
1723 * current render target.
1724 *
1725 * \param renderer the rendering context.
1726 * \param scaleX the horizontal scaling factor.
1727 * \param scaleY the vertical scaling factor.
1728 * \returns true on success or false on failure; call SDL_GetError() for more
1729 * information.
1730 *
1731 * \threadsafety This function should only be called on the main thread.
1732 *
1733 * \since This function is available since SDL 3.2.0.
1734 *
1735 * \sa SDL_GetRenderScale
1736 */
1737extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderScale(SDL_Renderer *renderer, float scaleX, float scaleY);
1738
1739/**
1740 * Get the drawing scale for the current target.
1741 *
1742 * Each render target has its own scale. This function gets the scale for the
1743 * current render target.
1744 *
1745 * \param renderer the rendering context.
1746 * \param scaleX a pointer filled in with the horizontal scaling factor.
1747 * \param scaleY a pointer filled in with the vertical scaling factor.
1748 * \returns true on success or false on failure; call SDL_GetError() for more
1749 * information.
1750 *
1751 * \threadsafety This function should only be called on the main thread.
1752 *
1753 * \since This function is available since SDL 3.2.0.
1754 *
1755 * \sa SDL_SetRenderScale
1756 */
1757extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderScale(SDL_Renderer *renderer, float *scaleX, float *scaleY);
1758
1759/**
1760 * Set the color used for drawing operations.
1761 *
1762 * Set the color for drawing or filling rectangles, lines, and points, and for
1763 * SDL_RenderClear().
1764 *
1765 * \param renderer the rendering context.
1766 * \param r the red value used to draw on the rendering target.
1767 * \param g the green value used to draw on the rendering target.
1768 * \param b the blue value used to draw on the rendering target.
1769 * \param a the alpha value used to draw on the rendering target; usually
1770 * `SDL_ALPHA_OPAQUE` (255). Use SDL_SetRenderDrawBlendMode to
1771 * specify how the alpha channel is used.
1772 * \returns true on success or false on failure; call SDL_GetError() for more
1773 * information.
1774 *
1775 * \threadsafety This function should only be called on the main thread.
1776 *
1777 * \since This function is available since SDL 3.2.0.
1778 *
1779 * \sa SDL_GetRenderDrawColor
1780 * \sa SDL_SetRenderDrawColorFloat
1781 */
1782extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderDrawColor(SDL_Renderer *renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
1783
1784/**
1785 * Set the color used for drawing operations (Rect, Line and Clear).
1786 *
1787 * Set the color for drawing or filling rectangles, lines, and points, and for
1788 * SDL_RenderClear().
1789 *
1790 * \param renderer the rendering context.
1791 * \param r the red value used to draw on the rendering target.
1792 * \param g the green value used to draw on the rendering target.
1793 * \param b the blue value used to draw on the rendering target.
1794 * \param a the alpha value used to draw on the rendering target. Use
1795 * SDL_SetRenderDrawBlendMode to specify how the alpha channel is
1796 * used.
1797 * \returns true on success or false on failure; call SDL_GetError() for more
1798 * information.
1799 *
1800 * \threadsafety This function should only be called on the main thread.
1801 *
1802 * \since This function is available since SDL 3.2.0.
1803 *
1804 * \sa SDL_GetRenderDrawColorFloat
1805 * \sa SDL_SetRenderDrawColor
1806 */
1807extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderDrawColorFloat(SDL_Renderer *renderer, float r, float g, float b, float a);
1808
1809/**
1810 * Get the color used for drawing operations (Rect, Line and Clear).
1811 *
1812 * \param renderer the rendering context.
1813 * \param r a pointer filled in with the red value used to draw on the
1814 * rendering target.
1815 * \param g a pointer filled in with the green value used to draw on the
1816 * rendering target.
1817 * \param b a pointer filled in with the blue value used to draw on the
1818 * rendering target.
1819 * \param a a pointer filled in with the alpha value used to draw on the
1820 * rendering target; usually `SDL_ALPHA_OPAQUE` (255).
1821 * \returns true on success or false on failure; call SDL_GetError() for more
1822 * information.
1823 *
1824 * \threadsafety This function should only be called on the main thread.
1825 *
1826 * \since This function is available since SDL 3.2.0.
1827 *
1828 * \sa SDL_GetRenderDrawColorFloat
1829 * \sa SDL_SetRenderDrawColor
1830 */
1831extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderDrawColor(SDL_Renderer *renderer, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);
1832
1833/**
1834 * Get the color used for drawing operations (Rect, Line and Clear).
1835 *
1836 * \param renderer the rendering context.
1837 * \param r a pointer filled in with the red value used to draw on the
1838 * rendering target.
1839 * \param g a pointer filled in with the green value used to draw on the
1840 * rendering target.
1841 * \param b a pointer filled in with the blue value used to draw on the
1842 * rendering target.
1843 * \param a a pointer filled in with the alpha value used to draw on the
1844 * rendering target.
1845 * \returns true on success or false on failure; call SDL_GetError() for more
1846 * information.
1847 *
1848 * \threadsafety This function should only be called on the main thread.
1849 *
1850 * \since This function is available since SDL 3.2.0.
1851 *
1852 * \sa SDL_SetRenderDrawColorFloat
1853 * \sa SDL_GetRenderDrawColor
1854 */
1855extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderDrawColorFloat(SDL_Renderer *renderer, float *r, float *g, float *b, float *a);
1856
1857/**
1858 * Set the color scale used for render operations.
1859 *
1860 * The color scale is an additional scale multiplied into the pixel color
1861 * value while rendering. This can be used to adjust the brightness of colors
1862 * during HDR rendering, or changing HDR video brightness when playing on an
1863 * SDR display.
1864 *
1865 * The color scale does not affect the alpha channel, only the color
1866 * brightness.
1867 *
1868 * \param renderer the rendering context.
1869 * \param scale the color scale value.
1870 * \returns true on success or false on failure; call SDL_GetError() for more
1871 * information.
1872 *
1873 * \threadsafety This function should only be called on the main thread.
1874 *
1875 * \since This function is available since SDL 3.2.0.
1876 *
1877 * \sa SDL_GetRenderColorScale
1878 */
1879extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderColorScale(SDL_Renderer *renderer, float scale);
1880
1881/**
1882 * Get the color scale used for render operations.
1883 *
1884 * \param renderer the rendering context.
1885 * \param scale a pointer filled in with the current color scale value.
1886 * \returns true on success or false on failure; call SDL_GetError() for more
1887 * information.
1888 *
1889 * \threadsafety This function should only be called on the main thread.
1890 *
1891 * \since This function is available since SDL 3.2.0.
1892 *
1893 * \sa SDL_SetRenderColorScale
1894 */
1895extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderColorScale(SDL_Renderer *renderer, float *scale);
1896
1897/**
1898 * Set the blend mode used for drawing operations (Fill and Line).
1899 *
1900 * If the blend mode is not supported, the closest supported mode is chosen.
1901 *
1902 * \param renderer the rendering context.
1903 * \param blendMode the SDL_BlendMode to use for blending.
1904 * \returns true on success or false on failure; call SDL_GetError() for more
1905 * information.
1906 *
1907 * \threadsafety This function should only be called on the main thread.
1908 *
1909 * \since This function is available since SDL 3.2.0.
1910 *
1911 * \sa SDL_GetRenderDrawBlendMode
1912 */
1913extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode);
1914
1915/**
1916 * Get the blend mode used for drawing operations.
1917 *
1918 * \param renderer the rendering context.
1919 * \param blendMode a pointer filled in with the current SDL_BlendMode.
1920 * \returns true on success or false on failure; call SDL_GetError() for more
1921 * information.
1922 *
1923 * \threadsafety This function should only be called on the main thread.
1924 *
1925 * \since This function is available since SDL 3.2.0.
1926 *
1927 * \sa SDL_SetRenderDrawBlendMode
1928 */
1929extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode *blendMode);
1930
1931/**
1932 * Clear the current rendering target with the drawing color.
1933 *
1934 * This function clears the entire rendering target, ignoring the viewport and
1935 * the clip rectangle. Note, that clearing will also set/fill all pixels of
1936 * the rendering target to current renderer draw color, so make sure to invoke
1937 * SDL_SetRenderDrawColor() when needed.
1938 *
1939 * \param renderer the rendering context.
1940 * \returns true on success or false on failure; call SDL_GetError() for more
1941 * information.
1942 *
1943 * \threadsafety This function should only be called on the main thread.
1944 *
1945 * \since This function is available since SDL 3.2.0.
1946 *
1947 * \sa SDL_SetRenderDrawColor
1948 */
1949extern SDL_DECLSPEC bool SDLCALL SDL_RenderClear(SDL_Renderer *renderer);
1950
1951/**
1952 * Draw a point on the current rendering target at subpixel precision.
1953 *
1954 * \param renderer the renderer which should draw a point.
1955 * \param x the x coordinate of the point.
1956 * \param y the y coordinate of the point.
1957 * \returns true on success or false on failure; call SDL_GetError() for more
1958 * information.
1959 *
1960 * \threadsafety This function should only be called on the main thread.
1961 *
1962 * \since This function is available since SDL 3.2.0.
1963 *
1964 * \sa SDL_RenderPoints
1965 */
1966extern SDL_DECLSPEC bool SDLCALL SDL_RenderPoint(SDL_Renderer *renderer, float x, float y);
1967
1968/**
1969 * Draw multiple points on the current rendering target at subpixel precision.
1970 *
1971 * \param renderer the renderer which should draw multiple points.
1972 * \param points the points to draw.
1973 * \param count the number of points to draw.
1974 * \returns true on success or false on failure; call SDL_GetError() for more
1975 * information.
1976 *
1977 * \threadsafety This function should only be called on the main thread.
1978 *
1979 * \since This function is available since SDL 3.2.0.
1980 *
1981 * \sa SDL_RenderPoint
1982 */
1983extern SDL_DECLSPEC bool SDLCALL SDL_RenderPoints(SDL_Renderer *renderer, const SDL_FPoint *points, int count);
1984
1985/**
1986 * Draw a line on the current rendering target at subpixel precision.
1987 *
1988 * \param renderer the renderer which should draw a line.
1989 * \param x1 the x coordinate of the start point.
1990 * \param y1 the y coordinate of the start point.
1991 * \param x2 the x coordinate of the end point.
1992 * \param y2 the y coordinate of the end point.
1993 * \returns true on success or false on failure; call SDL_GetError() for more
1994 * information.
1995 *
1996 * \threadsafety This function should only be called on the main thread.
1997 *
1998 * \since This function is available since SDL 3.2.0.
1999 *
2000 * \sa SDL_RenderLines
2001 */
2002extern SDL_DECLSPEC bool SDLCALL SDL_RenderLine(SDL_Renderer *renderer, float x1, float y1, float x2, float y2);
2003
2004/**
2005 * Draw a series of connected lines on the current rendering target at
2006 * subpixel precision.
2007 *
2008 * \param renderer the renderer which should draw multiple lines.
2009 * \param points the points along the lines.
2010 * \param count the number of points, drawing count-1 lines.
2011 * \returns true on success or false on failure; call SDL_GetError() for more
2012 * information.
2013 *
2014 * \threadsafety This function should only be called on the main thread.
2015 *
2016 * \since This function is available since SDL 3.2.0.
2017 *
2018 * \sa SDL_RenderLine
2019 */
2020extern SDL_DECLSPEC bool SDLCALL SDL_RenderLines(SDL_Renderer *renderer, const SDL_FPoint *points, int count);
2021
2022/**
2023 * Draw a rectangle on the current rendering target at subpixel precision.
2024 *
2025 * \param renderer the renderer which should draw a rectangle.
2026 * \param rect a pointer to the destination rectangle, or NULL to outline the
2027 * entire rendering target.
2028 * \returns true on success or false on failure; call SDL_GetError() for more
2029 * information.
2030 *
2031 * \threadsafety This function should only be called on the main thread.
2032 *
2033 * \since This function is available since SDL 3.2.0.
2034 *
2035 * \sa SDL_RenderRects
2036 */
2037extern SDL_DECLSPEC bool SDLCALL SDL_RenderRect(SDL_Renderer *renderer, const SDL_FRect *rect);
2038
2039/**
2040 * Draw some number of rectangles on the current rendering target at subpixel
2041 * precision.
2042 *
2043 * \param renderer the renderer which should draw multiple rectangles.
2044 * \param rects a pointer to an array of destination rectangles.
2045 * \param count the number of rectangles.
2046 * \returns true on success or false on failure; call SDL_GetError() for more
2047 * information.
2048 *
2049 * \threadsafety This function should only be called on the main thread.
2050 *
2051 * \since This function is available since SDL 3.2.0.
2052 *
2053 * \sa SDL_RenderRect
2054 */
2055extern SDL_DECLSPEC bool SDLCALL SDL_RenderRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count);
2056
2057/**
2058 * Fill a rectangle on the current rendering target with the drawing color at
2059 * subpixel precision.
2060 *
2061 * \param renderer the renderer which should fill a rectangle.
2062 * \param rect a pointer to the destination rectangle, or NULL for the entire
2063 * rendering target.
2064 * \returns true on success or false on failure; call SDL_GetError() for more
2065 * information.
2066 *
2067 * \threadsafety This function should only be called on the main thread.
2068 *
2069 * \since This function is available since SDL 3.2.0.
2070 *
2071 * \sa SDL_RenderFillRects
2072 */
2073extern SDL_DECLSPEC bool SDLCALL SDL_RenderFillRect(SDL_Renderer *renderer, const SDL_FRect *rect);
2074
2075/**
2076 * Fill some number of rectangles on the current rendering target with the
2077 * drawing color at subpixel precision.
2078 *
2079 * \param renderer the renderer which should fill multiple rectangles.
2080 * \param rects a pointer to an array of destination rectangles.
2081 * \param count the number of rectangles.
2082 * \returns true on success or false on failure; call SDL_GetError() for more
2083 * information.
2084 *
2085 * \threadsafety This function should only be called on the main thread.
2086 *
2087 * \since This function is available since SDL 3.2.0.
2088 *
2089 * \sa SDL_RenderFillRect
2090 */
2091extern SDL_DECLSPEC bool SDLCALL SDL_RenderFillRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count);
2092
2093/**
2094 * Copy a portion of the texture to the current rendering target at subpixel
2095 * precision.
2096 *
2097 * \param renderer the renderer which should copy parts of a texture.
2098 * \param texture the source texture.
2099 * \param srcrect a pointer to the source rectangle, or NULL for the entire
2100 * texture.
2101 * \param dstrect a pointer to the destination rectangle, or NULL for the
2102 * entire rendering target.
2103 * \returns true on success or false on failure; call SDL_GetError() for more
2104 * information.
2105 *
2106 * \threadsafety This function should only be called on the main thread.
2107 *
2108 * \since This function is available since SDL 3.2.0.
2109 *
2110 * \sa SDL_RenderTextureRotated
2111 * \sa SDL_RenderTextureTiled
2112 */
2113extern SDL_DECLSPEC bool SDLCALL SDL_RenderTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, const SDL_FRect *dstrect);
2114
2115/**
2116 * Copy a portion of the source texture to the current rendering target, with
2117 * rotation and flipping, at subpixel precision.
2118 *
2119 * \param renderer the renderer which should copy parts of a texture.
2120 * \param texture the source texture.
2121 * \param srcrect a pointer to the source rectangle, or NULL for the entire
2122 * texture.
2123 * \param dstrect a pointer to the destination rectangle, or NULL for the
2124 * entire rendering target.
2125 * \param angle an angle in degrees that indicates the rotation that will be
2126 * applied to dstrect, rotating it in a clockwise direction.
2127 * \param center a pointer to a point indicating the point around which
2128 * dstrect will be rotated (if NULL, rotation will be done
2129 * around dstrect.w/2, dstrect.h/2).
2130 * \param flip an SDL_FlipMode value stating which flipping actions should be
2131 * performed on the texture.
2132 * \returns true on success or false on failure; call SDL_GetError() for more
2133 * information.
2134 *
2135 * \threadsafety This function should only be called on the main thread.
2136 *
2137 * \since This function is available since SDL 3.2.0.
2138 *
2139 * \sa SDL_RenderTexture
2140 */
2141extern SDL_DECLSPEC bool SDLCALL SDL_RenderTextureRotated(SDL_Renderer *renderer, SDL_Texture *texture,
2142 const SDL_FRect *srcrect, const SDL_FRect *dstrect,
2143 double angle, const SDL_FPoint *center,
2144 SDL_FlipMode flip);
2145
2146/**
2147 * Copy a portion of the source texture to the current rendering target, with
2148 * affine transform, at subpixel precision.
2149 *
2150 * \param renderer the renderer which should copy parts of a texture.
2151 * \param texture the source texture.
2152 * \param srcrect a pointer to the source rectangle, or NULL for the entire
2153 * texture.
2154 * \param origin a pointer to a point indicating where the top-left corner of
2155 * srcrect should be mapped to, or NULL for the rendering
2156 * target's origin.
2157 * \param right a pointer to a point indicating where the top-right corner of
2158 * srcrect should be mapped to, or NULL for the rendering
2159 * target's top-right corner.
2160 * \param down a pointer to a point indicating where the bottom-left corner of
2161 * srcrect should be mapped to, or NULL for the rendering target's
2162 * bottom-left corner.
2163 * \returns true on success or false on failure; call SDL_GetError() for more
2164 * information.
2165 *
2166 * \threadsafety You may only call this function from the main thread.
2167 *
2168 * \since This function is available since SDL 3.2.0.
2169 *
2170 * \sa SDL_RenderTexture
2171 */
2172extern SDL_DECLSPEC bool SDLCALL SDL_RenderTextureAffine(SDL_Renderer *renderer, SDL_Texture *texture,
2173 const SDL_FRect *srcrect, const SDL_FPoint *origin,
2174 const SDL_FPoint *right, const SDL_FPoint *down);
2175
2176/**
2177 * Tile a portion of the texture to the current rendering target at subpixel
2178 * precision.
2179 *
2180 * The pixels in `srcrect` will be repeated as many times as needed to
2181 * completely fill `dstrect`.
2182 *
2183 * \param renderer the renderer which should copy parts of a texture.
2184 * \param texture the source texture.
2185 * \param srcrect a pointer to the source rectangle, or NULL for the entire
2186 * texture.
2187 * \param scale the scale used to transform srcrect into the destination
2188 * rectangle, e.g. a 32x32 texture with a scale of 2 would fill
2189 * 64x64 tiles.
2190 * \param dstrect a pointer to the destination rectangle, or NULL for the
2191 * entire rendering target.
2192 * \returns true on success or false on failure; call SDL_GetError() for more
2193 * information.
2194 *
2195 * \threadsafety This function should only be called on the main thread.
2196 *
2197 * \since This function is available since SDL 3.2.0.
2198 *
2199 * \sa SDL_RenderTexture
2200 */
2201extern SDL_DECLSPEC bool SDLCALL SDL_RenderTextureTiled(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, float scale, const SDL_FRect *dstrect);
2202
2203/**
2204 * Perform a scaled copy using the 9-grid algorithm to the current rendering
2205 * target at subpixel precision.
2206 *
2207 * The pixels in the texture are split into a 3x3 grid, using the different
2208 * corner sizes for each corner, and the sides and center making up the
2209 * remaining pixels. The corners are then scaled using `scale` and fit into
2210 * the corners of the destination rectangle. The sides and center are then
2211 * stretched into place to cover the remaining destination rectangle.
2212 *
2213 * \param renderer the renderer which should copy parts of a texture.
2214 * \param texture the source texture.
2215 * \param srcrect the SDL_Rect structure representing the rectangle to be used
2216 * for the 9-grid, or NULL to use the entire texture.
2217 * \param left_width the width, in pixels, of the left corners in `srcrect`.
2218 * \param right_width the width, in pixels, of the right corners in `srcrect`.
2219 * \param top_height the height, in pixels, of the top corners in `srcrect`.
2220 * \param bottom_height the height, in pixels, of the bottom corners in
2221 * `srcrect`.
2222 * \param scale the scale used to transform the corner of `srcrect` into the
2223 * corner of `dstrect`, or 0.0f for an unscaled copy.
2224 * \param dstrect a pointer to the destination rectangle, or NULL for the
2225 * entire rendering target.
2226 * \returns true on success or false on failure; call SDL_GetError() for more
2227 * information.
2228 *
2229 * \threadsafety This function should only be called on the main thread.
2230 *
2231 * \since This function is available since SDL 3.2.0.
2232 *
2233 * \sa SDL_RenderTexture
2234 */
2235extern SDL_DECLSPEC bool SDLCALL SDL_RenderTexture9Grid(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, float left_width, float right_width, float top_height, float bottom_height, float scale, const SDL_FRect *dstrect);
2236
2237/**
2238 * Render a list of triangles, optionally using a texture and indices into the
2239 * vertex array Color and alpha modulation is done per vertex
2240 * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
2241 *
2242 * \param renderer the rendering context.
2243 * \param texture (optional) The SDL texture to use.
2244 * \param vertices vertices.
2245 * \param num_vertices number of vertices.
2246 * \param indices (optional) An array of integer indices into the 'vertices'
2247 * array, if NULL all vertices will be rendered in sequential
2248 * order.
2249 * \param num_indices number of indices.
2250 * \returns true on success or false on failure; call SDL_GetError() for more
2251 * information.
2252 *
2253 * \threadsafety This function should only be called on the main thread.
2254 *
2255 * \since This function is available since SDL 3.2.0.
2256 *
2257 * \sa SDL_RenderGeometryRaw
2258 */
2259extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer,
2260 SDL_Texture *texture,
2261 const SDL_Vertex *vertices, int num_vertices,
2262 const int *indices, int num_indices);
2263
2264/**
2265 * Render a list of triangles, optionally using a texture and indices into the
2266 * vertex arrays Color and alpha modulation is done per vertex
2267 * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
2268 *
2269 * \param renderer the rendering context.
2270 * \param texture (optional) The SDL texture to use.
2271 * \param xy vertex positions.
2272 * \param xy_stride byte size to move from one element to the next element.
2273 * \param color vertex colors (as SDL_FColor).
2274 * \param color_stride byte size to move from one element to the next element.
2275 * \param uv vertex normalized texture coordinates.
2276 * \param uv_stride byte size to move from one element to the next element.
2277 * \param num_vertices number of vertices.
2278 * \param indices (optional) An array of indices into the 'vertices' arrays,
2279 * if NULL all vertices will be rendered in sequential order.
2280 * \param num_indices number of indices.
2281 * \param size_indices index size: 1 (byte), 2 (short), 4 (int).
2282 * \returns true on success or false on failure; call SDL_GetError() for more
2283 * information.
2284 *
2285 * \threadsafety This function should only be called on the main thread.
2286 *
2287 * \since This function is available since SDL 3.2.0.
2288 *
2289 * \sa SDL_RenderGeometry
2290 */
2291extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
2292 SDL_Texture *texture,
2293 const float *xy, int xy_stride,
2294 const SDL_FColor *color, int color_stride,
2295 const float *uv, int uv_stride,
2296 int num_vertices,
2297 const void *indices, int num_indices, int size_indices);
2298
2299/**
2300 * Read pixels from the current rendering target.
2301 *
2302 * The returned surface contains pixels inside the desired area clipped to the
2303 * current viewport, and should be freed with SDL_DestroySurface().
2304 *
2305 * Note that this returns the actual pixels on the screen, so if you are using
2306 * logical presentation you should use SDL_GetRenderLogicalPresentationRect()
2307 * to get the area containing your content.
2308 *
2309 * **WARNING**: This is a very slow operation, and should not be used
2310 * frequently. If you're using this on the main rendering target, it should be
2311 * called after rendering and before SDL_RenderPresent().
2312 *
2313 * \param renderer the rendering context.
2314 * \param rect an SDL_Rect structure representing the area to read, which will
2315 * be clipped to the current viewport, or NULL for the entire
2316 * viewport.
2317 * \returns a new SDL_Surface on success or NULL on failure; call
2318 * SDL_GetError() for more information.
2319 *
2320 * \threadsafety This function should only be called on the main thread.
2321 *
2322 * \since This function is available since SDL 3.2.0.
2323 */
2324extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect);
2325
2326/**
2327 * Update the screen with any rendering performed since the previous call.
2328 *
2329 * SDL's rendering functions operate on a backbuffer; that is, calling a
2330 * rendering function such as SDL_RenderLine() does not directly put a line on
2331 * the screen, but rather updates the backbuffer. As such, you compose your
2332 * entire scene and *present* the composed backbuffer to the screen as a
2333 * complete picture.
2334 *
2335 * Therefore, when using SDL's rendering API, one does all drawing intended
2336 * for the frame, and then calls this function once per frame to present the
2337 * final drawing to the user.
2338 *
2339 * The backbuffer should be considered invalidated after each present; do not
2340 * assume that previous contents will exist between frames. You are strongly
2341 * encouraged to call SDL_RenderClear() to initialize the backbuffer before
2342 * starting each new frame's drawing, even if you plan to overwrite every
2343 * pixel.
2344 *
2345 * Please note, that in case of rendering to a texture - there is **no need**
2346 * to call `SDL_RenderPresent` after drawing needed objects to a texture, and
2347 * should not be done; you are only required to change back the rendering
2348 * target to default via `SDL_SetRenderTarget(renderer, NULL)` afterwards, as
2349 * textures by themselves do not have a concept of backbuffers. Calling
2350 * SDL_RenderPresent while rendering to a texture will still update the screen
2351 * with any current drawing that has been done _to the window itself_.
2352 *
2353 * \param renderer the rendering context.
2354 * \returns true on success or false on failure; call SDL_GetError() for more
2355 * information.
2356 *
2357 * \threadsafety This function should only be called on the main thread.
2358 *
2359 * \since This function is available since SDL 3.2.0.
2360 *
2361 * \sa SDL_CreateRenderer
2362 * \sa SDL_RenderClear
2363 * \sa SDL_RenderFillRect
2364 * \sa SDL_RenderFillRects
2365 * \sa SDL_RenderLine
2366 * \sa SDL_RenderLines
2367 * \sa SDL_RenderPoint
2368 * \sa SDL_RenderPoints
2369 * \sa SDL_RenderRect
2370 * \sa SDL_RenderRects
2371 * \sa SDL_SetRenderDrawBlendMode
2372 * \sa SDL_SetRenderDrawColor
2373 */
2374extern SDL_DECLSPEC bool SDLCALL SDL_RenderPresent(SDL_Renderer *renderer);
2375
2376/**
2377 * Destroy the specified texture.
2378 *
2379 * Passing NULL or an otherwise invalid texture will set the SDL error message
2380 * to "Invalid texture".
2381 *
2382 * \param texture the texture to destroy.
2383 *
2384 * \threadsafety This function should only be called on the main thread.
2385 *
2386 * \since This function is available since SDL 3.2.0.
2387 *
2388 * \sa SDL_CreateTexture
2389 * \sa SDL_CreateTextureFromSurface
2390 */
2391extern SDL_DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture *texture);
2392
2393/**
2394 * Destroy the rendering context for a window and free all associated
2395 * textures.
2396 *
2397 * This should be called before destroying the associated window.
2398 *
2399 * \param renderer the rendering context.
2400 *
2401 * \threadsafety This function should only be called on the main thread.
2402 *
2403 * \since This function is available since SDL 3.2.0.
2404 *
2405 * \sa SDL_CreateRenderer
2406 */
2407extern SDL_DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer *renderer);
2408
2409/**
2410 * Force the rendering context to flush any pending commands and state.
2411 *
2412 * You do not need to (and in fact, shouldn't) call this function unless you
2413 * are planning to call into OpenGL/Direct3D/Metal/whatever directly, in
2414 * addition to using an SDL_Renderer.
2415 *
2416 * This is for a very-specific case: if you are using SDL's render API, and
2417 * you plan to make OpenGL/D3D/whatever calls in addition to SDL render API
2418 * calls. If this applies, you should call this function between calls to
2419 * SDL's render API and the low-level API you're using in cooperation.
2420 *
2421 * In all other cases, you can ignore this function.
2422 *
2423 * This call makes SDL flush any pending rendering work it was queueing up to
2424 * do later in a single batch, and marks any internal cached state as invalid,
2425 * so it'll prepare all its state again later, from scratch.
2426 *
2427 * This means you do not need to save state in your rendering code to protect
2428 * the SDL renderer. However, there lots of arbitrary pieces of Direct3D and
2429 * OpenGL state that can confuse things; you should use your best judgment and
2430 * be prepared to make changes if specific state needs to be protected.
2431 *
2432 * \param renderer the rendering context.
2433 * \returns true on success or false on failure; call SDL_GetError() for more
2434 * information.
2435 *
2436 * \threadsafety This function should only be called on the main thread.
2437 *
2438 * \since This function is available since SDL 3.2.0.
2439 */
2440extern SDL_DECLSPEC bool SDLCALL SDL_FlushRenderer(SDL_Renderer *renderer);
2441
2442/**
2443 * Get the CAMetalLayer associated with the given Metal renderer.
2444 *
2445 * This function returns `void *`, so SDL doesn't have to include Metal's
2446 * headers, but it can be safely cast to a `CAMetalLayer *`.
2447 *
2448 * \param renderer the renderer to query.
2449 * \returns a `CAMetalLayer *` on success, or NULL if the renderer isn't a
2450 * Metal renderer.
2451 *
2452 * \threadsafety This function should only be called on the main thread.
2453 *
2454 * \since This function is available since SDL 3.2.0.
2455 *
2456 * \sa SDL_GetRenderMetalCommandEncoder
2457 */
2458extern SDL_DECLSPEC void * SDLCALL SDL_GetRenderMetalLayer(SDL_Renderer *renderer);
2459
2460/**
2461 * Get the Metal command encoder for the current frame.
2462 *
2463 * This function returns `void *`, so SDL doesn't have to include Metal's
2464 * headers, but it can be safely cast to an `id<MTLRenderCommandEncoder>`.
2465 *
2466 * This will return NULL if Metal refuses to give SDL a drawable to render to,
2467 * which might happen if the window is hidden/minimized/offscreen. This
2468 * doesn't apply to command encoders for render targets, just the window's
2469 * backbuffer. Check your return values!
2470 *
2471 * \param renderer the renderer to query.
2472 * \returns an `id<MTLRenderCommandEncoder>` on success, or NULL if the
2473 * renderer isn't a Metal renderer or there was an error.
2474 *
2475 * \threadsafety This function should only be called on the main thread.
2476 *
2477 * \since This function is available since SDL 3.2.0.
2478 *
2479 * \sa SDL_GetRenderMetalLayer
2480 */
2481extern SDL_DECLSPEC void * SDLCALL SDL_GetRenderMetalCommandEncoder(SDL_Renderer *renderer);
2482
2483
2484/**
2485 * Add a set of synchronization semaphores for the current frame.
2486 *
2487 * The Vulkan renderer will wait for `wait_semaphore` before submitting
2488 * rendering commands and signal `signal_semaphore` after rendering commands
2489 * are complete for this frame.
2490 *
2491 * This should be called each frame that you want semaphore synchronization.
2492 * The Vulkan renderer may have multiple frames in flight on the GPU, so you
2493 * should have multiple semaphores that are used for synchronization. Querying
2494 * SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER will give you the
2495 * maximum number of semaphores you'll need.
2496 *
2497 * \param renderer the rendering context.
2498 * \param wait_stage_mask the VkPipelineStageFlags for the wait.
2499 * \param wait_semaphore a VkSempahore to wait on before rendering the current
2500 * frame, or 0 if not needed.
2501 * \param signal_semaphore a VkSempahore that SDL will signal when rendering
2502 * for the current frame is complete, or 0 if not
2503 * needed.
2504 * \returns true on success or false on failure; call SDL_GetError() for more
2505 * information.
2506 *
2507 * \threadsafety It is **NOT** safe to call this function from two threads at
2508 * once.
2509 *
2510 * \since This function is available since SDL 3.2.0.
2511 */
2512extern SDL_DECLSPEC bool SDLCALL SDL_AddVulkanRenderSemaphores(SDL_Renderer *renderer, Uint32 wait_stage_mask, Sint64 wait_semaphore, Sint64 signal_semaphore);
2513
2514/**
2515 * Toggle VSync of the given renderer.
2516 *
2517 * When a renderer is created, vsync defaults to SDL_RENDERER_VSYNC_DISABLED.
2518 *
2519 * The `vsync` parameter can be 1 to synchronize present with every vertical
2520 * refresh, 2 to synchronize present with every second vertical refresh, etc.,
2521 * SDL_RENDERER_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync), or
2522 * SDL_RENDERER_VSYNC_DISABLED to disable. Not every value is supported by
2523 * every driver, so you should check the return value to see whether the
2524 * requested setting is supported.
2525 *
2526 * \param renderer the renderer to toggle.
2527 * \param vsync the vertical refresh sync interval.
2528 * \returns true on success or false on failure; call SDL_GetError() for more
2529 * information.
2530 *
2531 * \threadsafety This function should only be called on the main thread.
2532 *
2533 * \since This function is available since SDL 3.2.0.
2534 *
2535 * \sa SDL_GetRenderVSync
2536 */
2537extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderVSync(SDL_Renderer *renderer, int vsync);
2538
2539#define SDL_RENDERER_VSYNC_DISABLED 0
2540#define SDL_RENDERER_VSYNC_ADAPTIVE (-1)
2541
2542/**
2543 * Get VSync of the given renderer.
2544 *
2545 * \param renderer the renderer to toggle.
2546 * \param vsync an int filled with the current vertical refresh sync interval.
2547 * See SDL_SetRenderVSync() for the meaning of the value.
2548 * \returns true on success or false on failure; call SDL_GetError() for more
2549 * information.
2550 *
2551 * \threadsafety This function should only be called on the main thread.
2552 *
2553 * \since This function is available since SDL 3.2.0.
2554 *
2555 * \sa SDL_SetRenderVSync
2556 */
2557extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderVSync(SDL_Renderer *renderer, int *vsync);
2558
2559/**
2560 * The size, in pixels, of a single SDL_RenderDebugText() character.
2561 *
2562 * The font is monospaced and square, so this applies to all characters.
2563 *
2564 * \since This macro is available since SDL 3.2.0.
2565 *
2566 * \sa SDL_RenderDebugText
2567 */
2568#define SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE 8
2569
2570/**
2571 * Draw debug text to an SDL_Renderer.
2572 *
2573 * This function will render a string of text to an SDL_Renderer. Note that
2574 * this is a convenience function for debugging, with severe limitations, and
2575 * not intended to be used for production apps and games.
2576 *
2577 * Among these limitations:
2578 *
2579 * - It accepts UTF-8 strings, but will only renders ASCII characters.
2580 * - It has a single, tiny size (8x8 pixels). One can use logical presentation
2581 * or scaling to adjust it, but it will be blurry.
2582 * - It uses a simple, hardcoded bitmap font. It does not allow different font
2583 * selections and it does not support truetype, for proper scaling.
2584 * - It does no word-wrapping and does not treat newline characters as a line
2585 * break. If the text goes out of the window, it's gone.
2586 *
2587 * For serious text rendering, there are several good options, such as
2588 * SDL_ttf, stb_truetype, or other external libraries.
2589 *
2590 * On first use, this will create an internal texture for rendering glyphs.
2591 * This texture will live until the renderer is destroyed.
2592 *
2593 * The text is drawn in the color specified by SDL_SetRenderDrawColor().
2594 *
2595 * \param renderer the renderer which should draw a line of text.
2596 * \param x the x coordinate where the top-left corner of the text will draw.
2597 * \param y the y coordinate where the top-left corner of the text will draw.
2598 * \param str the string to render.
2599 * \returns true on success or false on failure; call SDL_GetError() for more
2600 * information.
2601 *
2602 * \threadsafety This function should only be called on the main thread.
2603 *
2604 * \since This function is available since SDL 3.2.0.
2605 *
2606 * \sa SDL_RenderDebugTextFormat
2607 * \sa SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE
2608 */
2609extern SDL_DECLSPEC bool SDLCALL SDL_RenderDebugText(SDL_Renderer *renderer, float x, float y, const char *str);
2610
2611/**
2612 * Draw debug text to an SDL_Renderer.
2613 *
2614 * This function will render a printf()-style format string to a renderer.
2615 * Note that this is a convinence function for debugging, with severe
2616 * limitations, and is not intended to be used for production apps and games.
2617 *
2618 * For the full list of limitations and other useful information, see
2619 * SDL_RenderDebugText.
2620 *
2621 * \param renderer the renderer which should draw the text.
2622 * \param x the x coordinate where the top-left corner of the text will draw.
2623 * \param y the y coordinate where the top-left corner of the text will draw.
2624 * \param fmt the format string to draw.
2625 * \param ... additional parameters matching % tokens in the `fmt` string, if
2626 * any.
2627 * \returns true on success or false on failure; call SDL_GetError() for more
2628 * information.
2629 *
2630 * \threadsafety This function should only be called on the main thread.
2631 *
2632 * \since This function is available since SDL 3.2.0.
2633 *
2634 * \sa SDL_RenderDebugText
2635 * \sa SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE
2636 */
2637extern SDL_DECLSPEC bool SDLCALL SDL_RenderDebugTextFormat(SDL_Renderer *renderer, float x, float y, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(4);
2638
2639/* Ends C function definitions when using C++ */
2640#ifdef __cplusplus
2641}
2642#endif
2643#include <SDL3/SDL_close_code.h>
2644
2645#endif /* SDL_render_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_revision.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_revision.h
new file mode 100644
index 0000000..f0f57cd
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_revision.h
@@ -0,0 +1,56 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* WIKI CATEGORY: Version */
23
24/*
25 * SDL_revision.h contains the SDL revision, which might be defined on the
26 * compiler command line, or generated right into the header itself by the
27 * build system.
28 */
29
30#ifndef SDL_revision_h_
31#define SDL_revision_h_
32
33#ifdef SDL_WIKI_DOCUMENTATION_SECTION
34
35/**
36 * This macro is a string describing the source at a particular point in
37 * development.
38 *
39 * This string is often generated from revision control's state at build time.
40 *
41 * This string can be quite complex and does not follow any standard. For
42 * example, it might be something like "SDL-prerelease-3.1.1-47-gf687e0732".
43 * It might also be user-defined at build time, so it's best to treat it as a
44 * clue in debugging forensics and not something the app will parse in any
45 * way.
46 *
47 * \since This macro is available since SDL 3.2.0.
48 */
49#define SDL_REVISION "Some arbitrary string decided at SDL build time"
50#elif defined(SDL_VENDOR_INFO)
51#define SDL_REVISION SDL_VENDOR_INFO
52#else
53#define SDL_REVISION ""
54#endif
55
56#endif /* SDL_revision_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_scancode.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_scancode.h
new file mode 100644
index 0000000..6e9be47
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_scancode.h
@@ -0,0 +1,429 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryScancode
24 *
25 * Defines keyboard scancodes.
26 *
27 * Please refer to the Best Keyboard Practices document for details on what
28 * this information means and how best to use it.
29 *
30 * https://wiki.libsdl.org/SDL3/BestKeyboardPractices
31 */
32
33#ifndef SDL_scancode_h_
34#define SDL_scancode_h_
35
36#include <SDL3/SDL_stdinc.h>
37
38/**
39 * The SDL keyboard scancode representation.
40 *
41 * An SDL scancode is the physical representation of a key on the keyboard,
42 * independent of language and keyboard mapping.
43 *
44 * Values of this type are used to represent keyboard keys, among other places
45 * in the `scancode` field of the SDL_KeyboardEvent structure.
46 *
47 * The values in this enumeration are based on the USB usage page standard:
48 * https://usb.org/sites/default/files/hut1_5.pdf
49 *
50 * \since This enum is available since SDL 3.2.0.
51 */
52typedef enum SDL_Scancode
53{
54 SDL_SCANCODE_UNKNOWN = 0,
55
56 /**
57 * \name Usage page 0x07
58 *
59 * These values are from usage page 0x07 (USB keyboard page).
60 */
61 /* @{ */
62
63 SDL_SCANCODE_A = 4,
64 SDL_SCANCODE_B = 5,
65 SDL_SCANCODE_C = 6,
66 SDL_SCANCODE_D = 7,
67 SDL_SCANCODE_E = 8,
68 SDL_SCANCODE_F = 9,
69 SDL_SCANCODE_G = 10,
70 SDL_SCANCODE_H = 11,
71 SDL_SCANCODE_I = 12,
72 SDL_SCANCODE_J = 13,
73 SDL_SCANCODE_K = 14,
74 SDL_SCANCODE_L = 15,
75 SDL_SCANCODE_M = 16,
76 SDL_SCANCODE_N = 17,
77 SDL_SCANCODE_O = 18,
78 SDL_SCANCODE_P = 19,
79 SDL_SCANCODE_Q = 20,
80 SDL_SCANCODE_R = 21,
81 SDL_SCANCODE_S = 22,
82 SDL_SCANCODE_T = 23,
83 SDL_SCANCODE_U = 24,
84 SDL_SCANCODE_V = 25,
85 SDL_SCANCODE_W = 26,
86 SDL_SCANCODE_X = 27,
87 SDL_SCANCODE_Y = 28,
88 SDL_SCANCODE_Z = 29,
89
90 SDL_SCANCODE_1 = 30,
91 SDL_SCANCODE_2 = 31,
92 SDL_SCANCODE_3 = 32,
93 SDL_SCANCODE_4 = 33,
94 SDL_SCANCODE_5 = 34,
95 SDL_SCANCODE_6 = 35,
96 SDL_SCANCODE_7 = 36,
97 SDL_SCANCODE_8 = 37,
98 SDL_SCANCODE_9 = 38,
99 SDL_SCANCODE_0 = 39,
100
101 SDL_SCANCODE_RETURN = 40,
102 SDL_SCANCODE_ESCAPE = 41,
103 SDL_SCANCODE_BACKSPACE = 42,
104 SDL_SCANCODE_TAB = 43,
105 SDL_SCANCODE_SPACE = 44,
106
107 SDL_SCANCODE_MINUS = 45,
108 SDL_SCANCODE_EQUALS = 46,
109 SDL_SCANCODE_LEFTBRACKET = 47,
110 SDL_SCANCODE_RIGHTBRACKET = 48,
111 SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
112 * key on ISO keyboards and at the right end
113 * of the QWERTY row on ANSI keyboards.
114 * Produces REVERSE SOLIDUS (backslash) and
115 * VERTICAL LINE in a US layout, REVERSE
116 * SOLIDUS and VERTICAL LINE in a UK Mac
117 * layout, NUMBER SIGN and TILDE in a UK
118 * Windows layout, DOLLAR SIGN and POUND SIGN
119 * in a Swiss German layout, NUMBER SIGN and
120 * APOSTROPHE in a German layout, GRAVE
121 * ACCENT and POUND SIGN in a French Mac
122 * layout, and ASTERISK and MICRO SIGN in a
123 * French Windows layout.
124 */
125 SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code
126 * instead of 49 for the same key, but all
127 * OSes I've seen treat the two codes
128 * identically. So, as an implementor, unless
129 * your keyboard generates both of those
130 * codes and your OS treats them differently,
131 * you should generate SDL_SCANCODE_BACKSLASH
132 * instead of this code. As a user, you
133 * should not rely on this code because SDL
134 * will never generate it with most (all?)
135 * keyboards.
136 */
137 SDL_SCANCODE_SEMICOLON = 51,
138 SDL_SCANCODE_APOSTROPHE = 52,
139 SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI
140 * and ISO keyboards). Produces GRAVE ACCENT and
141 * TILDE in a US Windows layout and in US and UK
142 * Mac layouts on ANSI keyboards, GRAVE ACCENT
143 * and NOT SIGN in a UK Windows layout, SECTION
144 * SIGN and PLUS-MINUS SIGN in US and UK Mac
145 * layouts on ISO keyboards, SECTION SIGN and
146 * DEGREE SIGN in a Swiss German layout (Mac:
147 * only on ISO keyboards), CIRCUMFLEX ACCENT and
148 * DEGREE SIGN in a German layout (Mac: only on
149 * ISO keyboards), SUPERSCRIPT TWO and TILDE in a
150 * French Windows layout, COMMERCIAL AT and
151 * NUMBER SIGN in a French Mac layout on ISO
152 * keyboards, and LESS-THAN SIGN and GREATER-THAN
153 * SIGN in a Swiss German, German, or French Mac
154 * layout on ANSI keyboards.
155 */
156 SDL_SCANCODE_COMMA = 54,
157 SDL_SCANCODE_PERIOD = 55,
158 SDL_SCANCODE_SLASH = 56,
159
160 SDL_SCANCODE_CAPSLOCK = 57,
161
162 SDL_SCANCODE_F1 = 58,
163 SDL_SCANCODE_F2 = 59,
164 SDL_SCANCODE_F3 = 60,
165 SDL_SCANCODE_F4 = 61,
166 SDL_SCANCODE_F5 = 62,
167 SDL_SCANCODE_F6 = 63,
168 SDL_SCANCODE_F7 = 64,
169 SDL_SCANCODE_F8 = 65,
170 SDL_SCANCODE_F9 = 66,
171 SDL_SCANCODE_F10 = 67,
172 SDL_SCANCODE_F11 = 68,
173 SDL_SCANCODE_F12 = 69,
174
175 SDL_SCANCODE_PRINTSCREEN = 70,
176 SDL_SCANCODE_SCROLLLOCK = 71,
177 SDL_SCANCODE_PAUSE = 72,
178 SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but
179 does send code 73, not 117) */
180 SDL_SCANCODE_HOME = 74,
181 SDL_SCANCODE_PAGEUP = 75,
182 SDL_SCANCODE_DELETE = 76,
183 SDL_SCANCODE_END = 77,
184 SDL_SCANCODE_PAGEDOWN = 78,
185 SDL_SCANCODE_RIGHT = 79,
186 SDL_SCANCODE_LEFT = 80,
187 SDL_SCANCODE_DOWN = 81,
188 SDL_SCANCODE_UP = 82,
189
190 SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards
191 */
192 SDL_SCANCODE_KP_DIVIDE = 84,
193 SDL_SCANCODE_KP_MULTIPLY = 85,
194 SDL_SCANCODE_KP_MINUS = 86,
195 SDL_SCANCODE_KP_PLUS = 87,
196 SDL_SCANCODE_KP_ENTER = 88,
197 SDL_SCANCODE_KP_1 = 89,
198 SDL_SCANCODE_KP_2 = 90,
199 SDL_SCANCODE_KP_3 = 91,
200 SDL_SCANCODE_KP_4 = 92,
201 SDL_SCANCODE_KP_5 = 93,
202 SDL_SCANCODE_KP_6 = 94,
203 SDL_SCANCODE_KP_7 = 95,
204 SDL_SCANCODE_KP_8 = 96,
205 SDL_SCANCODE_KP_9 = 97,
206 SDL_SCANCODE_KP_0 = 98,
207 SDL_SCANCODE_KP_PERIOD = 99,
208
209 SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO
210 * keyboards have over ANSI ones,
211 * located between left shift and Z.
212 * Produces GRAVE ACCENT and TILDE in a
213 * US or UK Mac layout, REVERSE SOLIDUS
214 * (backslash) and VERTICAL LINE in a
215 * US or UK Windows layout, and
216 * LESS-THAN SIGN and GREATER-THAN SIGN
217 * in a Swiss German, German, or French
218 * layout. */
219 SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */
220 SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,
221 * not a physical key - but some Mac keyboards
222 * do have a power key. */
223 SDL_SCANCODE_KP_EQUALS = 103,
224 SDL_SCANCODE_F13 = 104,
225 SDL_SCANCODE_F14 = 105,
226 SDL_SCANCODE_F15 = 106,
227 SDL_SCANCODE_F16 = 107,
228 SDL_SCANCODE_F17 = 108,
229 SDL_SCANCODE_F18 = 109,
230 SDL_SCANCODE_F19 = 110,
231 SDL_SCANCODE_F20 = 111,
232 SDL_SCANCODE_F21 = 112,
233 SDL_SCANCODE_F22 = 113,
234 SDL_SCANCODE_F23 = 114,
235 SDL_SCANCODE_F24 = 115,
236 SDL_SCANCODE_EXECUTE = 116,
237 SDL_SCANCODE_HELP = 117, /**< AL Integrated Help Center */
238 SDL_SCANCODE_MENU = 118, /**< Menu (show menu) */
239 SDL_SCANCODE_SELECT = 119,
240 SDL_SCANCODE_STOP = 120, /**< AC Stop */
241 SDL_SCANCODE_AGAIN = 121, /**< AC Redo/Repeat */
242 SDL_SCANCODE_UNDO = 122, /**< AC Undo */
243 SDL_SCANCODE_CUT = 123, /**< AC Cut */
244 SDL_SCANCODE_COPY = 124, /**< AC Copy */
245 SDL_SCANCODE_PASTE = 125, /**< AC Paste */
246 SDL_SCANCODE_FIND = 126, /**< AC Find */
247 SDL_SCANCODE_MUTE = 127,
248 SDL_SCANCODE_VOLUMEUP = 128,
249 SDL_SCANCODE_VOLUMEDOWN = 129,
250/* not sure whether there's a reason to enable these */
251/* SDL_SCANCODE_LOCKINGCAPSLOCK = 130, */
252/* SDL_SCANCODE_LOCKINGNUMLOCK = 131, */
253/* SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */
254 SDL_SCANCODE_KP_COMMA = 133,
255 SDL_SCANCODE_KP_EQUALSAS400 = 134,
256
257 SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see
258 footnotes in USB doc */
259 SDL_SCANCODE_INTERNATIONAL2 = 136,
260 SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */
261 SDL_SCANCODE_INTERNATIONAL4 = 138,
262 SDL_SCANCODE_INTERNATIONAL5 = 139,
263 SDL_SCANCODE_INTERNATIONAL6 = 140,
264 SDL_SCANCODE_INTERNATIONAL7 = 141,
265 SDL_SCANCODE_INTERNATIONAL8 = 142,
266 SDL_SCANCODE_INTERNATIONAL9 = 143,
267 SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */
268 SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */
269 SDL_SCANCODE_LANG3 = 146, /**< Katakana */
270 SDL_SCANCODE_LANG4 = 147, /**< Hiragana */
271 SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */
272 SDL_SCANCODE_LANG6 = 149, /**< reserved */
273 SDL_SCANCODE_LANG7 = 150, /**< reserved */
274 SDL_SCANCODE_LANG8 = 151, /**< reserved */
275 SDL_SCANCODE_LANG9 = 152, /**< reserved */
276
277 SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */
278 SDL_SCANCODE_SYSREQ = 154,
279 SDL_SCANCODE_CANCEL = 155, /**< AC Cancel */
280 SDL_SCANCODE_CLEAR = 156,
281 SDL_SCANCODE_PRIOR = 157,
282 SDL_SCANCODE_RETURN2 = 158,
283 SDL_SCANCODE_SEPARATOR = 159,
284 SDL_SCANCODE_OUT = 160,
285 SDL_SCANCODE_OPER = 161,
286 SDL_SCANCODE_CLEARAGAIN = 162,
287 SDL_SCANCODE_CRSEL = 163,
288 SDL_SCANCODE_EXSEL = 164,
289
290 SDL_SCANCODE_KP_00 = 176,
291 SDL_SCANCODE_KP_000 = 177,
292 SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
293 SDL_SCANCODE_DECIMALSEPARATOR = 179,
294 SDL_SCANCODE_CURRENCYUNIT = 180,
295 SDL_SCANCODE_CURRENCYSUBUNIT = 181,
296 SDL_SCANCODE_KP_LEFTPAREN = 182,
297 SDL_SCANCODE_KP_RIGHTPAREN = 183,
298 SDL_SCANCODE_KP_LEFTBRACE = 184,
299 SDL_SCANCODE_KP_RIGHTBRACE = 185,
300 SDL_SCANCODE_KP_TAB = 186,
301 SDL_SCANCODE_KP_BACKSPACE = 187,
302 SDL_SCANCODE_KP_A = 188,
303 SDL_SCANCODE_KP_B = 189,
304 SDL_SCANCODE_KP_C = 190,
305 SDL_SCANCODE_KP_D = 191,
306 SDL_SCANCODE_KP_E = 192,
307 SDL_SCANCODE_KP_F = 193,
308 SDL_SCANCODE_KP_XOR = 194,
309 SDL_SCANCODE_KP_POWER = 195,
310 SDL_SCANCODE_KP_PERCENT = 196,
311 SDL_SCANCODE_KP_LESS = 197,
312 SDL_SCANCODE_KP_GREATER = 198,
313 SDL_SCANCODE_KP_AMPERSAND = 199,
314 SDL_SCANCODE_KP_DBLAMPERSAND = 200,
315 SDL_SCANCODE_KP_VERTICALBAR = 201,
316 SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
317 SDL_SCANCODE_KP_COLON = 203,
318 SDL_SCANCODE_KP_HASH = 204,
319 SDL_SCANCODE_KP_SPACE = 205,
320 SDL_SCANCODE_KP_AT = 206,
321 SDL_SCANCODE_KP_EXCLAM = 207,
322 SDL_SCANCODE_KP_MEMSTORE = 208,
323 SDL_SCANCODE_KP_MEMRECALL = 209,
324 SDL_SCANCODE_KP_MEMCLEAR = 210,
325 SDL_SCANCODE_KP_MEMADD = 211,
326 SDL_SCANCODE_KP_MEMSUBTRACT = 212,
327 SDL_SCANCODE_KP_MEMMULTIPLY = 213,
328 SDL_SCANCODE_KP_MEMDIVIDE = 214,
329 SDL_SCANCODE_KP_PLUSMINUS = 215,
330 SDL_SCANCODE_KP_CLEAR = 216,
331 SDL_SCANCODE_KP_CLEARENTRY = 217,
332 SDL_SCANCODE_KP_BINARY = 218,
333 SDL_SCANCODE_KP_OCTAL = 219,
334 SDL_SCANCODE_KP_DECIMAL = 220,
335 SDL_SCANCODE_KP_HEXADECIMAL = 221,
336
337 SDL_SCANCODE_LCTRL = 224,
338 SDL_SCANCODE_LSHIFT = 225,
339 SDL_SCANCODE_LALT = 226, /**< alt, option */
340 SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */
341 SDL_SCANCODE_RCTRL = 228,
342 SDL_SCANCODE_RSHIFT = 229,
343 SDL_SCANCODE_RALT = 230, /**< alt gr, option */
344 SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */
345
346 SDL_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered
347 * by any of the above, but since there's a
348 * special SDL_KMOD_MODE for it I'm adding it here
349 */
350
351 /* @} *//* Usage page 0x07 */
352
353 /**
354 * \name Usage page 0x0C
355 *
356 * These values are mapped from usage page 0x0C (USB consumer page).
357 *
358 * There are way more keys in the spec than we can represent in the
359 * current scancode range, so pick the ones that commonly come up in
360 * real world usage.
361 */
362 /* @{ */
363
364 SDL_SCANCODE_SLEEP = 258, /**< Sleep */
365 SDL_SCANCODE_WAKE = 259, /**< Wake */
366
367 SDL_SCANCODE_CHANNEL_INCREMENT = 260, /**< Channel Increment */
368 SDL_SCANCODE_CHANNEL_DECREMENT = 261, /**< Channel Decrement */
369
370 SDL_SCANCODE_MEDIA_PLAY = 262, /**< Play */
371 SDL_SCANCODE_MEDIA_PAUSE = 263, /**< Pause */
372 SDL_SCANCODE_MEDIA_RECORD = 264, /**< Record */
373 SDL_SCANCODE_MEDIA_FAST_FORWARD = 265, /**< Fast Forward */
374 SDL_SCANCODE_MEDIA_REWIND = 266, /**< Rewind */
375 SDL_SCANCODE_MEDIA_NEXT_TRACK = 267, /**< Next Track */
376 SDL_SCANCODE_MEDIA_PREVIOUS_TRACK = 268, /**< Previous Track */
377 SDL_SCANCODE_MEDIA_STOP = 269, /**< Stop */
378 SDL_SCANCODE_MEDIA_EJECT = 270, /**< Eject */
379 SDL_SCANCODE_MEDIA_PLAY_PAUSE = 271, /**< Play / Pause */
380 SDL_SCANCODE_MEDIA_SELECT = 272, /* Media Select */
381
382 SDL_SCANCODE_AC_NEW = 273, /**< AC New */
383 SDL_SCANCODE_AC_OPEN = 274, /**< AC Open */
384 SDL_SCANCODE_AC_CLOSE = 275, /**< AC Close */
385 SDL_SCANCODE_AC_EXIT = 276, /**< AC Exit */
386 SDL_SCANCODE_AC_SAVE = 277, /**< AC Save */
387 SDL_SCANCODE_AC_PRINT = 278, /**< AC Print */
388 SDL_SCANCODE_AC_PROPERTIES = 279, /**< AC Properties */
389
390 SDL_SCANCODE_AC_SEARCH = 280, /**< AC Search */
391 SDL_SCANCODE_AC_HOME = 281, /**< AC Home */
392 SDL_SCANCODE_AC_BACK = 282, /**< AC Back */
393 SDL_SCANCODE_AC_FORWARD = 283, /**< AC Forward */
394 SDL_SCANCODE_AC_STOP = 284, /**< AC Stop */
395 SDL_SCANCODE_AC_REFRESH = 285, /**< AC Refresh */
396 SDL_SCANCODE_AC_BOOKMARKS = 286, /**< AC Bookmarks */
397
398 /* @} *//* Usage page 0x0C */
399
400
401 /**
402 * \name Mobile keys
403 *
404 * These are values that are often used on mobile phones.
405 */
406 /* @{ */
407
408 SDL_SCANCODE_SOFTLEFT = 287, /**< Usually situated below the display on phones and
409 used as a multi-function feature key for selecting
410 a software defined function shown on the bottom left
411 of the display. */
412 SDL_SCANCODE_SOFTRIGHT = 288, /**< Usually situated below the display on phones and
413 used as a multi-function feature key for selecting
414 a software defined function shown on the bottom right
415 of the display. */
416 SDL_SCANCODE_CALL = 289, /**< Used for accepting phone calls. */
417 SDL_SCANCODE_ENDCALL = 290, /**< Used for rejecting phone calls. */
418
419 /* @} *//* Mobile keys */
420
421 /* Add any other keys here. */
422
423 SDL_SCANCODE_RESERVED = 400, /**< 400-500 reserved for dynamic keycodes */
424
425 SDL_SCANCODE_COUNT = 512 /**< not a key, just marks the number of scancodes for array bounds */
426
427} SDL_Scancode;
428
429#endif /* SDL_scancode_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_sensor.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_sensor.h
new file mode 100644
index 0000000..b220f05
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_sensor.h
@@ -0,0 +1,320 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategorySensor
24 *
25 * SDL sensor management.
26 *
27 * These APIs grant access to gyros and accelerometers on various platforms.
28 *
29 * In order to use these functions, SDL_Init() must have been called with the
30 * SDL_INIT_SENSOR flag. This causes SDL to scan the system for sensors, and
31 * load appropriate drivers.
32 */
33
34#ifndef SDL_sensor_h_
35#define SDL_sensor_h_
36
37#include <SDL3/SDL_stdinc.h>
38#include <SDL3/SDL_error.h>
39#include <SDL3/SDL_properties.h>
40
41#include <SDL3/SDL_begin_code.h>
42/* Set up for C function definitions, even when using C++ */
43#ifdef __cplusplus
44/* *INDENT-OFF* */
45extern "C" {
46/* *INDENT-ON* */
47#endif
48
49/**
50 * The opaque structure used to identify an opened SDL sensor.
51 *
52 * \since This struct is available since SDL 3.2.0.
53 */
54typedef struct SDL_Sensor SDL_Sensor;
55
56/**
57 * This is a unique ID for a sensor for the time it is connected to the
58 * system, and is never reused for the lifetime of the application.
59 *
60 * The value 0 is an invalid ID.
61 *
62 * \since This datatype is available since SDL 3.2.0.
63 */
64typedef Uint32 SDL_SensorID;
65
66/**
67 * A constant to represent standard gravity for accelerometer sensors.
68 *
69 * The accelerometer returns the current acceleration in SI meters per second
70 * squared. This measurement includes the force of gravity, so a device at
71 * rest will have an value of SDL_STANDARD_GRAVITY away from the center of the
72 * earth, which is a positive Y value.
73 *
74 * \since This macro is available since SDL 3.2.0.
75 */
76#define SDL_STANDARD_GRAVITY 9.80665f
77
78/**
79 * The different sensors defined by SDL.
80 *
81 * Additional sensors may be available, using platform dependent semantics.
82 *
83 * Here are the additional Android sensors:
84 *
85 * https://developer.android.com/reference/android/hardware/SensorEvent.html#values
86 *
87 * Accelerometer sensor notes:
88 *
89 * The accelerometer returns the current acceleration in SI meters per second
90 * squared. This measurement includes the force of gravity, so a device at
91 * rest will have an value of SDL_STANDARD_GRAVITY away from the center of the
92 * earth, which is a positive Y value.
93 *
94 * - `values[0]`: Acceleration on the x axis
95 * - `values[1]`: Acceleration on the y axis
96 * - `values[2]`: Acceleration on the z axis
97 *
98 * For phones and tablets held in natural orientation and game controllers
99 * held in front of you, the axes are defined as follows:
100 *
101 * - -X ... +X : left ... right
102 * - -Y ... +Y : bottom ... top
103 * - -Z ... +Z : farther ... closer
104 *
105 * The accelerometer axis data is not changed when the device is rotated.
106 *
107 * Gyroscope sensor notes:
108 *
109 * The gyroscope returns the current rate of rotation in radians per second.
110 * The rotation is positive in the counter-clockwise direction. That is, an
111 * observer looking from a positive location on one of the axes would see
112 * positive rotation on that axis when it appeared to be rotating
113 * counter-clockwise.
114 *
115 * - `values[0]`: Angular speed around the x axis (pitch)
116 * - `values[1]`: Angular speed around the y axis (yaw)
117 * - `values[2]`: Angular speed around the z axis (roll)
118 *
119 * For phones and tablets held in natural orientation and game controllers
120 * held in front of you, the axes are defined as follows:
121 *
122 * - -X ... +X : left ... right
123 * - -Y ... +Y : bottom ... top
124 * - -Z ... +Z : farther ... closer
125 *
126 * The gyroscope axis data is not changed when the device is rotated.
127 *
128 * \since This enum is available since SDL 3.2.0.
129 *
130 * \sa SDL_GetCurrentDisplayOrientation
131 */
132typedef enum SDL_SensorType
133{
134 SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */
135 SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */
136 SDL_SENSOR_ACCEL, /**< Accelerometer */
137 SDL_SENSOR_GYRO, /**< Gyroscope */
138 SDL_SENSOR_ACCEL_L, /**< Accelerometer for left Joy-Con controller and Wii nunchuk */
139 SDL_SENSOR_GYRO_L, /**< Gyroscope for left Joy-Con controller */
140 SDL_SENSOR_ACCEL_R, /**< Accelerometer for right Joy-Con controller */
141 SDL_SENSOR_GYRO_R /**< Gyroscope for right Joy-Con controller */
142} SDL_SensorType;
143
144
145/* Function prototypes */
146
147/**
148 * Get a list of currently connected sensors.
149 *
150 * \param count a pointer filled in with the number of sensors returned, may
151 * be NULL.
152 * \returns a 0 terminated array of sensor instance IDs or NULL on failure;
153 * call SDL_GetError() for more information. This should be freed
154 * with SDL_free() when it is no longer needed.
155 *
156 * \since This function is available since SDL 3.2.0.
157 */
158extern SDL_DECLSPEC SDL_SensorID * SDLCALL SDL_GetSensors(int *count);
159
160/**
161 * Get the implementation dependent name of a sensor.
162 *
163 * This can be called before any sensors are opened.
164 *
165 * \param instance_id the sensor instance ID.
166 * \returns the sensor name, or NULL if `instance_id` is not valid.
167 *
168 * \since This function is available since SDL 3.2.0.
169 */
170extern SDL_DECLSPEC const char * SDLCALL SDL_GetSensorNameForID(SDL_SensorID instance_id);
171
172/**
173 * Get the type of a sensor.
174 *
175 * This can be called before any sensors are opened.
176 *
177 * \param instance_id the sensor instance ID.
178 * \returns the SDL_SensorType, or `SDL_SENSOR_INVALID` if `instance_id` is
179 * not valid.
180 *
181 * \since This function is available since SDL 3.2.0.
182 */
183extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorTypeForID(SDL_SensorID instance_id);
184
185/**
186 * Get the platform dependent type of a sensor.
187 *
188 * This can be called before any sensors are opened.
189 *
190 * \param instance_id the sensor instance ID.
191 * \returns the sensor platform dependent type, or -1 if `instance_id` is not
192 * valid.
193 *
194 * \since This function is available since SDL 3.2.0.
195 */
196extern SDL_DECLSPEC int SDLCALL SDL_GetSensorNonPortableTypeForID(SDL_SensorID instance_id);
197
198/**
199 * Open a sensor for use.
200 *
201 * \param instance_id the sensor instance ID.
202 * \returns an SDL_Sensor object or NULL on failure; call SDL_GetError() for
203 * more information.
204 *
205 * \since This function is available since SDL 3.2.0.
206 */
207extern SDL_DECLSPEC SDL_Sensor * SDLCALL SDL_OpenSensor(SDL_SensorID instance_id);
208
209/**
210 * Return the SDL_Sensor associated with an instance ID.
211 *
212 * \param instance_id the sensor instance ID.
213 * \returns an SDL_Sensor object or NULL on failure; call SDL_GetError() for
214 * more information.
215 *
216 * \since This function is available since SDL 3.2.0.
217 */
218extern SDL_DECLSPEC SDL_Sensor * SDLCALL SDL_GetSensorFromID(SDL_SensorID instance_id);
219
220/**
221 * Get the properties associated with a sensor.
222 *
223 * \param sensor the SDL_Sensor object.
224 * \returns a valid property ID on success or 0 on failure; call
225 * SDL_GetError() for more information.
226 *
227 * \since This function is available since SDL 3.2.0.
228 */
229extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSensorProperties(SDL_Sensor *sensor);
230
231/**
232 * Get the implementation dependent name of a sensor.
233 *
234 * \param sensor the SDL_Sensor object.
235 * \returns the sensor name or NULL on failure; call SDL_GetError() for more
236 * information.
237 *
238 * \since This function is available since SDL 3.2.0.
239 */
240extern SDL_DECLSPEC const char * SDLCALL SDL_GetSensorName(SDL_Sensor *sensor);
241
242/**
243 * Get the type of a sensor.
244 *
245 * \param sensor the SDL_Sensor object to inspect.
246 * \returns the SDL_SensorType type, or `SDL_SENSOR_INVALID` if `sensor` is
247 * NULL.
248 *
249 * \since This function is available since SDL 3.2.0.
250 */
251extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorType(SDL_Sensor *sensor);
252
253/**
254 * Get the platform dependent type of a sensor.
255 *
256 * \param sensor the SDL_Sensor object to inspect.
257 * \returns the sensor platform dependent type, or -1 if `sensor` is NULL.
258 *
259 * \since This function is available since SDL 3.2.0.
260 */
261extern SDL_DECLSPEC int SDLCALL SDL_GetSensorNonPortableType(SDL_Sensor *sensor);
262
263/**
264 * Get the instance ID of a sensor.
265 *
266 * \param sensor the SDL_Sensor object to inspect.
267 * \returns the sensor instance ID, or 0 on failure; call SDL_GetError() for
268 * more information.
269 *
270 * \since This function is available since SDL 3.2.0.
271 */
272extern SDL_DECLSPEC SDL_SensorID SDLCALL SDL_GetSensorID(SDL_Sensor *sensor);
273
274/**
275 * Get the current state of an opened sensor.
276 *
277 * The number of values and interpretation of the data is sensor dependent.
278 *
279 * \param sensor the SDL_Sensor object to query.
280 * \param data a pointer filled with the current sensor state.
281 * \param num_values the number of values to write to data.
282 * \returns true on success or false on failure; call SDL_GetError() for more
283 * information.
284 *
285 * \since This function is available since SDL 3.2.0.
286 */
287extern SDL_DECLSPEC bool SDLCALL SDL_GetSensorData(SDL_Sensor *sensor, float *data, int num_values);
288
289/**
290 * Close a sensor previously opened with SDL_OpenSensor().
291 *
292 * \param sensor the SDL_Sensor object to close.
293 *
294 * \since This function is available since SDL 3.2.0.
295 */
296extern SDL_DECLSPEC void SDLCALL SDL_CloseSensor(SDL_Sensor *sensor);
297
298/**
299 * Update the current state of the open sensors.
300 *
301 * This is called automatically by the event loop if sensor events are
302 * enabled.
303 *
304 * This needs to be called from the thread that initialized the sensor
305 * subsystem.
306 *
307 * \since This function is available since SDL 3.2.0.
308 */
309extern SDL_DECLSPEC void SDLCALL SDL_UpdateSensors(void);
310
311
312/* Ends C function definitions when using C++ */
313#ifdef __cplusplus
314/* *INDENT-OFF* */
315}
316/* *INDENT-ON* */
317#endif
318#include <SDL3/SDL_close_code.h>
319
320#endif /* SDL_sensor_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_stdinc.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_stdinc.h
new file mode 100644
index 0000000..7df253f
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_stdinc.h
@@ -0,0 +1,6137 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryStdinc
24 *
25 * SDL provides its own implementation of some of the most important C runtime
26 * functions.
27 *
28 * Using these functions allows an app to have access to common C
29 * functionality without depending on a specific C runtime (or a C runtime at
30 * all). More importantly, the SDL implementations work identically across
31 * platforms, so apps can avoid surprises like snprintf() behaving differently
32 * between Windows and Linux builds, or itoa() only existing on some
33 * platforms.
34 *
35 * For many of the most common functions, like SDL_memcpy, SDL might just call
36 * through to the usual C runtime behind the scenes, if it makes sense to do
37 * so (if it's faster and always available/reliable on a given platform),
38 * reducing library size and offering the most optimized option.
39 *
40 * SDL also offers other C-runtime-adjacent functionality in this header that
41 * either isn't, strictly speaking, part of any C runtime standards, like
42 * SDL_crc32() and SDL_reinterpret_cast, etc. It also offers a few better
43 * options, like SDL_strlcpy(), which functions as a safer form of strcpy().
44 */
45
46#ifndef SDL_stdinc_h_
47#define SDL_stdinc_h_
48
49#include <SDL3/SDL_platform_defines.h>
50
51#include <stdarg.h>
52#include <stdint.h>
53#include <string.h>
54#include <wchar.h>
55
56#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
57 defined(SDL_INCLUDE_INTTYPES_H)
58#include <inttypes.h>
59#endif
60
61#ifndef __cplusplus
62#if defined(__has_include) && !defined(SDL_INCLUDE_STDBOOL_H)
63#if __has_include(<stdbool.h>)
64#define SDL_INCLUDE_STDBOOL_H
65#endif
66#endif
67#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
68 (defined(_MSC_VER) && (_MSC_VER >= 1910 /* Visual Studio 2017 */)) || \
69 defined(SDL_INCLUDE_STDBOOL_H)
70#include <stdbool.h>
71#elif !defined(__bool_true_false_are_defined) && !defined(bool)
72#define bool unsigned char
73#define false 0
74#define true 1
75#define __bool_true_false_are_defined 1
76#endif
77#endif /* !__cplusplus */
78
79#ifndef SDL_DISABLE_ALLOCA
80# ifndef alloca
81# ifdef HAVE_ALLOCA_H
82# include <alloca.h>
83# elif defined(SDL_PLATFORM_NETBSD)
84# if defined(__STRICT_ANSI__)
85# define SDL_DISABLE_ALLOCA
86# else
87# include <stdlib.h>
88# endif
89# elif defined(__GNUC__)
90# define alloca __builtin_alloca
91# elif defined(_MSC_VER)
92# include <malloc.h>
93# define alloca _alloca
94# elif defined(__WATCOMC__)
95# include <malloc.h>
96# elif defined(__BORLANDC__)
97# include <malloc.h>
98# elif defined(__DMC__)
99# include <stdlib.h>
100# elif defined(SDL_PLATFORM_AIX)
101# pragma alloca
102# elif defined(__MRC__)
103void *alloca(unsigned);
104# else
105void *alloca(size_t);
106# endif
107# endif
108#endif
109
110
111#ifdef SDL_WIKI_DOCUMENTATION_SECTION
112
113/**
114 * Don't let SDL use "long long" C types.
115 *
116 * SDL will define this if it believes the compiler doesn't understand the
117 * "long long" syntax for C datatypes. This can happen on older compilers.
118 *
119 * If _your_ compiler doesn't support "long long" but SDL doesn't know it, it
120 * is safe to define this yourself to build against the SDL headers.
121 *
122 * If this is defined, it will remove access to some C runtime support
123 * functions, like SDL_ulltoa and SDL_strtoll that refer to this datatype
124 * explicitly. The rest of SDL will still be available.
125 *
126 * SDL's own source code cannot be built with a compiler that has this
127 * defined, for various technical reasons.
128 */
129#define SDL_NOLONGLONG 1
130
131#elif defined(_MSC_VER) && (_MSC_VER < 1310) /* long long introduced in Visual Studio.NET 2003 */
132# define SDL_NOLONGLONG 1
133#endif
134
135
136#ifdef SDL_WIKI_DOCUMENTATION_SECTION
137
138/**
139 * The largest value that a `size_t` can hold for the target platform.
140 *
141 * `size_t` is generally the same size as a pointer in modern times, but this
142 * can get weird on very old and very esoteric machines. For example, on a
143 * 16-bit Intel 286, you might have a 32-bit "far" pointer (16-bit segment
144 * plus 16-bit offset), but `size_t` is 16 bits, because it can only deal with
145 * the offset into an individual segment.
146 *
147 * In modern times, it's generally expected to cover an entire linear address
148 * space. But be careful!
149 *
150 * \since This macro is available since SDL 3.2.0.
151 */
152#define SDL_SIZE_MAX SIZE_MAX
153
154#elif defined(SIZE_MAX)
155# define SDL_SIZE_MAX SIZE_MAX
156#else
157# define SDL_SIZE_MAX ((size_t) -1)
158#endif
159
160#ifndef SDL_COMPILE_TIME_ASSERT
161#ifdef SDL_WIKI_DOCUMENTATION_SECTION
162
163/**
164 * A compile-time assertion.
165 *
166 * This can check constant values _known to the compiler at build time_ for
167 * correctness, and end the compile with the error if they fail.
168 *
169 * Often times these are used to verify basic truths, like the size of a
170 * datatype is what is expected:
171 *
172 * ```c
173 * SDL_COMPILE_TIME_ASSERT(uint32_size, sizeof(Uint32) == 4);
174 * ```
175 *
176 * The `name` parameter must be a valid C symbol, and must be unique across
177 * all compile-time asserts in the same compilation unit (one run of the
178 * compiler), or the build might fail with cryptic errors on some targets.
179 * This is used with a C language trick that works on older compilers that
180 * don't support better assertion techniques.
181 *
182 * If you need an assertion that operates at runtime, on variable data, you
183 * should try SDL_assert instead.
184 *
185 * \param name a unique identifier for this assertion.
186 * \param x the value to test. Must be a boolean value.
187 *
188 * \threadsafety This macro doesn't generate any code to run.
189 *
190 * \since This macro is available since SDL 3.2.0.
191 *
192 * \sa SDL_assert
193 */
194#define SDL_COMPILE_TIME_ASSERT(name, x) FailToCompileIf_x_IsFalse(x)
195#elif defined(__cplusplus)
196/* Keep C++ case alone: Some versions of gcc will define __STDC_VERSION__ even when compiling in C++ mode. */
197#if (__cplusplus >= 201103L)
198#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
199#endif
200#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202311L)
201#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
202#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
203#define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
204#endif
205#endif /* !SDL_COMPILE_TIME_ASSERT */
206
207#ifndef SDL_COMPILE_TIME_ASSERT
208/* universal, but may trigger -Wunused-local-typedefs */
209#define SDL_COMPILE_TIME_ASSERT(name, x) \
210 typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
211#endif
212
213/**
214 * The number of elements in a static array.
215 *
216 * This will compile but return incorrect results for a pointer to an array;
217 * it has to be an array the compiler knows the size of.
218 *
219 * This macro looks like it double-evaluates the argument, but it does so
220 * inside of `sizeof`, so there are no side-effects here, as expressions do
221 * not actually run any code in these cases.
222 *
223 * \since This macro is available since SDL 3.2.0.
224 */
225#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
226
227/**
228 * Macro useful for building other macros with strings in them.
229 *
230 * For example:
231 *
232 * ```c
233 * #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")`
234 * ```
235 *
236 * \param arg the text to turn into a string literal.
237 *
238 * \since This macro is available since SDL 3.2.0.
239 */
240#define SDL_STRINGIFY_ARG(arg) #arg
241
242/**
243 * \name Cast operators
244 *
245 * Use proper C++ casts when compiled as C++ to be compatible with the option
246 * -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).
247 */
248/* @{ */
249
250#ifdef SDL_WIKI_DOCUMENTATION_SECTION
251
252/**
253 * Handle a Reinterpret Cast properly whether using C or C++.
254 *
255 * If compiled as C++, this macro offers a proper C++ reinterpret_cast<>.
256 *
257 * If compiled as C, this macro does a normal C-style cast.
258 *
259 * This is helpful to avoid compiler warnings in C++.
260 *
261 * \param type the type to cast the expression to.
262 * \param expression the expression to cast to a different type.
263 * \returns `expression`, cast to `type`.
264 *
265 * \threadsafety It is safe to call this macro from any thread.
266 *
267 * \since This macro is available since SDL 3.2.0.
268 *
269 * \sa SDL_static_cast
270 * \sa SDL_const_cast
271 */
272#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression) /* or `((type)(expression))` in C */
273
274/**
275 * Handle a Static Cast properly whether using C or C++.
276 *
277 * If compiled as C++, this macro offers a proper C++ static_cast<>.
278 *
279 * If compiled as C, this macro does a normal C-style cast.
280 *
281 * This is helpful to avoid compiler warnings in C++.
282 *
283 * \param type the type to cast the expression to.
284 * \param expression the expression to cast to a different type.
285 * \returns `expression`, cast to `type`.
286 *
287 * \threadsafety It is safe to call this macro from any thread.
288 *
289 * \since This macro is available since SDL 3.2.0.
290 *
291 * \sa SDL_reinterpret_cast
292 * \sa SDL_const_cast
293 */
294#define SDL_static_cast(type, expression) static_cast<type>(expression) /* or `((type)(expression))` in C */
295
296/**
297 * Handle a Const Cast properly whether using C or C++.
298 *
299 * If compiled as C++, this macro offers a proper C++ const_cast<>.
300 *
301 * If compiled as C, this macro does a normal C-style cast.
302 *
303 * This is helpful to avoid compiler warnings in C++.
304 *
305 * \param type the type to cast the expression to.
306 * \param expression the expression to cast to a different type.
307 * \returns `expression`, cast to `type`.
308 *
309 * \threadsafety It is safe to call this macro from any thread.
310 *
311 * \since This macro is available since SDL 3.2.0.
312 *
313 * \sa SDL_reinterpret_cast
314 * \sa SDL_static_cast
315 */
316#define SDL_const_cast(type, expression) const_cast<type>(expression) /* or `((type)(expression))` in C */
317
318#elif defined(__cplusplus)
319#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
320#define SDL_static_cast(type, expression) static_cast<type>(expression)
321#define SDL_const_cast(type, expression) const_cast<type>(expression)
322#else
323#define SDL_reinterpret_cast(type, expression) ((type)(expression))
324#define SDL_static_cast(type, expression) ((type)(expression))
325#define SDL_const_cast(type, expression) ((type)(expression))
326#endif
327
328/* @} *//* Cast operators */
329
330/**
331 * Define a four character code as a Uint32.
332 *
333 * \param A the first ASCII character.
334 * \param B the second ASCII character.
335 * \param C the third ASCII character.
336 * \param D the fourth ASCII character.
337 * \returns the four characters converted into a Uint32, one character
338 * per-byte.
339 *
340 * \threadsafety It is safe to call this macro from any thread.
341 *
342 * \since This macro is available since SDL 3.2.0.
343 */
344#define SDL_FOURCC(A, B, C, D) \
345 ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \
346 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \
347 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \
348 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24))
349
350#ifdef SDL_WIKI_DOCUMENTATION_SECTION
351
352/**
353 * Append the 64 bit integer suffix to a signed integer literal.
354 *
355 * This helps compilers that might believe a integer literal larger than
356 * 0xFFFFFFFF is overflowing a 32-bit value. Use `SDL_SINT64_C(0xFFFFFFFF1)`
357 * instead of `0xFFFFFFFF1` by itself.
358 *
359 * \since This macro is available since SDL 3.2.0.
360 *
361 * \sa SDL_UINT64_C
362 */
363#define SDL_SINT64_C(c) c ## LL /* or whatever the current compiler uses. */
364
365/**
366 * Append the 64 bit integer suffix to an unsigned integer literal.
367 *
368 * This helps compilers that might believe a integer literal larger than
369 * 0xFFFFFFFF is overflowing a 32-bit value. Use `SDL_UINT64_C(0xFFFFFFFF1)`
370 * instead of `0xFFFFFFFF1` by itself.
371 *
372 * \since This macro is available since SDL 3.2.0.
373 *
374 * \sa SDL_SINT64_C
375 */
376#define SDL_UINT64_C(c) c ## ULL /* or whatever the current compiler uses. */
377
378#else /* !SDL_WIKI_DOCUMENTATION_SECTION */
379
380#ifndef SDL_SINT64_C
381#if defined(INT64_C)
382#define SDL_SINT64_C(c) INT64_C(c)
383#elif defined(_MSC_VER)
384#define SDL_SINT64_C(c) c ## i64
385#elif defined(__LP64__) || defined(_LP64)
386#define SDL_SINT64_C(c) c ## L
387#else
388#define SDL_SINT64_C(c) c ## LL
389#endif
390#endif /* !SDL_SINT64_C */
391
392#ifndef SDL_UINT64_C
393#if defined(UINT64_C)
394#define SDL_UINT64_C(c) UINT64_C(c)
395#elif defined(_MSC_VER)
396#define SDL_UINT64_C(c) c ## ui64
397#elif defined(__LP64__) || defined(_LP64)
398#define SDL_UINT64_C(c) c ## UL
399#else
400#define SDL_UINT64_C(c) c ## ULL
401#endif
402#endif /* !SDL_UINT64_C */
403
404#endif /* !SDL_WIKI_DOCUMENTATION_SECTION */
405
406/**
407 * \name Basic data types
408 */
409/* @{ */
410
411/**
412 * A signed 8-bit integer type.
413 *
414 * \since This macro is available since SDL 3.2.0.
415 */
416typedef int8_t Sint8;
417#define SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */
418#define SDL_MIN_SINT8 ((Sint8)(~0x7F)) /* -128 */
419
420/**
421 * An unsigned 8-bit integer type.
422 *
423 * \since This macro is available since SDL 3.2.0.
424 */
425typedef uint8_t Uint8;
426#define SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */
427#define SDL_MIN_UINT8 ((Uint8)0x00) /* 0 */
428
429/**
430 * A signed 16-bit integer type.
431 *
432 * \since This macro is available since SDL 3.2.0.
433 */
434typedef int16_t Sint16;
435#define SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */
436#define SDL_MIN_SINT16 ((Sint16)(~0x7FFF)) /* -32768 */
437
438/**
439 * An unsigned 16-bit integer type.
440 *
441 * \since This macro is available since SDL 3.2.0.
442 */
443typedef uint16_t Uint16;
444#define SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */
445#define SDL_MIN_UINT16 ((Uint16)0x0000) /* 0 */
446
447/**
448 * A signed 32-bit integer type.
449 *
450 * \since This macro is available since SDL 3.2.0.
451 */
452typedef int32_t Sint32;
453#define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */
454#define SDL_MIN_SINT32 ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */
455
456/**
457 * An unsigned 32-bit integer type.
458 *
459 * \since This macro is available since SDL 3.2.0.
460 */
461typedef uint32_t Uint32;
462#define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */
463#define SDL_MIN_UINT32 ((Uint32)0x00000000) /* 0 */
464
465/**
466 * A signed 64-bit integer type.
467 *
468 * \since This macro is available since SDL 3.2.0.
469 *
470 * \sa SDL_SINT64_C
471 */
472typedef int64_t Sint64;
473#define SDL_MAX_SINT64 SDL_SINT64_C(0x7FFFFFFFFFFFFFFF) /* 9223372036854775807 */
474#define SDL_MIN_SINT64 ~SDL_SINT64_C(0x7FFFFFFFFFFFFFFF) /* -9223372036854775808 */
475
476/**
477 * An unsigned 64-bit integer type.
478 *
479 * \since This macro is available since SDL 3.2.0.
480 *
481 * \sa SDL_UINT64_C
482 */
483typedef uint64_t Uint64;
484#define SDL_MAX_UINT64 SDL_UINT64_C(0xFFFFFFFFFFFFFFFF) /* 18446744073709551615 */
485#define SDL_MIN_UINT64 SDL_UINT64_C(0x0000000000000000) /* 0 */
486
487/**
488 * SDL times are signed, 64-bit integers representing nanoseconds since the
489 * Unix epoch (Jan 1, 1970).
490 *
491 * They can be converted between POSIX time_t values with SDL_NS_TO_SECONDS()
492 * and SDL_SECONDS_TO_NS(), and between Windows FILETIME values with
493 * SDL_TimeToWindows() and SDL_TimeFromWindows().
494 *
495 * \since This macro is available since SDL 3.2.0.
496 *
497 * \sa SDL_MAX_SINT64
498 * \sa SDL_MIN_SINT64
499 */
500typedef Sint64 SDL_Time;
501#define SDL_MAX_TIME SDL_MAX_SINT64
502#define SDL_MIN_TIME SDL_MIN_SINT64
503
504/* @} *//* Basic data types */
505
506/**
507 * \name Floating-point constants
508 */
509/* @{ */
510
511#ifdef FLT_EPSILON
512#define SDL_FLT_EPSILON FLT_EPSILON
513#else
514
515/**
516 * Epsilon constant, used for comparing floating-point numbers.
517 *
518 * Equals by default to platform-defined `FLT_EPSILON`, or
519 * `1.1920928955078125e-07F` if that's not available.
520 *
521 * \since This macro is available since SDL 3.2.0.
522 */
523#define SDL_FLT_EPSILON 1.1920928955078125e-07F /* 0x0.000002p0 */
524#endif
525
526/* @} *//* Floating-point constants */
527
528#ifdef SDL_WIKI_DOCUMENTATION_SECTION
529
530/**
531 * A printf-formatting string for an Sint64 value.
532 *
533 * Use it like this:
534 *
535 * ```c
536 * SDL_Log("There are %" SDL_PRIs64 " bottles of beer on the wall.", bottles);
537 * ```
538 *
539 * \since This macro is available since SDL 3.2.0.
540 */
541#define SDL_PRIs64 "lld"
542
543/**
544 * A printf-formatting string for a Uint64 value.
545 *
546 * Use it like this:
547 *
548 * ```c
549 * SDL_Log("There are %" SDL_PRIu64 " bottles of beer on the wall.", bottles);
550 * ```
551 *
552 * \since This macro is available since SDL 3.2.0.
553 */
554#define SDL_PRIu64 "llu"
555
556/**
557 * A printf-formatting string for a Uint64 value as lower-case hexadecimal.
558 *
559 * Use it like this:
560 *
561 * ```c
562 * SDL_Log("There are %" SDL_PRIx64 " bottles of beer on the wall.", bottles);
563 * ```
564 *
565 * \since This macro is available since SDL 3.2.0.
566 */
567#define SDL_PRIx64 "llx"
568
569/**
570 * A printf-formatting string for a Uint64 value as upper-case hexadecimal.
571 *
572 * Use it like this:
573 *
574 * ```c
575 * SDL_Log("There are %" SDL_PRIX64 " bottles of beer on the wall.", bottles);
576 * ```
577 *
578 * \since This macro is available since SDL 3.2.0.
579 */
580#define SDL_PRIX64 "llX"
581
582/**
583 * A printf-formatting string for an Sint32 value.
584 *
585 * Use it like this:
586 *
587 * ```c
588 * SDL_Log("There are %" SDL_PRIs32 " bottles of beer on the wall.", bottles);
589 * ```
590 *
591 * \since This macro is available since SDL 3.2.0.
592 */
593#define SDL_PRIs32 "d"
594
595/**
596 * A printf-formatting string for a Uint32 value.
597 *
598 * Use it like this:
599 *
600 * ```c
601 * SDL_Log("There are %" SDL_PRIu32 " bottles of beer on the wall.", bottles);
602 * ```
603 *
604 * \since This macro is available since SDL 3.2.0.
605 */
606#define SDL_PRIu32 "u"
607
608/**
609 * A printf-formatting string for a Uint32 value as lower-case hexadecimal.
610 *
611 * Use it like this:
612 *
613 * ```c
614 * SDL_Log("There are %" SDL_PRIx32 " bottles of beer on the wall.", bottles);
615 * ```
616 *
617 * \since This macro is available since SDL 3.2.0.
618 */
619#define SDL_PRIx32 "x"
620
621/**
622 * A printf-formatting string for a Uint32 value as upper-case hexadecimal.
623 *
624 * Use it like this:
625 *
626 * ```c
627 * SDL_Log("There are %" SDL_PRIX32 " bottles of beer on the wall.", bottles);
628 * ```
629 *
630 * \since This macro is available since SDL 3.2.0.
631 */
632#define SDL_PRIX32 "X"
633
634/**
635 * A printf-formatting string prefix for a `long long` value.
636 *
637 * This is just the prefix! You probably actually want SDL_PRILLd, SDL_PRILLu,
638 * SDL_PRILLx, or SDL_PRILLX instead.
639 *
640 * Use it like this:
641 *
642 * ```c
643 * SDL_Log("There are %" SDL_PRILL_PREFIX "d bottles of beer on the wall.", bottles);
644 * ```
645 *
646 * \since This macro is available since SDL 3.2.0.
647 */
648#define SDL_PRILL_PREFIX "ll"
649
650/**
651 * A printf-formatting string for a `long long` value.
652 *
653 * Use it like this:
654 *
655 * ```c
656 * SDL_Log("There are %" SDL_PRILLd " bottles of beer on the wall.", bottles);
657 * ```
658 *
659 * \since This macro is available since SDL 3.2.0.
660 */
661#define SDL_PRILLd SDL_PRILL_PREFIX "d"
662
663/**
664 * A printf-formatting string for a `unsigned long long` value.
665 *
666 * Use it like this:
667 *
668 * ```c
669 * SDL_Log("There are %" SDL_PRILLu " bottles of beer on the wall.", bottles);
670 * ```
671 *
672 * \since This macro is available since SDL 3.2.0.
673 */
674#define SDL_PRILLu SDL_PRILL_PREFIX "u"
675
676/**
677 * A printf-formatting string for an `unsigned long long` value as lower-case
678 * hexadecimal.
679 *
680 * Use it like this:
681 *
682 * ```c
683 * SDL_Log("There are %" SDL_PRILLx " bottles of beer on the wall.", bottles);
684 * ```
685 *
686 * \since This macro is available since SDL 3.2.0.
687 */
688#define SDL_PRILLx SDL_PRILL_PREFIX "x"
689
690/**
691 * A printf-formatting string for an `unsigned long long` value as upper-case
692 * hexadecimal.
693 *
694 * Use it like this:
695 *
696 * ```c
697 * SDL_Log("There are %" SDL_PRILLX " bottles of beer on the wall.", bottles);
698 * ```
699 *
700 * \since This macro is available since SDL 3.2.0.
701 */
702#define SDL_PRILLX SDL_PRILL_PREFIX "X"
703#endif /* SDL_WIKI_DOCUMENTATION_SECTION */
704
705/* Make sure we have macros for printing width-based integers.
706 * <inttypes.h> should define these but this is not true all platforms.
707 * (for example win32) */
708#ifndef SDL_PRIs64
709#if defined(SDL_PLATFORM_WINDOWS)
710#define SDL_PRIs64 "I64d"
711#elif defined(PRId64)
712#define SDL_PRIs64 PRId64
713#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE) && !defined(__EMSCRIPTEN__)
714#define SDL_PRIs64 "ld"
715#else
716#define SDL_PRIs64 "lld"
717#endif
718#endif
719#ifndef SDL_PRIu64
720#if defined(SDL_PLATFORM_WINDOWS)
721#define SDL_PRIu64 "I64u"
722#elif defined(PRIu64)
723#define SDL_PRIu64 PRIu64
724#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE) && !defined(__EMSCRIPTEN__)
725#define SDL_PRIu64 "lu"
726#else
727#define SDL_PRIu64 "llu"
728#endif
729#endif
730#ifndef SDL_PRIx64
731#if defined(SDL_PLATFORM_WINDOWS)
732#define SDL_PRIx64 "I64x"
733#elif defined(PRIx64)
734#define SDL_PRIx64 PRIx64
735#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
736#define SDL_PRIx64 "lx"
737#else
738#define SDL_PRIx64 "llx"
739#endif
740#endif
741#ifndef SDL_PRIX64
742#if defined(SDL_PLATFORM_WINDOWS)
743#define SDL_PRIX64 "I64X"
744#elif defined(PRIX64)
745#define SDL_PRIX64 PRIX64
746#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
747#define SDL_PRIX64 "lX"
748#else
749#define SDL_PRIX64 "llX"
750#endif
751#endif
752#ifndef SDL_PRIs32
753#ifdef PRId32
754#define SDL_PRIs32 PRId32
755#else
756#define SDL_PRIs32 "d"
757#endif
758#endif
759#ifndef SDL_PRIu32
760#ifdef PRIu32
761#define SDL_PRIu32 PRIu32
762#else
763#define SDL_PRIu32 "u"
764#endif
765#endif
766#ifndef SDL_PRIx32
767#ifdef PRIx32
768#define SDL_PRIx32 PRIx32
769#else
770#define SDL_PRIx32 "x"
771#endif
772#endif
773#ifndef SDL_PRIX32
774#ifdef PRIX32
775#define SDL_PRIX32 PRIX32
776#else
777#define SDL_PRIX32 "X"
778#endif
779#endif
780/* Specifically for the `long long` -- SDL-specific. */
781#ifdef SDL_PLATFORM_WINDOWS
782#ifndef SDL_NOLONGLONG
783SDL_COMPILE_TIME_ASSERT(longlong_size64, sizeof(long long) == 8); /* using I64 for windows - make sure `long long` is 64 bits. */
784#endif
785#define SDL_PRILL_PREFIX "I64"
786#else
787#define SDL_PRILL_PREFIX "ll"
788#endif
789#ifndef SDL_PRILLd
790#define SDL_PRILLd SDL_PRILL_PREFIX "d"
791#endif
792#ifndef SDL_PRILLu
793#define SDL_PRILLu SDL_PRILL_PREFIX "u"
794#endif
795#ifndef SDL_PRILLx
796#define SDL_PRILLx SDL_PRILL_PREFIX "x"
797#endif
798#ifndef SDL_PRILLX
799#define SDL_PRILLX SDL_PRILL_PREFIX "X"
800#endif
801
802/* Annotations to help code analysis tools */
803#ifdef SDL_WIKI_DOCUMENTATION_SECTION
804
805/**
806 * Macro that annotates function params with input buffer size.
807 *
808 * If we were to annotate `memcpy`:
809 *
810 * ```c
811 * void *memcpy(void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
812 * ```
813 *
814 * This notes that `src` should be `len` bytes in size and is only read by the
815 * function. The compiler or other analysis tools can warn when this doesn't
816 * appear to be the case.
817 *
818 * On compilers without this annotation mechanism, this is defined to nothing.
819 *
820 * \since This macro is available since SDL 3.2.0.
821 */
822#define SDL_IN_BYTECAP(x) _In_bytecount_(x)
823
824/**
825 * Macro that annotates function params with input/output string buffer size.
826 *
827 * If we were to annotate `strlcat`:
828 *
829 * ```c
830 * size_t strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
831 * ```
832 *
833 * This notes that `dst` is a null-terminated C string, should be `maxlen`
834 * bytes in size, and is both read from and written to by the function. The
835 * compiler or other analysis tools can warn when this doesn't appear to be
836 * the case.
837 *
838 * On compilers without this annotation mechanism, this is defined to nothing.
839 *
840 * \since This macro is available since SDL 3.2.0.
841 */
842#define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x)
843
844/**
845 * Macro that annotates function params with output string buffer size.
846 *
847 * If we were to annotate `snprintf`:
848 *
849 * ```c
850 * int snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, ...);
851 * ```
852 *
853 * This notes that `text` is a null-terminated C string, should be `maxlen`
854 * bytes in size, and is only written to by the function. The compiler or
855 * other analysis tools can warn when this doesn't appear to be the case.
856 *
857 * On compilers without this annotation mechanism, this is defined to nothing.
858 *
859 * \since This macro is available since SDL 3.2.0.
860 */
861#define SDL_OUT_Z_CAP(x) _Out_z_cap_(x)
862
863/**
864 * Macro that annotates function params with output buffer size.
865 *
866 * If we were to annotate `wcsncpy`:
867 *
868 * ```c
869 * char *wcscpy(SDL_OUT_CAP(bufsize) wchar_t *dst, const wchar_t *src, size_t bufsize);
870 * ```
871 *
872 * This notes that `dst` should have a capacity of `bufsize` wchar_t in size,
873 * and is only written to by the function. The compiler or other analysis
874 * tools can warn when this doesn't appear to be the case.
875 *
876 * This operates on counts of objects, not bytes. Use SDL_OUT_BYTECAP for
877 * bytes.
878 *
879 * On compilers without this annotation mechanism, this is defined to nothing.
880 *
881 * \since This macro is available since SDL 3.2.0.
882 */
883#define SDL_OUT_CAP(x) _Out_cap_(x)
884
885/**
886 * Macro that annotates function params with output buffer size.
887 *
888 * If we were to annotate `memcpy`:
889 *
890 * ```c
891 * void *memcpy(SDL_OUT_BYTECAP(bufsize) void *dst, const void *src, size_t bufsize);
892 * ```
893 *
894 * This notes that `dst` should have a capacity of `bufsize` bytes in size,
895 * and is only written to by the function. The compiler or other analysis
896 * tools can warn when this doesn't appear to be the case.
897 *
898 * On compilers without this annotation mechanism, this is defined to nothing.
899 *
900 * \since This macro is available since SDL 3.2.0.
901 */
902#define SDL_OUT_BYTECAP(x) _Out_bytecap_(x)
903
904/**
905 * Macro that annotates function params with output buffer string size.
906 *
907 * If we were to annotate `strcpy`:
908 *
909 * ```c
910 * char *strcpy(SDL_OUT_Z_BYTECAP(bufsize) char *dst, const char *src, size_t bufsize);
911 * ```
912 *
913 * This notes that `dst` should have a capacity of `bufsize` bytes in size,
914 * and a zero-terminated string is written to it by the function. The compiler
915 * or other analysis tools can warn when this doesn't appear to be the case.
916 *
917 * On compilers without this annotation mechanism, this is defined to nothing.
918 *
919 * \since This macro is available since SDL 3.2.0.
920 */
921#define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x)
922
923/**
924 * Macro that annotates function params as printf-style format strings.
925 *
926 * If we were to annotate `fprintf`:
927 *
928 * ```c
929 * int fprintf(FILE *f, SDL_PRINTF_FORMAT_STRING const char *fmt, ...);
930 * ```
931 *
932 * This notes that `fmt` should be a printf-style format string. The compiler
933 * or other analysis tools can warn when this doesn't appear to be the case.
934 *
935 * On compilers without this annotation mechanism, this is defined to nothing.
936 *
937 * \since This macro is available since SDL 3.2.0.
938 */
939#define SDL_PRINTF_FORMAT_STRING _Printf_format_string_
940
941/**
942 * Macro that annotates function params as scanf-style format strings.
943 *
944 * If we were to annotate `fscanf`:
945 *
946 * ```c
947 * int fscanf(FILE *f, SDL_SCANF_FORMAT_STRING const char *fmt, ...);
948 * ```
949 *
950 * This notes that `fmt` should be a scanf-style format string. The compiler
951 * or other analysis tools can warn when this doesn't appear to be the case.
952 *
953 * On compilers without this annotation mechanism, this is defined to nothing.
954 *
955 * \since This macro is available since SDL 3.2.0.
956 */
957#define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_
958
959/**
960 * Macro that annotates a vararg function that operates like printf.
961 *
962 * If we were to annotate `fprintf`:
963 *
964 * ```c
965 * int fprintf(FILE *f, const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
966 * ```
967 *
968 * This notes that the second parameter should be a printf-style format
969 * string, followed by `...`. The compiler or other analysis tools can warn
970 * when this doesn't appear to be the case.
971 *
972 * On compilers without this annotation mechanism, this is defined to nothing.
973 *
974 * This can (and should) be used with SDL_PRINTF_FORMAT_STRING as well, which
975 * between them will cover at least Visual Studio, GCC, and Clang.
976 *
977 * \since This macro is available since SDL 3.2.0.
978 */
979#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))
980
981/**
982 * Macro that annotates a va_list function that operates like printf.
983 *
984 * If we were to annotate `vfprintf`:
985 *
986 * ```c
987 * int vfprintf(FILE *f, const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(2);
988 * ```
989 *
990 * This notes that the second parameter should be a printf-style format
991 * string, followed by a va_list. The compiler or other analysis tools can
992 * warn when this doesn't appear to be the case.
993 *
994 * On compilers without this annotation mechanism, this is defined to nothing.
995 *
996 * This can (and should) be used with SDL_PRINTF_FORMAT_STRING as well, which
997 * between them will cover at least Visual Studio, GCC, and Clang.
998 *
999 * \since This macro is available since SDL 3.2.0.
1000 */
1001#define SDL_PRINTF_VARARG_FUNCV( fmtargnumber ) __attribute__(( format( __printf__, fmtargnumber, 0 )))
1002
1003/**
1004 * Macro that annotates a vararg function that operates like scanf.
1005 *
1006 * If we were to annotate `fscanf`:
1007 *
1008 * ```c
1009 * int fscanf(FILE *f, const char *fmt, ...) SDL_PRINTF_VARARG_FUNCV(2);
1010 * ```
1011 *
1012 * This notes that the second parameter should be a scanf-style format string,
1013 * followed by `...`. The compiler or other analysis tools can warn when this
1014 * doesn't appear to be the case.
1015 *
1016 * On compilers without this annotation mechanism, this is defined to nothing.
1017 *
1018 * This can (and should) be used with SDL_SCANF_FORMAT_STRING as well, which
1019 * between them will cover at least Visual Studio, GCC, and Clang.
1020 *
1021 * \since This macro is available since SDL 3.2.0.
1022 */
1023#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))
1024
1025/**
1026 * Macro that annotates a va_list function that operates like scanf.
1027 *
1028 * If we were to annotate `vfscanf`:
1029 *
1030 * ```c
1031 * int vfscanf(FILE *f, const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(2);
1032 * ```
1033 *
1034 * This notes that the second parameter should be a scanf-style format string,
1035 * followed by a va_list. The compiler or other analysis tools can warn when
1036 * this doesn't appear to be the case.
1037 *
1038 * On compilers without this annotation mechanism, this is defined to nothing.
1039 *
1040 * This can (and should) be used with SDL_SCANF_FORMAT_STRING as well, which
1041 * between them will cover at least Visual Studio, GCC, and Clang.
1042 *
1043 * \since This macro is available since SDL 3.2.0.
1044 */
1045#define SDL_SCANF_VARARG_FUNCV( fmtargnumber ) __attribute__(( format( __scanf__, fmtargnumber, 0 )))
1046
1047/**
1048 * Macro that annotates a vararg function that operates like wprintf.
1049 *
1050 * If we were to annotate `fwprintf`:
1051 *
1052 * ```c
1053 * int fwprintf(FILE *f, const wchar_t *fmt, ...) SDL_WPRINTF_VARARG_FUNC(2);
1054 * ```
1055 *
1056 * This notes that the second parameter should be a wprintf-style format wide
1057 * string, followed by `...`. The compiler or other analysis tools can warn
1058 * when this doesn't appear to be the case.
1059 *
1060 * On compilers without this annotation mechanism, this is defined to nothing.
1061 *
1062 * This can (and should) be used with SDL_PRINTF_FORMAT_STRING as well, which
1063 * between them will cover at least Visual Studio, GCC, and Clang.
1064 *
1065 * \since This macro is available since SDL 3.2.0.
1066 */
1067#define SDL_WPRINTF_VARARG_FUNC( fmtargnumber ) /* __attribute__ (( format( __wprintf__, fmtargnumber, fmtargnumber+1 ))) */
1068
1069/**
1070 * Macro that annotates a va_list function that operates like wprintf.
1071 *
1072 * If we were to annotate `vfwprintf`:
1073 *
1074 * ```c
1075 * int vfwprintf(FILE *f, const wchar_t *fmt, va_list ap) SDL_WPRINTF_VARARG_FUNC(2);
1076 * ```
1077 *
1078 * This notes that the second parameter should be a wprintf-style format wide
1079 * string, followed by a va_list. The compiler or other analysis tools can
1080 * warn when this doesn't appear to be the case.
1081 *
1082 * On compilers without this annotation mechanism, this is defined to nothing.
1083 *
1084 * This can (and should) be used with SDL_PRINTF_FORMAT_STRING as well, which
1085 * between them will cover at least Visual Studio, GCC, and Clang.
1086 *
1087 * \since This macro is available since SDL 3.2.0.
1088 */
1089#define SDL_WPRINTF_VARARG_FUNCV( fmtargnumber ) /* __attribute__ (( format( __wprintf__, fmtargnumber, 0 ))) */
1090
1091#elif defined(SDL_DISABLE_ANALYZE_MACROS)
1092#define SDL_IN_BYTECAP(x)
1093#define SDL_INOUT_Z_CAP(x)
1094#define SDL_OUT_Z_CAP(x)
1095#define SDL_OUT_CAP(x)
1096#define SDL_OUT_BYTECAP(x)
1097#define SDL_OUT_Z_BYTECAP(x)
1098#define SDL_PRINTF_FORMAT_STRING
1099#define SDL_SCANF_FORMAT_STRING
1100#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
1101#define SDL_PRINTF_VARARG_FUNCV( fmtargnumber )
1102#define SDL_SCANF_VARARG_FUNC( fmtargnumber )
1103#define SDL_SCANF_VARARG_FUNCV( fmtargnumber )
1104#define SDL_WPRINTF_VARARG_FUNC( fmtargnumber )
1105#define SDL_WPRINTF_VARARG_FUNCV( fmtargnumber )
1106#else
1107#if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */
1108#include <sal.h>
1109
1110#define SDL_IN_BYTECAP(x) _In_bytecount_(x)
1111#define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x)
1112#define SDL_OUT_Z_CAP(x) _Out_z_cap_(x)
1113#define SDL_OUT_CAP(x) _Out_cap_(x)
1114#define SDL_OUT_BYTECAP(x) _Out_bytecap_(x)
1115#define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x)
1116
1117#define SDL_PRINTF_FORMAT_STRING _Printf_format_string_
1118#define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_
1119#else
1120#define SDL_IN_BYTECAP(x)
1121#define SDL_INOUT_Z_CAP(x)
1122#define SDL_OUT_Z_CAP(x)
1123#define SDL_OUT_CAP(x)
1124#define SDL_OUT_BYTECAP(x)
1125#define SDL_OUT_Z_BYTECAP(x)
1126#define SDL_PRINTF_FORMAT_STRING
1127#define SDL_SCANF_FORMAT_STRING
1128#endif
1129#if defined(__GNUC__) || defined(__clang__)
1130#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))
1131#define SDL_PRINTF_VARARG_FUNCV( fmtargnumber ) __attribute__(( format( __printf__, fmtargnumber, 0 )))
1132#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))
1133#define SDL_SCANF_VARARG_FUNCV( fmtargnumber ) __attribute__(( format( __scanf__, fmtargnumber, 0 )))
1134#define SDL_WPRINTF_VARARG_FUNC( fmtargnumber ) /* __attribute__ (( format( __wprintf__, fmtargnumber, fmtargnumber+1 ))) */
1135#define SDL_WPRINTF_VARARG_FUNCV( fmtargnumber ) /* __attribute__ (( format( __wprintf__, fmtargnumber, 0 ))) */
1136#else
1137#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
1138#define SDL_PRINTF_VARARG_FUNCV( fmtargnumber )
1139#define SDL_SCANF_VARARG_FUNC( fmtargnumber )
1140#define SDL_SCANF_VARARG_FUNCV( fmtargnumber )
1141#define SDL_WPRINTF_VARARG_FUNC( fmtargnumber )
1142#define SDL_WPRINTF_VARARG_FUNCV( fmtargnumber )
1143#endif
1144#endif /* SDL_DISABLE_ANALYZE_MACROS */
1145
1146/** \cond */
1147#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1148SDL_COMPILE_TIME_ASSERT(bool_size, sizeof(bool) == 1);
1149SDL_COMPILE_TIME_ASSERT(uint8_size, sizeof(Uint8) == 1);
1150SDL_COMPILE_TIME_ASSERT(sint8_size, sizeof(Sint8) == 1);
1151SDL_COMPILE_TIME_ASSERT(uint16_size, sizeof(Uint16) == 2);
1152SDL_COMPILE_TIME_ASSERT(sint16_size, sizeof(Sint16) == 2);
1153SDL_COMPILE_TIME_ASSERT(uint32_size, sizeof(Uint32) == 4);
1154SDL_COMPILE_TIME_ASSERT(sint32_size, sizeof(Sint32) == 4);
1155SDL_COMPILE_TIME_ASSERT(uint64_size, sizeof(Uint64) == 8);
1156SDL_COMPILE_TIME_ASSERT(sint64_size, sizeof(Sint64) == 8);
1157#ifndef SDL_NOLONGLONG
1158SDL_COMPILE_TIME_ASSERT(uint64_longlong, sizeof(Uint64) <= sizeof(unsigned long long));
1159SDL_COMPILE_TIME_ASSERT(size_t_longlong, sizeof(size_t) <= sizeof(unsigned long long));
1160#endif
1161typedef struct SDL_alignment_test
1162{
1163 Uint8 a;
1164 void *b;
1165} SDL_alignment_test;
1166SDL_COMPILE_TIME_ASSERT(struct_alignment, sizeof(SDL_alignment_test) == (2 * sizeof(void *)));
1167SDL_COMPILE_TIME_ASSERT(two_s_complement, (int)~(int)0 == (int)(-1));
1168#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
1169/** \endcond */
1170
1171/* Check to make sure enums are the size of ints, for structure packing.
1172 For both Watcom C/C++ and Borland C/C++ the compiler option that makes
1173 enums having the size of an int must be enabled.
1174 This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
1175*/
1176
1177/** \cond */
1178#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1179#if !defined(SDL_PLATFORM_VITA) && !defined(SDL_PLATFORM_3DS)
1180/* TODO: include/SDL_stdinc.h:390: error: size of array 'SDL_dummy_enum' is negative */
1181typedef enum SDL_DUMMY_ENUM
1182{
1183 DUMMY_ENUM_VALUE
1184} SDL_DUMMY_ENUM;
1185
1186SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
1187#endif
1188#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
1189/** \endcond */
1190
1191#include <SDL3/SDL_begin_code.h>
1192/* Set up for C function definitions, even when using C++ */
1193#ifdef __cplusplus
1194extern "C" {
1195#endif
1196
1197/**
1198 * A macro to initialize an SDL interface.
1199 *
1200 * This macro will initialize an SDL interface structure and should be called
1201 * before you fill out the fields with your implementation.
1202 *
1203 * You can use it like this:
1204 *
1205 * ```c
1206 * SDL_IOStreamInterface iface;
1207 *
1208 * SDL_INIT_INTERFACE(&iface);
1209 *
1210 * // Fill in the interface function pointers with your implementation
1211 * iface.seek = ...
1212 *
1213 * stream = SDL_OpenIO(&iface, NULL);
1214 * ```
1215 *
1216 * If you are using designated initializers, you can use the size of the
1217 * interface as the version, e.g.
1218 *
1219 * ```c
1220 * SDL_IOStreamInterface iface = {
1221 * .version = sizeof(iface),
1222 * .seek = ...
1223 * };
1224 * stream = SDL_OpenIO(&iface, NULL);
1225 * ```
1226 *
1227 * \threadsafety It is safe to call this macro from any thread.
1228 *
1229 * \since This macro is available since SDL 3.2.0.
1230 *
1231 * \sa SDL_IOStreamInterface
1232 * \sa SDL_StorageInterface
1233 * \sa SDL_VirtualJoystickDesc
1234 */
1235#define SDL_INIT_INTERFACE(iface) \
1236 do { \
1237 SDL_zerop(iface); \
1238 (iface)->version = sizeof(*(iface)); \
1239 } while (0)
1240
1241
1242#ifdef SDL_WIKI_DOCUMENTATION_SECTION
1243
1244/**
1245 * Allocate memory on the stack (maybe).
1246 *
1247 * If SDL knows how to access alloca() on the current platform, it will use it
1248 * to stack-allocate memory here. If it doesn't, it will use SDL_malloc() to
1249 * heap-allocate memory.
1250 *
1251 * Since this might not be stack memory at all, it's important that you check
1252 * the returned pointer for NULL, and that you call SDL_stack_free on the
1253 * memory when done with it. Since this might be stack memory, it's important
1254 * that you don't allocate large amounts of it, or allocate in a loop without
1255 * returning from the function, so the stack doesn't overflow.
1256 *
1257 * \param type the datatype of the memory to allocate.
1258 * \param count the number of `type` objects to allocate.
1259 * \returns newly-allocated memory, or NULL on failure.
1260 *
1261 * \threadsafety It is safe to call this macro from any thread.
1262 *
1263 * \since This macro is available since SDL 3.2.0.
1264 *
1265 * \sa SDL_stack_free
1266 */
1267#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
1268
1269/**
1270 * Free memory previously allocated with SDL_stack_alloc.
1271 *
1272 * If SDL used alloca() to allocate this memory, this macro does nothing and
1273 * the allocated memory will be automatically released when the function that
1274 * called SDL_stack_alloc() returns. If SDL used SDL_malloc(), it will
1275 * SDL_free the memory immediately.
1276 *
1277 * \param data the pointer, from SDL_stack_alloc(), to free.
1278 *
1279 * \threadsafety It is safe to call this macro from any thread.
1280 *
1281 * \since This macro is available since SDL 3.2.0.
1282 *
1283 * \sa SDL_stack_alloc
1284 */
1285#define SDL_stack_free(data)
1286#elif !defined(SDL_DISABLE_ALLOCA)
1287#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
1288#define SDL_stack_free(data)
1289#else
1290#define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*(count))
1291#define SDL_stack_free(data) SDL_free(data)
1292#endif
1293
1294/**
1295 * Allocate uninitialized memory.
1296 *
1297 * The allocated memory returned by this function must be freed with
1298 * SDL_free().
1299 *
1300 * If `size` is 0, it will be set to 1.
1301 *
1302 * If the allocation is successful, the returned pointer is guaranteed to be
1303 * aligned to either the *fundamental alignment* (`alignof(max_align_t)` in
1304 * C11 and later) or `2 * sizeof(void *)`, whichever is smaller. Use
1305 * SDL_aligned_alloc() if you need to allocate memory aligned to an alignment
1306 * greater than this guarantee.
1307 *
1308 * \param size the size to allocate.
1309 * \returns a pointer to the allocated memory, or NULL if allocation failed.
1310 *
1311 * \threadsafety It is safe to call this function from any thread.
1312 *
1313 * \since This function is available since SDL 3.2.0.
1314 *
1315 * \sa SDL_free
1316 * \sa SDL_calloc
1317 * \sa SDL_realloc
1318 * \sa SDL_aligned_alloc
1319 */
1320extern SDL_DECLSPEC SDL_MALLOC void * SDLCALL SDL_malloc(size_t size);
1321
1322/**
1323 * Allocate a zero-initialized array.
1324 *
1325 * The memory returned by this function must be freed with SDL_free().
1326 *
1327 * If either of `nmemb` or `size` is 0, they will both be set to 1.
1328 *
1329 * If the allocation is successful, the returned pointer is guaranteed to be
1330 * aligned to either the *fundamental alignment* (`alignof(max_align_t)` in
1331 * C11 and later) or `2 * sizeof(void *)`, whichever is smaller.
1332 *
1333 * \param nmemb the number of elements in the array.
1334 * \param size the size of each element of the array.
1335 * \returns a pointer to the allocated array, or NULL if allocation failed.
1336 *
1337 * \threadsafety It is safe to call this function from any thread.
1338 *
1339 * \since This function is available since SDL 3.2.0.
1340 *
1341 * \sa SDL_free
1342 * \sa SDL_malloc
1343 * \sa SDL_realloc
1344 */
1345extern SDL_DECLSPEC SDL_MALLOC SDL_ALLOC_SIZE2(1, 2) void * SDLCALL SDL_calloc(size_t nmemb, size_t size);
1346
1347/**
1348 * Change the size of allocated memory.
1349 *
1350 * The memory returned by this function must be freed with SDL_free().
1351 *
1352 * If `size` is 0, it will be set to 1. Note that this is unlike some other C
1353 * runtime `realloc` implementations, which may treat `realloc(mem, 0)` the
1354 * same way as `free(mem)`.
1355 *
1356 * If `mem` is NULL, the behavior of this function is equivalent to
1357 * SDL_malloc(). Otherwise, the function can have one of three possible
1358 * outcomes:
1359 *
1360 * - If it returns the same pointer as `mem`, it means that `mem` was resized
1361 * in place without freeing.
1362 * - If it returns a different non-NULL pointer, it means that `mem` was freed
1363 * and cannot be dereferenced anymore.
1364 * - If it returns NULL (indicating failure), then `mem` will remain valid and
1365 * must still be freed with SDL_free().
1366 *
1367 * If the allocation is successfully resized, the returned pointer is
1368 * guaranteed to be aligned to either the *fundamental alignment*
1369 * (`alignof(max_align_t)` in C11 and later) or `2 * sizeof(void *)`,
1370 * whichever is smaller.
1371 *
1372 * \param mem a pointer to allocated memory to reallocate, or NULL.
1373 * \param size the new size of the memory.
1374 * \returns a pointer to the newly allocated memory, or NULL if allocation
1375 * failed.
1376 *
1377 * \threadsafety It is safe to call this function from any thread.
1378 *
1379 * \since This function is available since SDL 3.2.0.
1380 *
1381 * \sa SDL_free
1382 * \sa SDL_malloc
1383 * \sa SDL_calloc
1384 */
1385extern SDL_DECLSPEC SDL_ALLOC_SIZE(2) void * SDLCALL SDL_realloc(void *mem, size_t size);
1386
1387/**
1388 * Free allocated memory.
1389 *
1390 * The pointer is no longer valid after this call and cannot be dereferenced
1391 * anymore.
1392 *
1393 * If `mem` is NULL, this function does nothing.
1394 *
1395 * \param mem a pointer to allocated memory, or NULL.
1396 *
1397 * \threadsafety It is safe to call this function from any thread.
1398 *
1399 * \since This function is available since SDL 3.2.0.
1400 *
1401 * \sa SDL_malloc
1402 * \sa SDL_calloc
1403 * \sa SDL_realloc
1404 */
1405extern SDL_DECLSPEC void SDLCALL SDL_free(void *mem);
1406
1407/**
1408 * A callback used to implement SDL_malloc().
1409 *
1410 * SDL will always ensure that the passed `size` is greater than 0.
1411 *
1412 * \param size the size to allocate.
1413 * \returns a pointer to the allocated memory, or NULL if allocation failed.
1414 *
1415 * \threadsafety It should be safe to call this callback from any thread.
1416 *
1417 * \since This datatype is available since SDL 3.2.0.
1418 *
1419 * \sa SDL_malloc
1420 * \sa SDL_GetOriginalMemoryFunctions
1421 * \sa SDL_GetMemoryFunctions
1422 * \sa SDL_SetMemoryFunctions
1423 */
1424typedef void *(SDLCALL *SDL_malloc_func)(size_t size);
1425
1426/**
1427 * A callback used to implement SDL_calloc().
1428 *
1429 * SDL will always ensure that the passed `nmemb` and `size` are both greater
1430 * than 0.
1431 *
1432 * \param nmemb the number of elements in the array.
1433 * \param size the size of each element of the array.
1434 * \returns a pointer to the allocated array, or NULL if allocation failed.
1435 *
1436 * \threadsafety It should be safe to call this callback from any thread.
1437 *
1438 * \since This datatype is available since SDL 3.2.0.
1439 *
1440 * \sa SDL_calloc
1441 * \sa SDL_GetOriginalMemoryFunctions
1442 * \sa SDL_GetMemoryFunctions
1443 * \sa SDL_SetMemoryFunctions
1444 */
1445typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);
1446
1447/**
1448 * A callback used to implement SDL_realloc().
1449 *
1450 * SDL will always ensure that the passed `size` is greater than 0.
1451 *
1452 * \param mem a pointer to allocated memory to reallocate, or NULL.
1453 * \param size the new size of the memory.
1454 * \returns a pointer to the newly allocated memory, or NULL if allocation
1455 * failed.
1456 *
1457 * \threadsafety It should be safe to call this callback from any thread.
1458 *
1459 * \since This datatype is available since SDL 3.2.0.
1460 *
1461 * \sa SDL_realloc
1462 * \sa SDL_GetOriginalMemoryFunctions
1463 * \sa SDL_GetMemoryFunctions
1464 * \sa SDL_SetMemoryFunctions
1465 */
1466typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
1467
1468/**
1469 * A callback used to implement SDL_free().
1470 *
1471 * SDL will always ensure that the passed `mem` is a non-NULL pointer.
1472 *
1473 * \param mem a pointer to allocated memory.
1474 *
1475 * \threadsafety It should be safe to call this callback from any thread.
1476 *
1477 * \since This datatype is available since SDL 3.2.0.
1478 *
1479 * \sa SDL_free
1480 * \sa SDL_GetOriginalMemoryFunctions
1481 * \sa SDL_GetMemoryFunctions
1482 * \sa SDL_SetMemoryFunctions
1483 */
1484typedef void (SDLCALL *SDL_free_func)(void *mem);
1485
1486/**
1487 * Get the original set of SDL memory functions.
1488 *
1489 * This is what SDL_malloc and friends will use by default, if there has been
1490 * no call to SDL_SetMemoryFunctions. This is not necessarily using the C
1491 * runtime's `malloc` functions behind the scenes! Different platforms and
1492 * build configurations might do any number of unexpected things.
1493 *
1494 * \param malloc_func filled with malloc function.
1495 * \param calloc_func filled with calloc function.
1496 * \param realloc_func filled with realloc function.
1497 * \param free_func filled with free function.
1498 *
1499 * \threadsafety It is safe to call this function from any thread.
1500 *
1501 * \since This function is available since SDL 3.2.0.
1502 */
1503extern SDL_DECLSPEC void SDLCALL SDL_GetOriginalMemoryFunctions(SDL_malloc_func *malloc_func,
1504 SDL_calloc_func *calloc_func,
1505 SDL_realloc_func *realloc_func,
1506 SDL_free_func *free_func);
1507
1508/**
1509 * Get the current set of SDL memory functions.
1510 *
1511 * \param malloc_func filled with malloc function.
1512 * \param calloc_func filled with calloc function.
1513 * \param realloc_func filled with realloc function.
1514 * \param free_func filled with free function.
1515 *
1516 * \threadsafety This does not hold a lock, so do not call this in the
1517 * unlikely event of a background thread calling
1518 * SDL_SetMemoryFunctions simultaneously.
1519 *
1520 * \since This function is available since SDL 3.2.0.
1521 *
1522 * \sa SDL_SetMemoryFunctions
1523 * \sa SDL_GetOriginalMemoryFunctions
1524 */
1525extern SDL_DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
1526 SDL_calloc_func *calloc_func,
1527 SDL_realloc_func *realloc_func,
1528 SDL_free_func *free_func);
1529
1530/**
1531 * Replace SDL's memory allocation functions with a custom set.
1532 *
1533 * It is not safe to call this function once any allocations have been made,
1534 * as future calls to SDL_free will use the new allocator, even if they came
1535 * from an SDL_malloc made with the old one!
1536 *
1537 * If used, usually this needs to be the first call made into the SDL library,
1538 * if not the very first thing done at program startup time.
1539 *
1540 * \param malloc_func custom malloc function.
1541 * \param calloc_func custom calloc function.
1542 * \param realloc_func custom realloc function.
1543 * \param free_func custom free function.
1544 * \returns true on success or false on failure; call SDL_GetError() for more
1545 * information.
1546 *
1547 * \threadsafety It is safe to call this function from any thread, but one
1548 * should not replace the memory functions once any allocations
1549 * are made!
1550 *
1551 * \since This function is available since SDL 3.2.0.
1552 *
1553 * \sa SDL_GetMemoryFunctions
1554 * \sa SDL_GetOriginalMemoryFunctions
1555 */
1556extern SDL_DECLSPEC bool SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
1557 SDL_calloc_func calloc_func,
1558 SDL_realloc_func realloc_func,
1559 SDL_free_func free_func);
1560
1561/**
1562 * Allocate memory aligned to a specific alignment.
1563 *
1564 * The memory returned by this function must be freed with SDL_aligned_free(),
1565 * _not_ SDL_free().
1566 *
1567 * If `alignment` is less than the size of `void *`, it will be increased to
1568 * match that.
1569 *
1570 * The returned memory address will be a multiple of the alignment value, and
1571 * the size of the memory allocated will be a multiple of the alignment value.
1572 *
1573 * \param alignment the alignment of the memory.
1574 * \param size the size to allocate.
1575 * \returns a pointer to the aligned memory, or NULL if allocation failed.
1576 *
1577 * \threadsafety It is safe to call this function from any thread.
1578 *
1579 * \since This function is available since SDL 3.2.0.
1580 *
1581 * \sa SDL_aligned_free
1582 */
1583extern SDL_DECLSPEC SDL_MALLOC void * SDLCALL SDL_aligned_alloc(size_t alignment, size_t size);
1584
1585/**
1586 * Free memory allocated by SDL_aligned_alloc().
1587 *
1588 * The pointer is no longer valid after this call and cannot be dereferenced
1589 * anymore.
1590 *
1591 * If `mem` is NULL, this function does nothing.
1592 *
1593 * \param mem a pointer previously returned by SDL_aligned_alloc(), or NULL.
1594 *
1595 * \threadsafety It is safe to call this function from any thread.
1596 *
1597 * \since This function is available since SDL 3.2.0.
1598 *
1599 * \sa SDL_aligned_alloc
1600 */
1601extern SDL_DECLSPEC void SDLCALL SDL_aligned_free(void *mem);
1602
1603/**
1604 * Get the number of outstanding (unfreed) allocations.
1605 *
1606 * \returns the number of allocations or -1 if allocation counting is
1607 * disabled.
1608 *
1609 * \threadsafety It is safe to call this function from any thread.
1610 *
1611 * \since This function is available since SDL 3.2.0.
1612 */
1613extern SDL_DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
1614
1615/**
1616 * A thread-safe set of environment variables
1617 *
1618 * \since This struct is available since SDL 3.2.0.
1619 *
1620 * \sa SDL_GetEnvironment
1621 * \sa SDL_CreateEnvironment
1622 * \sa SDL_GetEnvironmentVariable
1623 * \sa SDL_GetEnvironmentVariables
1624 * \sa SDL_SetEnvironmentVariable
1625 * \sa SDL_UnsetEnvironmentVariable
1626 * \sa SDL_DestroyEnvironment
1627 */
1628typedef struct SDL_Environment SDL_Environment;
1629
1630/**
1631 * Get the process environment.
1632 *
1633 * This is initialized at application start and is not affected by setenv()
1634 * and unsetenv() calls after that point. Use SDL_SetEnvironmentVariable() and
1635 * SDL_UnsetEnvironmentVariable() if you want to modify this environment, or
1636 * SDL_setenv_unsafe() or SDL_unsetenv_unsafe() if you want changes to persist
1637 * in the C runtime environment after SDL_Quit().
1638 *
1639 * \returns a pointer to the environment for the process or NULL on failure;
1640 * call SDL_GetError() for more information.
1641 *
1642 * \threadsafety It is safe to call this function from any thread.
1643 *
1644 * \since This function is available since SDL 3.2.0.
1645 *
1646 * \sa SDL_GetEnvironmentVariable
1647 * \sa SDL_GetEnvironmentVariables
1648 * \sa SDL_SetEnvironmentVariable
1649 * \sa SDL_UnsetEnvironmentVariable
1650 */
1651extern SDL_DECLSPEC SDL_Environment * SDLCALL SDL_GetEnvironment(void);
1652
1653/**
1654 * Create a set of environment variables
1655 *
1656 * \param populated true to initialize it from the C runtime environment,
1657 * false to create an empty environment.
1658 * \returns a pointer to the new environment or NULL on failure; call
1659 * SDL_GetError() for more information.
1660 *
1661 * \threadsafety If `populated` is false, it is safe to call this function
1662 * from any thread, otherwise it is safe if no other threads are
1663 * calling setenv() or unsetenv()
1664 *
1665 * \since This function is available since SDL 3.2.0.
1666 *
1667 * \sa SDL_GetEnvironmentVariable
1668 * \sa SDL_GetEnvironmentVariables
1669 * \sa SDL_SetEnvironmentVariable
1670 * \sa SDL_UnsetEnvironmentVariable
1671 * \sa SDL_DestroyEnvironment
1672 */
1673extern SDL_DECLSPEC SDL_Environment * SDLCALL SDL_CreateEnvironment(bool populated);
1674
1675/**
1676 * Get the value of a variable in the environment.
1677 *
1678 * \param env the environment to query.
1679 * \param name the name of the variable to get.
1680 * \returns a pointer to the value of the variable or NULL if it can't be
1681 * found.
1682 *
1683 * \threadsafety It is safe to call this function from any thread.
1684 *
1685 * \since This function is available since SDL 3.2.0.
1686 *
1687 * \sa SDL_GetEnvironment
1688 * \sa SDL_CreateEnvironment
1689 * \sa SDL_GetEnvironmentVariables
1690 * \sa SDL_SetEnvironmentVariable
1691 * \sa SDL_UnsetEnvironmentVariable
1692 */
1693extern SDL_DECLSPEC const char * SDLCALL SDL_GetEnvironmentVariable(SDL_Environment *env, const char *name);
1694
1695/**
1696 * Get all variables in the environment.
1697 *
1698 * \param env the environment to query.
1699 * \returns a NULL terminated array of pointers to environment variables in
1700 * the form "variable=value" or NULL on failure; call SDL_GetError()
1701 * for more information. This is a single allocation that should be
1702 * freed with SDL_free() when it is no longer needed.
1703 *
1704 * \threadsafety It is safe to call this function from any thread.
1705 *
1706 * \since This function is available since SDL 3.2.0.
1707 *
1708 * \sa SDL_GetEnvironment
1709 * \sa SDL_CreateEnvironment
1710 * \sa SDL_GetEnvironmentVariables
1711 * \sa SDL_SetEnvironmentVariable
1712 * \sa SDL_UnsetEnvironmentVariable
1713 */
1714extern SDL_DECLSPEC char ** SDLCALL SDL_GetEnvironmentVariables(SDL_Environment *env);
1715
1716/**
1717 * Set the value of a variable in the environment.
1718 *
1719 * \param env the environment to modify.
1720 * \param name the name of the variable to set.
1721 * \param value the value of the variable to set.
1722 * \param overwrite true to overwrite the variable if it exists, false to
1723 * return success without setting the variable if it already
1724 * exists.
1725 * \returns true on success or false on failure; call SDL_GetError() for more
1726 * information.
1727 *
1728 * \threadsafety It is safe to call this function from any thread.
1729 *
1730 * \since This function is available since SDL 3.2.0.
1731 *
1732 * \sa SDL_GetEnvironment
1733 * \sa SDL_CreateEnvironment
1734 * \sa SDL_GetEnvironmentVariable
1735 * \sa SDL_GetEnvironmentVariables
1736 * \sa SDL_UnsetEnvironmentVariable
1737 */
1738extern SDL_DECLSPEC bool SDLCALL SDL_SetEnvironmentVariable(SDL_Environment *env, const char *name, const char *value, bool overwrite);
1739
1740/**
1741 * Clear a variable from the environment.
1742 *
1743 * \param env the environment to modify.
1744 * \param name the name of the variable to unset.
1745 * \returns true on success or false on failure; call SDL_GetError() for more
1746 * information.
1747 *
1748 * \threadsafety It is safe to call this function from any thread.
1749 *
1750 * \since This function is available since SDL 3.2.0.
1751 *
1752 * \sa SDL_GetEnvironment
1753 * \sa SDL_CreateEnvironment
1754 * \sa SDL_GetEnvironmentVariable
1755 * \sa SDL_GetEnvironmentVariables
1756 * \sa SDL_SetEnvironmentVariable
1757 * \sa SDL_UnsetEnvironmentVariable
1758 */
1759extern SDL_DECLSPEC bool SDLCALL SDL_UnsetEnvironmentVariable(SDL_Environment *env, const char *name);
1760
1761/**
1762 * Destroy a set of environment variables.
1763 *
1764 * \param env the environment to destroy.
1765 *
1766 * \threadsafety It is safe to call this function from any thread, as long as
1767 * the environment is no longer in use.
1768 *
1769 * \since This function is available since SDL 3.2.0.
1770 *
1771 * \sa SDL_CreateEnvironment
1772 */
1773extern SDL_DECLSPEC void SDLCALL SDL_DestroyEnvironment(SDL_Environment *env);
1774
1775/**
1776 * Get the value of a variable in the environment.
1777 *
1778 * This function uses SDL's cached copy of the environment and is thread-safe.
1779 *
1780 * \param name the name of the variable to get.
1781 * \returns a pointer to the value of the variable or NULL if it can't be
1782 * found.
1783 *
1784 * \threadsafety It is safe to call this function from any thread.
1785 *
1786 * \since This function is available since SDL 3.2.0.
1787 */
1788extern SDL_DECLSPEC const char * SDLCALL SDL_getenv(const char *name);
1789
1790/**
1791 * Get the value of a variable in the environment.
1792 *
1793 * This function bypasses SDL's cached copy of the environment and is not
1794 * thread-safe.
1795 *
1796 * \param name the name of the variable to get.
1797 * \returns a pointer to the value of the variable or NULL if it can't be
1798 * found.
1799 *
1800 * \threadsafety This function is not thread safe, consider using SDL_getenv()
1801 * instead.
1802 *
1803 * \since This function is available since SDL 3.2.0.
1804 *
1805 * \sa SDL_getenv
1806 */
1807extern SDL_DECLSPEC const char * SDLCALL SDL_getenv_unsafe(const char *name);
1808
1809/**
1810 * Set the value of a variable in the environment.
1811 *
1812 * \param name the name of the variable to set.
1813 * \param value the value of the variable to set.
1814 * \param overwrite 1 to overwrite the variable if it exists, 0 to return
1815 * success without setting the variable if it already exists.
1816 * \returns 0 on success, -1 on error.
1817 *
1818 * \threadsafety This function is not thread safe, consider using
1819 * SDL_SetEnvironmentVariable() instead.
1820 *
1821 * \since This function is available since SDL 3.2.0.
1822 *
1823 * \sa SDL_SetEnvironmentVariable
1824 */
1825extern SDL_DECLSPEC int SDLCALL SDL_setenv_unsafe(const char *name, const char *value, int overwrite);
1826
1827/**
1828 * Clear a variable from the environment.
1829 *
1830 * \param name the name of the variable to unset.
1831 * \returns 0 on success, -1 on error.
1832 *
1833 * \threadsafety This function is not thread safe, consider using
1834 * SDL_UnsetEnvironmentVariable() instead.
1835 *
1836 * \since This function is available since SDL 3.2.0.
1837 *
1838 * \sa SDL_UnsetEnvironmentVariable
1839 */
1840extern SDL_DECLSPEC int SDLCALL SDL_unsetenv_unsafe(const char *name);
1841
1842/**
1843 * A callback used with SDL sorting and binary search functions.
1844 *
1845 * \param a a pointer to the first element being compared.
1846 * \param b a pointer to the second element being compared.
1847 * \returns -1 if `a` should be sorted before `b`, 1 if `b` should be sorted
1848 * before `a`, 0 if they are equal. If two elements are equal, their
1849 * order in the sorted array is undefined.
1850 *
1851 * \since This callback is available since SDL 3.2.0.
1852 *
1853 * \sa SDL_bsearch
1854 * \sa SDL_qsort
1855 */
1856typedef int (SDLCALL *SDL_CompareCallback)(const void *a, const void *b);
1857
1858/**
1859 * Sort an array.
1860 *
1861 * For example:
1862 *
1863 * ```c
1864 * typedef struct {
1865 * int key;
1866 * const char *string;
1867 * } data;
1868 *
1869 * int SDLCALL compare(const void *a, const void *b)
1870 * {
1871 * const data *A = (const data *)a;
1872 * const data *B = (const data *)b;
1873 *
1874 * if (A->n < B->n) {
1875 * return -1;
1876 * } else if (B->n < A->n) {
1877 * return 1;
1878 * } else {
1879 * return 0;
1880 * }
1881 * }
1882 *
1883 * data values[] = {
1884 * { 3, "third" }, { 1, "first" }, { 2, "second" }
1885 * };
1886 *
1887 * SDL_qsort(values, SDL_arraysize(values), sizeof(values[0]), compare);
1888 * ```
1889 *
1890 * \param base a pointer to the start of the array.
1891 * \param nmemb the number of elements in the array.
1892 * \param size the size of the elements in the array.
1893 * \param compare a function used to compare elements in the array.
1894 *
1895 * \threadsafety It is safe to call this function from any thread.
1896 *
1897 * \since This function is available since SDL 3.2.0.
1898 *
1899 * \sa SDL_bsearch
1900 * \sa SDL_qsort_r
1901 */
1902extern SDL_DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, SDL_CompareCallback compare);
1903
1904/**
1905 * Perform a binary search on a previously sorted array.
1906 *
1907 * For example:
1908 *
1909 * ```c
1910 * typedef struct {
1911 * int key;
1912 * const char *string;
1913 * } data;
1914 *
1915 * int SDLCALL compare(const void *a, const void *b)
1916 * {
1917 * const data *A = (const data *)a;
1918 * const data *B = (const data *)b;
1919 *
1920 * if (A->n < B->n) {
1921 * return -1;
1922 * } else if (B->n < A->n) {
1923 * return 1;
1924 * } else {
1925 * return 0;
1926 * }
1927 * }
1928 *
1929 * data values[] = {
1930 * { 1, "first" }, { 2, "second" }, { 3, "third" }
1931 * };
1932 * data key = { 2, NULL };
1933 *
1934 * data *result = SDL_bsearch(&key, values, SDL_arraysize(values), sizeof(values[0]), compare);
1935 * ```
1936 *
1937 * \param key a pointer to a key equal to the element being searched for.
1938 * \param base a pointer to the start of the array.
1939 * \param nmemb the number of elements in the array.
1940 * \param size the size of the elements in the array.
1941 * \param compare a function used to compare elements in the array.
1942 * \returns a pointer to the matching element in the array, or NULL if not
1943 * found.
1944 *
1945 * \threadsafety It is safe to call this function from any thread.
1946 *
1947 * \since This function is available since SDL 3.2.0.
1948 *
1949 * \sa SDL_bsearch_r
1950 * \sa SDL_qsort
1951 */
1952extern SDL_DECLSPEC void * SDLCALL SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, SDL_CompareCallback compare);
1953
1954/**
1955 * A callback used with SDL sorting and binary search functions.
1956 *
1957 * \param userdata the `userdata` pointer passed to the sort function.
1958 * \param a a pointer to the first element being compared.
1959 * \param b a pointer to the second element being compared.
1960 * \returns -1 if `a` should be sorted before `b`, 1 if `b` should be sorted
1961 * before `a`, 0 if they are equal. If two elements are equal, their
1962 * order in the sorted array is undefined.
1963 *
1964 * \since This callback is available since SDL 3.2.0.
1965 *
1966 * \sa SDL_qsort_r
1967 * \sa SDL_bsearch_r
1968 */
1969typedef int (SDLCALL *SDL_CompareCallback_r)(void *userdata, const void *a, const void *b);
1970
1971/**
1972 * Sort an array, passing a userdata pointer to the compare function.
1973 *
1974 * For example:
1975 *
1976 * ```c
1977 * typedef enum {
1978 * sort_increasing,
1979 * sort_decreasing,
1980 * } sort_method;
1981 *
1982 * typedef struct {
1983 * int key;
1984 * const char *string;
1985 * } data;
1986 *
1987 * int SDLCALL compare(const void *userdata, const void *a, const void *b)
1988 * {
1989 * sort_method method = (sort_method)(uintptr_t)userdata;
1990 * const data *A = (const data *)a;
1991 * const data *B = (const data *)b;
1992 *
1993 * if (A->key < B->key) {
1994 * return (method == sort_increasing) ? -1 : 1;
1995 * } else if (B->key < A->key) {
1996 * return (method == sort_increasing) ? 1 : -1;
1997 * } else {
1998 * return 0;
1999 * }
2000 * }
2001 *
2002 * data values[] = {
2003 * { 3, "third" }, { 1, "first" }, { 2, "second" }
2004 * };
2005 *
2006 * SDL_qsort_r(values, SDL_arraysize(values), sizeof(values[0]), compare, (const void *)(uintptr_t)sort_increasing);
2007 * ```
2008 *
2009 * \param base a pointer to the start of the array.
2010 * \param nmemb the number of elements in the array.
2011 * \param size the size of the elements in the array.
2012 * \param compare a function used to compare elements in the array.
2013 * \param userdata a pointer to pass to the compare function.
2014 *
2015 * \threadsafety It is safe to call this function from any thread.
2016 *
2017 * \since This function is available since SDL 3.2.0.
2018 *
2019 * \sa SDL_bsearch_r
2020 * \sa SDL_qsort
2021 */
2022extern SDL_DECLSPEC void SDLCALL SDL_qsort_r(void *base, size_t nmemb, size_t size, SDL_CompareCallback_r compare, void *userdata);
2023
2024/**
2025 * Perform a binary search on a previously sorted array, passing a userdata
2026 * pointer to the compare function.
2027 *
2028 * For example:
2029 *
2030 * ```c
2031 * typedef enum {
2032 * sort_increasing,
2033 * sort_decreasing,
2034 * } sort_method;
2035 *
2036 * typedef struct {
2037 * int key;
2038 * const char *string;
2039 * } data;
2040 *
2041 * int SDLCALL compare(const void *userdata, const void *a, const void *b)
2042 * {
2043 * sort_method method = (sort_method)(uintptr_t)userdata;
2044 * const data *A = (const data *)a;
2045 * const data *B = (const data *)b;
2046 *
2047 * if (A->key < B->key) {
2048 * return (method == sort_increasing) ? -1 : 1;
2049 * } else if (B->key < A->key) {
2050 * return (method == sort_increasing) ? 1 : -1;
2051 * } else {
2052 * return 0;
2053 * }
2054 * }
2055 *
2056 * data values[] = {
2057 * { 1, "first" }, { 2, "second" }, { 3, "third" }
2058 * };
2059 * data key = { 2, NULL };
2060 *
2061 * data *result = SDL_bsearch_r(&key, values, SDL_arraysize(values), sizeof(values[0]), compare, (const void *)(uintptr_t)sort_increasing);
2062 * ```
2063 *
2064 * \param key a pointer to a key equal to the element being searched for.
2065 * \param base a pointer to the start of the array.
2066 * \param nmemb the number of elements in the array.
2067 * \param size the size of the elements in the array.
2068 * \param compare a function used to compare elements in the array.
2069 * \param userdata a pointer to pass to the compare function.
2070 * \returns a pointer to the matching element in the array, or NULL if not
2071 * found.
2072 *
2073 * \threadsafety It is safe to call this function from any thread.
2074 *
2075 * \since This function is available since SDL 3.2.0.
2076 *
2077 * \sa SDL_bsearch
2078 * \sa SDL_qsort_r
2079 */
2080extern SDL_DECLSPEC void * SDLCALL SDL_bsearch_r(const void *key, const void *base, size_t nmemb, size_t size, SDL_CompareCallback_r compare, void *userdata);
2081
2082/**
2083 * Compute the absolute value of `x`.
2084 *
2085 * \param x an integer value.
2086 * \returns the absolute value of x.
2087 *
2088 * \threadsafety It is safe to call this function from any thread.
2089 *
2090 * \since This function is available since SDL 3.2.0.
2091 */
2092extern SDL_DECLSPEC int SDLCALL SDL_abs(int x);
2093
2094/**
2095 * Return the lesser of two values.
2096 *
2097 * This is a helper macro that might be more clear than writing out the
2098 * comparisons directly, and works with any type that can be compared with the
2099 * `<` operator. However, it double-evaluates both its parameters, so do not
2100 * use expressions with side-effects here.
2101 *
2102 * \param x the first value to compare.
2103 * \param y the second value to compare.
2104 * \returns the lesser of `x` and `y`.
2105 *
2106 * \threadsafety It is safe to call this macro from any thread.
2107 *
2108 * \since This macro is available since SDL 3.2.0.
2109 */
2110#define SDL_min(x, y) (((x) < (y)) ? (x) : (y))
2111
2112/**
2113 * Return the greater of two values.
2114 *
2115 * This is a helper macro that might be more clear than writing out the
2116 * comparisons directly, and works with any type that can be compared with the
2117 * `>` operator. However, it double-evaluates both its parameters, so do not
2118 * use expressions with side-effects here.
2119 *
2120 * \param x the first value to compare.
2121 * \param y the second value to compare.
2122 * \returns the lesser of `x` and `y`.
2123 *
2124 * \threadsafety It is safe to call this macro from any thread.
2125 *
2126 * \since This macro is available since SDL 3.2.0.
2127 */
2128#define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
2129
2130/**
2131 * Return a value clamped to a range.
2132 *
2133 * If `x` is outside the range a values between `a` and `b`, the returned
2134 * value will be `a` or `b` as appropriate. Otherwise, `x` is returned.
2135 *
2136 * This macro will produce incorrect results if `b` is less than `a`.
2137 *
2138 * This is a helper macro that might be more clear than writing out the
2139 * comparisons directly, and works with any type that can be compared with the
2140 * `<` and `>` operators. However, it double-evaluates all its parameters, so
2141 * do not use expressions with side-effects here.
2142 *
2143 * \param x the value to compare.
2144 * \param a the low end value.
2145 * \param b the high end value.
2146 * \returns x, clamped between a and b.
2147 *
2148 * \threadsafety It is safe to call this macro from any thread.
2149 *
2150 * \since This macro is available since SDL 3.2.0.
2151 */
2152#define SDL_clamp(x, a, b) (((x) < (a)) ? (a) : (((x) > (b)) ? (b) : (x)))
2153
2154/**
2155 * Query if a character is alphabetic (a letter).
2156 *
2157 * **WARNING**: Regardless of system locale, this will only treat ASCII values
2158 * for English 'a-z' and 'A-Z' as true.
2159 *
2160 * \param x character value to check.
2161 * \returns non-zero if x falls within the character class, zero otherwise.
2162 *
2163 * \threadsafety It is safe to call this function from any thread.
2164 *
2165 * \since This function is available since SDL 3.2.0.
2166 */
2167extern SDL_DECLSPEC int SDLCALL SDL_isalpha(int x);
2168
2169/**
2170 * Query if a character is alphabetic (a letter) or a number.
2171 *
2172 * **WARNING**: Regardless of system locale, this will only treat ASCII values
2173 * for English 'a-z', 'A-Z', and '0-9' as true.
2174 *
2175 * \param x character value to check.
2176 * \returns non-zero if x falls within the character class, zero otherwise.
2177 *
2178 * \threadsafety It is safe to call this function from any thread.
2179 *
2180 * \since This function is available since SDL 3.2.0.
2181 */
2182extern SDL_DECLSPEC int SDLCALL SDL_isalnum(int x);
2183
2184/**
2185 * Report if a character is blank (a space or tab).
2186 *
2187 * **WARNING**: Regardless of system locale, this will only treat ASCII values
2188 * 0x20 (space) or 0x9 (tab) as true.
2189 *
2190 * \param x character value to check.
2191 * \returns non-zero if x falls within the character class, zero otherwise.
2192 *
2193 * \threadsafety It is safe to call this function from any thread.
2194 *
2195 * \since This function is available since SDL 3.2.0.
2196 */
2197extern SDL_DECLSPEC int SDLCALL SDL_isblank(int x);
2198
2199/**
2200 * Report if a character is a control character.
2201 *
2202 * **WARNING**: Regardless of system locale, this will only treat ASCII values
2203 * 0 through 0x1F, and 0x7F, as true.
2204 *
2205 * \param x character value to check.
2206 * \returns non-zero if x falls within the character class, zero otherwise.
2207 *
2208 * \threadsafety It is safe to call this function from any thread.
2209 *
2210 * \since This function is available since SDL 3.2.0.
2211 */
2212extern SDL_DECLSPEC int SDLCALL SDL_iscntrl(int x);
2213
2214/**
2215 * Report if a character is a numeric digit.
2216 *
2217 * **WARNING**: Regardless of system locale, this will only treat ASCII values
2218 * '0' (0x30) through '9' (0x39), as true.
2219 *
2220 * \param x character value to check.
2221 * \returns non-zero if x falls within the character class, zero otherwise.
2222 *
2223 * \threadsafety It is safe to call this function from any thread.
2224 *
2225 * \since This function is available since SDL 3.2.0.
2226 */
2227extern SDL_DECLSPEC int SDLCALL SDL_isdigit(int x);
2228
2229/**
2230 * Report if a character is a hexadecimal digit.
2231 *
2232 * **WARNING**: Regardless of system locale, this will only treat ASCII values
2233 * 'A' through 'F', 'a' through 'f', and '0' through '9', as true.
2234 *
2235 * \param x character value to check.
2236 * \returns non-zero if x falls within the character class, zero otherwise.
2237 *
2238 * \threadsafety It is safe to call this function from any thread.
2239 *
2240 * \since This function is available since SDL 3.2.0.
2241 */
2242extern SDL_DECLSPEC int SDLCALL SDL_isxdigit(int x);
2243
2244/**
2245 * Report if a character is a punctuation mark.
2246 *
2247 * **WARNING**: Regardless of system locale, this is equivalent to
2248 * `((SDL_isgraph(x)) && (!SDL_isalnum(x)))`.
2249 *
2250 * \param x character value to check.
2251 * \returns non-zero if x falls within the character class, zero otherwise.
2252 *
2253 * \threadsafety It is safe to call this function from any thread.
2254 *
2255 * \since This function is available since SDL 3.2.0.
2256 *
2257 * \sa SDL_isgraph
2258 * \sa SDL_isalnum
2259 */
2260extern SDL_DECLSPEC int SDLCALL SDL_ispunct(int x);
2261
2262/**
2263 * Report if a character is whitespace.
2264 *
2265 * **WARNING**: Regardless of system locale, this will only treat the
2266 * following ASCII values as true:
2267 *
2268 * - space (0x20)
2269 * - tab (0x09)
2270 * - newline (0x0A)
2271 * - vertical tab (0x0B)
2272 * - form feed (0x0C)
2273 * - return (0x0D)
2274 *
2275 * \param x character value to check.
2276 * \returns non-zero if x falls within the character class, zero otherwise.
2277 *
2278 * \threadsafety It is safe to call this function from any thread.
2279 *
2280 * \since This function is available since SDL 3.2.0.
2281 */
2282extern SDL_DECLSPEC int SDLCALL SDL_isspace(int x);
2283
2284/**
2285 * Report if a character is upper case.
2286 *
2287 * **WARNING**: Regardless of system locale, this will only treat ASCII values
2288 * 'A' through 'Z' as true.
2289 *
2290 * \param x character value to check.
2291 * \returns non-zero if x falls within the character class, zero otherwise.
2292 *
2293 * \threadsafety It is safe to call this function from any thread.
2294 *
2295 * \since This function is available since SDL 3.2.0.
2296 */
2297extern SDL_DECLSPEC int SDLCALL SDL_isupper(int x);
2298
2299/**
2300 * Report if a character is lower case.
2301 *
2302 * **WARNING**: Regardless of system locale, this will only treat ASCII values
2303 * 'a' through 'z' as true.
2304 *
2305 * \param x character value to check.
2306 * \returns non-zero if x falls within the character class, zero otherwise.
2307 *
2308 * \threadsafety It is safe to call this function from any thread.
2309 *
2310 * \since This function is available since SDL 3.2.0.
2311 */
2312extern SDL_DECLSPEC int SDLCALL SDL_islower(int x);
2313
2314/**
2315 * Report if a character is "printable".
2316 *
2317 * Be advised that "printable" has a definition that goes back to text
2318 * terminals from the dawn of computing, making this a sort of special case
2319 * function that is not suitable for Unicode (or most any) text management.
2320 *
2321 * **WARNING**: Regardless of system locale, this will only treat ASCII values
2322 * ' ' (0x20) through '~' (0x7E) as true.
2323 *
2324 * \param x character value to check.
2325 * \returns non-zero if x falls within the character class, zero otherwise.
2326 *
2327 * \threadsafety It is safe to call this function from any thread.
2328 *
2329 * \since This function is available since SDL 3.2.0.
2330 */
2331extern SDL_DECLSPEC int SDLCALL SDL_isprint(int x);
2332
2333/**
2334 * Report if a character is any "printable" except space.
2335 *
2336 * Be advised that "printable" has a definition that goes back to text
2337 * terminals from the dawn of computing, making this a sort of special case
2338 * function that is not suitable for Unicode (or most any) text management.
2339 *
2340 * **WARNING**: Regardless of system locale, this is equivalent to
2341 * `(SDL_isprint(x)) && ((x) != ' ')`.
2342 *
2343 * \param x character value to check.
2344 * \returns non-zero if x falls within the character class, zero otherwise.
2345 *
2346 * \threadsafety It is safe to call this function from any thread.
2347 *
2348 * \since This function is available since SDL 3.2.0.
2349 *
2350 * \sa SDL_isprint
2351 */
2352extern SDL_DECLSPEC int SDLCALL SDL_isgraph(int x);
2353
2354/**
2355 * Convert low-ASCII English letters to uppercase.
2356 *
2357 * **WARNING**: Regardless of system locale, this will only convert ASCII
2358 * values 'a' through 'z' to uppercase.
2359 *
2360 * This function returns the uppercase equivalent of `x`. If a character
2361 * cannot be converted, or is already uppercase, this function returns `x`.
2362 *
2363 * \param x character value to check.
2364 * \returns capitalized version of x, or x if no conversion available.
2365 *
2366 * \threadsafety It is safe to call this function from any thread.
2367 *
2368 * \since This function is available since SDL 3.2.0.
2369 */
2370extern SDL_DECLSPEC int SDLCALL SDL_toupper(int x);
2371
2372/**
2373 * Convert low-ASCII English letters to lowercase.
2374 *
2375 * **WARNING**: Regardless of system locale, this will only convert ASCII
2376 * values 'A' through 'Z' to lowercase.
2377 *
2378 * This function returns the lowercase equivalent of `x`. If a character
2379 * cannot be converted, or is already lowercase, this function returns `x`.
2380 *
2381 * \param x character value to check.
2382 * \returns lowercase version of x, or x if no conversion available.
2383 *
2384 * \threadsafety It is safe to call this function from any thread.
2385 *
2386 * \since This function is available since SDL 3.2.0.
2387 */
2388extern SDL_DECLSPEC int SDLCALL SDL_tolower(int x);
2389
2390/**
2391 * Calculate a CRC-16 value.
2392 *
2393 * https://en.wikipedia.org/wiki/Cyclic_redundancy_check
2394 *
2395 * This function can be called multiple times, to stream data to be
2396 * checksummed in blocks. Each call must provide the previous CRC-16 return
2397 * value to be updated with the next block. The first call to this function
2398 * for a set of blocks should pass in a zero CRC value.
2399 *
2400 * \param crc the current checksum for this data set, or 0 for a new data set.
2401 * \param data a new block of data to add to the checksum.
2402 * \param len the size, in bytes, of the new block of data.
2403 * \returns a CRC-16 checksum value of all blocks in the data set.
2404 *
2405 * \threadsafety It is safe to call this function from any thread.
2406 *
2407 * \since This function is available since SDL 3.2.0.
2408 */
2409extern SDL_DECLSPEC Uint16 SDLCALL SDL_crc16(Uint16 crc, const void *data, size_t len);
2410
2411/**
2412 * Calculate a CRC-32 value.
2413 *
2414 * https://en.wikipedia.org/wiki/Cyclic_redundancy_check
2415 *
2416 * This function can be called multiple times, to stream data to be
2417 * checksummed in blocks. Each call must provide the previous CRC-32 return
2418 * value to be updated with the next block. The first call to this function
2419 * for a set of blocks should pass in a zero CRC value.
2420 *
2421 * \param crc the current checksum for this data set, or 0 for a new data set.
2422 * \param data a new block of data to add to the checksum.
2423 * \param len the size, in bytes, of the new block of data.
2424 * \returns a CRC-32 checksum value of all blocks in the data set.
2425 *
2426 * \threadsafety It is safe to call this function from any thread.
2427 *
2428 * \since This function is available since SDL 3.2.0.
2429 */
2430extern SDL_DECLSPEC Uint32 SDLCALL SDL_crc32(Uint32 crc, const void *data, size_t len);
2431
2432/**
2433 * Calculate a 32-bit MurmurHash3 value for a block of data.
2434 *
2435 * https://en.wikipedia.org/wiki/MurmurHash
2436 *
2437 * A seed may be specified, which changes the final results consistently, but
2438 * this does not work like SDL_crc16 and SDL_crc32: you can't feed a previous
2439 * result from this function back into itself as the next seed value to
2440 * calculate a hash in chunks; it won't produce the same hash as it would if
2441 * the same data was provided in a single call.
2442 *
2443 * If you aren't sure what to provide for a seed, zero is fine. Murmur3 is not
2444 * cryptographically secure, so it shouldn't be used for hashing top-secret
2445 * data.
2446 *
2447 * \param data the data to be hashed.
2448 * \param len the size of data, in bytes.
2449 * \param seed a value that alters the final hash value.
2450 * \returns a Murmur3 32-bit hash value.
2451 *
2452 * \threadsafety It is safe to call this function from any thread.
2453 *
2454 * \since This function is available since SDL 3.2.0.
2455 */
2456extern SDL_DECLSPEC Uint32 SDLCALL SDL_murmur3_32(const void *data, size_t len, Uint32 seed);
2457
2458/**
2459 * Copy non-overlapping memory.
2460 *
2461 * The memory regions must not overlap. If they do, use SDL_memmove() instead.
2462 *
2463 * \param dst The destination memory region. Must not be NULL, and must not
2464 * overlap with `src`.
2465 * \param src The source memory region. Must not be NULL, and must not overlap
2466 * with `dst`.
2467 * \param len The length in bytes of both `dst` and `src`.
2468 * \returns `dst`.
2469 *
2470 * \threadsafety It is safe to call this function from any thread.
2471 *
2472 * \since This function is available since SDL 3.2.0.
2473 *
2474 * \sa SDL_memmove
2475 */
2476extern SDL_DECLSPEC void * SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
2477
2478/* Take advantage of compiler optimizations for memcpy */
2479#ifndef SDL_SLOW_MEMCPY
2480#ifdef SDL_memcpy
2481#undef SDL_memcpy
2482#endif
2483#define SDL_memcpy memcpy
2484#endif
2485
2486
2487/**
2488 * A macro to copy memory between objects, with basic type checking.
2489 *
2490 * SDL_memcpy and SDL_memmove do not care where you copy memory to and from,
2491 * which can lead to bugs. This macro aims to avoid most of those bugs by
2492 * making sure that the source and destination are both pointers to objects
2493 * that are the same size. It does not check that the objects are the same
2494 * _type_, just that the copy will not overflow either object.
2495 *
2496 * The size check happens at compile time, and the compiler will throw an
2497 * error if the objects are different sizes.
2498 *
2499 * Generally this is intended to copy a single object, not an array.
2500 *
2501 * This macro looks like it double-evaluates its parameters, but the extras
2502 * them are in `sizeof` sections, which generate no code nor side-effects.
2503 *
2504 * \param dst a pointer to the destination object. Must not be NULL.
2505 * \param src a pointer to the source object. Must not be NULL.
2506 *
2507 * \threadsafety It is safe to call this function from any thread.
2508 *
2509 * \since This function is available since SDL 3.2.0.
2510 */
2511#define SDL_copyp(dst, src) \
2512 { SDL_COMPILE_TIME_ASSERT(SDL_copyp, sizeof (*(dst)) == sizeof (*(src))); } \
2513 SDL_memcpy((dst), (src), sizeof(*(src)))
2514
2515/**
2516 * Copy memory ranges that might overlap.
2517 *
2518 * It is okay for the memory regions to overlap. If you are confident that the
2519 * regions never overlap, using SDL_memcpy() may improve performance.
2520 *
2521 * \param dst The destination memory region. Must not be NULL.
2522 * \param src The source memory region. Must not be NULL.
2523 * \param len The length in bytes of both `dst` and `src`.
2524 * \returns `dst`.
2525 *
2526 * \threadsafety It is safe to call this function from any thread.
2527 *
2528 * \since This function is available since SDL 3.2.0.
2529 *
2530 * \sa SDL_memcpy
2531 */
2532extern SDL_DECLSPEC void * SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
2533
2534/* Take advantage of compiler optimizations for memmove */
2535#ifndef SDL_SLOW_MEMMOVE
2536#ifdef SDL_memmove
2537#undef SDL_memmove
2538#endif
2539#define SDL_memmove memmove
2540#endif
2541
2542/**
2543 * Initialize all bytes of buffer of memory to a specific value.
2544 *
2545 * This function will set `len` bytes, pointed to by `dst`, to the value
2546 * specified in `c`.
2547 *
2548 * Despite `c` being an `int` instead of a `char`, this only operates on
2549 * bytes; `c` must be a value between 0 and 255, inclusive.
2550 *
2551 * \param dst the destination memory region. Must not be NULL.
2552 * \param c the byte value to set.
2553 * \param len the length, in bytes, to set in `dst`.
2554 * \returns `dst`.
2555 *
2556 * \threadsafety It is safe to call this function from any thread.
2557 *
2558 * \since This function is available since SDL 3.2.0.
2559 */
2560extern SDL_DECLSPEC void * SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);
2561
2562/**
2563 * Initialize all 32-bit words of buffer of memory to a specific value.
2564 *
2565 * This function will set a buffer of `dwords` Uint32 values, pointed to by
2566 * `dst`, to the value specified in `val`.
2567 *
2568 * Unlike SDL_memset, this sets 32-bit values, not bytes, so it's not limited
2569 * to a range of 0-255.
2570 *
2571 * \param dst the destination memory region. Must not be NULL.
2572 * \param val the Uint32 value to set.
2573 * \param dwords the number of Uint32 values to set in `dst`.
2574 * \returns `dst`.
2575 *
2576 * \threadsafety It is safe to call this function from any thread.
2577 *
2578 * \since This function is available since SDL 3.2.0.
2579 */
2580extern SDL_DECLSPEC void * SDLCALL SDL_memset4(void *dst, Uint32 val, size_t dwords);
2581
2582/* Take advantage of compiler optimizations for memset */
2583#ifndef SDL_SLOW_MEMSET
2584#ifdef SDL_memset
2585#undef SDL_memset
2586#endif
2587#define SDL_memset memset
2588#endif
2589
2590/**
2591 * Clear an object's memory to zero.
2592 *
2593 * This is wrapper over SDL_memset that handles calculating the object size,
2594 * so there's no chance of copy/paste errors, and the code is cleaner.
2595 *
2596 * This requires an object, not a pointer to an object, nor an array.
2597 *
2598 * \param x the object to clear.
2599 *
2600 * \threadsafety It is safe to call this macro from any thread.
2601 *
2602 * \since This macro is available since SDL 3.2.0.
2603 *
2604 * \sa SDL_zerop
2605 * \sa SDL_zeroa
2606 */
2607#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
2608
2609/**
2610 * Clear an object's memory to zero, using a pointer.
2611 *
2612 * This is wrapper over SDL_memset that handles calculating the object size,
2613 * so there's no chance of copy/paste errors, and the code is cleaner.
2614 *
2615 * This requires a pointer to an object, not an object itself, nor an array.
2616 *
2617 * \param x a pointer to the object to clear.
2618 *
2619 * \threadsafety It is safe to call this macro from any thread.
2620 *
2621 * \since This macro is available since SDL 3.2.0.
2622 *
2623 * \sa SDL_zero
2624 * \sa SDL_zeroa
2625 */
2626#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
2627
2628/**
2629 * Clear an array's memory to zero.
2630 *
2631 * This is wrapper over SDL_memset that handles calculating the array size, so
2632 * there's no chance of copy/paste errors, and the code is cleaner.
2633 *
2634 * This requires an array, not an object, nor a pointer to an object.
2635 *
2636 * \param x an array to clear.
2637 *
2638 * \threadsafety It is safe to call this macro from any thread.
2639 *
2640 * \since This macro is available since SDL 3.2.0.
2641 *
2642 * \sa SDL_zero
2643 * \sa SDL_zeroa
2644 */
2645#define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
2646
2647
2648/**
2649 * Compare two buffers of memory.
2650 *
2651 * \param s1 the first buffer to compare. NULL is not permitted!
2652 * \param s2 the second buffer to compare. NULL is not permitted!
2653 * \param len the number of bytes to compare between the buffers.
2654 * \returns less than zero if s1 is "less than" s2, greater than zero if s1 is
2655 * "greater than" s2, and zero if the buffers match exactly for `len`
2656 * bytes.
2657 *
2658 * \threadsafety It is safe to call this function from any thread.
2659 *
2660 * \since This function is available since SDL 3.2.0.
2661 */
2662extern SDL_DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
2663
2664/**
2665 * This works exactly like wcslen() but doesn't require access to a C runtime.
2666 *
2667 * Counts the number of wchar_t values in `wstr`, excluding the null
2668 * terminator.
2669 *
2670 * Like SDL_strlen only counts bytes and not codepoints in a UTF-8 string,
2671 * this counts wchar_t values in a string, even if the string's encoding is of
2672 * variable width, like UTF-16.
2673 *
2674 * Also be aware that wchar_t is different sizes on different platforms (4
2675 * bytes on Linux, 2 on Windows, etc).
2676 *
2677 * \param wstr The null-terminated wide string to read. Must not be NULL.
2678 * \returns the length (in wchar_t values, excluding the null terminator) of
2679 * `wstr`.
2680 *
2681 * \threadsafety It is safe to call this function from any thread.
2682 *
2683 * \since This function is available since SDL 3.2.0.
2684 *
2685 * \sa SDL_wcsnlen
2686 * \sa SDL_utf8strlen
2687 * \sa SDL_utf8strnlen
2688 */
2689extern SDL_DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
2690
2691/**
2692 * This works exactly like wcsnlen() but doesn't require access to a C
2693 * runtime.
2694 *
2695 * Counts up to a maximum of `maxlen` wchar_t values in `wstr`, excluding the
2696 * null terminator.
2697 *
2698 * Like SDL_strnlen only counts bytes and not codepoints in a UTF-8 string,
2699 * this counts wchar_t values in a string, even if the string's encoding is of
2700 * variable width, like UTF-16.
2701 *
2702 * Also be aware that wchar_t is different sizes on different platforms (4
2703 * bytes on Linux, 2 on Windows, etc).
2704 *
2705 * Also, `maxlen` is a count of wide characters, not bytes!
2706 *
2707 * \param wstr The null-terminated wide string to read. Must not be NULL.
2708 * \param maxlen The maximum amount of wide characters to count.
2709 * \returns the length (in wide characters, excluding the null terminator) of
2710 * `wstr` but never more than `maxlen`.
2711 *
2712 * \threadsafety It is safe to call this function from any thread.
2713 *
2714 * \since This function is available since SDL 3.2.0.
2715 *
2716 * \sa SDL_wcslen
2717 * \sa SDL_utf8strlen
2718 * \sa SDL_utf8strnlen
2719 */
2720extern SDL_DECLSPEC size_t SDLCALL SDL_wcsnlen(const wchar_t *wstr, size_t maxlen);
2721
2722/**
2723 * Copy a wide string.
2724 *
2725 * This function copies `maxlen` - 1 wide characters from `src` to `dst`, then
2726 * appends a null terminator.
2727 *
2728 * `src` and `dst` must not overlap.
2729 *
2730 * If `maxlen` is 0, no wide characters are copied and no null terminator is
2731 * written.
2732 *
2733 * \param dst The destination buffer. Must not be NULL, and must not overlap
2734 * with `src`.
2735 * \param src The null-terminated wide string to copy. Must not be NULL, and
2736 * must not overlap with `dst`.
2737 * \param maxlen The length (in wide characters) of the destination buffer.
2738 * \returns the length (in wide characters, excluding the null terminator) of
2739 * `src`.
2740 *
2741 * \threadsafety It is safe to call this function from any thread.
2742 *
2743 * \since This function is available since SDL 3.2.0.
2744 *
2745 * \sa SDL_wcslcat
2746 */
2747extern SDL_DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
2748
2749/**
2750 * Concatenate wide strings.
2751 *
2752 * This function appends up to `maxlen` - SDL_wcslen(dst) - 1 wide characters
2753 * from `src` to the end of the wide string in `dst`, then appends a null
2754 * terminator.
2755 *
2756 * `src` and `dst` must not overlap.
2757 *
2758 * If `maxlen` - SDL_wcslen(dst) - 1 is less than or equal to 0, then `dst` is
2759 * unmodified.
2760 *
2761 * \param dst The destination buffer already containing the first
2762 * null-terminated wide string. Must not be NULL and must not
2763 * overlap with `src`.
2764 * \param src The second null-terminated wide string. Must not be NULL, and
2765 * must not overlap with `dst`.
2766 * \param maxlen The length (in wide characters) of the destination buffer.
2767 * \returns the length (in wide characters, excluding the null terminator) of
2768 * the string in `dst` plus the length of `src`.
2769 *
2770 * \threadsafety It is safe to call this function from any thread.
2771 *
2772 * \since This function is available since SDL 3.2.0.
2773 *
2774 * \sa SDL_wcslcpy
2775 */
2776extern SDL_DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
2777
2778/**
2779 * Allocate a copy of a wide string.
2780 *
2781 * This allocates enough space for a null-terminated copy of `wstr`, using
2782 * SDL_malloc, and then makes a copy of the string into this space.
2783 *
2784 * The returned string is owned by the caller, and should be passed to
2785 * SDL_free when no longer needed.
2786 *
2787 * \param wstr the string to copy.
2788 * \returns a pointer to the newly-allocated wide string.
2789 *
2790 * \threadsafety It is safe to call this function from any thread.
2791 *
2792 * \since This function is available since SDL 3.2.0.
2793 */
2794extern SDL_DECLSPEC wchar_t * SDLCALL SDL_wcsdup(const wchar_t *wstr);
2795
2796/**
2797 * Search a wide string for the first instance of a specific substring.
2798 *
2799 * The search ends once it finds the requested substring, or a null terminator
2800 * byte to end the string.
2801 *
2802 * Note that this looks for strings of _wide characters_, not _codepoints_, so
2803 * it's legal to search for malformed and incomplete UTF-16 sequences.
2804 *
2805 * \param haystack the wide string to search. Must not be NULL.
2806 * \param needle the wide string to search for. Must not be NULL.
2807 * \returns a pointer to the first instance of `needle` in the string, or NULL
2808 * if not found.
2809 *
2810 * \threadsafety It is safe to call this function from any thread.
2811 *
2812 * \since This function is available since SDL 3.2.0.
2813 */
2814extern SDL_DECLSPEC wchar_t * SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
2815
2816/**
2817 * Search a wide string, up to n wide chars, for the first instance of a
2818 * specific substring.
2819 *
2820 * The search ends once it finds the requested substring, or a null terminator
2821 * value to end the string, or `maxlen` wide character have been examined. It
2822 * is possible to use this function on a wide string without a null
2823 * terminator.
2824 *
2825 * Note that this looks for strings of _wide characters_, not _codepoints_, so
2826 * it's legal to search for malformed and incomplete UTF-16 sequences.
2827 *
2828 * \param haystack the wide string to search. Must not be NULL.
2829 * \param needle the wide string to search for. Must not be NULL.
2830 * \param maxlen the maximum number of wide characters to search in
2831 * `haystack`.
2832 * \returns a pointer to the first instance of `needle` in the string, or NULL
2833 * if not found.
2834 *
2835 * \threadsafety It is safe to call this function from any thread.
2836 *
2837 * \since This function is available since SDL 3.2.0.
2838 */
2839extern SDL_DECLSPEC wchar_t * SDLCALL SDL_wcsnstr(const wchar_t *haystack, const wchar_t *needle, size_t maxlen);
2840
2841/**
2842 * Compare two null-terminated wide strings.
2843 *
2844 * This only compares wchar_t values until it hits a null-terminating
2845 * character; it does not care if the string is well-formed UTF-16 (or UTF-32,
2846 * depending on your platform's wchar_t size), or uses valid Unicode values.
2847 *
2848 * \param str1 the first string to compare. NULL is not permitted!
2849 * \param str2 the second string to compare. NULL is not permitted!
2850 * \returns less than zero if str1 is "less than" str2, greater than zero if
2851 * str1 is "greater than" str2, and zero if the strings match
2852 * exactly.
2853 *
2854 * \threadsafety It is safe to call this function from any thread.
2855 *
2856 * \since This function is available since SDL 3.2.0.
2857 */
2858extern SDL_DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
2859
2860/**
2861 * Compare two wide strings up to a number of wchar_t values.
2862 *
2863 * This only compares wchar_t values; it does not care if the string is
2864 * well-formed UTF-16 (or UTF-32, depending on your platform's wchar_t size),
2865 * or uses valid Unicode values.
2866 *
2867 * Note that while this function is intended to be used with UTF-16 (or
2868 * UTF-32, depending on your platform's definition of wchar_t), it is
2869 * comparing raw wchar_t values and not Unicode codepoints: `maxlen` specifies
2870 * a wchar_t limit! If the limit lands in the middle of a multi-wchar UTF-16
2871 * sequence, it will only compare a portion of the final character.
2872 *
2873 * `maxlen` specifies a maximum number of wchar_t to compare; if the strings
2874 * match to this number of wide chars (or both have matched to a
2875 * null-terminator character before this count), they will be considered
2876 * equal.
2877 *
2878 * \param str1 the first string to compare. NULL is not permitted!
2879 * \param str2 the second string to compare. NULL is not permitted!
2880 * \param maxlen the maximum number of wchar_t to compare.
2881 * \returns less than zero if str1 is "less than" str2, greater than zero if
2882 * str1 is "greater than" str2, and zero if the strings match
2883 * exactly.
2884 *
2885 * \threadsafety It is safe to call this function from any thread.
2886 *
2887 * \since This function is available since SDL 3.2.0.
2888 */
2889extern SDL_DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
2890
2891/**
2892 * Compare two null-terminated wide strings, case-insensitively.
2893 *
2894 * This will work with Unicode strings, using a technique called
2895 * "case-folding" to handle the vast majority of case-sensitive human
2896 * languages regardless of system locale. It can deal with expanding values: a
2897 * German Eszett character can compare against two ASCII 's' chars and be
2898 * considered a match, for example. A notable exception: it does not handle
2899 * the Turkish 'i' character; human language is complicated!
2900 *
2901 * Depending on your platform, "wchar_t" might be 2 bytes, and expected to be
2902 * UTF-16 encoded (like Windows), or 4 bytes in UTF-32 format. Since this
2903 * handles Unicode, it expects the string to be well-formed and not a
2904 * null-terminated string of arbitrary bytes. Characters that are not valid
2905 * UTF-16 (or UTF-32) are treated as Unicode character U+FFFD (REPLACEMENT
2906 * CHARACTER), which is to say two strings of random bits may turn out to
2907 * match if they convert to the same amount of replacement characters.
2908 *
2909 * \param str1 the first string to compare. NULL is not permitted!
2910 * \param str2 the second string to compare. NULL is not permitted!
2911 * \returns less than zero if str1 is "less than" str2, greater than zero if
2912 * str1 is "greater than" str2, and zero if the strings match
2913 * exactly.
2914 *
2915 * \threadsafety It is safe to call this function from any thread.
2916 *
2917 * \since This function is available since SDL 3.2.0.
2918 */
2919extern SDL_DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2);
2920
2921/**
2922 * Compare two wide strings, case-insensitively, up to a number of wchar_t.
2923 *
2924 * This will work with Unicode strings, using a technique called
2925 * "case-folding" to handle the vast majority of case-sensitive human
2926 * languages regardless of system locale. It can deal with expanding values: a
2927 * German Eszett character can compare against two ASCII 's' chars and be
2928 * considered a match, for example. A notable exception: it does not handle
2929 * the Turkish 'i' character; human language is complicated!
2930 *
2931 * Depending on your platform, "wchar_t" might be 2 bytes, and expected to be
2932 * UTF-16 encoded (like Windows), or 4 bytes in UTF-32 format. Since this
2933 * handles Unicode, it expects the string to be well-formed and not a
2934 * null-terminated string of arbitrary bytes. Characters that are not valid
2935 * UTF-16 (or UTF-32) are treated as Unicode character U+FFFD (REPLACEMENT
2936 * CHARACTER), which is to say two strings of random bits may turn out to
2937 * match if they convert to the same amount of replacement characters.
2938 *
2939 * Note that while this function might deal with variable-sized characters,
2940 * `maxlen` specifies a _wchar_ limit! If the limit lands in the middle of a
2941 * multi-byte UTF-16 sequence, it may convert a portion of the final character
2942 * to one or more Unicode character U+FFFD (REPLACEMENT CHARACTER) so as not
2943 * to overflow a buffer.
2944 *
2945 * `maxlen` specifies a maximum number of wchar_t values to compare; if the
2946 * strings match to this number of wchar_t (or both have matched to a
2947 * null-terminator character before this number of bytes), they will be
2948 * considered equal.
2949 *
2950 * \param str1 the first string to compare. NULL is not permitted!
2951 * \param str2 the second string to compare. NULL is not permitted!
2952 * \param maxlen the maximum number of wchar_t values to compare.
2953 * \returns less than zero if str1 is "less than" str2, greater than zero if
2954 * str1 is "greater than" str2, and zero if the strings match
2955 * exactly.
2956 *
2957 * \threadsafety It is safe to call this function from any thread.
2958 *
2959 * \since This function is available since SDL 3.2.0.
2960 */
2961extern SDL_DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
2962
2963/**
2964 * Parse a `long` from a wide string.
2965 *
2966 * If `str` starts with whitespace, then those whitespace characters are
2967 * skipped before attempting to parse the number.
2968 *
2969 * If the parsed number does not fit inside a `long`, the result is clamped to
2970 * the minimum and maximum representable `long` values.
2971 *
2972 * \param str The null-terminated wide string to read. Must not be NULL.
2973 * \param endp If not NULL, the address of the first invalid wide character
2974 * (i.e. the next character after the parsed number) will be
2975 * written to this pointer.
2976 * \param base The base of the integer to read. Supported values are 0 and 2
2977 * to 36 inclusive. If 0, the base will be inferred from the
2978 * number's prefix (0x for hexadecimal, 0 for octal, decimal
2979 * otherwise).
2980 * \returns the parsed `long`, or 0 if no number could be parsed.
2981 *
2982 * \threadsafety It is safe to call this function from any thread.
2983 *
2984 * \since This function is available since SDL 3.2.0.
2985 *
2986 * \sa SDL_strtol
2987 */
2988extern SDL_DECLSPEC long SDLCALL SDL_wcstol(const wchar_t *str, wchar_t **endp, int base);
2989
2990/**
2991 * This works exactly like strlen() but doesn't require access to a C runtime.
2992 *
2993 * Counts the bytes in `str`, excluding the null terminator.
2994 *
2995 * If you need the length of a UTF-8 string, consider using SDL_utf8strlen().
2996 *
2997 * \param str The null-terminated string to read. Must not be NULL.
2998 * \returns the length (in bytes, excluding the null terminator) of `src`.
2999 *
3000 * \threadsafety It is safe to call this function from any thread.
3001 *
3002 * \since This function is available since SDL 3.2.0.
3003 *
3004 * \sa SDL_strnlen
3005 * \sa SDL_utf8strlen
3006 * \sa SDL_utf8strnlen
3007 */
3008extern SDL_DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
3009
3010/**
3011 * This works exactly like strnlen() but doesn't require access to a C
3012 * runtime.
3013 *
3014 * Counts up to a maximum of `maxlen` bytes in `str`, excluding the null
3015 * terminator.
3016 *
3017 * If you need the length of a UTF-8 string, consider using SDL_utf8strnlen().
3018 *
3019 * \param str The null-terminated string to read. Must not be NULL.
3020 * \param maxlen The maximum amount of bytes to count.
3021 * \returns the length (in bytes, excluding the null terminator) of `src` but
3022 * never more than `maxlen`.
3023 *
3024 * \threadsafety It is safe to call this function from any thread.
3025 *
3026 * \since This function is available since SDL 3.2.0.
3027 *
3028 * \sa SDL_strlen
3029 * \sa SDL_utf8strlen
3030 * \sa SDL_utf8strnlen
3031 */
3032extern SDL_DECLSPEC size_t SDLCALL SDL_strnlen(const char *str, size_t maxlen);
3033
3034/**
3035 * Copy a string.
3036 *
3037 * This function copies up to `maxlen` - 1 characters from `src` to `dst`,
3038 * then appends a null terminator.
3039 *
3040 * If `maxlen` is 0, no characters are copied and no null terminator is
3041 * written.
3042 *
3043 * If you want to copy an UTF-8 string but need to ensure that multi-byte
3044 * sequences are not truncated, consider using SDL_utf8strlcpy().
3045 *
3046 * \param dst The destination buffer. Must not be NULL, and must not overlap
3047 * with `src`.
3048 * \param src The null-terminated string to copy. Must not be NULL, and must
3049 * not overlap with `dst`.
3050 * \param maxlen The length (in characters) of the destination buffer.
3051 * \returns the length (in characters, excluding the null terminator) of
3052 * `src`.
3053 *
3054 * \threadsafety It is safe to call this function from any thread.
3055 *
3056 * \since This function is available since SDL 3.2.0.
3057 *
3058 * \sa SDL_strlcat
3059 * \sa SDL_utf8strlcpy
3060 */
3061extern SDL_DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
3062
3063/**
3064 * Copy an UTF-8 string.
3065 *
3066 * This function copies up to `dst_bytes` - 1 bytes from `src` to `dst` while
3067 * also ensuring that the string written to `dst` does not end in a truncated
3068 * multi-byte sequence. Finally, it appends a null terminator.
3069 *
3070 * `src` and `dst` must not overlap.
3071 *
3072 * Note that unlike SDL_strlcpy(), this function returns the number of bytes
3073 * written, not the length of `src`.
3074 *
3075 * \param dst The destination buffer. Must not be NULL, and must not overlap
3076 * with `src`.
3077 * \param src The null-terminated UTF-8 string to copy. Must not be NULL, and
3078 * must not overlap with `dst`.
3079 * \param dst_bytes The length (in bytes) of the destination buffer. Must not
3080 * be 0.
3081 * \returns the number of bytes written, excluding the null terminator.
3082 *
3083 * \threadsafety It is safe to call this function from any thread.
3084 *
3085 * \since This function is available since SDL 3.2.0.
3086 *
3087 * \sa SDL_strlcpy
3088 */
3089extern SDL_DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes);
3090
3091/**
3092 * Concatenate strings.
3093 *
3094 * This function appends up to `maxlen` - SDL_strlen(dst) - 1 characters from
3095 * `src` to the end of the string in `dst`, then appends a null terminator.
3096 *
3097 * `src` and `dst` must not overlap.
3098 *
3099 * If `maxlen` - SDL_strlen(dst) - 1 is less than or equal to 0, then `dst` is
3100 * unmodified.
3101 *
3102 * \param dst The destination buffer already containing the first
3103 * null-terminated string. Must not be NULL and must not overlap
3104 * with `src`.
3105 * \param src The second null-terminated string. Must not be NULL, and must
3106 * not overlap with `dst`.
3107 * \param maxlen The length (in characters) of the destination buffer.
3108 * \returns the length (in characters, excluding the null terminator) of the
3109 * string in `dst` plus the length of `src`.
3110 *
3111 * \threadsafety It is safe to call this function from any thread.
3112 *
3113 * \since This function is available since SDL 3.2.0.
3114 *
3115 * \sa SDL_strlcpy
3116 */
3117extern SDL_DECLSPEC size_t SDLCALL SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
3118
3119/**
3120 * Allocate a copy of a string.
3121 *
3122 * This allocates enough space for a null-terminated copy of `str`, using
3123 * SDL_malloc, and then makes a copy of the string into this space.
3124 *
3125 * The returned string is owned by the caller, and should be passed to
3126 * SDL_free when no longer needed.
3127 *
3128 * \param str the string to copy.
3129 * \returns a pointer to the newly-allocated string.
3130 *
3131 * \threadsafety It is safe to call this function from any thread.
3132 *
3133 * \since This function is available since SDL 3.2.0.
3134 */
3135extern SDL_DECLSPEC SDL_MALLOC char * SDLCALL SDL_strdup(const char *str);
3136
3137/**
3138 * Allocate a copy of a string, up to n characters.
3139 *
3140 * This allocates enough space for a null-terminated copy of `str`, up to
3141 * `maxlen` bytes, using SDL_malloc, and then makes a copy of the string into
3142 * this space.
3143 *
3144 * If the string is longer than `maxlen` bytes, the returned string will be
3145 * `maxlen` bytes long, plus a null-terminator character that isn't included
3146 * in the count.
3147 *
3148 * The returned string is owned by the caller, and should be passed to
3149 * SDL_free when no longer needed.
3150 *
3151 * \param str the string to copy.
3152 * \param maxlen the maximum length of the copied string, not counting the
3153 * null-terminator character.
3154 * \returns a pointer to the newly-allocated string.
3155 *
3156 * \threadsafety It is safe to call this function from any thread.
3157 *
3158 * \since This function is available since SDL 3.2.0.
3159 */
3160extern SDL_DECLSPEC SDL_MALLOC char * SDLCALL SDL_strndup(const char *str, size_t maxlen);
3161
3162/**
3163 * Reverse a string's contents.
3164 *
3165 * This reverses a null-terminated string in-place. Only the content of the
3166 * string is reversed; the null-terminator character remains at the end of the
3167 * reversed string.
3168 *
3169 * **WARNING**: This function reverses the _bytes_ of the string, not the
3170 * codepoints. If `str` is a UTF-8 string with Unicode codepoints > 127, this
3171 * will ruin the string data. You should only use this function on strings
3172 * that are completely comprised of low ASCII characters.
3173 *
3174 * \param str the string to reverse.
3175 * \returns `str`.
3176 *
3177 * \threadsafety It is safe to call this function from any thread.
3178 *
3179 * \since This function is available since SDL 3.2.0.
3180 */
3181extern SDL_DECLSPEC char * SDLCALL SDL_strrev(char *str);
3182
3183/**
3184 * Convert a string to uppercase.
3185 *
3186 * **WARNING**: Regardless of system locale, this will only convert ASCII
3187 * values 'A' through 'Z' to uppercase.
3188 *
3189 * This function operates on a null-terminated string of bytes--even if it is
3190 * malformed UTF-8!--and converts ASCII characters 'a' through 'z' to their
3191 * uppercase equivalents in-place, returning the original `str` pointer.
3192 *
3193 * \param str the string to convert in-place. Can not be NULL.
3194 * \returns the `str` pointer passed into this function.
3195 *
3196 * \threadsafety It is safe to call this function from any thread.
3197 *
3198 * \since This function is available since SDL 3.2.0.
3199 *
3200 * \sa SDL_strlwr
3201 */
3202extern SDL_DECLSPEC char * SDLCALL SDL_strupr(char *str);
3203
3204/**
3205 * Convert a string to lowercase.
3206 *
3207 * **WARNING**: Regardless of system locale, this will only convert ASCII
3208 * values 'A' through 'Z' to lowercase.
3209 *
3210 * This function operates on a null-terminated string of bytes--even if it is
3211 * malformed UTF-8!--and converts ASCII characters 'A' through 'Z' to their
3212 * lowercase equivalents in-place, returning the original `str` pointer.
3213 *
3214 * \param str the string to convert in-place. Can not be NULL.
3215 * \returns the `str` pointer passed into this function.
3216 *
3217 * \threadsafety It is safe to call this function from any thread.
3218 *
3219 * \since This function is available since SDL 3.2.0.
3220 *
3221 * \sa SDL_strupr
3222 */
3223extern SDL_DECLSPEC char * SDLCALL SDL_strlwr(char *str);
3224
3225/**
3226 * Search a string for the first instance of a specific byte.
3227 *
3228 * The search ends once it finds the requested byte value, or a null
3229 * terminator byte to end the string.
3230 *
3231 * Note that this looks for _bytes_, not _characters_, so you cannot match
3232 * against a Unicode codepoint > 255, regardless of character encoding.
3233 *
3234 * \param str the string to search. Must not be NULL.
3235 * \param c the byte value to search for.
3236 * \returns a pointer to the first instance of `c` in the string, or NULL if
3237 * not found.
3238 *
3239 * \threadsafety It is safe to call this function from any thread.
3240 *
3241 * \since This function is available since SDL 3.2.0.
3242 */
3243extern SDL_DECLSPEC char * SDLCALL SDL_strchr(const char *str, int c);
3244
3245/**
3246 * Search a string for the last instance of a specific byte.
3247 *
3248 * The search must go until it finds a null terminator byte to end the string.
3249 *
3250 * Note that this looks for _bytes_, not _characters_, so you cannot match
3251 * against a Unicode codepoint > 255, regardless of character encoding.
3252 *
3253 * \param str the string to search. Must not be NULL.
3254 * \param c the byte value to search for.
3255 * \returns a pointer to the last instance of `c` in the string, or NULL if
3256 * not found.
3257 *
3258 * \threadsafety It is safe to call this function from any thread.
3259 *
3260 * \since This function is available since SDL 3.2.0.
3261 */
3262extern SDL_DECLSPEC char * SDLCALL SDL_strrchr(const char *str, int c);
3263
3264/**
3265 * Search a string for the first instance of a specific substring.
3266 *
3267 * The search ends once it finds the requested substring, or a null terminator
3268 * byte to end the string.
3269 *
3270 * Note that this looks for strings of _bytes_, not _characters_, so it's
3271 * legal to search for malformed and incomplete UTF-8 sequences.
3272 *
3273 * \param haystack the string to search. Must not be NULL.
3274 * \param needle the string to search for. Must not be NULL.
3275 * \returns a pointer to the first instance of `needle` in the string, or NULL
3276 * if not found.
3277 *
3278 * \threadsafety It is safe to call this function from any thread.
3279 *
3280 * \since This function is available since SDL 3.2.0.
3281 */
3282extern SDL_DECLSPEC char * SDLCALL SDL_strstr(const char *haystack, const char *needle);
3283
3284/**
3285 * Search a string, up to n bytes, for the first instance of a specific
3286 * substring.
3287 *
3288 * The search ends once it finds the requested substring, or a null terminator
3289 * byte to end the string, or `maxlen` bytes have been examined. It is
3290 * possible to use this function on a string without a null terminator.
3291 *
3292 * Note that this looks for strings of _bytes_, not _characters_, so it's
3293 * legal to search for malformed and incomplete UTF-8 sequences.
3294 *
3295 * \param haystack the string to search. Must not be NULL.
3296 * \param needle the string to search for. Must not be NULL.
3297 * \param maxlen the maximum number of bytes to search in `haystack`.
3298 * \returns a pointer to the first instance of `needle` in the string, or NULL
3299 * if not found.
3300 *
3301 * \threadsafety It is safe to call this function from any thread.
3302 *
3303 * \since This function is available since SDL 3.2.0.
3304 */
3305extern SDL_DECLSPEC char * SDLCALL SDL_strnstr(const char *haystack, const char *needle, size_t maxlen);
3306
3307/**
3308 * Search a UTF-8 string for the first instance of a specific substring,
3309 * case-insensitively.
3310 *
3311 * This will work with Unicode strings, using a technique called
3312 * "case-folding" to handle the vast majority of case-sensitive human
3313 * languages regardless of system locale. It can deal with expanding values: a
3314 * German Eszett character can compare against two ASCII 's' chars and be
3315 * considered a match, for example. A notable exception: it does not handle
3316 * the Turkish 'i' character; human language is complicated!
3317 *
3318 * Since this handles Unicode, it expects the strings to be well-formed UTF-8
3319 * and not a null-terminated string of arbitrary bytes. Bytes that are not
3320 * valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT
3321 * CHARACTER), which is to say two strings of random bits may turn out to
3322 * match if they convert to the same amount of replacement characters.
3323 *
3324 * \param haystack the string to search. Must not be NULL.
3325 * \param needle the string to search for. Must not be NULL.
3326 * \returns a pointer to the first instance of `needle` in the string, or NULL
3327 * if not found.
3328 *
3329 * \threadsafety It is safe to call this function from any thread.
3330 *
3331 * \since This function is available since SDL 3.2.0.
3332 */
3333extern SDL_DECLSPEC char * SDLCALL SDL_strcasestr(const char *haystack, const char *needle);
3334
3335/**
3336 * This works exactly like strtok_r() but doesn't require access to a C
3337 * runtime.
3338 *
3339 * Break a string up into a series of tokens.
3340 *
3341 * To start tokenizing a new string, `str` should be the non-NULL address of
3342 * the string to start tokenizing. Future calls to get the next token from the
3343 * same string should specify a NULL.
3344 *
3345 * Note that this function will overwrite pieces of `str` with null chars to
3346 * split it into tokens. This function cannot be used with const/read-only
3347 * strings!
3348 *
3349 * `saveptr` just needs to point to a `char *` that can be overwritten; SDL
3350 * will use this to save tokenizing state between calls. It is initialized if
3351 * `str` is non-NULL, and used to resume tokenizing when `str` is NULL.
3352 *
3353 * \param str the string to tokenize, or NULL to continue tokenizing.
3354 * \param delim the delimiter string that separates tokens.
3355 * \param saveptr pointer to a char *, used for ongoing state.
3356 * \returns A pointer to the next token, or NULL if no tokens remain.
3357 *
3358 * \threadsafety It is safe to call this function from any thread.
3359 *
3360 * \since This function is available since SDL 3.2.0.
3361 */
3362extern SDL_DECLSPEC char * SDLCALL SDL_strtok_r(char *str, const char *delim, char **saveptr);
3363
3364/**
3365 * Count the number of codepoints in a UTF-8 string.
3366 *
3367 * Counts the _codepoints_, not _bytes_, in `str`, excluding the null
3368 * terminator.
3369 *
3370 * If you need to count the bytes in a string instead, consider using
3371 * SDL_strlen().
3372 *
3373 * Since this handles Unicode, it expects the strings to be well-formed UTF-8
3374 * and not a null-terminated string of arbitrary bytes. Bytes that are not
3375 * valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT
3376 * CHARACTER), so a malformed or incomplete UTF-8 sequence might increase the
3377 * count by several replacement characters.
3378 *
3379 * \param str The null-terminated UTF-8 string to read. Must not be NULL.
3380 * \returns The length (in codepoints, excluding the null terminator) of
3381 * `src`.
3382 *
3383 * \threadsafety It is safe to call this function from any thread.
3384 *
3385 * \since This function is available since SDL 3.2.0.
3386 *
3387 * \sa SDL_utf8strnlen
3388 * \sa SDL_strlen
3389 */
3390extern SDL_DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
3391
3392/**
3393 * Count the number of codepoints in a UTF-8 string, up to n bytes.
3394 *
3395 * Counts the _codepoints_, not _bytes_, in `str`, excluding the null
3396 * terminator.
3397 *
3398 * If you need to count the bytes in a string instead, consider using
3399 * SDL_strnlen().
3400 *
3401 * The counting stops at `bytes` bytes (not codepoints!). This seems
3402 * counterintuitive, but makes it easy to express the total size of the
3403 * string's buffer.
3404 *
3405 * Since this handles Unicode, it expects the strings to be well-formed UTF-8
3406 * and not a null-terminated string of arbitrary bytes. Bytes that are not
3407 * valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT
3408 * CHARACTER), so a malformed or incomplete UTF-8 sequence might increase the
3409 * count by several replacement characters.
3410 *
3411 * \param str The null-terminated UTF-8 string to read. Must not be NULL.
3412 * \param bytes The maximum amount of bytes to count.
3413 * \returns The length (in codepoints, excluding the null terminator) of `src`
3414 * but never more than `maxlen`.
3415 *
3416 * \threadsafety It is safe to call this function from any thread.
3417 *
3418 * \since This function is available since SDL 3.2.0.
3419 *
3420 * \sa SDL_utf8strlen
3421 * \sa SDL_strnlen
3422 */
3423extern SDL_DECLSPEC size_t SDLCALL SDL_utf8strnlen(const char *str, size_t bytes);
3424
3425/**
3426 * Convert an integer into a string.
3427 *
3428 * This requires a radix to specified for string format. Specifying 10
3429 * produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2
3430 * to 36.
3431 *
3432 * Note that this function will overflow a buffer if `str` is not large enough
3433 * to hold the output! It may be safer to use SDL_snprintf to clamp output, or
3434 * SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate
3435 * much more space than you expect to use (and don't forget possible negative
3436 * signs, null terminator bytes, etc).
3437 *
3438 * \param value the integer to convert.
3439 * \param str the buffer to write the string into.
3440 * \param radix the radix to use for string generation.
3441 * \returns `str`.
3442 *
3443 * \threadsafety It is safe to call this function from any thread.
3444 *
3445 * \since This function is available since SDL 3.2.0.
3446 *
3447 * \sa SDL_uitoa
3448 * \sa SDL_ltoa
3449 * \sa SDL_lltoa
3450 */
3451extern SDL_DECLSPEC char * SDLCALL SDL_itoa(int value, char *str, int radix);
3452
3453/**
3454 * Convert an unsigned integer into a string.
3455 *
3456 * This requires a radix to specified for string format. Specifying 10
3457 * produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2
3458 * to 36.
3459 *
3460 * Note that this function will overflow a buffer if `str` is not large enough
3461 * to hold the output! It may be safer to use SDL_snprintf to clamp output, or
3462 * SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate
3463 * much more space than you expect to use (and don't forget null terminator
3464 * bytes, etc).
3465 *
3466 * \param value the unsigned integer to convert.
3467 * \param str the buffer to write the string into.
3468 * \param radix the radix to use for string generation.
3469 * \returns `str`.
3470 *
3471 * \threadsafety It is safe to call this function from any thread.
3472 *
3473 * \since This function is available since SDL 3.2.0.
3474 *
3475 * \sa SDL_itoa
3476 * \sa SDL_ultoa
3477 * \sa SDL_ulltoa
3478 */
3479extern SDL_DECLSPEC char * SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
3480
3481/**
3482 * Convert a long integer into a string.
3483 *
3484 * This requires a radix to specified for string format. Specifying 10
3485 * produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2
3486 * to 36.
3487 *
3488 * Note that this function will overflow a buffer if `str` is not large enough
3489 * to hold the output! It may be safer to use SDL_snprintf to clamp output, or
3490 * SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate
3491 * much more space than you expect to use (and don't forget possible negative
3492 * signs, null terminator bytes, etc).
3493 *
3494 * \param value the long integer to convert.
3495 * \param str the buffer to write the string into.
3496 * \param radix the radix to use for string generation.
3497 * \returns `str`.
3498 *
3499 * \threadsafety It is safe to call this function from any thread.
3500 *
3501 * \since This function is available since SDL 3.2.0.
3502 *
3503 * \sa SDL_ultoa
3504 * \sa SDL_itoa
3505 * \sa SDL_lltoa
3506 */
3507extern SDL_DECLSPEC char * SDLCALL SDL_ltoa(long value, char *str, int radix);
3508
3509/**
3510 * Convert an unsigned long integer into a string.
3511 *
3512 * This requires a radix to specified for string format. Specifying 10
3513 * produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2
3514 * to 36.
3515 *
3516 * Note that this function will overflow a buffer if `str` is not large enough
3517 * to hold the output! It may be safer to use SDL_snprintf to clamp output, or
3518 * SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate
3519 * much more space than you expect to use (and don't forget null terminator
3520 * bytes, etc).
3521 *
3522 * \param value the unsigned long integer to convert.
3523 * \param str the buffer to write the string into.
3524 * \param radix the radix to use for string generation.
3525 * \returns `str`.
3526 *
3527 * \threadsafety It is safe to call this function from any thread.
3528 *
3529 * \since This function is available since SDL 3.2.0.
3530 *
3531 * \sa SDL_ltoa
3532 * \sa SDL_uitoa
3533 * \sa SDL_ulltoa
3534 */
3535extern SDL_DECLSPEC char * SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
3536
3537#ifndef SDL_NOLONGLONG
3538
3539/**
3540 * Convert a long long integer into a string.
3541 *
3542 * This requires a radix to specified for string format. Specifying 10
3543 * produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2
3544 * to 36.
3545 *
3546 * Note that this function will overflow a buffer if `str` is not large enough
3547 * to hold the output! It may be safer to use SDL_snprintf to clamp output, or
3548 * SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate
3549 * much more space than you expect to use (and don't forget possible negative
3550 * signs, null terminator bytes, etc).
3551 *
3552 * \param value the long long integer to convert.
3553 * \param str the buffer to write the string into.
3554 * \param radix the radix to use for string generation.
3555 * \returns `str`.
3556 *
3557 * \threadsafety It is safe to call this function from any thread.
3558 *
3559 * \since This function is available since SDL 3.2.0.
3560 *
3561 * \sa SDL_ulltoa
3562 * \sa SDL_itoa
3563 * \sa SDL_ltoa
3564 */
3565extern SDL_DECLSPEC char * SDLCALL SDL_lltoa(long long value, char *str, int radix);
3566
3567/**
3568 * Convert an unsigned long long integer into a string.
3569 *
3570 * This requires a radix to specified for string format. Specifying 10
3571 * produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2
3572 * to 36.
3573 *
3574 * Note that this function will overflow a buffer if `str` is not large enough
3575 * to hold the output! It may be safer to use SDL_snprintf to clamp output, or
3576 * SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate
3577 * much more space than you expect to use (and don't forget null terminator
3578 * bytes, etc).
3579 *
3580 * \param value the unsigned long long integer to convert.
3581 * \param str the buffer to write the string into.
3582 * \param radix the radix to use for string generation.
3583 * \returns `str`.
3584 *
3585 * \threadsafety It is safe to call this function from any thread.
3586 *
3587 * \since This function is available since SDL 3.2.0.
3588 *
3589 * \sa SDL_lltoa
3590 * \sa SDL_uitoa
3591 * \sa SDL_ultoa
3592 */
3593extern SDL_DECLSPEC char * SDLCALL SDL_ulltoa(unsigned long long value, char *str, int radix);
3594#endif
3595
3596/**
3597 * Parse an `int` from a string.
3598 *
3599 * The result of calling `SDL_atoi(str)` is equivalent to
3600 * `(int)SDL_strtol(str, NULL, 10)`.
3601 *
3602 * \param str The null-terminated string to read. Must not be NULL.
3603 * \returns the parsed `int`.
3604 *
3605 * \threadsafety It is safe to call this function from any thread.
3606 *
3607 * \since This function is available since SDL 3.2.0.
3608 *
3609 * \sa SDL_atof
3610 * \sa SDL_strtol
3611 * \sa SDL_strtoul
3612 * \sa SDL_strtoll
3613 * \sa SDL_strtoull
3614 * \sa SDL_strtod
3615 * \sa SDL_itoa
3616 */
3617extern SDL_DECLSPEC int SDLCALL SDL_atoi(const char *str);
3618
3619/**
3620 * Parse a `double` from a string.
3621 *
3622 * The result of calling `SDL_atof(str)` is equivalent to `SDL_strtod(str,
3623 * NULL)`.
3624 *
3625 * \param str The null-terminated string to read. Must not be NULL.
3626 * \returns the parsed `double`.
3627 *
3628 * \threadsafety It is safe to call this function from any thread.
3629 *
3630 * \since This function is available since SDL 3.2.0.
3631 *
3632 * \sa SDL_atoi
3633 * \sa SDL_strtol
3634 * \sa SDL_strtoul
3635 * \sa SDL_strtoll
3636 * \sa SDL_strtoull
3637 * \sa SDL_strtod
3638 */
3639extern SDL_DECLSPEC double SDLCALL SDL_atof(const char *str);
3640
3641/**
3642 * Parse a `long` from a string.
3643 *
3644 * If `str` starts with whitespace, then those whitespace characters are
3645 * skipped before attempting to parse the number.
3646 *
3647 * If the parsed number does not fit inside a `long`, the result is clamped to
3648 * the minimum and maximum representable `long` values.
3649 *
3650 * \param str The null-terminated string to read. Must not be NULL.
3651 * \param endp If not NULL, the address of the first invalid character (i.e.
3652 * the next character after the parsed number) will be written to
3653 * this pointer.
3654 * \param base The base of the integer to read. Supported values are 0 and 2
3655 * to 36 inclusive. If 0, the base will be inferred from the
3656 * number's prefix (0x for hexadecimal, 0 for octal, decimal
3657 * otherwise).
3658 * \returns the parsed `long`, or 0 if no number could be parsed.
3659 *
3660 * \threadsafety It is safe to call this function from any thread.
3661 *
3662 * \since This function is available since SDL 3.2.0.
3663 *
3664 * \sa SDL_atoi
3665 * \sa SDL_atof
3666 * \sa SDL_strtoul
3667 * \sa SDL_strtoll
3668 * \sa SDL_strtoull
3669 * \sa SDL_strtod
3670 * \sa SDL_ltoa
3671 * \sa SDL_wcstol
3672 */
3673extern SDL_DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);
3674
3675/**
3676 * Parse an `unsigned long` from a string.
3677 *
3678 * If `str` starts with whitespace, then those whitespace characters are
3679 * skipped before attempting to parse the number.
3680 *
3681 * If the parsed number does not fit inside an `unsigned long`, the result is
3682 * clamped to the maximum representable `unsigned long` value.
3683 *
3684 * \param str The null-terminated string to read. Must not be NULL.
3685 * \param endp If not NULL, the address of the first invalid character (i.e.
3686 * the next character after the parsed number) will be written to
3687 * this pointer.
3688 * \param base The base of the integer to read. Supported values are 0 and 2
3689 * to 36 inclusive. If 0, the base will be inferred from the
3690 * number's prefix (0x for hexadecimal, 0 for octal, decimal
3691 * otherwise).
3692 * \returns the parsed `unsigned long`, or 0 if no number could be parsed.
3693 *
3694 * \threadsafety It is safe to call this function from any thread.
3695 *
3696 * \since This function is available since SDL 3.2.0.
3697 *
3698 * \sa SDL_atoi
3699 * \sa SDL_atof
3700 * \sa SDL_strtol
3701 * \sa SDL_strtoll
3702 * \sa SDL_strtoull
3703 * \sa SDL_strtod
3704 * \sa SDL_ultoa
3705 */
3706extern SDL_DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
3707
3708#ifndef SDL_NOLONGLONG
3709
3710/**
3711 * Parse a `long long` from a string.
3712 *
3713 * If `str` starts with whitespace, then those whitespace characters are
3714 * skipped before attempting to parse the number.
3715 *
3716 * If the parsed number does not fit inside a `long long`, the result is
3717 * clamped to the minimum and maximum representable `long long` values.
3718 *
3719 * \param str The null-terminated string to read. Must not be NULL.
3720 * \param endp If not NULL, the address of the first invalid character (i.e.
3721 * the next character after the parsed number) will be written to
3722 * this pointer.
3723 * \param base The base of the integer to read. Supported values are 0 and 2
3724 * to 36 inclusive. If 0, the base will be inferred from the
3725 * number's prefix (0x for hexadecimal, 0 for octal, decimal
3726 * otherwise).
3727 * \returns the parsed `long long`, or 0 if no number could be parsed.
3728 *
3729 * \threadsafety It is safe to call this function from any thread.
3730 *
3731 * \since This function is available since SDL 3.2.0.
3732 *
3733 * \sa SDL_atoi
3734 * \sa SDL_atof
3735 * \sa SDL_strtol
3736 * \sa SDL_strtoul
3737 * \sa SDL_strtoull
3738 * \sa SDL_strtod
3739 * \sa SDL_lltoa
3740 */
3741extern SDL_DECLSPEC long long SDLCALL SDL_strtoll(const char *str, char **endp, int base);
3742
3743/**
3744 * Parse an `unsigned long long` from a string.
3745 *
3746 * If `str` starts with whitespace, then those whitespace characters are
3747 * skipped before attempting to parse the number.
3748 *
3749 * If the parsed number does not fit inside an `unsigned long long`, the
3750 * result is clamped to the maximum representable `unsigned long long` value.
3751 *
3752 * \param str The null-terminated string to read. Must not be NULL.
3753 * \param endp If not NULL, the address of the first invalid character (i.e.
3754 * the next character after the parsed number) will be written to
3755 * this pointer.
3756 * \param base The base of the integer to read. Supported values are 0 and 2
3757 * to 36 inclusive. If 0, the base will be inferred from the
3758 * number's prefix (0x for hexadecimal, 0 for octal, decimal
3759 * otherwise).
3760 * \returns the parsed `unsigned long long`, or 0 if no number could be
3761 * parsed.
3762 *
3763 * \threadsafety It is safe to call this function from any thread.
3764 *
3765 * \since This function is available since SDL 3.2.0.
3766 *
3767 * \sa SDL_atoi
3768 * \sa SDL_atof
3769 * \sa SDL_strtol
3770 * \sa SDL_strtoll
3771 * \sa SDL_strtoul
3772 * \sa SDL_strtod
3773 * \sa SDL_ulltoa
3774 */
3775extern SDL_DECLSPEC unsigned long long SDLCALL SDL_strtoull(const char *str, char **endp, int base);
3776#endif
3777
3778/**
3779 * Parse a `double` from a string.
3780 *
3781 * This function makes fewer guarantees than the C runtime `strtod`:
3782 *
3783 * - Only decimal notation is guaranteed to be supported. The handling of
3784 * scientific and hexadecimal notation is unspecified.
3785 * - Whether or not INF and NAN can be parsed is unspecified.
3786 * - The precision of the result is unspecified.
3787 *
3788 * \param str the null-terminated string to read. Must not be NULL.
3789 * \param endp if not NULL, the address of the first invalid character (i.e.
3790 * the next character after the parsed number) will be written to
3791 * this pointer.
3792 * \returns the parsed `double`, or 0 if no number could be parsed.
3793 *
3794 * \threadsafety It is safe to call this function from any thread.
3795 *
3796 * \since This function is available since SDL 3.2.0.
3797 *
3798 * \sa SDL_atoi
3799 * \sa SDL_atof
3800 * \sa SDL_strtol
3801 * \sa SDL_strtoll
3802 * \sa SDL_strtoul
3803 * \sa SDL_strtoull
3804 */
3805extern SDL_DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);
3806
3807/**
3808 * Compare two null-terminated UTF-8 strings.
3809 *
3810 * Due to the nature of UTF-8 encoding, this will work with Unicode strings,
3811 * since effectively this function just compares bytes until it hits a
3812 * null-terminating character. Also due to the nature of UTF-8, this can be
3813 * used with SDL_qsort() to put strings in (roughly) alphabetical order.
3814 *
3815 * \param str1 the first string to compare. NULL is not permitted!
3816 * \param str2 the second string to compare. NULL is not permitted!
3817 * \returns less than zero if str1 is "less than" str2, greater than zero if
3818 * str1 is "greater than" str2, and zero if the strings match
3819 * exactly.
3820 *
3821 * \threadsafety It is safe to call this function from any thread.
3822 *
3823 * \since This function is available since SDL 3.2.0.
3824 */
3825extern SDL_DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
3826
3827/**
3828 * Compare two UTF-8 strings up to a number of bytes.
3829 *
3830 * Due to the nature of UTF-8 encoding, this will work with Unicode strings,
3831 * since effectively this function just compares bytes until it hits a
3832 * null-terminating character. Also due to the nature of UTF-8, this can be
3833 * used with SDL_qsort() to put strings in (roughly) alphabetical order.
3834 *
3835 * Note that while this function is intended to be used with UTF-8, it is
3836 * doing a bytewise comparison, and `maxlen` specifies a _byte_ limit! If the
3837 * limit lands in the middle of a multi-byte UTF-8 sequence, it will only
3838 * compare a portion of the final character.
3839 *
3840 * `maxlen` specifies a maximum number of bytes to compare; if the strings
3841 * match to this number of bytes (or both have matched to a null-terminator
3842 * character before this number of bytes), they will be considered equal.
3843 *
3844 * \param str1 the first string to compare. NULL is not permitted!
3845 * \param str2 the second string to compare. NULL is not permitted!
3846 * \param maxlen the maximum number of _bytes_ to compare.
3847 * \returns less than zero if str1 is "less than" str2, greater than zero if
3848 * str1 is "greater than" str2, and zero if the strings match
3849 * exactly.
3850 *
3851 * \threadsafety It is safe to call this function from any thread.
3852 *
3853 * \since This function is available since SDL 3.2.0.
3854 */
3855extern SDL_DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
3856
3857/**
3858 * Compare two null-terminated UTF-8 strings, case-insensitively.
3859 *
3860 * This will work with Unicode strings, using a technique called
3861 * "case-folding" to handle the vast majority of case-sensitive human
3862 * languages regardless of system locale. It can deal with expanding values: a
3863 * German Eszett character can compare against two ASCII 's' chars and be
3864 * considered a match, for example. A notable exception: it does not handle
3865 * the Turkish 'i' character; human language is complicated!
3866 *
3867 * Since this handles Unicode, it expects the string to be well-formed UTF-8
3868 * and not a null-terminated string of arbitrary bytes. Bytes that are not
3869 * valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT
3870 * CHARACTER), which is to say two strings of random bits may turn out to
3871 * match if they convert to the same amount of replacement characters.
3872 *
3873 * \param str1 the first string to compare. NULL is not permitted!
3874 * \param str2 the second string to compare. NULL is not permitted!
3875 * \returns less than zero if str1 is "less than" str2, greater than zero if
3876 * str1 is "greater than" str2, and zero if the strings match
3877 * exactly.
3878 *
3879 * \threadsafety It is safe to call this function from any thread.
3880 *
3881 * \since This function is available since SDL 3.2.0.
3882 */
3883extern SDL_DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
3884
3885
3886/**
3887 * Compare two UTF-8 strings, case-insensitively, up to a number of bytes.
3888 *
3889 * This will work with Unicode strings, using a technique called
3890 * "case-folding" to handle the vast majority of case-sensitive human
3891 * languages regardless of system locale. It can deal with expanding values: a
3892 * German Eszett character can compare against two ASCII 's' chars and be
3893 * considered a match, for example. A notable exception: it does not handle
3894 * the Turkish 'i' character; human language is complicated!
3895 *
3896 * Since this handles Unicode, it expects the string to be well-formed UTF-8
3897 * and not a null-terminated string of arbitrary bytes. Bytes that are not
3898 * valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT
3899 * CHARACTER), which is to say two strings of random bits may turn out to
3900 * match if they convert to the same amount of replacement characters.
3901 *
3902 * Note that while this function is intended to be used with UTF-8, `maxlen`
3903 * specifies a _byte_ limit! If the limit lands in the middle of a multi-byte
3904 * UTF-8 sequence, it may convert a portion of the final character to one or
3905 * more Unicode character U+FFFD (REPLACEMENT CHARACTER) so as not to overflow
3906 * a buffer.
3907 *
3908 * `maxlen` specifies a maximum number of bytes to compare; if the strings
3909 * match to this number of bytes (or both have matched to a null-terminator
3910 * character before this number of bytes), they will be considered equal.
3911 *
3912 * \param str1 the first string to compare. NULL is not permitted!
3913 * \param str2 the second string to compare. NULL is not permitted!
3914 * \param maxlen the maximum number of bytes to compare.
3915 * \returns less than zero if str1 is "less than" str2, greater than zero if
3916 * str1 is "greater than" str2, and zero if the strings match
3917 * exactly.
3918 *
3919 * \threadsafety It is safe to call this function from any thread.
3920 *
3921 * \since This function is available since SDL 3.2.0.
3922 */
3923extern SDL_DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen);
3924
3925/**
3926 * Searches a string for the first occurence of any character contained in a
3927 * breakset, and returns a pointer from the string to that character.
3928 *
3929 * \param str The null-terminated string to be searched. Must not be NULL, and
3930 * must not overlap with `breakset`.
3931 * \param breakset A null-terminated string containing the list of characters
3932 * to look for. Must not be NULL, and must not overlap with
3933 * `str`.
3934 * \returns A pointer to the location, in str, of the first occurence of a
3935 * character present in the breakset, or NULL if none is found.
3936 *
3937 * \threadsafety It is safe to call this function from any thread.
3938 *
3939 * \since This function is available since SDL 3.2.0.
3940 */
3941extern SDL_DECLSPEC char * SDLCALL SDL_strpbrk(const char *str, const char *breakset);
3942
3943/**
3944 * The Unicode REPLACEMENT CHARACTER codepoint.
3945 *
3946 * SDL_StepUTF8() and SDL_StepBackUTF8() report this codepoint when they
3947 * encounter a UTF-8 string with encoding errors.
3948 *
3949 * This tends to render as something like a question mark in most places.
3950 *
3951 * \since This macro is available since SDL 3.2.0.
3952 *
3953 * \sa SDL_StepBackUTF8
3954 * \sa SDL_StepUTF8
3955 */
3956#define SDL_INVALID_UNICODE_CODEPOINT 0xFFFD
3957
3958/**
3959 * Decode a UTF-8 string, one Unicode codepoint at a time.
3960 *
3961 * This will return the first Unicode codepoint in the UTF-8 encoded string in
3962 * `*pstr`, and then advance `*pstr` past any consumed bytes before returning.
3963 *
3964 * It will not access more than `*pslen` bytes from the string. `*pslen` will
3965 * be adjusted, as well, subtracting the number of bytes consumed.
3966 *
3967 * `pslen` is allowed to be NULL, in which case the string _must_ be
3968 * NULL-terminated, as the function will blindly read until it sees the NULL
3969 * char.
3970 *
3971 * if `*pslen` is zero, it assumes the end of string is reached and returns a
3972 * zero codepoint regardless of the contents of the string buffer.
3973 *
3974 * If the resulting codepoint is zero (a NULL terminator), or `*pslen` is
3975 * zero, it will not advance `*pstr` or `*pslen` at all.
3976 *
3977 * Generally this function is called in a loop until it returns zero,
3978 * adjusting its parameters each iteration.
3979 *
3980 * If an invalid UTF-8 sequence is encountered, this function returns
3981 * SDL_INVALID_UNICODE_CODEPOINT and advances the string/length by one byte
3982 * (which is to say, a multibyte sequence might produce several
3983 * SDL_INVALID_UNICODE_CODEPOINT returns before it syncs to the next valid
3984 * UTF-8 sequence).
3985 *
3986 * Several things can generate invalid UTF-8 sequences, including overlong
3987 * encodings, the use of UTF-16 surrogate values, and truncated data. Please
3988 * refer to
3989 * [RFC3629](https://www.ietf.org/rfc/rfc3629.txt)
3990 * for details.
3991 *
3992 * \param pstr a pointer to a UTF-8 string pointer to be read and adjusted.
3993 * \param pslen a pointer to the number of bytes in the string, to be read and
3994 * adjusted. NULL is allowed.
3995 * \returns the first Unicode codepoint in the string.
3996 *
3997 * \threadsafety It is safe to call this function from any thread.
3998 *
3999 * \since This function is available since SDL 3.2.0.
4000 */
4001extern SDL_DECLSPEC Uint32 SDLCALL SDL_StepUTF8(const char **pstr, size_t *pslen);
4002
4003/**
4004 * Decode a UTF-8 string in reverse, one Unicode codepoint at a time.
4005 *
4006 * This will go to the start of the previous Unicode codepoint in the string,
4007 * move `*pstr` to that location and return that codepoint.
4008 *
4009 * If `*pstr` is already at the start of the string), it will not advance
4010 * `*pstr` at all.
4011 *
4012 * Generally this function is called in a loop until it returns zero,
4013 * adjusting its parameter each iteration.
4014 *
4015 * If an invalid UTF-8 sequence is encountered, this function returns
4016 * SDL_INVALID_UNICODE_CODEPOINT.
4017 *
4018 * Several things can generate invalid UTF-8 sequences, including overlong
4019 * encodings, the use of UTF-16 surrogate values, and truncated data. Please
4020 * refer to
4021 * [RFC3629](https://www.ietf.org/rfc/rfc3629.txt)
4022 * for details.
4023 *
4024 * \param start a pointer to the beginning of the UTF-8 string.
4025 * \param pstr a pointer to a UTF-8 string pointer to be read and adjusted.
4026 * \returns the previous Unicode codepoint in the string.
4027 *
4028 * \threadsafety It is safe to call this function from any thread.
4029 *
4030 * \since This function is available since SDL 3.2.0.
4031 */
4032extern SDL_DECLSPEC Uint32 SDLCALL SDL_StepBackUTF8(const char *start, const char **pstr);
4033
4034/**
4035 * Convert a single Unicode codepoint to UTF-8.
4036 *
4037 * The buffer pointed to by `dst` must be at least 4 bytes long, as this
4038 * function may generate between 1 and 4 bytes of output.
4039 *
4040 * This function returns the first byte _after_ the newly-written UTF-8
4041 * sequence, which is useful for encoding multiple codepoints in a loop, or
4042 * knowing where to write a NULL-terminator character to end the string (in
4043 * either case, plan to have a buffer of _more_ than 4 bytes!).
4044 *
4045 * If `codepoint` is an invalid value (outside the Unicode range, or a UTF-16
4046 * surrogate value, etc), this will use U+FFFD (REPLACEMENT CHARACTER) for the
4047 * codepoint instead, and not set an error.
4048 *
4049 * If `dst` is NULL, this returns NULL immediately without writing to the
4050 * pointer and without setting an error.
4051 *
4052 * \param codepoint a Unicode codepoint to convert to UTF-8.
4053 * \param dst the location to write the encoded UTF-8. Must point to at least
4054 * 4 bytes!
4055 * \returns the first byte past the newly-written UTF-8 sequence.
4056 *
4057 * \threadsafety It is safe to call this function from any thread.
4058 *
4059 * \since This function is available since SDL 3.2.0.
4060 */
4061extern SDL_DECLSPEC char * SDLCALL SDL_UCS4ToUTF8(Uint32 codepoint, char *dst);
4062
4063/**
4064 * This works exactly like sscanf() but doesn't require access to a C runtime.
4065 *
4066 * Scan a string, matching a format string, converting each '%' item and
4067 * storing it to pointers provided through variable arguments.
4068 *
4069 * \param text the string to scan. Must not be NULL.
4070 * \param fmt a printf-style format string. Must not be NULL.
4071 * \param ... a list of pointers to values to be filled in with scanned items.
4072 * \returns the number of items that matched the format string.
4073 *
4074 * \threadsafety It is safe to call this function from any thread.
4075 *
4076 * \since This function is available since SDL 3.2.0.
4077 */
4078extern SDL_DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2);
4079
4080/**
4081 * This works exactly like vsscanf() but doesn't require access to a C
4082 * runtime.
4083 *
4084 * Functions identically to SDL_sscanf(), except it takes a `va_list` instead
4085 * of using `...` variable arguments.
4086 *
4087 * \param text the string to scan. Must not be NULL.
4088 * \param fmt a printf-style format string. Must not be NULL.
4089 * \param ap a `va_list` of pointers to values to be filled in with scanned
4090 * items.
4091 * \returns the number of items that matched the format string.
4092 *
4093 * \threadsafety It is safe to call this function from any thread.
4094 *
4095 * \since This function is available since SDL 3.2.0.
4096 */
4097extern SDL_DECLSPEC int SDLCALL SDL_vsscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, va_list ap) SDL_SCANF_VARARG_FUNCV(2);
4098
4099/**
4100 * This works exactly like snprintf() but doesn't require access to a C
4101 * runtime.
4102 *
4103 * Format a string of up to `maxlen`-1 bytes, converting each '%' item with
4104 * values provided through variable arguments.
4105 *
4106 * While some C runtimes differ on how to deal with too-large strings, this
4107 * function null-terminates the output, by treating the null-terminator as
4108 * part of the `maxlen` count. Note that if `maxlen` is zero, however, no
4109 * bytes will be written at all.
4110 *
4111 * This function returns the number of _bytes_ (not _characters_) that should
4112 * be written, excluding the null-terminator character. If this returns a
4113 * number >= `maxlen`, it means the output string was truncated. A negative
4114 * return value means an error occurred.
4115 *
4116 * Referencing the output string's pointer with a format item is undefined
4117 * behavior.
4118 *
4119 * \param text the buffer to write the string into. Must not be NULL.
4120 * \param maxlen the maximum bytes to write, including the null-terminator.
4121 * \param fmt a printf-style format string. Must not be NULL.
4122 * \param ... a list of values to be used with the format string.
4123 * \returns the number of bytes that should be written, not counting the
4124 * null-terminator char, or a negative value on error.
4125 *
4126 * \threadsafety It is safe to call this function from any thread.
4127 *
4128 * \since This function is available since SDL 3.2.0.
4129 */
4130extern SDL_DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);
4131
4132/**
4133 * This works exactly like swprintf() but doesn't require access to a C
4134 * runtime.
4135 *
4136 * Format a wide string of up to `maxlen`-1 wchar_t values, converting each
4137 * '%' item with values provided through variable arguments.
4138 *
4139 * While some C runtimes differ on how to deal with too-large strings, this
4140 * function null-terminates the output, by treating the null-terminator as
4141 * part of the `maxlen` count. Note that if `maxlen` is zero, however, no wide
4142 * characters will be written at all.
4143 *
4144 * This function returns the number of _wide characters_ (not _codepoints_)
4145 * that should be written, excluding the null-terminator character. If this
4146 * returns a number >= `maxlen`, it means the output string was truncated. A
4147 * negative return value means an error occurred.
4148 *
4149 * Referencing the output string's pointer with a format item is undefined
4150 * behavior.
4151 *
4152 * \param text the buffer to write the wide string into. Must not be NULL.
4153 * \param maxlen the maximum wchar_t values to write, including the
4154 * null-terminator.
4155 * \param fmt a printf-style format string. Must not be NULL.
4156 * \param ... a list of values to be used with the format string.
4157 * \returns the number of wide characters that should be written, not counting
4158 * the null-terminator char, or a negative value on error.
4159 *
4160 * \threadsafety It is safe to call this function from any thread.
4161 *
4162 * \since This function is available since SDL 3.2.0.
4163 */
4164extern SDL_DECLSPEC int SDLCALL SDL_swprintf(SDL_OUT_Z_CAP(maxlen) wchar_t *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const wchar_t *fmt, ...) SDL_WPRINTF_VARARG_FUNC(3);
4165
4166/**
4167 * This works exactly like vsnprintf() but doesn't require access to a C
4168 * runtime.
4169 *
4170 * Functions identically to SDL_snprintf(), except it takes a `va_list`
4171 * instead of using `...` variable arguments.
4172 *
4173 * \param text the buffer to write the string into. Must not be NULL.
4174 * \param maxlen the maximum bytes to write, including the null-terminator.
4175 * \param fmt a printf-style format string. Must not be NULL.
4176 * \param ap a `va_list` values to be used with the format string.
4177 * \returns the number of bytes that should be written, not counting the
4178 * null-terminator char, or a negative value on error.
4179 *
4180 * \threadsafety It is safe to call this function from any thread.
4181 *
4182 * \since This function is available since SDL 3.2.0.
4183 */
4184extern SDL_DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(3);
4185
4186/**
4187 * This works exactly like vswprintf() but doesn't require access to a C
4188 * runtime.
4189 *
4190 * Functions identically to SDL_swprintf(), except it takes a `va_list`
4191 * instead of using `...` variable arguments.
4192 *
4193 * \param text the buffer to write the string into. Must not be NULL.
4194 * \param maxlen the maximum wide characters to write, including the
4195 * null-terminator.
4196 * \param fmt a printf-style format wide string. Must not be NULL.
4197 * \param ap a `va_list` values to be used with the format string.
4198 * \returns the number of wide characters that should be written, not counting
4199 * the null-terminator char, or a negative value on error.
4200 *
4201 * \threadsafety It is safe to call this function from any thread.
4202 *
4203 * \since This function is available since SDL 3.2.0.
4204 */
4205extern SDL_DECLSPEC int SDLCALL SDL_vswprintf(SDL_OUT_Z_CAP(maxlen) wchar_t *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const wchar_t *fmt, va_list ap) SDL_WPRINTF_VARARG_FUNCV(3);
4206
4207/**
4208 * This works exactly like asprintf() but doesn't require access to a C
4209 * runtime.
4210 *
4211 * Functions identically to SDL_snprintf(), except it allocates a buffer large
4212 * enough to hold the output string on behalf of the caller.
4213 *
4214 * On success, this function returns the number of bytes (not characters)
4215 * comprising the output string, not counting the null-terminator character,
4216 * and sets `*strp` to the newly-allocated string.
4217 *
4218 * On error, this function returns a negative number, and the value of `*strp`
4219 * is undefined.
4220 *
4221 * The returned string is owned by the caller, and should be passed to
4222 * SDL_free when no longer needed.
4223 *
4224 * \param strp on output, is set to the new string. Must not be NULL.
4225 * \param fmt a printf-style format string. Must not be NULL.
4226 * \param ... a list of values to be used with the format string.
4227 * \returns the number of bytes in the newly-allocated string, not counting
4228 * the null-terminator char, or a negative value on error.
4229 *
4230 * \threadsafety It is safe to call this function from any thread.
4231 *
4232 * \since This function is available since SDL 3.2.0.
4233 */
4234extern SDL_DECLSPEC int SDLCALL SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
4235
4236/**
4237 * This works exactly like vasprintf() but doesn't require access to a C
4238 * runtime.
4239 *
4240 * Functions identically to SDL_asprintf(), except it takes a `va_list`
4241 * instead of using `...` variable arguments.
4242 *
4243 * \param strp on output, is set to the new string. Must not be NULL.
4244 * \param fmt a printf-style format string. Must not be NULL.
4245 * \param ap a `va_list` values to be used with the format string.
4246 * \returns the number of bytes in the newly-allocated string, not counting
4247 * the null-terminator char, or a negative value on error.
4248 *
4249 * \threadsafety It is safe to call this function from any thread.
4250 *
4251 * \since This function is available since SDL 3.2.0.
4252 */
4253extern SDL_DECLSPEC int SDLCALL SDL_vasprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(2);
4254
4255/**
4256 * Seeds the pseudo-random number generator.
4257 *
4258 * Reusing the seed number will cause SDL_rand() to repeat the same stream of
4259 * 'random' numbers.
4260 *
4261 * \param seed the value to use as a random number seed, or 0 to use
4262 * SDL_GetPerformanceCounter().
4263 *
4264 * \threadsafety This should be called on the same thread that calls
4265 * SDL_rand()
4266 *
4267 * \since This function is available since SDL 3.2.0.
4268 *
4269 * \sa SDL_rand
4270 * \sa SDL_rand_bits
4271 * \sa SDL_randf
4272 */
4273extern SDL_DECLSPEC void SDLCALL SDL_srand(Uint64 seed);
4274
4275/**
4276 * Generate a pseudo-random number less than n for positive n
4277 *
4278 * The method used is faster and of better quality than `rand() % n`. Odds are
4279 * roughly 99.9% even for n = 1 million. Evenness is better for smaller n, and
4280 * much worse as n gets bigger.
4281 *
4282 * Example: to simulate a d6 use `SDL_rand(6) + 1` The +1 converts 0..5 to
4283 * 1..6
4284 *
4285 * If you want to generate a pseudo-random number in the full range of Sint32,
4286 * you should use: (Sint32)SDL_rand_bits()
4287 *
4288 * If you want reproducible output, be sure to initialize with SDL_srand()
4289 * first.
4290 *
4291 * There are no guarantees as to the quality of the random sequence produced,
4292 * and this should not be used for security (cryptography, passwords) or where
4293 * money is on the line (loot-boxes, casinos). There are many random number
4294 * libraries available with different characteristics and you should pick one
4295 * of those to meet any serious needs.
4296 *
4297 * \param n the number of possible outcomes. n must be positive.
4298 * \returns a random value in the range of [0 .. n-1].
4299 *
4300 * \threadsafety All calls should be made from a single thread
4301 *
4302 * \since This function is available since SDL 3.2.0.
4303 *
4304 * \sa SDL_srand
4305 * \sa SDL_randf
4306 */
4307extern SDL_DECLSPEC Sint32 SDLCALL SDL_rand(Sint32 n);
4308
4309/**
4310 * Generate a uniform pseudo-random floating point number less than 1.0
4311 *
4312 * If you want reproducible output, be sure to initialize with SDL_srand()
4313 * first.
4314 *
4315 * There are no guarantees as to the quality of the random sequence produced,
4316 * and this should not be used for security (cryptography, passwords) or where
4317 * money is on the line (loot-boxes, casinos). There are many random number
4318 * libraries available with different characteristics and you should pick one
4319 * of those to meet any serious needs.
4320 *
4321 * \returns a random value in the range of [0.0, 1.0).
4322 *
4323 * \threadsafety All calls should be made from a single thread
4324 *
4325 * \since This function is available since SDL 3.2.0.
4326 *
4327 * \sa SDL_srand
4328 * \sa SDL_rand
4329 */
4330extern SDL_DECLSPEC float SDLCALL SDL_randf(void);
4331
4332/**
4333 * Generate 32 pseudo-random bits.
4334 *
4335 * You likely want to use SDL_rand() to get a psuedo-random number instead.
4336 *
4337 * There are no guarantees as to the quality of the random sequence produced,
4338 * and this should not be used for security (cryptography, passwords) or where
4339 * money is on the line (loot-boxes, casinos). There are many random number
4340 * libraries available with different characteristics and you should pick one
4341 * of those to meet any serious needs.
4342 *
4343 * \returns a random value in the range of [0-SDL_MAX_UINT32].
4344 *
4345 * \threadsafety All calls should be made from a single thread
4346 *
4347 * \since This function is available since SDL 3.2.0.
4348 *
4349 * \sa SDL_rand
4350 * \sa SDL_randf
4351 * \sa SDL_srand
4352 */
4353extern SDL_DECLSPEC Uint32 SDLCALL SDL_rand_bits(void);
4354
4355/**
4356 * Generate a pseudo-random number less than n for positive n
4357 *
4358 * The method used is faster and of better quality than `rand() % n`. Odds are
4359 * roughly 99.9% even for n = 1 million. Evenness is better for smaller n, and
4360 * much worse as n gets bigger.
4361 *
4362 * Example: to simulate a d6 use `SDL_rand_r(state, 6) + 1` The +1 converts
4363 * 0..5 to 1..6
4364 *
4365 * If you want to generate a pseudo-random number in the full range of Sint32,
4366 * you should use: (Sint32)SDL_rand_bits_r(state)
4367 *
4368 * There are no guarantees as to the quality of the random sequence produced,
4369 * and this should not be used for security (cryptography, passwords) or where
4370 * money is on the line (loot-boxes, casinos). There are many random number
4371 * libraries available with different characteristics and you should pick one
4372 * of those to meet any serious needs.
4373 *
4374 * \param state a pointer to the current random number state, this may not be
4375 * NULL.
4376 * \param n the number of possible outcomes. n must be positive.
4377 * \returns a random value in the range of [0 .. n-1].
4378 *
4379 * \threadsafety This function is thread-safe, as long as the state pointer
4380 * isn't shared between threads.
4381 *
4382 * \since This function is available since SDL 3.2.0.
4383 *
4384 * \sa SDL_rand
4385 * \sa SDL_rand_bits_r
4386 * \sa SDL_randf_r
4387 */
4388extern SDL_DECLSPEC Sint32 SDLCALL SDL_rand_r(Uint64 *state, Sint32 n);
4389
4390/**
4391 * Generate a uniform pseudo-random floating point number less than 1.0
4392 *
4393 * If you want reproducible output, be sure to initialize with SDL_srand()
4394 * first.
4395 *
4396 * There are no guarantees as to the quality of the random sequence produced,
4397 * and this should not be used for security (cryptography, passwords) or where
4398 * money is on the line (loot-boxes, casinos). There are many random number
4399 * libraries available with different characteristics and you should pick one
4400 * of those to meet any serious needs.
4401 *
4402 * \param state a pointer to the current random number state, this may not be
4403 * NULL.
4404 * \returns a random value in the range of [0.0, 1.0).
4405 *
4406 * \threadsafety This function is thread-safe, as long as the state pointer
4407 * isn't shared between threads.
4408 *
4409 * \since This function is available since SDL 3.2.0.
4410 *
4411 * \sa SDL_rand_bits_r
4412 * \sa SDL_rand_r
4413 * \sa SDL_randf
4414 */
4415extern SDL_DECLSPEC float SDLCALL SDL_randf_r(Uint64 *state);
4416
4417/**
4418 * Generate 32 pseudo-random bits.
4419 *
4420 * You likely want to use SDL_rand_r() to get a psuedo-random number instead.
4421 *
4422 * There are no guarantees as to the quality of the random sequence produced,
4423 * and this should not be used for security (cryptography, passwords) or where
4424 * money is on the line (loot-boxes, casinos). There are many random number
4425 * libraries available with different characteristics and you should pick one
4426 * of those to meet any serious needs.
4427 *
4428 * \param state a pointer to the current random number state, this may not be
4429 * NULL.
4430 * \returns a random value in the range of [0-SDL_MAX_UINT32].
4431 *
4432 * \threadsafety This function is thread-safe, as long as the state pointer
4433 * isn't shared between threads.
4434 *
4435 * \since This function is available since SDL 3.2.0.
4436 *
4437 * \sa SDL_rand_r
4438 * \sa SDL_randf_r
4439 */
4440extern SDL_DECLSPEC Uint32 SDLCALL SDL_rand_bits_r(Uint64 *state);
4441
4442#ifndef SDL_PI_D
4443
4444/**
4445 * The value of Pi, as a double-precision floating point literal.
4446 *
4447 * \since This macro is available since SDL 3.2.0.
4448 *
4449 * \sa SDL_PI_F
4450 */
4451#define SDL_PI_D 3.141592653589793238462643383279502884 /**< pi (double) */
4452#endif
4453
4454#ifndef SDL_PI_F
4455
4456/**
4457 * The value of Pi, as a single-precision floating point literal.
4458 *
4459 * \since This macro is available since SDL 3.2.0.
4460 *
4461 * \sa SDL_PI_D
4462 */
4463#define SDL_PI_F 3.141592653589793238462643383279502884F /**< pi (float) */
4464#endif
4465
4466/**
4467 * Compute the arc cosine of `x`.
4468 *
4469 * The definition of `y = acos(x)` is `x = cos(y)`.
4470 *
4471 * Domain: `-1 <= x <= 1`
4472 *
4473 * Range: `0 <= y <= Pi`
4474 *
4475 * This function operates on double-precision floating point values, use
4476 * SDL_acosf for single-precision floats.
4477 *
4478 * This function may use a different approximation across different versions,
4479 * platforms and configurations. i.e, it can return a different value given
4480 * the same input on different machines or operating systems, or if SDL is
4481 * updated.
4482 *
4483 * \param x floating point value.
4484 * \returns arc cosine of `x`, in radians.
4485 *
4486 * \threadsafety It is safe to call this function from any thread.
4487 *
4488 * \since This function is available since SDL 3.2.0.
4489 *
4490 * \sa SDL_acosf
4491 * \sa SDL_asin
4492 * \sa SDL_cos
4493 */
4494extern SDL_DECLSPEC double SDLCALL SDL_acos(double x);
4495
4496/**
4497 * Compute the arc cosine of `x`.
4498 *
4499 * The definition of `y = acos(x)` is `x = cos(y)`.
4500 *
4501 * Domain: `-1 <= x <= 1`
4502 *
4503 * Range: `0 <= y <= Pi`
4504 *
4505 * This function operates on single-precision floating point values, use
4506 * SDL_acos for double-precision floats.
4507 *
4508 * This function may use a different approximation across different versions,
4509 * platforms and configurations. i.e, it can return a different value given
4510 * the same input on different machines or operating systems, or if SDL is
4511 * updated.
4512 *
4513 * \param x floating point value.
4514 * \returns arc cosine of `x`, in radians.
4515 *
4516 * \threadsafety It is safe to call this function from any thread.
4517 *
4518 * \since This function is available since SDL 3.2.0.
4519 *
4520 * \sa SDL_acos
4521 * \sa SDL_asinf
4522 * \sa SDL_cosf
4523 */
4524extern SDL_DECLSPEC float SDLCALL SDL_acosf(float x);
4525
4526/**
4527 * Compute the arc sine of `x`.
4528 *
4529 * The definition of `y = asin(x)` is `x = sin(y)`.
4530 *
4531 * Domain: `-1 <= x <= 1`
4532 *
4533 * Range: `-Pi/2 <= y <= Pi/2`
4534 *
4535 * This function operates on double-precision floating point values, use
4536 * SDL_asinf for single-precision floats.
4537 *
4538 * This function may use a different approximation across different versions,
4539 * platforms and configurations. i.e, it can return a different value given
4540 * the same input on different machines or operating systems, or if SDL is
4541 * updated.
4542 *
4543 * \param x floating point value.
4544 * \returns arc sine of `x`, in radians.
4545 *
4546 * \threadsafety It is safe to call this function from any thread.
4547 *
4548 * \since This function is available since SDL 3.2.0.
4549 *
4550 * \sa SDL_asinf
4551 * \sa SDL_acos
4552 * \sa SDL_sin
4553 */
4554extern SDL_DECLSPEC double SDLCALL SDL_asin(double x);
4555
4556/**
4557 * Compute the arc sine of `x`.
4558 *
4559 * The definition of `y = asin(x)` is `x = sin(y)`.
4560 *
4561 * Domain: `-1 <= x <= 1`
4562 *
4563 * Range: `-Pi/2 <= y <= Pi/2`
4564 *
4565 * This function operates on single-precision floating point values, use
4566 * SDL_asin for double-precision floats.
4567 *
4568 * This function may use a different approximation across different versions,
4569 * platforms and configurations. i.e, it can return a different value given
4570 * the same input on different machines or operating systems, or if SDL is
4571 * updated.
4572 *
4573 * \param x floating point value.
4574 * \returns arc sine of `x`, in radians.
4575 *
4576 * \threadsafety It is safe to call this function from any thread.
4577 *
4578 * \since This function is available since SDL 3.2.0.
4579 *
4580 * \sa SDL_asin
4581 * \sa SDL_acosf
4582 * \sa SDL_sinf
4583 */
4584extern SDL_DECLSPEC float SDLCALL SDL_asinf(float x);
4585
4586/**
4587 * Compute the arc tangent of `x`.
4588 *
4589 * The definition of `y = atan(x)` is `x = tan(y)`.
4590 *
4591 * Domain: `-INF <= x <= INF`
4592 *
4593 * Range: `-Pi/2 <= y <= Pi/2`
4594 *
4595 * This function operates on double-precision floating point values, use
4596 * SDL_atanf for single-precision floats.
4597 *
4598 * To calculate the arc tangent of y / x, use SDL_atan2.
4599 *
4600 * This function may use a different approximation across different versions,
4601 * platforms and configurations. i.e, it can return a different value given
4602 * the same input on different machines or operating systems, or if SDL is
4603 * updated.
4604 *
4605 * \param x floating point value.
4606 * \returns arc tangent of of `x` in radians, or 0 if `x = 0`.
4607 *
4608 * \threadsafety It is safe to call this function from any thread.
4609 *
4610 * \since This function is available since SDL 3.2.0.
4611 *
4612 * \sa SDL_atanf
4613 * \sa SDL_atan2
4614 * \sa SDL_tan
4615 */
4616extern SDL_DECLSPEC double SDLCALL SDL_atan(double x);
4617
4618/**
4619 * Compute the arc tangent of `x`.
4620 *
4621 * The definition of `y = atan(x)` is `x = tan(y)`.
4622 *
4623 * Domain: `-INF <= x <= INF`
4624 *
4625 * Range: `-Pi/2 <= y <= Pi/2`
4626 *
4627 * This function operates on single-precision floating point values, use
4628 * SDL_atan for dboule-precision floats.
4629 *
4630 * To calculate the arc tangent of y / x, use SDL_atan2f.
4631 *
4632 * This function may use a different approximation across different versions,
4633 * platforms and configurations. i.e, it can return a different value given
4634 * the same input on different machines or operating systems, or if SDL is
4635 * updated.
4636 *
4637 * \param x floating point value.
4638 * \returns arc tangent of of `x` in radians, or 0 if `x = 0`.
4639 *
4640 * \threadsafety It is safe to call this function from any thread.
4641 *
4642 * \since This function is available since SDL 3.2.0.
4643 *
4644 * \sa SDL_atan
4645 * \sa SDL_atan2f
4646 * \sa SDL_tanf
4647 */
4648extern SDL_DECLSPEC float SDLCALL SDL_atanf(float x);
4649
4650/**
4651 * Compute the arc tangent of `y / x`, using the signs of x and y to adjust
4652 * the result's quadrant.
4653 *
4654 * The definition of `z = atan2(x, y)` is `y = x tan(z)`, where the quadrant
4655 * of z is determined based on the signs of x and y.
4656 *
4657 * Domain: `-INF <= x <= INF`, `-INF <= y <= INF`
4658 *
4659 * Range: `-Pi <= y <= Pi`
4660 *
4661 * This function operates on double-precision floating point values, use
4662 * SDL_atan2f for single-precision floats.
4663 *
4664 * To calculate the arc tangent of a single value, use SDL_atan.
4665 *
4666 * This function may use a different approximation across different versions,
4667 * platforms and configurations. i.e, it can return a different value given
4668 * the same input on different machines or operating systems, or if SDL is
4669 * updated.
4670 *
4671 * \param y floating point value of the numerator (y coordinate).
4672 * \param x floating point value of the denominator (x coordinate).
4673 * \returns arc tangent of of `y / x` in radians, or, if `x = 0`, either
4674 * `-Pi/2`, `0`, or `Pi/2`, depending on the value of `y`.
4675 *
4676 * \threadsafety It is safe to call this function from any thread.
4677 *
4678 * \since This function is available since SDL 3.2.0.
4679 *
4680 * \sa SDL_atan2f
4681 * \sa SDL_atan
4682 * \sa SDL_tan
4683 */
4684extern SDL_DECLSPEC double SDLCALL SDL_atan2(double y, double x);
4685
4686/**
4687 * Compute the arc tangent of `y / x`, using the signs of x and y to adjust
4688 * the result's quadrant.
4689 *
4690 * The definition of `z = atan2(x, y)` is `y = x tan(z)`, where the quadrant
4691 * of z is determined based on the signs of x and y.
4692 *
4693 * Domain: `-INF <= x <= INF`, `-INF <= y <= INF`
4694 *
4695 * Range: `-Pi <= y <= Pi`
4696 *
4697 * This function operates on single-precision floating point values, use
4698 * SDL_atan2 for double-precision floats.
4699 *
4700 * To calculate the arc tangent of a single value, use SDL_atanf.
4701 *
4702 * This function may use a different approximation across different versions,
4703 * platforms and configurations. i.e, it can return a different value given
4704 * the same input on different machines or operating systems, or if SDL is
4705 * updated.
4706 *
4707 * \param y floating point value of the numerator (y coordinate).
4708 * \param x floating point value of the denominator (x coordinate).
4709 * \returns arc tangent of of `y / x` in radians, or, if `x = 0`, either
4710 * `-Pi/2`, `0`, or `Pi/2`, depending on the value of `y`.
4711 *
4712 * \threadsafety It is safe to call this function from any thread.
4713 *
4714 * \since This function is available since SDL 3.2.0.
4715 *
4716 * \sa SDL_atan2
4717 * \sa SDL_atan
4718 * \sa SDL_tan
4719 */
4720extern SDL_DECLSPEC float SDLCALL SDL_atan2f(float y, float x);
4721
4722/**
4723 * Compute the ceiling of `x`.
4724 *
4725 * The ceiling of `x` is the smallest integer `y` such that `y > x`, i.e `x`
4726 * rounded up to the nearest integer.
4727 *
4728 * Domain: `-INF <= x <= INF`
4729 *
4730 * Range: `-INF <= y <= INF`, y integer
4731 *
4732 * This function operates on double-precision floating point values, use
4733 * SDL_ceilf for single-precision floats.
4734 *
4735 * \param x floating point value.
4736 * \returns the ceiling of `x`.
4737 *
4738 * \threadsafety It is safe to call this function from any thread.
4739 *
4740 * \since This function is available since SDL 3.2.0.
4741 *
4742 * \sa SDL_ceilf
4743 * \sa SDL_floor
4744 * \sa SDL_trunc
4745 * \sa SDL_round
4746 * \sa SDL_lround
4747 */
4748extern SDL_DECLSPEC double SDLCALL SDL_ceil(double x);
4749
4750/**
4751 * Compute the ceiling of `x`.
4752 *
4753 * The ceiling of `x` is the smallest integer `y` such that `y > x`, i.e `x`
4754 * rounded up to the nearest integer.
4755 *
4756 * Domain: `-INF <= x <= INF`
4757 *
4758 * Range: `-INF <= y <= INF`, y integer
4759 *
4760 * This function operates on single-precision floating point values, use
4761 * SDL_ceil for double-precision floats.
4762 *
4763 * \param x floating point value.
4764 * \returns the ceiling of `x`.
4765 *
4766 * \threadsafety It is safe to call this function from any thread.
4767 *
4768 * \since This function is available since SDL 3.2.0.
4769 *
4770 * \sa SDL_ceil
4771 * \sa SDL_floorf
4772 * \sa SDL_truncf
4773 * \sa SDL_roundf
4774 * \sa SDL_lroundf
4775 */
4776extern SDL_DECLSPEC float SDLCALL SDL_ceilf(float x);
4777
4778/**
4779 * Copy the sign of one floating-point value to another.
4780 *
4781 * The definition of copysign is that ``copysign(x, y) = abs(x) * sign(y)``.
4782 *
4783 * Domain: `-INF <= x <= INF`, ``-INF <= y <= f``
4784 *
4785 * Range: `-INF <= z <= INF`
4786 *
4787 * This function operates on double-precision floating point values, use
4788 * SDL_copysignf for single-precision floats.
4789 *
4790 * \param x floating point value to use as the magnitude.
4791 * \param y floating point value to use as the sign.
4792 * \returns the floating point value with the sign of y and the magnitude of
4793 * x.
4794 *
4795 * \threadsafety It is safe to call this function from any thread.
4796 *
4797 * \since This function is available since SDL 3.2.0.
4798 *
4799 * \sa SDL_copysignf
4800 * \sa SDL_fabs
4801 */
4802extern SDL_DECLSPEC double SDLCALL SDL_copysign(double x, double y);
4803
4804/**
4805 * Copy the sign of one floating-point value to another.
4806 *
4807 * The definition of copysign is that ``copysign(x, y) = abs(x) * sign(y)``.
4808 *
4809 * Domain: `-INF <= x <= INF`, ``-INF <= y <= f``
4810 *
4811 * Range: `-INF <= z <= INF`
4812 *
4813 * This function operates on single-precision floating point values, use
4814 * SDL_copysign for double-precision floats.
4815 *
4816 * \param x floating point value to use as the magnitude.
4817 * \param y floating point value to use as the sign.
4818 * \returns the floating point value with the sign of y and the magnitude of
4819 * x.
4820 *
4821 * \threadsafety It is safe to call this function from any thread.
4822 *
4823 * \since This function is available since SDL 3.2.0.
4824 *
4825 * \sa SDL_copysign
4826 * \sa SDL_fabsf
4827 */
4828extern SDL_DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
4829
4830/**
4831 * Compute the cosine of `x`.
4832 *
4833 * Domain: `-INF <= x <= INF`
4834 *
4835 * Range: `-1 <= y <= 1`
4836 *
4837 * This function operates on double-precision floating point values, use
4838 * SDL_cosf for single-precision floats.
4839 *
4840 * This function may use a different approximation across different versions,
4841 * platforms and configurations. i.e, it can return a different value given
4842 * the same input on different machines or operating systems, or if SDL is
4843 * updated.
4844 *
4845 * \param x floating point value, in radians.
4846 * \returns cosine of `x`.
4847 *
4848 * \threadsafety It is safe to call this function from any thread.
4849 *
4850 * \since This function is available since SDL 3.2.0.
4851 *
4852 * \sa SDL_cosf
4853 * \sa SDL_acos
4854 * \sa SDL_sin
4855 */
4856extern SDL_DECLSPEC double SDLCALL SDL_cos(double x);
4857
4858/**
4859 * Compute the cosine of `x`.
4860 *
4861 * Domain: `-INF <= x <= INF`
4862 *
4863 * Range: `-1 <= y <= 1`
4864 *
4865 * This function operates on single-precision floating point values, use
4866 * SDL_cos for double-precision floats.
4867 *
4868 * This function may use a different approximation across different versions,
4869 * platforms and configurations. i.e, it can return a different value given
4870 * the same input on different machines or operating systems, or if SDL is
4871 * updated.
4872 *
4873 * \param x floating point value, in radians.
4874 * \returns cosine of `x`.
4875 *
4876 * \threadsafety It is safe to call this function from any thread.
4877 *
4878 * \since This function is available since SDL 3.2.0.
4879 *
4880 * \sa SDL_cos
4881 * \sa SDL_acosf
4882 * \sa SDL_sinf
4883 */
4884extern SDL_DECLSPEC float SDLCALL SDL_cosf(float x);
4885
4886/**
4887 * Compute the exponential of `x`.
4888 *
4889 * The definition of `y = exp(x)` is `y = e^x`, where `e` is the base of the
4890 * natural logarithm. The inverse is the natural logarithm, SDL_log.
4891 *
4892 * Domain: `-INF <= x <= INF`
4893 *
4894 * Range: `0 <= y <= INF`
4895 *
4896 * The output will overflow if `exp(x)` is too large to be represented.
4897 *
4898 * This function operates on double-precision floating point values, use
4899 * SDL_expf for single-precision floats.
4900 *
4901 * This function may use a different approximation across different versions,
4902 * platforms and configurations. i.e, it can return a different value given
4903 * the same input on different machines or operating systems, or if SDL is
4904 * updated.
4905 *
4906 * \param x floating point value.
4907 * \returns value of `e^x`.
4908 *
4909 * \threadsafety It is safe to call this function from any thread.
4910 *
4911 * \since This function is available since SDL 3.2.0.
4912 *
4913 * \sa SDL_expf
4914 * \sa SDL_log
4915 */
4916extern SDL_DECLSPEC double SDLCALL SDL_exp(double x);
4917
4918/**
4919 * Compute the exponential of `x`.
4920 *
4921 * The definition of `y = exp(x)` is `y = e^x`, where `e` is the base of the
4922 * natural logarithm. The inverse is the natural logarithm, SDL_logf.
4923 *
4924 * Domain: `-INF <= x <= INF`
4925 *
4926 * Range: `0 <= y <= INF`
4927 *
4928 * The output will overflow if `exp(x)` is too large to be represented.
4929 *
4930 * This function operates on single-precision floating point values, use
4931 * SDL_exp for double-precision floats.
4932 *
4933 * This function may use a different approximation across different versions,
4934 * platforms and configurations. i.e, it can return a different value given
4935 * the same input on different machines or operating systems, or if SDL is
4936 * updated.
4937 *
4938 * \param x floating point value.
4939 * \returns value of `e^x`.
4940 *
4941 * \threadsafety It is safe to call this function from any thread.
4942 *
4943 * \since This function is available since SDL 3.2.0.
4944 *
4945 * \sa SDL_exp
4946 * \sa SDL_logf
4947 */
4948extern SDL_DECLSPEC float SDLCALL SDL_expf(float x);
4949
4950/**
4951 * Compute the absolute value of `x`
4952 *
4953 * Domain: `-INF <= x <= INF`
4954 *
4955 * Range: `0 <= y <= INF`
4956 *
4957 * This function operates on double-precision floating point values, use
4958 * SDL_fabsf for single-precision floats.
4959 *
4960 * \param x floating point value to use as the magnitude.
4961 * \returns the absolute value of `x`.
4962 *
4963 * \threadsafety It is safe to call this function from any thread.
4964 *
4965 * \since This function is available since SDL 3.2.0.
4966 *
4967 * \sa SDL_fabsf
4968 */
4969extern SDL_DECLSPEC double SDLCALL SDL_fabs(double x);
4970
4971/**
4972 * Compute the absolute value of `x`
4973 *
4974 * Domain: `-INF <= x <= INF`
4975 *
4976 * Range: `0 <= y <= INF`
4977 *
4978 * This function operates on single-precision floating point values, use
4979 * SDL_fabs for double-precision floats.
4980 *
4981 * \param x floating point value to use as the magnitude.
4982 * \returns the absolute value of `x`.
4983 *
4984 * \threadsafety It is safe to call this function from any thread.
4985 *
4986 * \since This function is available since SDL 3.2.0.
4987 *
4988 * \sa SDL_fabs
4989 */
4990extern SDL_DECLSPEC float SDLCALL SDL_fabsf(float x);
4991
4992/**
4993 * Compute the floor of `x`.
4994 *
4995 * The floor of `x` is the largest integer `y` such that `y > x`, i.e `x`
4996 * rounded down to the nearest integer.
4997 *
4998 * Domain: `-INF <= x <= INF`
4999 *
5000 * Range: `-INF <= y <= INF`, y integer
5001 *
5002 * This function operates on double-precision floating point values, use
5003 * SDL_floorf for single-precision floats.
5004 *
5005 * \param x floating point value.
5006 * \returns the floor of `x`.
5007 *
5008 * \threadsafety It is safe to call this function from any thread.
5009 *
5010 * \since This function is available since SDL 3.2.0.
5011 *
5012 * \sa SDL_floorf
5013 * \sa SDL_ceil
5014 * \sa SDL_trunc
5015 * \sa SDL_round
5016 * \sa SDL_lround
5017 */
5018extern SDL_DECLSPEC double SDLCALL SDL_floor(double x);
5019
5020/**
5021 * Compute the floor of `x`.
5022 *
5023 * The floor of `x` is the largest integer `y` such that `y > x`, i.e `x`
5024 * rounded down to the nearest integer.
5025 *
5026 * Domain: `-INF <= x <= INF`
5027 *
5028 * Range: `-INF <= y <= INF`, y integer
5029 *
5030 * This function operates on single-precision floating point values, use
5031 * SDL_floor for double-precision floats.
5032 *
5033 * \param x floating point value.
5034 * \returns the floor of `x`.
5035 *
5036 * \threadsafety It is safe to call this function from any thread.
5037 *
5038 * \since This function is available since SDL 3.2.0.
5039 *
5040 * \sa SDL_floor
5041 * \sa SDL_ceilf
5042 * \sa SDL_truncf
5043 * \sa SDL_roundf
5044 * \sa SDL_lroundf
5045 */
5046extern SDL_DECLSPEC float SDLCALL SDL_floorf(float x);
5047
5048/**
5049 * Truncate `x` to an integer.
5050 *
5051 * Rounds `x` to the next closest integer to 0. This is equivalent to removing
5052 * the fractional part of `x`, leaving only the integer part.
5053 *
5054 * Domain: `-INF <= x <= INF`
5055 *
5056 * Range: `-INF <= y <= INF`, y integer
5057 *
5058 * This function operates on double-precision floating point values, use
5059 * SDL_truncf for single-precision floats.
5060 *
5061 * \param x floating point value.
5062 * \returns `x` truncated to an integer.
5063 *
5064 * \threadsafety It is safe to call this function from any thread.
5065 *
5066 * \since This function is available since SDL 3.2.0.
5067 *
5068 * \sa SDL_truncf
5069 * \sa SDL_fmod
5070 * \sa SDL_ceil
5071 * \sa SDL_floor
5072 * \sa SDL_round
5073 * \sa SDL_lround
5074 */
5075extern SDL_DECLSPEC double SDLCALL SDL_trunc(double x);
5076
5077/**
5078 * Truncate `x` to an integer.
5079 *
5080 * Rounds `x` to the next closest integer to 0. This is equivalent to removing
5081 * the fractional part of `x`, leaving only the integer part.
5082 *
5083 * Domain: `-INF <= x <= INF`
5084 *
5085 * Range: `-INF <= y <= INF`, y integer
5086 *
5087 * This function operates on single-precision floating point values, use
5088 * SDL_trunc for double-precision floats.
5089 *
5090 * \param x floating point value.
5091 * \returns `x` truncated to an integer.
5092 *
5093 * \threadsafety It is safe to call this function from any thread.
5094 *
5095 * \since This function is available since SDL 3.2.0.
5096 *
5097 * \sa SDL_trunc
5098 * \sa SDL_fmodf
5099 * \sa SDL_ceilf
5100 * \sa SDL_floorf
5101 * \sa SDL_roundf
5102 * \sa SDL_lroundf
5103 */
5104extern SDL_DECLSPEC float SDLCALL SDL_truncf(float x);
5105
5106/**
5107 * Return the floating-point remainder of `x / y`
5108 *
5109 * Divides `x` by `y`, and returns the remainder.
5110 *
5111 * Domain: `-INF <= x <= INF`, `-INF <= y <= INF`, `y != 0`
5112 *
5113 * Range: `-y <= z <= y`
5114 *
5115 * This function operates on double-precision floating point values, use
5116 * SDL_fmodf for single-precision floats.
5117 *
5118 * \param x the numerator.
5119 * \param y the denominator. Must not be 0.
5120 * \returns the remainder of `x / y`.
5121 *
5122 * \threadsafety It is safe to call this function from any thread.
5123 *
5124 * \since This function is available since SDL 3.2.0.
5125 *
5126 * \sa SDL_fmodf
5127 * \sa SDL_modf
5128 * \sa SDL_trunc
5129 * \sa SDL_ceil
5130 * \sa SDL_floor
5131 * \sa SDL_round
5132 * \sa SDL_lround
5133 */
5134extern SDL_DECLSPEC double SDLCALL SDL_fmod(double x, double y);
5135
5136/**
5137 * Return the floating-point remainder of `x / y`
5138 *
5139 * Divides `x` by `y`, and returns the remainder.
5140 *
5141 * Domain: `-INF <= x <= INF`, `-INF <= y <= INF`, `y != 0`
5142 *
5143 * Range: `-y <= z <= y`
5144 *
5145 * This function operates on single-precision floating point values, use
5146 * SDL_fmod for double-precision floats.
5147 *
5148 * \param x the numerator.
5149 * \param y the denominator. Must not be 0.
5150 * \returns the remainder of `x / y`.
5151 *
5152 * \threadsafety It is safe to call this function from any thread.
5153 *
5154 * \since This function is available since SDL 3.2.0.
5155 *
5156 * \sa SDL_fmod
5157 * \sa SDL_truncf
5158 * \sa SDL_modff
5159 * \sa SDL_ceilf
5160 * \sa SDL_floorf
5161 * \sa SDL_roundf
5162 * \sa SDL_lroundf
5163 */
5164extern SDL_DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
5165
5166/**
5167 * Return whether the value is infinity.
5168 *
5169 * \param x double-precision floating point value.
5170 * \returns non-zero if the value is infinity, 0 otherwise.
5171 *
5172 * \threadsafety It is safe to call this function from any thread.
5173 *
5174 * \since This function is available since SDL 3.2.0.
5175 *
5176 * \sa SDL_isinff
5177 */
5178extern SDL_DECLSPEC int SDLCALL SDL_isinf(double x);
5179
5180/**
5181 * Return whether the value is infinity.
5182 *
5183 * \param x floating point value.
5184 * \returns non-zero if the value is infinity, 0 otherwise.
5185 *
5186 * \threadsafety It is safe to call this function from any thread.
5187 *
5188 * \since This function is available since SDL 3.2.0.
5189 *
5190 * \sa SDL_isinf
5191 */
5192extern SDL_DECLSPEC int SDLCALL SDL_isinff(float x);
5193
5194/**
5195 * Return whether the value is NaN.
5196 *
5197 * \param x double-precision floating point value.
5198 * \returns non-zero if the value is NaN, 0 otherwise.
5199 *
5200 * \threadsafety It is safe to call this function from any thread.
5201 *
5202 * \since This function is available since SDL 3.2.0.
5203 *
5204 * \sa SDL_isnanf
5205 */
5206extern SDL_DECLSPEC int SDLCALL SDL_isnan(double x);
5207
5208/**
5209 * Return whether the value is NaN.
5210 *
5211 * \param x floating point value.
5212 * \returns non-zero if the value is NaN, 0 otherwise.
5213 *
5214 * \threadsafety It is safe to call this function from any thread.
5215 *
5216 * \since This function is available since SDL 3.2.0.
5217 *
5218 * \sa SDL_isnan
5219 */
5220extern SDL_DECLSPEC int SDLCALL SDL_isnanf(float x);
5221
5222/**
5223 * Compute the natural logarithm of `x`.
5224 *
5225 * Domain: `0 < x <= INF`
5226 *
5227 * Range: `-INF <= y <= INF`
5228 *
5229 * It is an error for `x` to be less than or equal to 0.
5230 *
5231 * This function operates on double-precision floating point values, use
5232 * SDL_logf for single-precision floats.
5233 *
5234 * This function may use a different approximation across different versions,
5235 * platforms and configurations. i.e, it can return a different value given
5236 * the same input on different machines or operating systems, or if SDL is
5237 * updated.
5238 *
5239 * \param x floating point value. Must be greater than 0.
5240 * \returns the natural logarithm of `x`.
5241 *
5242 * \threadsafety It is safe to call this function from any thread.
5243 *
5244 * \since This function is available since SDL 3.2.0.
5245 *
5246 * \sa SDL_logf
5247 * \sa SDL_log10
5248 * \sa SDL_exp
5249 */
5250extern SDL_DECLSPEC double SDLCALL SDL_log(double x);
5251
5252/**
5253 * Compute the natural logarithm of `x`.
5254 *
5255 * Domain: `0 < x <= INF`
5256 *
5257 * Range: `-INF <= y <= INF`
5258 *
5259 * It is an error for `x` to be less than or equal to 0.
5260 *
5261 * This function operates on single-precision floating point values, use
5262 * SDL_log for double-precision floats.
5263 *
5264 * This function may use a different approximation across different versions,
5265 * platforms and configurations. i.e, it can return a different value given
5266 * the same input on different machines or operating systems, or if SDL is
5267 * updated.
5268 *
5269 * \param x floating point value. Must be greater than 0.
5270 * \returns the natural logarithm of `x`.
5271 *
5272 * \threadsafety It is safe to call this function from any thread.
5273 *
5274 * \since This function is available since SDL 3.2.0.
5275 *
5276 * \sa SDL_log
5277 * \sa SDL_expf
5278 */
5279extern SDL_DECLSPEC float SDLCALL SDL_logf(float x);
5280
5281/**
5282 * Compute the base-10 logarithm of `x`.
5283 *
5284 * Domain: `0 < x <= INF`
5285 *
5286 * Range: `-INF <= y <= INF`
5287 *
5288 * It is an error for `x` to be less than or equal to 0.
5289 *
5290 * This function operates on double-precision floating point values, use
5291 * SDL_log10f for single-precision floats.
5292 *
5293 * This function may use a different approximation across different versions,
5294 * platforms and configurations. i.e, it can return a different value given
5295 * the same input on different machines or operating systems, or if SDL is
5296 * updated.
5297 *
5298 * \param x floating point value. Must be greater than 0.
5299 * \returns the logarithm of `x`.
5300 *
5301 * \threadsafety It is safe to call this function from any thread.
5302 *
5303 * \since This function is available since SDL 3.2.0.
5304 *
5305 * \sa SDL_log10f
5306 * \sa SDL_log
5307 * \sa SDL_pow
5308 */
5309extern SDL_DECLSPEC double SDLCALL SDL_log10(double x);
5310
5311/**
5312 * Compute the base-10 logarithm of `x`.
5313 *
5314 * Domain: `0 < x <= INF`
5315 *
5316 * Range: `-INF <= y <= INF`
5317 *
5318 * It is an error for `x` to be less than or equal to 0.
5319 *
5320 * This function operates on single-precision floating point values, use
5321 * SDL_log10 for double-precision floats.
5322 *
5323 * This function may use a different approximation across different versions,
5324 * platforms and configurations. i.e, it can return a different value given
5325 * the same input on different machines or operating systems, or if SDL is
5326 * updated.
5327 *
5328 * \param x floating point value. Must be greater than 0.
5329 * \returns the logarithm of `x`.
5330 *
5331 * \threadsafety It is safe to call this function from any thread.
5332 *
5333 * \since This function is available since SDL 3.2.0.
5334 *
5335 * \sa SDL_log10
5336 * \sa SDL_logf
5337 * \sa SDL_powf
5338 */
5339extern SDL_DECLSPEC float SDLCALL SDL_log10f(float x);
5340
5341/**
5342 * Split `x` into integer and fractional parts
5343 *
5344 * This function operates on double-precision floating point values, use
5345 * SDL_modff for single-precision floats.
5346 *
5347 * \param x floating point value.
5348 * \param y output pointer to store the integer part of `x`.
5349 * \returns the fractional part of `x`.
5350 *
5351 * \threadsafety It is safe to call this function from any thread.
5352 *
5353 * \since This function is available since SDL 3.2.0.
5354 *
5355 * \sa SDL_modff
5356 * \sa SDL_trunc
5357 * \sa SDL_fmod
5358 */
5359extern SDL_DECLSPEC double SDLCALL SDL_modf(double x, double *y);
5360
5361/**
5362 * Split `x` into integer and fractional parts
5363 *
5364 * This function operates on single-precision floating point values, use
5365 * SDL_modf for double-precision floats.
5366 *
5367 * \param x floating point value.
5368 * \param y output pointer to store the integer part of `x`.
5369 * \returns the fractional part of `x`.
5370 *
5371 * \threadsafety It is safe to call this function from any thread.
5372 *
5373 * \since This function is available since SDL 3.2.0.
5374 *
5375 * \sa SDL_modf
5376 * \sa SDL_truncf
5377 * \sa SDL_fmodf
5378 */
5379extern SDL_DECLSPEC float SDLCALL SDL_modff(float x, float *y);
5380
5381/**
5382 * Raise `x` to the power `y`
5383 *
5384 * Domain: `-INF <= x <= INF`, `-INF <= y <= INF`
5385 *
5386 * Range: `-INF <= z <= INF`
5387 *
5388 * If `y` is the base of the natural logarithm (e), consider using SDL_exp
5389 * instead.
5390 *
5391 * This function operates on double-precision floating point values, use
5392 * SDL_powf for single-precision floats.
5393 *
5394 * This function may use a different approximation across different versions,
5395 * platforms and configurations. i.e, it can return a different value given
5396 * the same input on different machines or operating systems, or if SDL is
5397 * updated.
5398 *
5399 * \param x the base.
5400 * \param y the exponent.
5401 * \returns `x` raised to the power `y`.
5402 *
5403 * \threadsafety It is safe to call this function from any thread.
5404 *
5405 * \since This function is available since SDL 3.2.0.
5406 *
5407 * \sa SDL_powf
5408 * \sa SDL_exp
5409 * \sa SDL_log
5410 */
5411extern SDL_DECLSPEC double SDLCALL SDL_pow(double x, double y);
5412
5413/**
5414 * Raise `x` to the power `y`
5415 *
5416 * Domain: `-INF <= x <= INF`, `-INF <= y <= INF`
5417 *
5418 * Range: `-INF <= z <= INF`
5419 *
5420 * If `y` is the base of the natural logarithm (e), consider using SDL_exp
5421 * instead.
5422 *
5423 * This function operates on single-precision floating point values, use
5424 * SDL_pow for double-precision floats.
5425 *
5426 * This function may use a different approximation across different versions,
5427 * platforms and configurations. i.e, it can return a different value given
5428 * the same input on different machines or operating systems, or if SDL is
5429 * updated.
5430 *
5431 * \param x the base.
5432 * \param y the exponent.
5433 * \returns `x` raised to the power `y`.
5434 *
5435 * \threadsafety It is safe to call this function from any thread.
5436 *
5437 * \since This function is available since SDL 3.2.0.
5438 *
5439 * \sa SDL_pow
5440 * \sa SDL_expf
5441 * \sa SDL_logf
5442 */
5443extern SDL_DECLSPEC float SDLCALL SDL_powf(float x, float y);
5444
5445/**
5446 * Round `x` to the nearest integer.
5447 *
5448 * Rounds `x` to the nearest integer. Values halfway between integers will be
5449 * rounded away from zero.
5450 *
5451 * Domain: `-INF <= x <= INF`
5452 *
5453 * Range: `-INF <= y <= INF`, y integer
5454 *
5455 * This function operates on double-precision floating point values, use
5456 * SDL_roundf for single-precision floats. To get the result as an integer
5457 * type, use SDL_lround.
5458 *
5459 * \param x floating point value.
5460 * \returns the nearest integer to `x`.
5461 *
5462 * \threadsafety It is safe to call this function from any thread.
5463 *
5464 * \since This function is available since SDL 3.2.0.
5465 *
5466 * \sa SDL_roundf
5467 * \sa SDL_lround
5468 * \sa SDL_floor
5469 * \sa SDL_ceil
5470 * \sa SDL_trunc
5471 */
5472extern SDL_DECLSPEC double SDLCALL SDL_round(double x);
5473
5474/**
5475 * Round `x` to the nearest integer.
5476 *
5477 * Rounds `x` to the nearest integer. Values halfway between integers will be
5478 * rounded away from zero.
5479 *
5480 * Domain: `-INF <= x <= INF`
5481 *
5482 * Range: `-INF <= y <= INF`, y integer
5483 *
5484 * This function operates on single-precision floating point values, use
5485 * SDL_round for double-precision floats. To get the result as an integer
5486 * type, use SDL_lroundf.
5487 *
5488 * \param x floating point value.
5489 * \returns the nearest integer to `x`.
5490 *
5491 * \threadsafety It is safe to call this function from any thread.
5492 *
5493 * \since This function is available since SDL 3.2.0.
5494 *
5495 * \sa SDL_round
5496 * \sa SDL_lroundf
5497 * \sa SDL_floorf
5498 * \sa SDL_ceilf
5499 * \sa SDL_truncf
5500 */
5501extern SDL_DECLSPEC float SDLCALL SDL_roundf(float x);
5502
5503/**
5504 * Round `x` to the nearest integer representable as a long
5505 *
5506 * Rounds `x` to the nearest integer. Values halfway between integers will be
5507 * rounded away from zero.
5508 *
5509 * Domain: `-INF <= x <= INF`
5510 *
5511 * Range: `MIN_LONG <= y <= MAX_LONG`
5512 *
5513 * This function operates on double-precision floating point values, use
5514 * SDL_lroundf for single-precision floats. To get the result as a
5515 * floating-point type, use SDL_round.
5516 *
5517 * \param x floating point value.
5518 * \returns the nearest integer to `x`.
5519 *
5520 * \threadsafety It is safe to call this function from any thread.
5521 *
5522 * \since This function is available since SDL 3.2.0.
5523 *
5524 * \sa SDL_lroundf
5525 * \sa SDL_round
5526 * \sa SDL_floor
5527 * \sa SDL_ceil
5528 * \sa SDL_trunc
5529 */
5530extern SDL_DECLSPEC long SDLCALL SDL_lround(double x);
5531
5532/**
5533 * Round `x` to the nearest integer representable as a long
5534 *
5535 * Rounds `x` to the nearest integer. Values halfway between integers will be
5536 * rounded away from zero.
5537 *
5538 * Domain: `-INF <= x <= INF`
5539 *
5540 * Range: `MIN_LONG <= y <= MAX_LONG`
5541 *
5542 * This function operates on single-precision floating point values, use
5543 * SDL_lround for double-precision floats. To get the result as a
5544 * floating-point type, use SDL_roundf.
5545 *
5546 * \param x floating point value.
5547 * \returns the nearest integer to `x`.
5548 *
5549 * \threadsafety It is safe to call this function from any thread.
5550 *
5551 * \since This function is available since SDL 3.2.0.
5552 *
5553 * \sa SDL_lround
5554 * \sa SDL_roundf
5555 * \sa SDL_floorf
5556 * \sa SDL_ceilf
5557 * \sa SDL_truncf
5558 */
5559extern SDL_DECLSPEC long SDLCALL SDL_lroundf(float x);
5560
5561/**
5562 * Scale `x` by an integer power of two.
5563 *
5564 * Multiplies `x` by the `n`th power of the floating point radix (always 2).
5565 *
5566 * Domain: `-INF <= x <= INF`, `n` integer
5567 *
5568 * Range: `-INF <= y <= INF`
5569 *
5570 * This function operates on double-precision floating point values, use
5571 * SDL_scalbnf for single-precision floats.
5572 *
5573 * \param x floating point value to be scaled.
5574 * \param n integer exponent.
5575 * \returns `x * 2^n`.
5576 *
5577 * \threadsafety It is safe to call this function from any thread.
5578 *
5579 * \since This function is available since SDL 3.2.0.
5580 *
5581 * \sa SDL_scalbnf
5582 * \sa SDL_pow
5583 */
5584extern SDL_DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
5585
5586/**
5587 * Scale `x` by an integer power of two.
5588 *
5589 * Multiplies `x` by the `n`th power of the floating point radix (always 2).
5590 *
5591 * Domain: `-INF <= x <= INF`, `n` integer
5592 *
5593 * Range: `-INF <= y <= INF`
5594 *
5595 * This function operates on single-precision floating point values, use
5596 * SDL_scalbn for double-precision floats.
5597 *
5598 * \param x floating point value to be scaled.
5599 * \param n integer exponent.
5600 * \returns `x * 2^n`.
5601 *
5602 * \threadsafety It is safe to call this function from any thread.
5603 *
5604 * \since This function is available since SDL 3.2.0.
5605 *
5606 * \sa SDL_scalbn
5607 * \sa SDL_powf
5608 */
5609extern SDL_DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);
5610
5611/**
5612 * Compute the sine of `x`.
5613 *
5614 * Domain: `-INF <= x <= INF`
5615 *
5616 * Range: `-1 <= y <= 1`
5617 *
5618 * This function operates on double-precision floating point values, use
5619 * SDL_sinf for single-precision floats.
5620 *
5621 * This function may use a different approximation across different versions,
5622 * platforms and configurations. i.e, it can return a different value given
5623 * the same input on different machines or operating systems, or if SDL is
5624 * updated.
5625 *
5626 * \param x floating point value, in radians.
5627 * \returns sine of `x`.
5628 *
5629 * \threadsafety It is safe to call this function from any thread.
5630 *
5631 * \since This function is available since SDL 3.2.0.
5632 *
5633 * \sa SDL_sinf
5634 * \sa SDL_asin
5635 * \sa SDL_cos
5636 */
5637extern SDL_DECLSPEC double SDLCALL SDL_sin(double x);
5638
5639/**
5640 * Compute the sine of `x`.
5641 *
5642 * Domain: `-INF <= x <= INF`
5643 *
5644 * Range: `-1 <= y <= 1`
5645 *
5646 * This function operates on single-precision floating point values, use
5647 * SDL_sin for double-precision floats.
5648 *
5649 * This function may use a different approximation across different versions,
5650 * platforms and configurations. i.e, it can return a different value given
5651 * the same input on different machines or operating systems, or if SDL is
5652 * updated.
5653 *
5654 * \param x floating point value, in radians.
5655 * \returns sine of `x`.
5656 *
5657 * \threadsafety It is safe to call this function from any thread.
5658 *
5659 * \since This function is available since SDL 3.2.0.
5660 *
5661 * \sa SDL_sin
5662 * \sa SDL_asinf
5663 * \sa SDL_cosf
5664 */
5665extern SDL_DECLSPEC float SDLCALL SDL_sinf(float x);
5666
5667/**
5668 * Compute the square root of `x`.
5669 *
5670 * Domain: `0 <= x <= INF`
5671 *
5672 * Range: `0 <= y <= INF`
5673 *
5674 * This function operates on double-precision floating point values, use
5675 * SDL_sqrtf for single-precision floats.
5676 *
5677 * This function may use a different approximation across different versions,
5678 * platforms and configurations. i.e, it can return a different value given
5679 * the same input on different machines or operating systems, or if SDL is
5680 * updated.
5681 *
5682 * \param x floating point value. Must be greater than or equal to 0.
5683 * \returns square root of `x`.
5684 *
5685 * \threadsafety It is safe to call this function from any thread.
5686 *
5687 * \since This function is available since SDL 3.2.0.
5688 *
5689 * \sa SDL_sqrtf
5690 */
5691extern SDL_DECLSPEC double SDLCALL SDL_sqrt(double x);
5692
5693/**
5694 * Compute the square root of `x`.
5695 *
5696 * Domain: `0 <= x <= INF`
5697 *
5698 * Range: `0 <= y <= INF`
5699 *
5700 * This function operates on single-precision floating point values, use
5701 * SDL_sqrt for double-precision floats.
5702 *
5703 * This function may use a different approximation across different versions,
5704 * platforms and configurations. i.e, it can return a different value given
5705 * the same input on different machines or operating systems, or if SDL is
5706 * updated.
5707 *
5708 * \param x floating point value. Must be greater than or equal to 0.
5709 * \returns square root of `x`.
5710 *
5711 * \threadsafety It is safe to call this function from any thread.
5712 *
5713 * \since This function is available since SDL 3.2.0.
5714 *
5715 * \sa SDL_sqrt
5716 */
5717extern SDL_DECLSPEC float SDLCALL SDL_sqrtf(float x);
5718
5719/**
5720 * Compute the tangent of `x`.
5721 *
5722 * Domain: `-INF <= x <= INF`
5723 *
5724 * Range: `-INF <= y <= INF`
5725 *
5726 * This function operates on double-precision floating point values, use
5727 * SDL_tanf for single-precision floats.
5728 *
5729 * This function may use a different approximation across different versions,
5730 * platforms and configurations. i.e, it can return a different value given
5731 * the same input on different machines or operating systems, or if SDL is
5732 * updated.
5733 *
5734 * \param x floating point value, in radians.
5735 * \returns tangent of `x`.
5736 *
5737 * \threadsafety It is safe to call this function from any thread.
5738 *
5739 * \since This function is available since SDL 3.2.0.
5740 *
5741 * \sa SDL_tanf
5742 * \sa SDL_sin
5743 * \sa SDL_cos
5744 * \sa SDL_atan
5745 * \sa SDL_atan2
5746 */
5747extern SDL_DECLSPEC double SDLCALL SDL_tan(double x);
5748
5749/**
5750 * Compute the tangent of `x`.
5751 *
5752 * Domain: `-INF <= x <= INF`
5753 *
5754 * Range: `-INF <= y <= INF`
5755 *
5756 * This function operates on single-precision floating point values, use
5757 * SDL_tan for double-precision floats.
5758 *
5759 * This function may use a different approximation across different versions,
5760 * platforms and configurations. i.e, it can return a different value given
5761 * the same input on different machines or operating systems, or if SDL is
5762 * updated.
5763 *
5764 * \param x floating point value, in radians.
5765 * \returns tangent of `x`.
5766 *
5767 * \threadsafety It is safe to call this function from any thread.
5768 *
5769 * \since This function is available since SDL 3.2.0.
5770 *
5771 * \sa SDL_tan
5772 * \sa SDL_sinf
5773 * \sa SDL_cosf
5774 * \sa SDL_atanf
5775 * \sa SDL_atan2f
5776 */
5777extern SDL_DECLSPEC float SDLCALL SDL_tanf(float x);
5778
5779/**
5780 * An opaque handle representing string encoding conversion state.
5781 *
5782 * \since This datatype is available since SDL 3.2.0.
5783 *
5784 * \sa SDL_iconv_open
5785 */
5786typedef struct SDL_iconv_data_t *SDL_iconv_t;
5787
5788/**
5789 * This function allocates a context for the specified character set
5790 * conversion.
5791 *
5792 * \param tocode The target character encoding, must not be NULL.
5793 * \param fromcode The source character encoding, must not be NULL.
5794 * \returns a handle that must be freed with SDL_iconv_close, or
5795 * SDL_ICONV_ERROR on failure.
5796 *
5797 * \since This function is available since SDL 3.2.0.
5798 *
5799 * \sa SDL_iconv
5800 * \sa SDL_iconv_close
5801 * \sa SDL_iconv_string
5802 */
5803extern SDL_DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
5804 const char *fromcode);
5805
5806/**
5807 * This function frees a context used for character set conversion.
5808 *
5809 * \param cd The character set conversion handle.
5810 * \returns 0 on success, or -1 on failure.
5811 *
5812 * \since This function is available since SDL 3.2.0.
5813 *
5814 * \sa SDL_iconv
5815 * \sa SDL_iconv_open
5816 * \sa SDL_iconv_string
5817 */
5818extern SDL_DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
5819
5820/**
5821 * This function converts text between encodings, reading from and writing to
5822 * a buffer.
5823 *
5824 * It returns the number of succesful conversions on success. On error,
5825 * SDL_ICONV_E2BIG is returned when the output buffer is too small, or
5826 * SDL_ICONV_EILSEQ is returned when an invalid input sequence is encountered,
5827 * or SDL_ICONV_EINVAL is returned when an incomplete input sequence is
5828 * encountered.
5829 *
5830 * On exit:
5831 *
5832 * - inbuf will point to the beginning of the next multibyte sequence. On
5833 * error, this is the location of the problematic input sequence. On
5834 * success, this is the end of the input sequence.
5835 * - inbytesleft will be set to the number of bytes left to convert, which
5836 * will be 0 on success.
5837 * - outbuf will point to the location where to store the next output byte.
5838 * - outbytesleft will be set to the number of bytes left in the output
5839 * buffer.
5840 *
5841 * \param cd The character set conversion context, created in
5842 * SDL_iconv_open().
5843 * \param inbuf Address of variable that points to the first character of the
5844 * input sequence.
5845 * \param inbytesleft The number of bytes in the input buffer.
5846 * \param outbuf Address of variable that points to the output buffer.
5847 * \param outbytesleft The number of bytes in the output buffer.
5848 * \returns the number of conversions on success, or a negative error code.
5849 *
5850 * \since This function is available since SDL 3.2.0.
5851 *
5852 * \sa SDL_iconv_open
5853 * \sa SDL_iconv_close
5854 * \sa SDL_iconv_string
5855 */
5856extern SDL_DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
5857 size_t *inbytesleft, char **outbuf,
5858 size_t *outbytesleft);
5859
5860#define SDL_ICONV_ERROR (size_t)-1 /**< Generic error. Check SDL_GetError()? */
5861#define SDL_ICONV_E2BIG (size_t)-2 /**< Output buffer was too small. */
5862#define SDL_ICONV_EILSEQ (size_t)-3 /**< Invalid input sequence was encountered. */
5863#define SDL_ICONV_EINVAL (size_t)-4 /**< Incomplete input sequence was encountered. */
5864
5865
5866/**
5867 * Helper function to convert a string's encoding in one call.
5868 *
5869 * This function converts a buffer or string between encodings in one pass.
5870 *
5871 * The string does not need to be NULL-terminated; this function operates on
5872 * the number of bytes specified in `inbytesleft` whether there is a NULL
5873 * character anywhere in the buffer.
5874 *
5875 * The returned string is owned by the caller, and should be passed to
5876 * SDL_free when no longer needed.
5877 *
5878 * \param tocode the character encoding of the output string. Examples are
5879 * "UTF-8", "UCS-4", etc.
5880 * \param fromcode the character encoding of data in `inbuf`.
5881 * \param inbuf the string to convert to a different encoding.
5882 * \param inbytesleft the size of the input string _in bytes_.
5883 * \returns a new string, converted to the new encoding, or NULL on error.
5884 *
5885 * \since This function is available since SDL 3.2.0.
5886 *
5887 * \sa SDL_iconv_open
5888 * \sa SDL_iconv_close
5889 * \sa SDL_iconv
5890 */
5891extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
5892 const char *fromcode,
5893 const char *inbuf,
5894 size_t inbytesleft);
5895
5896/* Some helper macros for common SDL_iconv_string cases... */
5897
5898/**
5899 * Convert a UTF-8 string to the current locale's character encoding.
5900 *
5901 * This is a helper macro that might be more clear than calling
5902 * SDL_iconv_string directly. However, it double-evaluates its parameter, so
5903 * do not use an expression with side-effects here.
5904 *
5905 * \param S the string to convert.
5906 * \returns a new string, converted to the new encoding, or NULL on error.
5907 *
5908 * \since This macro is available since SDL 3.2.0.
5909 */
5910#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
5911
5912/**
5913 * Convert a UTF-8 string to UCS-2.
5914 *
5915 * This is a helper macro that might be more clear than calling
5916 * SDL_iconv_string directly. However, it double-evaluates its parameter, so
5917 * do not use an expression with side-effects here.
5918 *
5919 * \param S the string to convert.
5920 * \returns a new string, converted to the new encoding, or NULL on error.
5921 *
5922 * \since This macro is available since SDL 3.2.0.
5923 */
5924#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)
5925
5926/**
5927 * Convert a UTF-8 string to UCS-4.
5928 *
5929 * This is a helper macro that might be more clear than calling
5930 * SDL_iconv_string directly. However, it double-evaluates its parameter, so
5931 * do not use an expression with side-effects here.
5932 *
5933 * \param S the string to convert.
5934 * \returns a new string, converted to the new encoding, or NULL on error.
5935 *
5936 * \since This macro is available since SDL 3.2.0.
5937 */
5938#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1)
5939
5940/**
5941 * Convert a wchar_t string to UTF-8.
5942 *
5943 * This is a helper macro that might be more clear than calling
5944 * SDL_iconv_string directly. However, it double-evaluates its parameter, so
5945 * do not use an expression with side-effects here.
5946 *
5947 * \param S the string to convert.
5948 * \returns a new string, converted to the new encoding, or NULL on error.
5949 *
5950 * \since This macro is available since SDL 3.2.0.
5951 */
5952#define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", (char *)S, (SDL_wcslen(S)+1)*sizeof(wchar_t))
5953
5954
5955/* force builds using Clang's static analysis tools to use literal C runtime
5956 here, since there are possibly tests that are ineffective otherwise. */
5957#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
5958
5959/* The analyzer knows about strlcpy even when the system doesn't provide it */
5960#if !defined(HAVE_STRLCPY) && !defined(strlcpy)
5961size_t strlcpy(char *dst, const char *src, size_t size);
5962#endif
5963
5964/* The analyzer knows about strlcat even when the system doesn't provide it */
5965#if !defined(HAVE_STRLCAT) && !defined(strlcat)
5966size_t strlcat(char *dst, const char *src, size_t size);
5967#endif
5968
5969#if !defined(HAVE_WCSLCPY) && !defined(wcslcpy)
5970size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size);
5971#endif
5972
5973#if !defined(HAVE_WCSLCAT) && !defined(wcslcat)
5974size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size);
5975#endif
5976
5977#ifndef _WIN32
5978/* strdup is not ANSI but POSIX, and its prototype might be hidden... */
5979/* not for windows: might conflict with string.h where strdup may have
5980 * dllimport attribute: https://github.com/libsdl-org/SDL/issues/12948 */
5981char *strdup(const char *str);
5982#endif
5983
5984/* Starting LLVM 16, the analyser errors out if these functions do not have
5985 their prototype defined (clang-diagnostic-implicit-function-declaration) */
5986#include <stdio.h>
5987#include <stdlib.h>
5988
5989#define SDL_malloc malloc
5990#define SDL_calloc calloc
5991#define SDL_realloc realloc
5992#define SDL_free free
5993#ifndef SDL_memcpy
5994#define SDL_memcpy memcpy
5995#endif
5996#ifndef SDL_memmove
5997#define SDL_memmove memmove
5998#endif
5999#ifndef SDL_memset
6000#define SDL_memset memset
6001#endif
6002#define SDL_memcmp memcmp
6003#define SDL_strlcpy strlcpy
6004#define SDL_strlcat strlcat
6005#define SDL_strlen strlen
6006#define SDL_wcslen wcslen
6007#define SDL_wcslcpy wcslcpy
6008#define SDL_wcslcat wcslcat
6009#define SDL_strdup strdup
6010#define SDL_wcsdup wcsdup
6011#define SDL_strchr strchr
6012#define SDL_strrchr strrchr
6013#define SDL_strstr strstr
6014#define SDL_wcsstr wcsstr
6015#define SDL_strtok_r strtok_r
6016#define SDL_strcmp strcmp
6017#define SDL_wcscmp wcscmp
6018#define SDL_strncmp strncmp
6019#define SDL_wcsncmp wcsncmp
6020#define SDL_strcasecmp strcasecmp
6021#define SDL_strncasecmp strncasecmp
6022#define SDL_strpbrk strpbrk
6023#define SDL_sscanf sscanf
6024#define SDL_vsscanf vsscanf
6025#define SDL_snprintf snprintf
6026#define SDL_vsnprintf vsnprintf
6027#endif
6028
6029/**
6030 * Multiply two integers, checking for overflow.
6031 *
6032 * If `a * b` would overflow, return false.
6033 *
6034 * Otherwise store `a * b` via ret and return true.
6035 *
6036 * \param a the multiplicand.
6037 * \param b the multiplier.
6038 * \param ret on non-overflow output, stores the multiplication result, may
6039 * not be NULL.
6040 * \returns false on overflow, true if result is multiplied without overflow.
6041 *
6042 * \threadsafety It is safe to call this function from any thread.
6043 *
6044 * \since This function is available since SDL 3.2.0.
6045 */
6046SDL_FORCE_INLINE bool SDL_size_mul_check_overflow(size_t a, size_t b, size_t *ret)
6047{
6048 if (a != 0 && b > SDL_SIZE_MAX / a) {
6049 return false;
6050 }
6051 *ret = a * b;
6052 return true;
6053}
6054
6055#ifndef SDL_WIKI_DOCUMENTATION_SECTION
6056#if SDL_HAS_BUILTIN(__builtin_mul_overflow)
6057/* This needs to be wrapped in an inline rather than being a direct #define,
6058 * because __builtin_mul_overflow() is type-generic, but we want to be
6059 * consistent about interpreting a and b as size_t. */
6060SDL_FORCE_INLINE bool SDL_size_mul_check_overflow_builtin(size_t a, size_t b, size_t *ret)
6061{
6062 return (__builtin_mul_overflow(a, b, ret) == 0);
6063}
6064#define SDL_size_mul_check_overflow(a, b, ret) SDL_size_mul_check_overflow_builtin(a, b, ret)
6065#endif
6066#endif
6067
6068/**
6069 * Add two integers, checking for overflow.
6070 *
6071 * If `a + b` would overflow, return false.
6072 *
6073 * Otherwise store `a + b` via ret and return true.
6074 *
6075 * \param a the first addend.
6076 * \param b the second addend.
6077 * \param ret on non-overflow output, stores the addition result, may not be
6078 * NULL.
6079 * \returns false on overflow, true if result is added without overflow.
6080 *
6081 * \threadsafety It is safe to call this function from any thread.
6082 *
6083 * \since This function is available since SDL 3.2.0.
6084 */
6085SDL_FORCE_INLINE bool SDL_size_add_check_overflow(size_t a, size_t b, size_t *ret)
6086{
6087 if (b > SDL_SIZE_MAX - a) {
6088 return false;
6089 }
6090 *ret = a + b;
6091 return true;
6092}
6093
6094#ifndef SDL_WIKI_DOCUMENTATION_SECTION
6095#if SDL_HAS_BUILTIN(__builtin_add_overflow)
6096/* This needs to be wrapped in an inline rather than being a direct #define,
6097 * the same as the call to __builtin_mul_overflow() above. */
6098SDL_FORCE_INLINE bool SDL_size_add_check_overflow_builtin(size_t a, size_t b, size_t *ret)
6099{
6100 return (__builtin_add_overflow(a, b, ret) == 0);
6101}
6102#define SDL_size_add_check_overflow(a, b, ret) SDL_size_add_check_overflow_builtin(a, b, ret)
6103#endif
6104#endif
6105
6106/* This is a generic function pointer which should be cast to the type you expect */
6107#ifdef SDL_WIKI_DOCUMENTATION_SECTION
6108
6109/**
6110 * A generic function pointer.
6111 *
6112 * In theory, generic function pointers should use this, instead of `void *`,
6113 * since some platforms could treat code addresses differently than data
6114 * addresses. Although in current times no popular platforms make this
6115 * distinction, it is more correct and portable to use the correct type for a
6116 * generic pointer.
6117 *
6118 * If for some reason you need to force this typedef to be an actual `void *`,
6119 * perhaps to work around a compiler or existing code, you can define
6120 * `SDL_FUNCTION_POINTER_IS_VOID_POINTER` before including any SDL headers.
6121 *
6122 * \since This datatype is available since SDL 3.2.0.
6123 */
6124typedef void (*SDL_FunctionPointer)(void);
6125#elif defined(SDL_FUNCTION_POINTER_IS_VOID_POINTER)
6126typedef void *SDL_FunctionPointer;
6127#else
6128typedef void (*SDL_FunctionPointer)(void);
6129#endif
6130
6131/* Ends C function definitions when using C++ */
6132#ifdef __cplusplus
6133}
6134#endif
6135#include <SDL3/SDL_close_code.h>
6136
6137#endif /* SDL_stdinc_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_storage.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_storage.h
new file mode 100644
index 0000000..6837eba
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_storage.h
@@ -0,0 +1,682 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryStorage
24 *
25 * The storage API is a high-level API designed to abstract away the
26 * portability issues that come up when using something lower-level (in SDL's
27 * case, this sits on top of the [Filesystem](CategoryFilesystem) and
28 * [IOStream](CategoryIOStream) subsystems). It is significantly more
29 * restrictive than a typical filesystem API, for a number of reasons:
30 *
31 * 1. **What to Access:** A common pitfall with existing filesystem APIs is
32 * the assumption that all storage is monolithic. However, many other
33 * platforms (game consoles in particular) are more strict about what _type_
34 * of filesystem is being accessed; for example, game content and user data
35 * are usually two separate storage devices with entirely different
36 * characteristics (and possibly different low-level APIs altogether!).
37 *
38 * 2. **How to Access:** Another common mistake is applications assuming that
39 * all storage is universally writeable - again, many platforms treat game
40 * content and user data as two separate storage devices, and only user data
41 * is writeable while game content is read-only.
42 *
43 * 3. **When to Access:** The most common portability issue with filesystem
44 * access is _timing_ - you cannot always assume that the storage device is
45 * always accessible all of the time, nor can you assume that there are no
46 * limits to how long you have access to a particular device.
47 *
48 * Consider the following example:
49 *
50 * ```c
51 * void ReadGameData(void)
52 * {
53 * extern char** fileNames;
54 * extern size_t numFiles;
55 * for (size_t i = 0; i < numFiles; i += 1) {
56 * FILE *data = fopen(fileNames[i], "rwb");
57 * if (data == NULL) {
58 * // Something bad happened!
59 * } else {
60 * // A bunch of stuff happens here
61 * fclose(data);
62 * }
63 * }
64 * }
65 *
66 * void ReadSave(void)
67 * {
68 * FILE *save = fopen("saves/save0.sav", "rb");
69 * if (save == NULL) {
70 * // Something bad happened!
71 * } else {
72 * // A bunch of stuff happens here
73 * fclose(save);
74 * }
75 * }
76 *
77 * void WriteSave(void)
78 * {
79 * FILE *save = fopen("saves/save0.sav", "wb");
80 * if (save == NULL) {
81 * // Something bad happened!
82 * } else {
83 * // A bunch of stuff happens here
84 * fclose(save);
85 * }
86 * }
87 * ```
88 *
89 * Going over the bullet points again:
90 *
91 * 1. **What to Access:** This code accesses a global filesystem; game data
92 * and saves are all presumed to be in the current working directory (which
93 * may or may not be the game's installation folder!).
94 *
95 * 2. **How to Access:** This code assumes that content paths are writeable,
96 * and that save data is also writeable despite being in the same location as
97 * the game data.
98 *
99 * 3. **When to Access:** This code assumes that they can be called at any
100 * time, since the filesystem is always accessible and has no limits on how
101 * long the filesystem is being accessed.
102 *
103 * Due to these assumptions, the filesystem code is not portable and will fail
104 * under these common scenarios:
105 *
106 * - The game is installed on a device that is read-only, both content loading
107 * and game saves will fail or crash outright
108 * - Game/User storage is not implicitly mounted, so no files will be found
109 * for either scenario when a platform requires explicitly mounting
110 * filesystems
111 * - Save data may not be safe since the I/O is not being flushed or
112 * validated, so an error occurring elsewhere in the program may result in
113 * missing/corrupted save data
114 *
115 * When using SDL_Storage, these types of problems are virtually impossible to
116 * trip over:
117 *
118 * ```c
119 * void ReadGameData(void)
120 * {
121 * extern char** fileNames;
122 * extern size_t numFiles;
123 *
124 * SDL_Storage *title = SDL_OpenTitleStorage(NULL, 0);
125 * if (title == NULL) {
126 * // Something bad happened!
127 * }
128 * while (!SDL_StorageReady(title)) {
129 * SDL_Delay(1);
130 * }
131 *
132 * for (size_t i = 0; i < numFiles; i += 1) {
133 * void* dst;
134 * Uint64 dstLen = 0;
135 *
136 * if (SDL_GetStorageFileSize(title, fileNames[i], &dstLen) && dstLen > 0) {
137 * dst = SDL_malloc(dstLen);
138 * if (SDL_ReadStorageFile(title, fileNames[i], dst, dstLen)) {
139 * // A bunch of stuff happens here
140 * } else {
141 * // Something bad happened!
142 * }
143 * SDL_free(dst);
144 * } else {
145 * // Something bad happened!
146 * }
147 * }
148 *
149 * SDL_CloseStorage(title);
150 * }
151 *
152 * void ReadSave(void)
153 * {
154 * SDL_Storage *user = SDL_OpenUserStorage("libsdl", "Storage Example", 0);
155 * if (user == NULL) {
156 * // Something bad happened!
157 * }
158 * while (!SDL_StorageReady(user)) {
159 * SDL_Delay(1);
160 * }
161 *
162 * Uint64 saveLen = 0;
163 * if (SDL_GetStorageFileSize(user, "save0.sav", &saveLen) && saveLen > 0) {
164 * void* dst = SDL_malloc(saveLen);
165 * if (SDL_ReadStorageFile(user, "save0.sav", dst, saveLen)) {
166 * // A bunch of stuff happens here
167 * } else {
168 * // Something bad happened!
169 * }
170 * SDL_free(dst);
171 * } else {
172 * // Something bad happened!
173 * }
174 *
175 * SDL_CloseStorage(user);
176 * }
177 *
178 * void WriteSave(void)
179 * {
180 * SDL_Storage *user = SDL_OpenUserStorage("libsdl", "Storage Example", 0);
181 * if (user == NULL) {
182 * // Something bad happened!
183 * }
184 * while (!SDL_StorageReady(user)) {
185 * SDL_Delay(1);
186 * }
187 *
188 * extern void *saveData; // A bunch of stuff happened here...
189 * extern Uint64 saveLen;
190 * if (!SDL_WriteStorageFile(user, "save0.sav", saveData, saveLen)) {
191 * // Something bad happened!
192 * }
193 *
194 * SDL_CloseStorage(user);
195 * }
196 * ```
197 *
198 * Note the improvements that SDL_Storage makes:
199 *
200 * 1. **What to Access:** This code explicitly reads from a title or user
201 * storage device based on the context of the function.
202 *
203 * 2. **How to Access:** This code explicitly uses either a read or write
204 * function based on the context of the function.
205 *
206 * 3. **When to Access:** This code explicitly opens the device when it needs
207 * to, and closes it when it is finished working with the filesystem.
208 *
209 * The result is an application that is significantly more robust against the
210 * increasing demands of platforms and their filesystems!
211 *
212 * A publicly available example of an SDL_Storage backend is the
213 * [Steam Cloud](https://partner.steamgames.com/doc/features/cloud)
214 * backend - you can initialize Steamworks when starting the program, and then
215 * SDL will recognize that Steamworks is initialized and automatically use
216 * ISteamRemoteStorage when the application opens user storage. More
217 * importantly, when you _open_ storage it knows to begin a "batch" of
218 * filesystem operations, and when you _close_ storage it knows to end and
219 * flush the batch. This is used by Steam to support
220 * [Dynamic Cloud Sync](https://steamcommunity.com/groups/steamworks/announcements/detail/3142949576401813670)
221 * ; users can save data on one PC, put the device to sleep, and then continue
222 * playing on another PC (and vice versa) with the save data fully
223 * synchronized across all devices, allowing for a seamless experience without
224 * having to do full restarts of the program.
225 *
226 * ## Notes on valid paths
227 *
228 * All paths in the Storage API use Unix-style path separators ('/'). Using a
229 * different path separator will not work, even if the underlying platform
230 * would otherwise accept it. This is to keep code using the Storage API
231 * portable between platforms and Storage implementations and simplify app
232 * code.
233 *
234 * Paths with relative directories ("." and "..") are forbidden by the Storage
235 * API.
236 *
237 * All valid UTF-8 strings (discounting the NULL terminator character and the
238 * '/' path separator) are usable for filenames, however, an underlying
239 * Storage implementation may not support particularly strange sequences and
240 * refuse to create files with those names, etc.
241 */
242
243#ifndef SDL_storage_h_
244#define SDL_storage_h_
245
246#include <SDL3/SDL_stdinc.h>
247#include <SDL3/SDL_error.h>
248#include <SDL3/SDL_filesystem.h>
249#include <SDL3/SDL_properties.h>
250
251#include <SDL3/SDL_begin_code.h>
252
253/* Set up for C function definitions, even when using C++ */
254#ifdef __cplusplus
255extern "C" {
256#endif
257
258/**
259 * Function interface for SDL_Storage.
260 *
261 * Apps that want to supply a custom implementation of SDL_Storage will fill
262 * in all the functions in this struct, and then pass it to SDL_OpenStorage to
263 * create a custom SDL_Storage object.
264 *
265 * It is not usually necessary to do this; SDL provides standard
266 * implementations for many things you might expect to do with an SDL_Storage.
267 *
268 * This structure should be initialized using SDL_INIT_INTERFACE()
269 *
270 * \since This struct is available since SDL 3.2.0.
271 *
272 * \sa SDL_INIT_INTERFACE
273 */
274typedef struct SDL_StorageInterface
275{
276 /* The version of this interface */
277 Uint32 version;
278
279 /* Called when the storage is closed */
280 bool (SDLCALL *close)(void *userdata);
281
282 /* Optional, returns whether the storage is currently ready for access */
283 bool (SDLCALL *ready)(void *userdata);
284
285 /* Enumerate a directory, optional for write-only storage */
286 bool (SDLCALL *enumerate)(void *userdata, const char *path, SDL_EnumerateDirectoryCallback callback, void *callback_userdata);
287
288 /* Get path information, optional for write-only storage */
289 bool (SDLCALL *info)(void *userdata, const char *path, SDL_PathInfo *info);
290
291 /* Read a file from storage, optional for write-only storage */
292 bool (SDLCALL *read_file)(void *userdata, const char *path, void *destination, Uint64 length);
293
294 /* Write a file to storage, optional for read-only storage */
295 bool (SDLCALL *write_file)(void *userdata, const char *path, const void *source, Uint64 length);
296
297 /* Create a directory, optional for read-only storage */
298 bool (SDLCALL *mkdir)(void *userdata, const char *path);
299
300 /* Remove a file or empty directory, optional for read-only storage */
301 bool (SDLCALL *remove)(void *userdata, const char *path);
302
303 /* Rename a path, optional for read-only storage */
304 bool (SDLCALL *rename)(void *userdata, const char *oldpath, const char *newpath);
305
306 /* Copy a file, optional for read-only storage */
307 bool (SDLCALL *copy)(void *userdata, const char *oldpath, const char *newpath);
308
309 /* Get the space remaining, optional for read-only storage */
310 Uint64 (SDLCALL *space_remaining)(void *userdata);
311} SDL_StorageInterface;
312
313/* Check the size of SDL_StorageInterface
314 *
315 * If this assert fails, either the compiler is padding to an unexpected size,
316 * or the interface has been updated and this should be updated to match and
317 * the code using this interface should be updated to handle the old version.
318 */
319SDL_COMPILE_TIME_ASSERT(SDL_StorageInterface_SIZE,
320 (sizeof(void *) == 4 && sizeof(SDL_StorageInterface) == 48) ||
321 (sizeof(void *) == 8 && sizeof(SDL_StorageInterface) == 96));
322
323/**
324 * An abstract interface for filesystem access.
325 *
326 * This is an opaque datatype. One can create this object using standard SDL
327 * functions like SDL_OpenTitleStorage or SDL_OpenUserStorage, etc, or create
328 * an object with a custom implementation using SDL_OpenStorage.
329 *
330 * \since This struct is available since SDL 3.2.0.
331 */
332typedef struct SDL_Storage SDL_Storage;
333
334/**
335 * Opens up a read-only container for the application's filesystem.
336 *
337 * \param override a path to override the backend's default title root.
338 * \param props a property list that may contain backend-specific information.
339 * \returns a title storage container on success or NULL on failure; call
340 * SDL_GetError() for more information.
341 *
342 * \since This function is available since SDL 3.2.0.
343 *
344 * \sa SDL_CloseStorage
345 * \sa SDL_GetStorageFileSize
346 * \sa SDL_OpenUserStorage
347 * \sa SDL_ReadStorageFile
348 */
349extern SDL_DECLSPEC SDL_Storage * SDLCALL SDL_OpenTitleStorage(const char *override, SDL_PropertiesID props);
350
351/**
352 * Opens up a container for a user's unique read/write filesystem.
353 *
354 * While title storage can generally be kept open throughout runtime, user
355 * storage should only be opened when the client is ready to read/write files.
356 * This allows the backend to properly batch file operations and flush them
357 * when the container has been closed; ensuring safe and optimal save I/O.
358 *
359 * \param org the name of your organization.
360 * \param app the name of your application.
361 * \param props a property list that may contain backend-specific information.
362 * \returns a user storage container on success or NULL on failure; call
363 * SDL_GetError() for more information.
364 *
365 * \since This function is available since SDL 3.2.0.
366 *
367 * \sa SDL_CloseStorage
368 * \sa SDL_GetStorageFileSize
369 * \sa SDL_GetStorageSpaceRemaining
370 * \sa SDL_OpenTitleStorage
371 * \sa SDL_ReadStorageFile
372 * \sa SDL_StorageReady
373 * \sa SDL_WriteStorageFile
374 */
375extern SDL_DECLSPEC SDL_Storage * SDLCALL SDL_OpenUserStorage(const char *org, const char *app, SDL_PropertiesID props);
376
377/**
378 * Opens up a container for local filesystem storage.
379 *
380 * This is provided for development and tools. Portable applications should
381 * use SDL_OpenTitleStorage() for access to game data and
382 * SDL_OpenUserStorage() for access to user data.
383 *
384 * \param path the base path prepended to all storage paths, or NULL for no
385 * base path.
386 * \returns a filesystem storage container on success or NULL on failure; call
387 * SDL_GetError() for more information.
388 *
389 * \since This function is available since SDL 3.2.0.
390 *
391 * \sa SDL_CloseStorage
392 * \sa SDL_GetStorageFileSize
393 * \sa SDL_GetStorageSpaceRemaining
394 * \sa SDL_OpenTitleStorage
395 * \sa SDL_OpenUserStorage
396 * \sa SDL_ReadStorageFile
397 * \sa SDL_WriteStorageFile
398 */
399extern SDL_DECLSPEC SDL_Storage * SDLCALL SDL_OpenFileStorage(const char *path);
400
401/**
402 * Opens up a container using a client-provided storage interface.
403 *
404 * Applications do not need to use this function unless they are providing
405 * their own SDL_Storage implementation. If you just need an SDL_Storage, you
406 * should use the built-in implementations in SDL, like SDL_OpenTitleStorage()
407 * or SDL_OpenUserStorage().
408 *
409 * This function makes a copy of `iface` and the caller does not need to keep
410 * it around after this call.
411 *
412 * \param iface the interface that implements this storage, initialized using
413 * SDL_INIT_INTERFACE().
414 * \param userdata the pointer that will be passed to the interface functions.
415 * \returns a storage container on success or NULL on failure; call
416 * SDL_GetError() for more information.
417 *
418 * \since This function is available since SDL 3.2.0.
419 *
420 * \sa SDL_CloseStorage
421 * \sa SDL_GetStorageFileSize
422 * \sa SDL_GetStorageSpaceRemaining
423 * \sa SDL_INIT_INTERFACE
424 * \sa SDL_ReadStorageFile
425 * \sa SDL_StorageReady
426 * \sa SDL_WriteStorageFile
427 */
428extern SDL_DECLSPEC SDL_Storage * SDLCALL SDL_OpenStorage(const SDL_StorageInterface *iface, void *userdata);
429
430/**
431 * Closes and frees a storage container.
432 *
433 * \param storage a storage container to close.
434 * \returns true if the container was freed with no errors, false otherwise;
435 * call SDL_GetError() for more information. Even if the function
436 * returns an error, the container data will be freed; the error is
437 * only for informational purposes.
438 *
439 * \since This function is available since SDL 3.2.0.
440 *
441 * \sa SDL_OpenFileStorage
442 * \sa SDL_OpenStorage
443 * \sa SDL_OpenTitleStorage
444 * \sa SDL_OpenUserStorage
445 */
446extern SDL_DECLSPEC bool SDLCALL SDL_CloseStorage(SDL_Storage *storage);
447
448/**
449 * Checks if the storage container is ready to use.
450 *
451 * This function should be called in regular intervals until it returns true -
452 * however, it is not recommended to spinwait on this call, as the backend may
453 * depend on a synchronous message loop. You might instead poll this in your
454 * game's main loop while processing events and drawing a loading screen.
455 *
456 * \param storage a storage container to query.
457 * \returns true if the container is ready, false otherwise.
458 *
459 * \since This function is available since SDL 3.2.0.
460 */
461extern SDL_DECLSPEC bool SDLCALL SDL_StorageReady(SDL_Storage *storage);
462
463/**
464 * Query the size of a file within a storage container.
465 *
466 * \param storage a storage container to query.
467 * \param path the relative path of the file to query.
468 * \param length a pointer to be filled with the file's length.
469 * \returns true if the file could be queried or false on failure; call
470 * SDL_GetError() for more information.
471 *
472 * \since This function is available since SDL 3.2.0.
473 *
474 * \sa SDL_ReadStorageFile
475 * \sa SDL_StorageReady
476 */
477extern SDL_DECLSPEC bool SDLCALL SDL_GetStorageFileSize(SDL_Storage *storage, const char *path, Uint64 *length);
478
479/**
480 * Synchronously read a file from a storage container into a client-provided
481 * buffer.
482 *
483 * The value of `length` must match the length of the file exactly; call
484 * SDL_GetStorageFileSize() to get this value. This behavior may be relaxed in
485 * a future release.
486 *
487 * \param storage a storage container to read from.
488 * \param path the relative path of the file to read.
489 * \param destination a client-provided buffer to read the file into.
490 * \param length the length of the destination buffer.
491 * \returns true if the file was read or false on failure; call SDL_GetError()
492 * for more information.
493 *
494 * \since This function is available since SDL 3.2.0.
495 *
496 * \sa SDL_GetStorageFileSize
497 * \sa SDL_StorageReady
498 * \sa SDL_WriteStorageFile
499 */
500extern SDL_DECLSPEC bool SDLCALL SDL_ReadStorageFile(SDL_Storage *storage, const char *path, void *destination, Uint64 length);
501
502/**
503 * Synchronously write a file from client memory into a storage container.
504 *
505 * \param storage a storage container to write to.
506 * \param path the relative path of the file to write.
507 * \param source a client-provided buffer to write from.
508 * \param length the length of the source buffer.
509 * \returns true if the file was written or false on failure; call
510 * SDL_GetError() for more information.
511 *
512 * \since This function is available since SDL 3.2.0.
513 *
514 * \sa SDL_GetStorageSpaceRemaining
515 * \sa SDL_ReadStorageFile
516 * \sa SDL_StorageReady
517 */
518extern SDL_DECLSPEC bool SDLCALL SDL_WriteStorageFile(SDL_Storage *storage, const char *path, const void *source, Uint64 length);
519
520/**
521 * Create a directory in a writable storage container.
522 *
523 * \param storage a storage container.
524 * \param path the path of the directory to create.
525 * \returns true on success or false on failure; call SDL_GetError() for more
526 * information.
527 *
528 * \since This function is available since SDL 3.2.0.
529 *
530 * \sa SDL_StorageReady
531 */
532extern SDL_DECLSPEC bool SDLCALL SDL_CreateStorageDirectory(SDL_Storage *storage, const char *path);
533
534/**
535 * Enumerate a directory in a storage container through a callback function.
536 *
537 * This function provides every directory entry through an app-provided
538 * callback, called once for each directory entry, until all results have been
539 * provided or the callback returns either SDL_ENUM_SUCCESS or
540 * SDL_ENUM_FAILURE.
541 *
542 * This will return false if there was a system problem in general, or if a
543 * callback returns SDL_ENUM_FAILURE. A successful return means a callback
544 * returned SDL_ENUM_SUCCESS to halt enumeration, or all directory entries
545 * were enumerated.
546 *
547 * If `path` is NULL, this is treated as a request to enumerate the root of
548 * the storage container's tree. An empty string also works for this.
549 *
550 * \param storage a storage container.
551 * \param path the path of the directory to enumerate, or NULL for the root.
552 * \param callback a function that is called for each entry in the directory.
553 * \param userdata a pointer that is passed to `callback`.
554 * \returns true on success or false on failure; call SDL_GetError() for more
555 * information.
556 *
557 * \since This function is available since SDL 3.2.0.
558 *
559 * \sa SDL_StorageReady
560 */
561extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateStorageDirectory(SDL_Storage *storage, const char *path, SDL_EnumerateDirectoryCallback callback, void *userdata);
562
563/**
564 * Remove a file or an empty directory in a writable storage container.
565 *
566 * \param storage a storage container.
567 * \param path the path of the directory to enumerate.
568 * \returns true on success or false on failure; call SDL_GetError() for more
569 * information.
570 *
571 * \since This function is available since SDL 3.2.0.
572 *
573 * \sa SDL_StorageReady
574 */
575extern SDL_DECLSPEC bool SDLCALL SDL_RemoveStoragePath(SDL_Storage *storage, const char *path);
576
577/**
578 * Rename a file or directory in a writable storage container.
579 *
580 * \param storage a storage container.
581 * \param oldpath the old path.
582 * \param newpath the new path.
583 * \returns true on success or false on failure; call SDL_GetError() for more
584 * information.
585 *
586 * \since This function is available since SDL 3.2.0.
587 *
588 * \sa SDL_StorageReady
589 */
590extern SDL_DECLSPEC bool SDLCALL SDL_RenameStoragePath(SDL_Storage *storage, const char *oldpath, const char *newpath);
591
592/**
593 * Copy a file in a writable storage container.
594 *
595 * \param storage a storage container.
596 * \param oldpath the old path.
597 * \param newpath the new path.
598 * \returns true on success or false on failure; call SDL_GetError() for more
599 * information.
600 *
601 * \since This function is available since SDL 3.2.0.
602 *
603 * \sa SDL_StorageReady
604 */
605extern SDL_DECLSPEC bool SDLCALL SDL_CopyStorageFile(SDL_Storage *storage, const char *oldpath, const char *newpath);
606
607/**
608 * Get information about a filesystem path in a storage container.
609 *
610 * \param storage a storage container.
611 * \param path the path to query.
612 * \param info a pointer filled in with information about the path, or NULL to
613 * check for the existence of a file.
614 * \returns true on success or false if the file doesn't exist, or another
615 * failure; call SDL_GetError() for more information.
616 *
617 * \since This function is available since SDL 3.2.0.
618 *
619 * \sa SDL_StorageReady
620 */
621extern SDL_DECLSPEC bool SDLCALL SDL_GetStoragePathInfo(SDL_Storage *storage, const char *path, SDL_PathInfo *info);
622
623/**
624 * Queries the remaining space in a storage container.
625 *
626 * \param storage a storage container to query.
627 * \returns the amount of remaining space, in bytes.
628 *
629 * \since This function is available since SDL 3.2.0.
630 *
631 * \sa SDL_StorageReady
632 * \sa SDL_WriteStorageFile
633 */
634extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetStorageSpaceRemaining(SDL_Storage *storage);
635
636/**
637 * Enumerate a directory tree, filtered by pattern, and return a list.
638 *
639 * Files are filtered out if they don't match the string in `pattern`, which
640 * may contain wildcard characters `*` (match everything) and `?` (match one
641 * character). If pattern is NULL, no filtering is done and all results are
642 * returned. Subdirectories are permitted, and are specified with a path
643 * separator of '/'. Wildcard characters `*` and `?` never match a path
644 * separator.
645 *
646 * `flags` may be set to SDL_GLOB_CASEINSENSITIVE to make the pattern matching
647 * case-insensitive.
648 *
649 * The returned array is always NULL-terminated, for your iterating
650 * convenience, but if `count` is non-NULL, on return it will contain the
651 * number of items in the array, not counting the NULL terminator.
652 *
653 * If `path` is NULL, this is treated as a request to enumerate the root of
654 * the storage container's tree. An empty string also works for this.
655 *
656 * \param storage a storage container.
657 * \param path the path of the directory to enumerate, or NULL for the root.
658 * \param pattern the pattern that files in the directory must match. Can be
659 * NULL.
660 * \param flags `SDL_GLOB_*` bitflags that affect this search.
661 * \param count on return, will be set to the number of items in the returned
662 * array. Can be NULL.
663 * \returns an array of strings on success or NULL on failure; call
664 * SDL_GetError() for more information. The caller should pass the
665 * returned pointer to SDL_free when done with it. This is a single
666 * allocation that should be freed with SDL_free() when it is no
667 * longer needed.
668 *
669 * \threadsafety It is safe to call this function from any thread, assuming
670 * the `storage` object is thread-safe.
671 *
672 * \since This function is available since SDL 3.2.0.
673 */
674extern SDL_DECLSPEC char ** SDLCALL SDL_GlobStorageDirectory(SDL_Storage *storage, const char *path, const char *pattern, SDL_GlobFlags flags, int *count);
675
676/* Ends C function definitions when using C++ */
677#ifdef __cplusplus
678}
679#endif
680#include <SDL3/SDL_close_code.h>
681
682#endif /* SDL_storage_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_surface.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_surface.h
new file mode 100644
index 0000000..15fce04
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_surface.h
@@ -0,0 +1,1563 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategorySurface
24 *
25 * SDL surfaces are buffers of pixels in system RAM. These are useful for
26 * passing around and manipulating images that are not stored in GPU memory.
27 *
28 * SDL_Surface makes serious efforts to manage images in various formats, and
29 * provides a reasonable toolbox for transforming the data, including copying
30 * between surfaces, filling rectangles in the image data, etc.
31 *
32 * There is also a simple .bmp loader, SDL_LoadBMP(). SDL itself does not
33 * provide loaders for various other file formats, but there are several
34 * excellent external libraries that do, including its own satellite library,
35 * SDL_image:
36 *
37 * https://github.com/libsdl-org/SDL_image
38 */
39
40#ifndef SDL_surface_h_
41#define SDL_surface_h_
42
43#include <SDL3/SDL_stdinc.h>
44#include <SDL3/SDL_error.h>
45#include <SDL3/SDL_blendmode.h>
46#include <SDL3/SDL_pixels.h>
47#include <SDL3/SDL_properties.h>
48#include <SDL3/SDL_rect.h>
49#include <SDL3/SDL_iostream.h>
50
51#include <SDL3/SDL_begin_code.h>
52/* Set up for C function definitions, even when using C++ */
53#ifdef __cplusplus
54extern "C" {
55#endif
56
57/**
58 * The flags on an SDL_Surface.
59 *
60 * These are generally considered read-only.
61 *
62 * \since This datatype is available since SDL 3.2.0.
63 */
64typedef Uint32 SDL_SurfaceFlags;
65
66#define SDL_SURFACE_PREALLOCATED 0x00000001u /**< Surface uses preallocated pixel memory */
67#define SDL_SURFACE_LOCK_NEEDED 0x00000002u /**< Surface needs to be locked to access pixels */
68#define SDL_SURFACE_LOCKED 0x00000004u /**< Surface is currently locked */
69#define SDL_SURFACE_SIMD_ALIGNED 0x00000008u /**< Surface uses pixel memory allocated with SDL_aligned_alloc() */
70
71/**
72 * Evaluates to true if the surface needs to be locked before access.
73 *
74 * \since This macro is available since SDL 3.2.0.
75 */
76#define SDL_MUSTLOCK(S) (((S)->flags & SDL_SURFACE_LOCK_NEEDED) == SDL_SURFACE_LOCK_NEEDED)
77
78/**
79 * The scaling mode.
80 *
81 * \since This enum is available since SDL 3.2.0.
82 */
83typedef enum SDL_ScaleMode
84{
85 SDL_SCALEMODE_INVALID = -1,
86 SDL_SCALEMODE_NEAREST, /**< nearest pixel sampling */
87 SDL_SCALEMODE_LINEAR /**< linear filtering */
88} SDL_ScaleMode;
89
90/**
91 * The flip mode.
92 *
93 * \since This enum is available since SDL 3.2.0.
94 */
95typedef enum SDL_FlipMode
96{
97 SDL_FLIP_NONE, /**< Do not flip */
98 SDL_FLIP_HORIZONTAL, /**< flip horizontally */
99 SDL_FLIP_VERTICAL /**< flip vertically */
100} SDL_FlipMode;
101
102#ifndef SDL_INTERNAL
103
104/**
105 * A collection of pixels used in software blitting.
106 *
107 * Pixels are arranged in memory in rows, with the top row first. Each row
108 * occupies an amount of memory given by the pitch (sometimes known as the row
109 * stride in non-SDL APIs).
110 *
111 * Within each row, pixels are arranged from left to right until the width is
112 * reached. Each pixel occupies a number of bits appropriate for its format,
113 * with most formats representing each pixel as one or more whole bytes (in
114 * some indexed formats, instead multiple pixels are packed into each byte),
115 * and a byte order given by the format. After encoding all pixels, any
116 * remaining bytes to reach the pitch are used as padding to reach a desired
117 * alignment, and have undefined contents.
118 *
119 * When a surface holds YUV format data, the planes are assumed to be
120 * contiguous without padding between them, e.g. a 32x32 surface in NV12
121 * format with a pitch of 32 would consist of 32x32 bytes of Y plane followed
122 * by 32x16 bytes of UV plane.
123 *
124 * When a surface holds MJPG format data, pixels points at the compressed JPEG
125 * image and pitch is the length of that data.
126 *
127 * \since This struct is available since SDL 3.2.0.
128 *
129 * \sa SDL_CreateSurface
130 * \sa SDL_DestroySurface
131 */
132struct SDL_Surface
133{
134 SDL_SurfaceFlags flags; /**< The flags of the surface, read-only */
135 SDL_PixelFormat format; /**< The format of the surface, read-only */
136 int w; /**< The width of the surface, read-only. */
137 int h; /**< The height of the surface, read-only. */
138 int pitch; /**< The distance in bytes between rows of pixels, read-only */
139 void *pixels; /**< A pointer to the pixels of the surface, the pixels are writeable if non-NULL */
140
141 int refcount; /**< Application reference count, used when freeing surface */
142
143 void *reserved; /**< Reserved for internal use */
144};
145#endif /* !SDL_INTERNAL */
146
147typedef struct SDL_Surface SDL_Surface;
148
149/**
150 * Allocate a new surface with a specific pixel format.
151 *
152 * The pixels of the new surface are initialized to zero.
153 *
154 * \param width the width of the surface.
155 * \param height the height of the surface.
156 * \param format the SDL_PixelFormat for the new surface's pixel format.
157 * \returns the new SDL_Surface structure that is created or NULL on failure;
158 * call SDL_GetError() for more information.
159 *
160 * \threadsafety It is safe to call this function from any thread.
161 *
162 * \since This function is available since SDL 3.2.0.
163 *
164 * \sa SDL_CreateSurfaceFrom
165 * \sa SDL_DestroySurface
166 */
167extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_CreateSurface(int width, int height, SDL_PixelFormat format);
168
169/**
170 * Allocate a new surface with a specific pixel format and existing pixel
171 * data.
172 *
173 * No copy is made of the pixel data. Pixel data is not managed automatically;
174 * you must free the surface before you free the pixel data.
175 *
176 * Pitch is the offset in bytes from one row of pixels to the next, e.g.
177 * `width*4` for `SDL_PIXELFORMAT_RGBA8888`.
178 *
179 * You may pass NULL for pixels and 0 for pitch to create a surface that you
180 * will fill in with valid values later.
181 *
182 * \param width the width of the surface.
183 * \param height the height of the surface.
184 * \param format the SDL_PixelFormat for the new surface's pixel format.
185 * \param pixels a pointer to existing pixel data.
186 * \param pitch the number of bytes between each row, including padding.
187 * \returns the new SDL_Surface structure that is created or NULL on failure;
188 * call SDL_GetError() for more information.
189 *
190 * \threadsafety It is safe to call this function from any thread.
191 *
192 * \since This function is available since SDL 3.2.0.
193 *
194 * \sa SDL_CreateSurface
195 * \sa SDL_DestroySurface
196 */
197extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_CreateSurfaceFrom(int width, int height, SDL_PixelFormat format, void *pixels, int pitch);
198
199/**
200 * Free a surface.
201 *
202 * It is safe to pass NULL to this function.
203 *
204 * \param surface the SDL_Surface to free.
205 *
206 * \threadsafety No other thread should be using the surface when it is freed.
207 *
208 * \since This function is available since SDL 3.2.0.
209 *
210 * \sa SDL_CreateSurface
211 * \sa SDL_CreateSurfaceFrom
212 */
213extern SDL_DECLSPEC void SDLCALL SDL_DestroySurface(SDL_Surface *surface);
214
215/**
216 * Get the properties associated with a surface.
217 *
218 * The following properties are understood by SDL:
219 *
220 * - `SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT`: for HDR10 and floating point
221 * surfaces, this defines the value of 100% diffuse white, with higher
222 * values being displayed in the High Dynamic Range headroom. This defaults
223 * to 203 for HDR10 surfaces and 1.0 for floating point surfaces.
224 * - `SDL_PROP_SURFACE_HDR_HEADROOM_FLOAT`: for HDR10 and floating point
225 * surfaces, this defines the maximum dynamic range used by the content, in
226 * terms of the SDR white point. This defaults to 0.0, which disables tone
227 * mapping.
228 * - `SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING`: the tone mapping operator
229 * used when compressing from a surface with high dynamic range to another
230 * with lower dynamic range. Currently this supports "chrome", which uses
231 * the same tone mapping that Chrome uses for HDR content, the form "*=N",
232 * where N is a floating point scale factor applied in linear space, and
233 * "none", which disables tone mapping. This defaults to "chrome".
234 * - `SDL_PROP_SURFACE_HOTSPOT_X_NUMBER`: the hotspot pixel offset from the
235 * left edge of the image, if this surface is being used as a cursor.
236 * - `SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER`: the hotspot pixel offset from the
237 * top edge of the image, if this surface is being used as a cursor.
238 *
239 * \param surface the SDL_Surface structure to query.
240 * \returns a valid property ID on success or 0 on failure; call
241 * SDL_GetError() for more information.
242 *
243 * \threadsafety It is safe to call this function from any thread.
244 *
245 * \since This function is available since SDL 3.2.0.
246 */
247extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSurfaceProperties(SDL_Surface *surface);
248
249#define SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT "SDL.surface.SDR_white_point"
250#define SDL_PROP_SURFACE_HDR_HEADROOM_FLOAT "SDL.surface.HDR_headroom"
251#define SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING "SDL.surface.tonemap"
252#define SDL_PROP_SURFACE_HOTSPOT_X_NUMBER "SDL.surface.hotspot.x"
253#define SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER "SDL.surface.hotspot.y"
254
255/**
256 * Set the colorspace used by a surface.
257 *
258 * Setting the colorspace doesn't change the pixels, only how they are
259 * interpreted in color operations.
260 *
261 * \param surface the SDL_Surface structure to update.
262 * \param colorspace an SDL_Colorspace value describing the surface
263 * colorspace.
264 * \returns true on success or false on failure; call SDL_GetError() for more
265 * information.
266 *
267 * \threadsafety This function is not thread safe.
268 *
269 * \since This function is available since SDL 3.2.0.
270 *
271 * \sa SDL_GetSurfaceColorspace
272 */
273extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceColorspace(SDL_Surface *surface, SDL_Colorspace colorspace);
274
275/**
276 * Get the colorspace used by a surface.
277 *
278 * The colorspace defaults to SDL_COLORSPACE_SRGB_LINEAR for floating point
279 * formats, SDL_COLORSPACE_HDR10 for 10-bit formats, SDL_COLORSPACE_SRGB for
280 * other RGB surfaces and SDL_COLORSPACE_BT709_FULL for YUV textures.
281 *
282 * \param surface the SDL_Surface structure to query.
283 * \returns the colorspace used by the surface, or SDL_COLORSPACE_UNKNOWN if
284 * the surface is NULL.
285 *
286 * \threadsafety This function is not thread safe.
287 *
288 * \since This function is available since SDL 3.2.0.
289 *
290 * \sa SDL_SetSurfaceColorspace
291 */
292extern SDL_DECLSPEC SDL_Colorspace SDLCALL SDL_GetSurfaceColorspace(SDL_Surface *surface);
293
294/**
295 * Create a palette and associate it with a surface.
296 *
297 * This function creates a palette compatible with the provided surface. The
298 * palette is then returned for you to modify, and the surface will
299 * automatically use the new palette in future operations. You do not need to
300 * destroy the returned palette, it will be freed when the reference count
301 * reaches 0, usually when the surface is destroyed.
302 *
303 * Bitmap surfaces (with format SDL_PIXELFORMAT_INDEX1LSB or
304 * SDL_PIXELFORMAT_INDEX1MSB) will have the palette initialized with 0 as
305 * white and 1 as black. Other surfaces will get a palette initialized with
306 * white in every entry.
307 *
308 * If this function is called for a surface that already has a palette, a new
309 * palette will be created to replace it.
310 *
311 * \param surface the SDL_Surface structure to update.
312 * \returns a new SDL_Palette structure on success or NULL on failure (e.g. if
313 * the surface didn't have an index format); call SDL_GetError() for
314 * more information.
315 *
316 * \threadsafety This function is not thread safe.
317 *
318 * \since This function is available since SDL 3.2.0.
319 *
320 * \sa SDL_SetPaletteColors
321 */
322extern SDL_DECLSPEC SDL_Palette * SDLCALL SDL_CreateSurfacePalette(SDL_Surface *surface);
323
324/**
325 * Set the palette used by a surface.
326 *
327 * A single palette can be shared with many surfaces.
328 *
329 * \param surface the SDL_Surface structure to update.
330 * \param palette the SDL_Palette structure to use.
331 * \returns true on success or false on failure; call SDL_GetError() for more
332 * information.
333 *
334 * \threadsafety This function is not thread safe.
335 *
336 * \since This function is available since SDL 3.2.0.
337 *
338 * \sa SDL_CreatePalette
339 * \sa SDL_GetSurfacePalette
340 */
341extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette);
342
343/**
344 * Get the palette used by a surface.
345 *
346 * \param surface the SDL_Surface structure to query.
347 * \returns a pointer to the palette used by the surface, or NULL if there is
348 * no palette used.
349 *
350 * \threadsafety It is safe to call this function from any thread.
351 *
352 * \since This function is available since SDL 3.2.0.
353 *
354 * \sa SDL_SetSurfacePalette
355 */
356extern SDL_DECLSPEC SDL_Palette * SDLCALL SDL_GetSurfacePalette(SDL_Surface *surface);
357
358/**
359 * Add an alternate version of a surface.
360 *
361 * This function adds an alternate version of this surface, usually used for
362 * content with high DPI representations like cursors or icons. The size,
363 * format, and content do not need to match the original surface, and these
364 * alternate versions will not be updated when the original surface changes.
365 *
366 * This function adds a reference to the alternate version, so you should call
367 * SDL_DestroySurface() on the image after this call.
368 *
369 * \param surface the SDL_Surface structure to update.
370 * \param image a pointer to an alternate SDL_Surface to associate with this
371 * surface.
372 * \returns true on success or false on failure; call SDL_GetError() for more
373 * information.
374 *
375 * \threadsafety This function is not thread safe.
376 *
377 * \since This function is available since SDL 3.2.0.
378 *
379 * \sa SDL_RemoveSurfaceAlternateImages
380 * \sa SDL_GetSurfaceImages
381 * \sa SDL_SurfaceHasAlternateImages
382 */
383extern SDL_DECLSPEC bool SDLCALL SDL_AddSurfaceAlternateImage(SDL_Surface *surface, SDL_Surface *image);
384
385/**
386 * Return whether a surface has alternate versions available.
387 *
388 * \param surface the SDL_Surface structure to query.
389 * \returns true if alternate versions are available or false otherwise.
390 *
391 * \threadsafety It is safe to call this function from any thread.
392 *
393 * \since This function is available since SDL 3.2.0.
394 *
395 * \sa SDL_AddSurfaceAlternateImage
396 * \sa SDL_RemoveSurfaceAlternateImages
397 * \sa SDL_GetSurfaceImages
398 */
399extern SDL_DECLSPEC bool SDLCALL SDL_SurfaceHasAlternateImages(SDL_Surface *surface);
400
401/**
402 * Get an array including all versions of a surface.
403 *
404 * This returns all versions of a surface, with the surface being queried as
405 * the first element in the returned array.
406 *
407 * Freeing the array of surfaces does not affect the surfaces in the array.
408 * They are still referenced by the surface being queried and will be cleaned
409 * up normally.
410 *
411 * \param surface the SDL_Surface structure to query.
412 * \param count a pointer filled in with the number of surface pointers
413 * returned, may be NULL.
414 * \returns a NULL terminated array of SDL_Surface pointers or NULL on
415 * failure; call SDL_GetError() for more information. This should be
416 * freed with SDL_free() when it is no longer needed.
417 *
418 * \threadsafety This function is not thread safe.
419 *
420 * \since This function is available since SDL 3.2.0.
421 *
422 * \sa SDL_AddSurfaceAlternateImage
423 * \sa SDL_RemoveSurfaceAlternateImages
424 * \sa SDL_SurfaceHasAlternateImages
425 */
426extern SDL_DECLSPEC SDL_Surface ** SDLCALL SDL_GetSurfaceImages(SDL_Surface *surface, int *count);
427
428/**
429 * Remove all alternate versions of a surface.
430 *
431 * This function removes a reference from all the alternative versions,
432 * destroying them if this is the last reference to them.
433 *
434 * \param surface the SDL_Surface structure to update.
435 *
436 * \threadsafety This function is not thread safe.
437 *
438 * \since This function is available since SDL 3.2.0.
439 *
440 * \sa SDL_AddSurfaceAlternateImage
441 * \sa SDL_GetSurfaceImages
442 * \sa SDL_SurfaceHasAlternateImages
443 */
444extern SDL_DECLSPEC void SDLCALL SDL_RemoveSurfaceAlternateImages(SDL_Surface *surface);
445
446/**
447 * Set up a surface for directly accessing the pixels.
448 *
449 * Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write to
450 * and read from `surface->pixels`, using the pixel format stored in
451 * `surface->format`. Once you are done accessing the surface, you should use
452 * SDL_UnlockSurface() to release it.
453 *
454 * Not all surfaces require locking. If `SDL_MUSTLOCK(surface)` evaluates to
455 * 0, then you can read and write to the surface at any time, and the pixel
456 * format of the surface will not change.
457 *
458 * \param surface the SDL_Surface structure to be locked.
459 * \returns true on success or false on failure; call SDL_GetError() for more
460 * information.
461 *
462 * \threadsafety This function is not thread safe. The locking referred to by
463 * this function is making the pixels available for direct
464 * access, not thread-safe locking.
465 *
466 * \since This function is available since SDL 3.2.0.
467 *
468 * \sa SDL_MUSTLOCK
469 * \sa SDL_UnlockSurface
470 */
471extern SDL_DECLSPEC bool SDLCALL SDL_LockSurface(SDL_Surface *surface);
472
473/**
474 * Release a surface after directly accessing the pixels.
475 *
476 * \param surface the SDL_Surface structure to be unlocked.
477 *
478 * \threadsafety This function is not thread safe. The locking referred to by
479 * this function is making the pixels available for direct
480 * access, not thread-safe locking.
481 *
482 * \since This function is available since SDL 3.2.0.
483 *
484 * \sa SDL_LockSurface
485 */
486extern SDL_DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface *surface);
487
488/**
489 * Load a BMP image from a seekable SDL data stream.
490 *
491 * The new surface should be freed with SDL_DestroySurface(). Not doing so
492 * will result in a memory leak.
493 *
494 * \param src the data stream for the surface.
495 * \param closeio if true, calls SDL_CloseIO() on `src` before returning, even
496 * in the case of an error.
497 * \returns a pointer to a new SDL_Surface structure or NULL on failure; call
498 * SDL_GetError() for more information.
499 *
500 * \threadsafety It is safe to call this function from any thread.
501 *
502 * \since This function is available since SDL 3.2.0.
503 *
504 * \sa SDL_DestroySurface
505 * \sa SDL_LoadBMP
506 * \sa SDL_SaveBMP_IO
507 */
508extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_LoadBMP_IO(SDL_IOStream *src, bool closeio);
509
510/**
511 * Load a BMP image from a file.
512 *
513 * The new surface should be freed with SDL_DestroySurface(). Not doing so
514 * will result in a memory leak.
515 *
516 * \param file the BMP file to load.
517 * \returns a pointer to a new SDL_Surface structure or NULL on failure; call
518 * SDL_GetError() for more information.
519 *
520 * \threadsafety It is safe to call this function from any thread.
521 *
522 * \since This function is available since SDL 3.2.0.
523 *
524 * \sa SDL_DestroySurface
525 * \sa SDL_LoadBMP_IO
526 * \sa SDL_SaveBMP
527 */
528extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_LoadBMP(const char *file);
529
530/**
531 * Save a surface to a seekable SDL data stream in BMP format.
532 *
533 * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
534 * BMP directly. Other RGB formats with 8-bit or higher get converted to a
535 * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
536 * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
537 * not supported.
538 *
539 * \param surface the SDL_Surface structure containing the image to be saved.
540 * \param dst a data stream to save to.
541 * \param closeio if true, calls SDL_CloseIO() on `dst` before returning, even
542 * in the case of an error.
543 * \returns true on success or false on failure; call SDL_GetError() for more
544 * information.
545 *
546 * \threadsafety This function is not thread safe.
547 *
548 * \since This function is available since SDL 3.2.0.
549 *
550 * \sa SDL_LoadBMP_IO
551 * \sa SDL_SaveBMP
552 */
553extern SDL_DECLSPEC bool SDLCALL SDL_SaveBMP_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);
554
555/**
556 * Save a surface to a file.
557 *
558 * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
559 * BMP directly. Other RGB formats with 8-bit or higher get converted to a
560 * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
561 * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
562 * not supported.
563 *
564 * \param surface the SDL_Surface structure containing the image to be saved.
565 * \param file a file to save to.
566 * \returns true on success or false on failure; call SDL_GetError() for more
567 * information.
568 *
569 * \threadsafety This function is not thread safe.
570 *
571 * \since This function is available since SDL 3.2.0.
572 *
573 * \sa SDL_LoadBMP
574 * \sa SDL_SaveBMP_IO
575 */
576extern SDL_DECLSPEC bool SDLCALL SDL_SaveBMP(SDL_Surface *surface, const char *file);
577
578/**
579 * Set the RLE acceleration hint for a surface.
580 *
581 * If RLE is enabled, color key and alpha blending blits are much faster, but
582 * the surface must be locked before directly accessing the pixels.
583 *
584 * \param surface the SDL_Surface structure to optimize.
585 * \param enabled true to enable RLE acceleration, false to disable it.
586 * \returns true on success or false on failure; call SDL_GetError() for more
587 * information.
588 *
589 * \threadsafety This function is not thread safe.
590 *
591 * \since This function is available since SDL 3.2.0.
592 *
593 * \sa SDL_BlitSurface
594 * \sa SDL_LockSurface
595 * \sa SDL_UnlockSurface
596 */
597extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceRLE(SDL_Surface *surface, bool enabled);
598
599/**
600 * Returns whether the surface is RLE enabled.
601 *
602 * It is safe to pass a NULL `surface` here; it will return false.
603 *
604 * \param surface the SDL_Surface structure to query.
605 * \returns true if the surface is RLE enabled, false otherwise.
606 *
607 * \threadsafety It is safe to call this function from any thread.
608 *
609 * \since This function is available since SDL 3.2.0.
610 *
611 * \sa SDL_SetSurfaceRLE
612 */
613extern SDL_DECLSPEC bool SDLCALL SDL_SurfaceHasRLE(SDL_Surface *surface);
614
615/**
616 * Set the color key (transparent pixel) in a surface.
617 *
618 * The color key defines a pixel value that will be treated as transparent in
619 * a blit. For example, one can use this to specify that cyan pixels should be
620 * considered transparent, and therefore not rendered.
621 *
622 * It is a pixel of the format used by the surface, as generated by
623 * SDL_MapRGB().
624 *
625 * \param surface the SDL_Surface structure to update.
626 * \param enabled true to enable color key, false to disable color key.
627 * \param key the transparent pixel.
628 * \returns true on success or false on failure; call SDL_GetError() for more
629 * information.
630 *
631 * \threadsafety This function is not thread safe.
632 *
633 * \since This function is available since SDL 3.2.0.
634 *
635 * \sa SDL_GetSurfaceColorKey
636 * \sa SDL_SetSurfaceRLE
637 * \sa SDL_SurfaceHasColorKey
638 */
639extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceColorKey(SDL_Surface *surface, bool enabled, Uint32 key);
640
641/**
642 * Returns whether the surface has a color key.
643 *
644 * It is safe to pass a NULL `surface` here; it will return false.
645 *
646 * \param surface the SDL_Surface structure to query.
647 * \returns true if the surface has a color key, false otherwise.
648 *
649 * \threadsafety It is safe to call this function from any thread.
650 *
651 * \since This function is available since SDL 3.2.0.
652 *
653 * \sa SDL_SetSurfaceColorKey
654 * \sa SDL_GetSurfaceColorKey
655 */
656extern SDL_DECLSPEC bool SDLCALL SDL_SurfaceHasColorKey(SDL_Surface *surface);
657
658/**
659 * Get the color key (transparent pixel) for a surface.
660 *
661 * The color key is a pixel of the format used by the surface, as generated by
662 * SDL_MapRGB().
663 *
664 * If the surface doesn't have color key enabled this function returns false.
665 *
666 * \param surface the SDL_Surface structure to query.
667 * \param key a pointer filled in with the transparent pixel.
668 * \returns true on success or false on failure; call SDL_GetError() for more
669 * information.
670 *
671 * \threadsafety It is safe to call this function from any thread.
672 *
673 * \since This function is available since SDL 3.2.0.
674 *
675 * \sa SDL_SetSurfaceColorKey
676 * \sa SDL_SurfaceHasColorKey
677 */
678extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceColorKey(SDL_Surface *surface, Uint32 *key);
679
680/**
681 * Set an additional color value multiplied into blit operations.
682 *
683 * When this surface is blitted, during the blit operation each source color
684 * channel is modulated by the appropriate color value according to the
685 * following formula:
686 *
687 * `srcC = srcC * (color / 255)`
688 *
689 * \param surface the SDL_Surface structure to update.
690 * \param r the red color value multiplied into blit operations.
691 * \param g the green color value multiplied into blit operations.
692 * \param b the blue color value multiplied into blit operations.
693 * \returns true on success or false on failure; call SDL_GetError() for more
694 * information.
695 *
696 * \threadsafety This function is not thread safe.
697 *
698 * \since This function is available since SDL 3.2.0.
699 *
700 * \sa SDL_GetSurfaceColorMod
701 * \sa SDL_SetSurfaceAlphaMod
702 */
703extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b);
704
705
706/**
707 * Get the additional color value multiplied into blit operations.
708 *
709 * \param surface the SDL_Surface structure to query.
710 * \param r a pointer filled in with the current red color value.
711 * \param g a pointer filled in with the current green color value.
712 * \param b a pointer filled in with the current blue color value.
713 * \returns true on success or false on failure; call SDL_GetError() for more
714 * information.
715 *
716 * \threadsafety This function is not thread safe.
717 *
718 * \since This function is available since SDL 3.2.0.
719 *
720 * \sa SDL_GetSurfaceAlphaMod
721 * \sa SDL_SetSurfaceColorMod
722 */
723extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b);
724
725/**
726 * Set an additional alpha value used in blit operations.
727 *
728 * When this surface is blitted, during the blit operation the source alpha
729 * value is modulated by this alpha value according to the following formula:
730 *
731 * `srcA = srcA * (alpha / 255)`
732 *
733 * \param surface the SDL_Surface structure to update.
734 * \param alpha the alpha value multiplied into blit operations.
735 * \returns true on success or false on failure; call SDL_GetError() for more
736 * information.
737 *
738 * \threadsafety This function is not thread safe.
739 *
740 * \since This function is available since SDL 3.2.0.
741 *
742 * \sa SDL_GetSurfaceAlphaMod
743 * \sa SDL_SetSurfaceColorMod
744 */
745extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha);
746
747/**
748 * Get the additional alpha value used in blit operations.
749 *
750 * \param surface the SDL_Surface structure to query.
751 * \param alpha a pointer filled in with the current alpha value.
752 * \returns true on success or false on failure; call SDL_GetError() for more
753 * information.
754 *
755 * \threadsafety It is safe to call this function from any thread.
756 *
757 * \since This function is available since SDL 3.2.0.
758 *
759 * \sa SDL_GetSurfaceColorMod
760 * \sa SDL_SetSurfaceAlphaMod
761 */
762extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha);
763
764/**
765 * Set the blend mode used for blit operations.
766 *
767 * To copy a surface to another surface (or texture) without blending with the
768 * existing data, the blendmode of the SOURCE surface should be set to
769 * `SDL_BLENDMODE_NONE`.
770 *
771 * \param surface the SDL_Surface structure to update.
772 * \param blendMode the SDL_BlendMode to use for blit blending.
773 * \returns true on success or false on failure; call SDL_GetError() for more
774 * information.
775 *
776 * \threadsafety This function is not thread safe.
777 *
778 * \since This function is available since SDL 3.2.0.
779 *
780 * \sa SDL_GetSurfaceBlendMode
781 */
782extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode);
783
784/**
785 * Get the blend mode used for blit operations.
786 *
787 * \param surface the SDL_Surface structure to query.
788 * \param blendMode a pointer filled in with the current SDL_BlendMode.
789 * \returns true on success or false on failure; call SDL_GetError() for more
790 * information.
791 *
792 * \threadsafety It is safe to call this function from any thread.
793 *
794 * \since This function is available since SDL 3.2.0.
795 *
796 * \sa SDL_SetSurfaceBlendMode
797 */
798extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode);
799
800/**
801 * Set the clipping rectangle for a surface.
802 *
803 * When `surface` is the destination of a blit, only the area within the clip
804 * rectangle is drawn into.
805 *
806 * Note that blits are automatically clipped to the edges of the source and
807 * destination surfaces.
808 *
809 * \param surface the SDL_Surface structure to be clipped.
810 * \param rect the SDL_Rect structure representing the clipping rectangle, or
811 * NULL to disable clipping.
812 * \returns true if the rectangle intersects the surface, otherwise false and
813 * blits will be completely clipped.
814 *
815 * \threadsafety This function is not thread safe.
816 *
817 * \since This function is available since SDL 3.2.0.
818 *
819 * \sa SDL_GetSurfaceClipRect
820 */
821extern SDL_DECLSPEC bool SDLCALL SDL_SetSurfaceClipRect(SDL_Surface *surface, const SDL_Rect *rect);
822
823/**
824 * Get the clipping rectangle for a surface.
825 *
826 * When `surface` is the destination of a blit, only the area within the clip
827 * rectangle is drawn into.
828 *
829 * \param surface the SDL_Surface structure representing the surface to be
830 * clipped.
831 * \param rect an SDL_Rect structure filled in with the clipping rectangle for
832 * the surface.
833 * \returns true on success or false on failure; call SDL_GetError() for more
834 * information.
835 *
836 * \threadsafety This function is not thread safe.
837 *
838 * \since This function is available since SDL 3.2.0.
839 *
840 * \sa SDL_SetSurfaceClipRect
841 */
842extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceClipRect(SDL_Surface *surface, SDL_Rect *rect);
843
844/**
845 * Flip a surface vertically or horizontally.
846 *
847 * \param surface the surface to flip.
848 * \param flip the direction to flip.
849 * \returns true on success or false on failure; call SDL_GetError() for more
850 * information.
851 *
852 * \threadsafety This function is not thread safe.
853 *
854 * \since This function is available since SDL 3.2.0.
855 */
856extern SDL_DECLSPEC bool SDLCALL SDL_FlipSurface(SDL_Surface *surface, SDL_FlipMode flip);
857
858/**
859 * Creates a new surface identical to the existing surface.
860 *
861 * If the original surface has alternate images, the new surface will have a
862 * reference to them as well.
863 *
864 * The returned surface should be freed with SDL_DestroySurface().
865 *
866 * \param surface the surface to duplicate.
867 * \returns a copy of the surface or NULL on failure; call SDL_GetError() for
868 * more information.
869 *
870 * \threadsafety This function is not thread safe.
871 *
872 * \since This function is available since SDL 3.2.0.
873 *
874 * \sa SDL_DestroySurface
875 */
876extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_DuplicateSurface(SDL_Surface *surface);
877
878/**
879 * Creates a new surface identical to the existing surface, scaled to the
880 * desired size.
881 *
882 * The returned surface should be freed with SDL_DestroySurface().
883 *
884 * \param surface the surface to duplicate and scale.
885 * \param width the width of the new surface.
886 * \param height the height of the new surface.
887 * \param scaleMode the SDL_ScaleMode to be used.
888 * \returns a copy of the surface or NULL on failure; call SDL_GetError() for
889 * more information.
890 *
891 * \threadsafety This function is not thread safe.
892 *
893 * \since This function is available since SDL 3.2.0.
894 *
895 * \sa SDL_DestroySurface
896 */
897extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_ScaleSurface(SDL_Surface *surface, int width, int height, SDL_ScaleMode scaleMode);
898
899/**
900 * Copy an existing surface to a new surface of the specified format.
901 *
902 * This function is used to optimize images for faster *repeat* blitting. This
903 * is accomplished by converting the original and storing the result as a new
904 * surface. The new, optimized surface can then be used as the source for
905 * future blits, making them faster.
906 *
907 * If you are converting to an indexed surface and want to map colors to a
908 * palette, you can use SDL_ConvertSurfaceAndColorspace() instead.
909 *
910 * If the original surface has alternate images, the new surface will have a
911 * reference to them as well.
912 *
913 * \param surface the existing SDL_Surface structure to convert.
914 * \param format the new pixel format.
915 * \returns the new SDL_Surface structure that is created or NULL on failure;
916 * call SDL_GetError() for more information.
917 *
918 * \threadsafety This function is not thread safe.
919 *
920 * \since This function is available since SDL 3.2.0.
921 *
922 * \sa SDL_ConvertSurfaceAndColorspace
923 * \sa SDL_DestroySurface
924 */
925extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_ConvertSurface(SDL_Surface *surface, SDL_PixelFormat format);
926
927/**
928 * Copy an existing surface to a new surface of the specified format and
929 * colorspace.
930 *
931 * This function converts an existing surface to a new format and colorspace
932 * and returns the new surface. This will perform any pixel format and
933 * colorspace conversion needed.
934 *
935 * If the original surface has alternate images, the new surface will have a
936 * reference to them as well.
937 *
938 * \param surface the existing SDL_Surface structure to convert.
939 * \param format the new pixel format.
940 * \param palette an optional palette to use for indexed formats, may be NULL.
941 * \param colorspace the new colorspace.
942 * \param props an SDL_PropertiesID with additional color properties, or 0.
943 * \returns the new SDL_Surface structure that is created or NULL on failure;
944 * call SDL_GetError() for more information.
945 *
946 * \threadsafety This function is not thread safe.
947 *
948 * \since This function is available since SDL 3.2.0.
949 *
950 * \sa SDL_ConvertSurface
951 * \sa SDL_DestroySurface
952 */
953extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_ConvertSurfaceAndColorspace(SDL_Surface *surface, SDL_PixelFormat format, SDL_Palette *palette, SDL_Colorspace colorspace, SDL_PropertiesID props);
954
955/**
956 * Copy a block of pixels of one format to another format.
957 *
958 * \param width the width of the block to copy, in pixels.
959 * \param height the height of the block to copy, in pixels.
960 * \param src_format an SDL_PixelFormat value of the `src` pixels format.
961 * \param src a pointer to the source pixels.
962 * \param src_pitch the pitch of the source pixels, in bytes.
963 * \param dst_format an SDL_PixelFormat value of the `dst` pixels format.
964 * \param dst a pointer to be filled in with new pixel data.
965 * \param dst_pitch the pitch of the destination pixels, in bytes.
966 * \returns true on success or false on failure; call SDL_GetError() for more
967 * information.
968 *
969 * \threadsafety The same destination pixels should not be used from two
970 * threads at once. It is safe to use the same source pixels
971 * from multiple threads.
972 *
973 * \since This function is available since SDL 3.2.0.
974 *
975 * \sa SDL_ConvertPixelsAndColorspace
976 */
977extern SDL_DECLSPEC bool SDLCALL SDL_ConvertPixels(int width, int height, SDL_PixelFormat src_format, const void *src, int src_pitch, SDL_PixelFormat dst_format, void *dst, int dst_pitch);
978
979/**
980 * Copy a block of pixels of one format and colorspace to another format and
981 * colorspace.
982 *
983 * \param width the width of the block to copy, in pixels.
984 * \param height the height of the block to copy, in pixels.
985 * \param src_format an SDL_PixelFormat value of the `src` pixels format.
986 * \param src_colorspace an SDL_Colorspace value describing the colorspace of
987 * the `src` pixels.
988 * \param src_properties an SDL_PropertiesID with additional source color
989 * properties, or 0.
990 * \param src a pointer to the source pixels.
991 * \param src_pitch the pitch of the source pixels, in bytes.
992 * \param dst_format an SDL_PixelFormat value of the `dst` pixels format.
993 * \param dst_colorspace an SDL_Colorspace value describing the colorspace of
994 * the `dst` pixels.
995 * \param dst_properties an SDL_PropertiesID with additional destination color
996 * properties, or 0.
997 * \param dst a pointer to be filled in with new pixel data.
998 * \param dst_pitch the pitch of the destination pixels, in bytes.
999 * \returns true on success or false on failure; call SDL_GetError() for more
1000 * information.
1001 *
1002 * \threadsafety The same destination pixels should not be used from two
1003 * threads at once. It is safe to use the same source pixels
1004 * from multiple threads.
1005 *
1006 * \since This function is available since SDL 3.2.0.
1007 *
1008 * \sa SDL_ConvertPixels
1009 */
1010extern SDL_DECLSPEC bool SDLCALL SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormat src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, const void *src, int src_pitch, SDL_PixelFormat dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, void *dst, int dst_pitch);
1011
1012/**
1013 * Premultiply the alpha on a block of pixels.
1014 *
1015 * This is safe to use with src == dst, but not for other overlapping areas.
1016 *
1017 * \param width the width of the block to convert, in pixels.
1018 * \param height the height of the block to convert, in pixels.
1019 * \param src_format an SDL_PixelFormat value of the `src` pixels format.
1020 * \param src a pointer to the source pixels.
1021 * \param src_pitch the pitch of the source pixels, in bytes.
1022 * \param dst_format an SDL_PixelFormat value of the `dst` pixels format.
1023 * \param dst a pointer to be filled in with premultiplied pixel data.
1024 * \param dst_pitch the pitch of the destination pixels, in bytes.
1025 * \param linear true to convert from sRGB to linear space for the alpha
1026 * multiplication, false to do multiplication in sRGB space.
1027 * \returns true on success or false on failure; call SDL_GetError() for more
1028 * information.
1029 *
1030 * \threadsafety The same destination pixels should not be used from two
1031 * threads at once. It is safe to use the same source pixels
1032 * from multiple threads.
1033 *
1034 * \since This function is available since SDL 3.2.0.
1035 */
1036extern SDL_DECLSPEC bool SDLCALL SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormat src_format, const void *src, int src_pitch, SDL_PixelFormat dst_format, void *dst, int dst_pitch, bool linear);
1037
1038/**
1039 * Premultiply the alpha in a surface.
1040 *
1041 * This is safe to use with src == dst, but not for other overlapping areas.
1042 *
1043 * \param surface the surface to modify.
1044 * \param linear true to convert from sRGB to linear space for the alpha
1045 * multiplication, false to do multiplication in sRGB space.
1046 * \returns true on success or false on failure; call SDL_GetError() for more
1047 * information.
1048 *
1049 * \threadsafety This function is not thread safe.
1050 *
1051 * \since This function is available since SDL 3.2.0.
1052 */
1053extern SDL_DECLSPEC bool SDLCALL SDL_PremultiplySurfaceAlpha(SDL_Surface *surface, bool linear);
1054
1055/**
1056 * Clear a surface with a specific color, with floating point precision.
1057 *
1058 * This function handles all surface formats, and ignores any clip rectangle.
1059 *
1060 * If the surface is YUV, the color is assumed to be in the sRGB colorspace,
1061 * otherwise the color is assumed to be in the colorspace of the suface.
1062 *
1063 * \param surface the SDL_Surface to clear.
1064 * \param r the red component of the pixel, normally in the range 0-1.
1065 * \param g the green component of the pixel, normally in the range 0-1.
1066 * \param b the blue component of the pixel, normally in the range 0-1.
1067 * \param a the alpha component of the pixel, normally in the range 0-1.
1068 * \returns true on success or false on failure; call SDL_GetError() for more
1069 * information.
1070 *
1071 * \threadsafety This function is not thread safe.
1072 *
1073 * \since This function is available since SDL 3.2.0.
1074 */
1075extern SDL_DECLSPEC bool SDLCALL SDL_ClearSurface(SDL_Surface *surface, float r, float g, float b, float a);
1076
1077/**
1078 * Perform a fast fill of a rectangle with a specific color.
1079 *
1080 * `color` should be a pixel of the format used by the surface, and can be
1081 * generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
1082 * alpha component then the destination is simply filled with that alpha
1083 * information, no blending takes place.
1084 *
1085 * If there is a clip rectangle set on the destination (set via
1086 * SDL_SetSurfaceClipRect()), then this function will fill based on the
1087 * intersection of the clip rectangle and `rect`.
1088 *
1089 * \param dst the SDL_Surface structure that is the drawing target.
1090 * \param rect the SDL_Rect structure representing the rectangle to fill, or
1091 * NULL to fill the entire surface.
1092 * \param color the color to fill with.
1093 * \returns true on success or false on failure; call SDL_GetError() for more
1094 * information.
1095 *
1096 * \threadsafety This function is not thread safe.
1097 *
1098 * \since This function is available since SDL 3.2.0.
1099 *
1100 * \sa SDL_FillSurfaceRects
1101 */
1102extern SDL_DECLSPEC bool SDLCALL SDL_FillSurfaceRect(SDL_Surface *dst, const SDL_Rect *rect, Uint32 color);
1103
1104/**
1105 * Perform a fast fill of a set of rectangles with a specific color.
1106 *
1107 * `color` should be a pixel of the format used by the surface, and can be
1108 * generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
1109 * alpha component then the destination is simply filled with that alpha
1110 * information, no blending takes place.
1111 *
1112 * If there is a clip rectangle set on the destination (set via
1113 * SDL_SetSurfaceClipRect()), then this function will fill based on the
1114 * intersection of the clip rectangle and `rect`.
1115 *
1116 * \param dst the SDL_Surface structure that is the drawing target.
1117 * \param rects an array of SDL_Rects representing the rectangles to fill.
1118 * \param count the number of rectangles in the array.
1119 * \param color the color to fill with.
1120 * \returns true on success or false on failure; call SDL_GetError() for more
1121 * information.
1122 *
1123 * \threadsafety This function is not thread safe.
1124 *
1125 * \since This function is available since SDL 3.2.0.
1126 *
1127 * \sa SDL_FillSurfaceRect
1128 */
1129extern SDL_DECLSPEC bool SDLCALL SDL_FillSurfaceRects(SDL_Surface *dst, const SDL_Rect *rects, int count, Uint32 color);
1130
1131/**
1132 * Performs a fast blit from the source surface to the destination surface
1133 * with clipping.
1134 *
1135 * If either `srcrect` or `dstrect` are NULL, the entire surface (`src` or
1136 * `dst`) is copied while ensuring clipping to `dst->clip_rect`.
1137 *
1138 * The blit function should not be called on a locked surface.
1139 *
1140 * The blit semantics for surfaces with and without blending and colorkey are
1141 * defined as follows:
1142 *
1143 * ```
1144 * RGBA->RGB:
1145 * Source surface blend mode set to SDL_BLENDMODE_BLEND:
1146 * alpha-blend (using the source alpha-channel and per-surface alpha)
1147 * SDL_SRCCOLORKEY ignored.
1148 * Source surface blend mode set to SDL_BLENDMODE_NONE:
1149 * copy RGB.
1150 * if SDL_SRCCOLORKEY set, only copy the pixels that do not match the
1151 * RGB values of the source color key, ignoring alpha in the
1152 * comparison.
1153 *
1154 * RGB->RGBA:
1155 * Source surface blend mode set to SDL_BLENDMODE_BLEND:
1156 * alpha-blend (using the source per-surface alpha)
1157 * Source surface blend mode set to SDL_BLENDMODE_NONE:
1158 * copy RGB, set destination alpha to source per-surface alpha value.
1159 * both:
1160 * if SDL_SRCCOLORKEY set, only copy the pixels that do not match the
1161 * source color key.
1162 *
1163 * RGBA->RGBA:
1164 * Source surface blend mode set to SDL_BLENDMODE_BLEND:
1165 * alpha-blend (using the source alpha-channel and per-surface alpha)
1166 * SDL_SRCCOLORKEY ignored.
1167 * Source surface blend mode set to SDL_BLENDMODE_NONE:
1168 * copy all of RGBA to the destination.
1169 * if SDL_SRCCOLORKEY set, only copy the pixels that do not match the
1170 * RGB values of the source color key, ignoring alpha in the
1171 * comparison.
1172 *
1173 * RGB->RGB:
1174 * Source surface blend mode set to SDL_BLENDMODE_BLEND:
1175 * alpha-blend (using the source per-surface alpha)
1176 * Source surface blend mode set to SDL_BLENDMODE_NONE:
1177 * copy RGB.
1178 * both:
1179 * if SDL_SRCCOLORKEY set, only copy the pixels that do not match the
1180 * source color key.
1181 * ```
1182 *
1183 * \param src the SDL_Surface structure to be copied from.
1184 * \param srcrect the SDL_Rect structure representing the rectangle to be
1185 * copied, or NULL to copy the entire surface.
1186 * \param dst the SDL_Surface structure that is the blit target.
1187 * \param dstrect the SDL_Rect structure representing the x and y position in
1188 * the destination surface, or NULL for (0,0). The width and
1189 * height are ignored, and are copied from `srcrect`. If you
1190 * want a specific width and height, you should use
1191 * SDL_BlitSurfaceScaled().
1192 * \returns true on success or false on failure; call SDL_GetError() for more
1193 * information.
1194 *
1195 * \threadsafety Only one thread should be using the `src` and `dst` surfaces
1196 * at any given time.
1197 *
1198 * \since This function is available since SDL 3.2.0.
1199 *
1200 * \sa SDL_BlitSurfaceScaled
1201 */
1202extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurface(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect);
1203
1204/**
1205 * Perform low-level surface blitting only.
1206 *
1207 * This is a semi-private blit function and it performs low-level surface
1208 * blitting, assuming the input rectangles have already been clipped.
1209 *
1210 * \param src the SDL_Surface structure to be copied from.
1211 * \param srcrect the SDL_Rect structure representing the rectangle to be
1212 * copied, may not be NULL.
1213 * \param dst the SDL_Surface structure that is the blit target.
1214 * \param dstrect the SDL_Rect structure representing the target rectangle in
1215 * the destination surface, may not be NULL.
1216 * \returns true on success or false on failure; call SDL_GetError() for more
1217 * information.
1218 *
1219 * \threadsafety Only one thread should be using the `src` and `dst` surfaces
1220 * at any given time.
1221 *
1222 * \since This function is available since SDL 3.2.0.
1223 *
1224 * \sa SDL_BlitSurface
1225 */
1226extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceUnchecked(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect);
1227
1228/**
1229 * Perform a scaled blit to a destination surface, which may be of a different
1230 * format.
1231 *
1232 * \param src the SDL_Surface structure to be copied from.
1233 * \param srcrect the SDL_Rect structure representing the rectangle to be
1234 * copied, or NULL to copy the entire surface.
1235 * \param dst the SDL_Surface structure that is the blit target.
1236 * \param dstrect the SDL_Rect structure representing the target rectangle in
1237 * the destination surface, or NULL to fill the entire
1238 * destination surface.
1239 * \param scaleMode the SDL_ScaleMode to be used.
1240 * \returns true on success or false on failure; call SDL_GetError() for more
1241 * information.
1242 *
1243 * \threadsafety Only one thread should be using the `src` and `dst` surfaces
1244 * at any given time.
1245 *
1246 * \since This function is available since SDL 3.2.0.
1247 *
1248 * \sa SDL_BlitSurface
1249 */
1250extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);
1251
1252/**
1253 * Perform low-level surface scaled blitting only.
1254 *
1255 * This is a semi-private function and it performs low-level surface blitting,
1256 * assuming the input rectangles have already been clipped.
1257 *
1258 * \param src the SDL_Surface structure to be copied from.
1259 * \param srcrect the SDL_Rect structure representing the rectangle to be
1260 * copied, may not be NULL.
1261 * \param dst the SDL_Surface structure that is the blit target.
1262 * \param dstrect the SDL_Rect structure representing the target rectangle in
1263 * the destination surface, may not be NULL.
1264 * \param scaleMode the SDL_ScaleMode to be used.
1265 * \returns true on success or false on failure; call SDL_GetError() for more
1266 * information.
1267 *
1268 * \threadsafety Only one thread should be using the `src` and `dst` surfaces
1269 * at any given time.
1270 *
1271 * \since This function is available since SDL 3.2.0.
1272 *
1273 * \sa SDL_BlitSurfaceScaled
1274 */
1275extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceUncheckedScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);
1276
1277/**
1278 * Perform a stretched pixel copy from one surface to another.
1279 *
1280 * \param src the SDL_Surface structure to be copied from.
1281 * \param srcrect the SDL_Rect structure representing the rectangle to be
1282 * copied, or NULL to copy the entire surface.
1283 * \param dst the SDL_Surface structure that is the blit target.
1284 * \param dstrect the SDL_Rect structure representing the target rectangle in
1285 * the destination surface, or NULL to fill the entire
1286 * destination surface.
1287 * \param scaleMode the SDL_ScaleMode to be used.
1288 * \returns true on success or false on failure; call SDL_GetError() for more
1289 * information.
1290 *
1291 * \threadsafety Only one thread should be using the `src` and `dst` surfaces
1292 * at any given time.
1293 *
1294 * \since This function is available since SDL 3.4.0.
1295 *
1296 * \sa SDL_BlitSurfaceScaled
1297 */
1298extern SDL_DECLSPEC bool SDLCALL SDL_StretchSurface(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);
1299
1300/**
1301 * Perform a tiled blit to a destination surface, which may be of a different
1302 * format.
1303 *
1304 * The pixels in `srcrect` will be repeated as many times as needed to
1305 * completely fill `dstrect`.
1306 *
1307 * \param src the SDL_Surface structure to be copied from.
1308 * \param srcrect the SDL_Rect structure representing the rectangle to be
1309 * copied, or NULL to copy the entire surface.
1310 * \param dst the SDL_Surface structure that is the blit target.
1311 * \param dstrect the SDL_Rect structure representing the target rectangle in
1312 * the destination surface, or NULL to fill the entire surface.
1313 * \returns true on success or false on failure; call SDL_GetError() for more
1314 * information.
1315 *
1316 * \threadsafety Only one thread should be using the `src` and `dst` surfaces
1317 * at any given time.
1318 *
1319 * \since This function is available since SDL 3.2.0.
1320 *
1321 * \sa SDL_BlitSurface
1322 */
1323extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceTiled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect);
1324
1325/**
1326 * Perform a scaled and tiled blit to a destination surface, which may be of a
1327 * different format.
1328 *
1329 * The pixels in `srcrect` will be scaled and repeated as many times as needed
1330 * to completely fill `dstrect`.
1331 *
1332 * \param src the SDL_Surface structure to be copied from.
1333 * \param srcrect the SDL_Rect structure representing the rectangle to be
1334 * copied, or NULL to copy the entire surface.
1335 * \param scale the scale used to transform srcrect into the destination
1336 * rectangle, e.g. a 32x32 texture with a scale of 2 would fill
1337 * 64x64 tiles.
1338 * \param scaleMode scale algorithm to be used.
1339 * \param dst the SDL_Surface structure that is the blit target.
1340 * \param dstrect the SDL_Rect structure representing the target rectangle in
1341 * the destination surface, or NULL to fill the entire surface.
1342 * \returns true on success or false on failure; call SDL_GetError() for more
1343 * information.
1344 *
1345 * \threadsafety Only one thread should be using the `src` and `dst` surfaces
1346 * at any given time.
1347 *
1348 * \since This function is available since SDL 3.2.0.
1349 *
1350 * \sa SDL_BlitSurface
1351 */
1352extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceTiledWithScale(SDL_Surface *src, const SDL_Rect *srcrect, float scale, SDL_ScaleMode scaleMode, SDL_Surface *dst, const SDL_Rect *dstrect);
1353
1354/**
1355 * Perform a scaled blit using the 9-grid algorithm to a destination surface,
1356 * which may be of a different format.
1357 *
1358 * The pixels in the source surface are split into a 3x3 grid, using the
1359 * different corner sizes for each corner, and the sides and center making up
1360 * the remaining pixels. The corners are then scaled using `scale` and fit
1361 * into the corners of the destination rectangle. The sides and center are
1362 * then stretched into place to cover the remaining destination rectangle.
1363 *
1364 * \param src the SDL_Surface structure to be copied from.
1365 * \param srcrect the SDL_Rect structure representing the rectangle to be used
1366 * for the 9-grid, or NULL to use the entire surface.
1367 * \param left_width the width, in pixels, of the left corners in `srcrect`.
1368 * \param right_width the width, in pixels, of the right corners in `srcrect`.
1369 * \param top_height the height, in pixels, of the top corners in `srcrect`.
1370 * \param bottom_height the height, in pixels, of the bottom corners in
1371 * `srcrect`.
1372 * \param scale the scale used to transform the corner of `srcrect` into the
1373 * corner of `dstrect`, or 0.0f for an unscaled blit.
1374 * \param scaleMode scale algorithm to be used.
1375 * \param dst the SDL_Surface structure that is the blit target.
1376 * \param dstrect the SDL_Rect structure representing the target rectangle in
1377 * the destination surface, or NULL to fill the entire surface.
1378 * \returns true on success or false on failure; call SDL_GetError() for more
1379 * information.
1380 *
1381 * \threadsafety Only one thread should be using the `src` and `dst` surfaces
1382 * at any given time.
1383 *
1384 * \since This function is available since SDL 3.2.0.
1385 *
1386 * \sa SDL_BlitSurface
1387 */
1388extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurface9Grid(SDL_Surface *src, const SDL_Rect *srcrect, int left_width, int right_width, int top_height, int bottom_height, float scale, SDL_ScaleMode scaleMode, SDL_Surface *dst, const SDL_Rect *dstrect);
1389
1390/**
1391 * Map an RGB triple to an opaque pixel value for a surface.
1392 *
1393 * This function maps the RGB color value to the specified pixel format and
1394 * returns the pixel value best approximating the given RGB color value for
1395 * the given pixel format.
1396 *
1397 * If the surface has a palette, the index of the closest matching color in
1398 * the palette will be returned.
1399 *
1400 * If the surface pixel format has an alpha component it will be returned as
1401 * all 1 bits (fully opaque).
1402 *
1403 * If the pixel format bpp (color depth) is less than 32-bpp then the unused
1404 * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
1405 * format the return value can be assigned to a Uint16, and similarly a Uint8
1406 * for an 8-bpp format).
1407 *
1408 * \param surface the surface to use for the pixel format and palette.
1409 * \param r the red component of the pixel in the range 0-255.
1410 * \param g the green component of the pixel in the range 0-255.
1411 * \param b the blue component of the pixel in the range 0-255.
1412 * \returns a pixel value.
1413 *
1414 * \threadsafety It is safe to call this function from any thread.
1415 *
1416 * \since This function is available since SDL 3.2.0.
1417 *
1418 * \sa SDL_MapSurfaceRGBA
1419 */
1420extern SDL_DECLSPEC Uint32 SDLCALL SDL_MapSurfaceRGB(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b);
1421
1422/**
1423 * Map an RGBA quadruple to a pixel value for a surface.
1424 *
1425 * This function maps the RGBA color value to the specified pixel format and
1426 * returns the pixel value best approximating the given RGBA color value for
1427 * the given pixel format.
1428 *
1429 * If the surface pixel format has no alpha component the alpha value will be
1430 * ignored (as it will be in formats with a palette).
1431 *
1432 * If the surface has a palette, the index of the closest matching color in
1433 * the palette will be returned.
1434 *
1435 * If the pixel format bpp (color depth) is less than 32-bpp then the unused
1436 * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
1437 * format the return value can be assigned to a Uint16, and similarly a Uint8
1438 * for an 8-bpp format).
1439 *
1440 * \param surface the surface to use for the pixel format and palette.
1441 * \param r the red component of the pixel in the range 0-255.
1442 * \param g the green component of the pixel in the range 0-255.
1443 * \param b the blue component of the pixel in the range 0-255.
1444 * \param a the alpha component of the pixel in the range 0-255.
1445 * \returns a pixel value.
1446 *
1447 * \threadsafety It is safe to call this function from any thread.
1448 *
1449 * \since This function is available since SDL 3.2.0.
1450 *
1451 * \sa SDL_MapSurfaceRGB
1452 */
1453extern SDL_DECLSPEC Uint32 SDLCALL SDL_MapSurfaceRGBA(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
1454
1455/**
1456 * Retrieves a single pixel from a surface.
1457 *
1458 * This function prioritizes correctness over speed: it is suitable for unit
1459 * tests, but is not intended for use in a game engine.
1460 *
1461 * Like SDL_GetRGBA, this uses the entire 0..255 range when converting color
1462 * components from pixel formats with less than 8 bits per RGB component.
1463 *
1464 * \param surface the surface to read.
1465 * \param x the horizontal coordinate, 0 <= x < width.
1466 * \param y the vertical coordinate, 0 <= y < height.
1467 * \param r a pointer filled in with the red channel, 0-255, or NULL to ignore
1468 * this channel.
1469 * \param g a pointer filled in with the green channel, 0-255, or NULL to
1470 * ignore this channel.
1471 * \param b a pointer filled in with the blue channel, 0-255, or NULL to
1472 * ignore this channel.
1473 * \param a a pointer filled in with the alpha channel, 0-255, or NULL to
1474 * ignore this channel.
1475 * \returns true on success or false on failure; call SDL_GetError() for more
1476 * information.
1477 *
1478 * \threadsafety This function is not thread safe.
1479 *
1480 * \since This function is available since SDL 3.2.0.
1481 */
1482extern SDL_DECLSPEC bool SDLCALL SDL_ReadSurfacePixel(SDL_Surface *surface, int x, int y, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);
1483
1484/**
1485 * Retrieves a single pixel from a surface.
1486 *
1487 * This function prioritizes correctness over speed: it is suitable for unit
1488 * tests, but is not intended for use in a game engine.
1489 *
1490 * \param surface the surface to read.
1491 * \param x the horizontal coordinate, 0 <= x < width.
1492 * \param y the vertical coordinate, 0 <= y < height.
1493 * \param r a pointer filled in with the red channel, normally in the range
1494 * 0-1, or NULL to ignore this channel.
1495 * \param g a pointer filled in with the green channel, normally in the range
1496 * 0-1, or NULL to ignore this channel.
1497 * \param b a pointer filled in with the blue channel, normally in the range
1498 * 0-1, or NULL to ignore this channel.
1499 * \param a a pointer filled in with the alpha channel, normally in the range
1500 * 0-1, or NULL to ignore this channel.
1501 * \returns true on success or false on failure; call SDL_GetError() for more
1502 * information.
1503 *
1504 * \threadsafety This function is not thread safe.
1505 *
1506 * \since This function is available since SDL 3.2.0.
1507 */
1508extern SDL_DECLSPEC bool SDLCALL SDL_ReadSurfacePixelFloat(SDL_Surface *surface, int x, int y, float *r, float *g, float *b, float *a);
1509
1510/**
1511 * Writes a single pixel to a surface.
1512 *
1513 * This function prioritizes correctness over speed: it is suitable for unit
1514 * tests, but is not intended for use in a game engine.
1515 *
1516 * Like SDL_MapRGBA, this uses the entire 0..255 range when converting color
1517 * components from pixel formats with less than 8 bits per RGB component.
1518 *
1519 * \param surface the surface to write.
1520 * \param x the horizontal coordinate, 0 <= x < width.
1521 * \param y the vertical coordinate, 0 <= y < height.
1522 * \param r the red channel value, 0-255.
1523 * \param g the green channel value, 0-255.
1524 * \param b the blue channel value, 0-255.
1525 * \param a the alpha channel value, 0-255.
1526 * \returns true on success or false on failure; call SDL_GetError() for more
1527 * information.
1528 *
1529 * \threadsafety This function is not thread safe.
1530 *
1531 * \since This function is available since SDL 3.2.0.
1532 */
1533extern SDL_DECLSPEC bool SDLCALL SDL_WriteSurfacePixel(SDL_Surface *surface, int x, int y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
1534
1535/**
1536 * Writes a single pixel to a surface.
1537 *
1538 * This function prioritizes correctness over speed: it is suitable for unit
1539 * tests, but is not intended for use in a game engine.
1540 *
1541 * \param surface the surface to write.
1542 * \param x the horizontal coordinate, 0 <= x < width.
1543 * \param y the vertical coordinate, 0 <= y < height.
1544 * \param r the red channel value, normally in the range 0-1.
1545 * \param g the green channel value, normally in the range 0-1.
1546 * \param b the blue channel value, normally in the range 0-1.
1547 * \param a the alpha channel value, normally in the range 0-1.
1548 * \returns true on success or false on failure; call SDL_GetError() for more
1549 * information.
1550 *
1551 * \threadsafety This function is not thread safe.
1552 *
1553 * \since This function is available since SDL 3.2.0.
1554 */
1555extern SDL_DECLSPEC bool SDLCALL SDL_WriteSurfacePixelFloat(SDL_Surface *surface, int x, int y, float r, float g, float b, float a);
1556
1557/* Ends C function definitions when using C++ */
1558#ifdef __cplusplus
1559}
1560#endif
1561#include <SDL3/SDL_close_code.h>
1562
1563#endif /* SDL_surface_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_system.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_system.h
new file mode 100644
index 0000000..294089f
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_system.h
@@ -0,0 +1,818 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategorySystem
24 *
25 * Platform-specific SDL API functions. These are functions that deal with
26 * needs of specific operating systems, that didn't make sense to offer as
27 * platform-independent, generic APIs.
28 *
29 * Most apps can make do without these functions, but they can be useful for
30 * integrating with other parts of a specific system, adding platform-specific
31 * polish to an app, or solving problems that only affect one target.
32 */
33
34#ifndef SDL_system_h_
35#define SDL_system_h_
36
37#include <SDL3/SDL_stdinc.h>
38#include <SDL3/SDL_error.h>
39#include <SDL3/SDL_keyboard.h>
40#include <SDL3/SDL_video.h>
41
42#include <SDL3/SDL_begin_code.h>
43/* Set up for C function definitions, even when using C++ */
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48
49/*
50 * Platform specific functions for Windows
51 */
52#if defined(SDL_PLATFORM_WINDOWS)
53
54typedef struct tagMSG MSG;
55
56/**
57 * A callback to be used with SDL_SetWindowsMessageHook.
58 *
59 * This callback may modify the message, and should return true if the message
60 * should continue to be processed, or false to prevent further processing.
61 *
62 * As this is processing a message directly from the Windows event loop, this
63 * callback should do the minimum required work and return quickly.
64 *
65 * \param userdata the app-defined pointer provided to
66 * SDL_SetWindowsMessageHook.
67 * \param msg a pointer to a Win32 event structure to process.
68 * \returns true to let event continue on, false to drop it.
69 *
70 * \threadsafety This may only be called (by SDL) from the thread handling the
71 * Windows event loop.
72 *
73 * \since This datatype is available since SDL 3.2.0.
74 *
75 * \sa SDL_SetWindowsMessageHook
76 * \sa SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP
77 */
78typedef bool (SDLCALL *SDL_WindowsMessageHook)(void *userdata, MSG *msg);
79
80/**
81 * Set a callback for every Windows message, run before TranslateMessage().
82 *
83 * The callback may modify the message, and should return true if the message
84 * should continue to be processed, or false to prevent further processing.
85 *
86 * \param callback the SDL_WindowsMessageHook function to call.
87 * \param userdata a pointer to pass to every iteration of `callback`.
88 *
89 * \since This function is available since SDL 3.2.0.
90 *
91 * \sa SDL_WindowsMessageHook
92 * \sa SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP
93 */
94extern SDL_DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
95
96#endif /* defined(SDL_PLATFORM_WINDOWS) */
97
98#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
99
100/**
101 * Get the D3D9 adapter index that matches the specified display.
102 *
103 * The returned adapter index can be passed to `IDirect3D9::CreateDevice` and
104 * controls on which monitor a full screen application will appear.
105 *
106 * \param displayID the instance of the display to query.
107 * \returns the D3D9 adapter index on success or -1 on failure; call
108 * SDL_GetError() for more information.
109 *
110 * \since This function is available since SDL 3.2.0.
111 */
112extern SDL_DECLSPEC int SDLCALL SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID);
113
114/**
115 * Get the DXGI Adapter and Output indices for the specified display.
116 *
117 * The DXGI Adapter and Output indices can be passed to `EnumAdapters` and
118 * `EnumOutputs` respectively to get the objects required to create a DX10 or
119 * DX11 device and swap chain.
120 *
121 * \param displayID the instance of the display to query.
122 * \param adapterIndex a pointer to be filled in with the adapter index.
123 * \param outputIndex a pointer to be filled in with the output index.
124 * \returns true on success or false on failure; call SDL_GetError() for more
125 * information.
126 *
127 * \since This function is available since SDL 3.2.0.
128 */
129extern SDL_DECLSPEC bool SDLCALL SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int *adapterIndex, int *outputIndex);
130
131#endif /* defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK) */
132
133
134/*
135 * Platform specific functions for UNIX
136 */
137
138/* this is defined in Xlib's headers, just need a simple declaration here. */
139typedef union _XEvent XEvent;
140
141/**
142 * A callback to be used with SDL_SetX11EventHook.
143 *
144 * This callback may modify the event, and should return true if the event
145 * should continue to be processed, or false to prevent further processing.
146 *
147 * As this is processing an event directly from the X11 event loop, this
148 * callback should do the minimum required work and return quickly.
149 *
150 * \param userdata the app-defined pointer provided to SDL_SetX11EventHook.
151 * \param xevent a pointer to an Xlib XEvent union to process.
152 * \returns true to let event continue on, false to drop it.
153 *
154 * \threadsafety This may only be called (by SDL) from the thread handling the
155 * X11 event loop.
156 *
157 * \since This datatype is available since SDL 3.2.0.
158 *
159 * \sa SDL_SetX11EventHook
160 */
161typedef bool (SDLCALL *SDL_X11EventHook)(void *userdata, XEvent *xevent);
162
163/**
164 * Set a callback for every X11 event.
165 *
166 * The callback may modify the event, and should return true if the event
167 * should continue to be processed, or false to prevent further processing.
168 *
169 * \param callback the SDL_X11EventHook function to call.
170 * \param userdata a pointer to pass to every iteration of `callback`.
171 *
172 * \since This function is available since SDL 3.2.0.
173 */
174extern SDL_DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata);
175
176/* Platform specific functions for Linux*/
177#ifdef SDL_PLATFORM_LINUX
178
179/**
180 * Sets the UNIX nice value for a thread.
181 *
182 * This uses setpriority() if possible, and RealtimeKit if available.
183 *
184 * \param threadID the Unix thread ID to change priority of.
185 * \param priority the new, Unix-specific, priority value.
186 * \returns true on success or false on failure; call SDL_GetError() for more
187 * information.
188 *
189 * \since This function is available since SDL 3.2.0.
190 */
191extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriority(Sint64 threadID, int priority);
192
193/**
194 * Sets the priority (not nice level) and scheduling policy for a thread.
195 *
196 * This uses setpriority() if possible, and RealtimeKit if available.
197 *
198 * \param threadID the Unix thread ID to change priority of.
199 * \param sdlPriority the new SDL_ThreadPriority value.
200 * \param schedPolicy the new scheduling policy (SCHED_FIFO, SCHED_RR,
201 * SCHED_OTHER, etc...).
202 * \returns true on success or false on failure; call SDL_GetError() for more
203 * information.
204 *
205 * \since This function is available since SDL 3.2.0.
206 */
207extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
208
209#endif /* SDL_PLATFORM_LINUX */
210
211/*
212 * Platform specific functions for iOS
213 */
214#ifdef SDL_PLATFORM_IOS
215
216/**
217 * The prototype for an Apple iOS animation callback.
218 *
219 * This datatype is only useful on Apple iOS.
220 *
221 * After passing a function pointer of this type to
222 * SDL_SetiOSAnimationCallback, the system will call that function pointer at
223 * a regular interval.
224 *
225 * \param userdata what was passed as `callbackParam` to
226 * SDL_SetiOSAnimationCallback as `callbackParam`.
227 *
228 * \since This datatype is available since SDL 3.2.0.
229 *
230 * \sa SDL_SetiOSAnimationCallback
231 */
232typedef void (SDLCALL *SDL_iOSAnimationCallback)(void *userdata);
233
234/**
235 * Use this function to set the animation callback on Apple iOS.
236 *
237 * The function prototype for `callback` is:
238 *
239 * ```c
240 * void callback(void *callbackParam);
241 * ```
242 *
243 * Where its parameter, `callbackParam`, is what was passed as `callbackParam`
244 * to SDL_SetiOSAnimationCallback().
245 *
246 * This function is only available on Apple iOS.
247 *
248 * For more information see:
249 *
250 * https://wiki.libsdl.org/SDL3/README/ios
251 *
252 * Note that if you use the "main callbacks" instead of a standard C `main`
253 * function, you don't have to use this API, as SDL will manage this for you.
254 *
255 * Details on main callbacks are here:
256 *
257 * https://wiki.libsdl.org/SDL3/README/main-functions
258 *
259 * \param window the window for which the animation callback should be set.
260 * \param interval the number of frames after which **callback** will be
261 * called.
262 * \param callback the function to call for every frame.
263 * \param callbackParam a pointer that is passed to `callback`.
264 * \returns true on success or false on failure; call SDL_GetError() for more
265 * information.
266 *
267 * \since This function is available since SDL 3.2.0.
268 *
269 * \sa SDL_SetiOSEventPump
270 */
271extern SDL_DECLSPEC bool SDLCALL SDL_SetiOSAnimationCallback(SDL_Window *window, int interval, SDL_iOSAnimationCallback callback, void *callbackParam);
272
273/**
274 * Use this function to enable or disable the SDL event pump on Apple iOS.
275 *
276 * This function is only available on Apple iOS.
277 *
278 * \param enabled true to enable the event pump, false to disable it.
279 *
280 * \since This function is available since SDL 3.2.0.
281 *
282 * \sa SDL_SetiOSAnimationCallback
283 */
284extern SDL_DECLSPEC void SDLCALL SDL_SetiOSEventPump(bool enabled);
285
286#endif /* SDL_PLATFORM_IOS */
287
288
289/*
290 * Platform specific functions for Android
291 */
292#ifdef SDL_PLATFORM_ANDROID
293
294/**
295 * Get the Android Java Native Interface Environment of the current thread.
296 *
297 * This is the JNIEnv one needs to access the Java virtual machine from native
298 * code, and is needed for many Android APIs to be usable from C.
299 *
300 * The prototype of the function in SDL's code actually declare a void* return
301 * type, even if the implementation returns a pointer to a JNIEnv. The
302 * rationale being that the SDL headers can avoid including jni.h.
303 *
304 * \returns a pointer to Java native interface object (JNIEnv) to which the
305 * current thread is attached, or NULL on failure; call
306 * SDL_GetError() for more information.
307 *
308 * \threadsafety It is safe to call this function from any thread.
309 *
310 * \since This function is available since SDL 3.2.0.
311 *
312 * \sa SDL_GetAndroidActivity
313 */
314extern SDL_DECLSPEC void * SDLCALL SDL_GetAndroidJNIEnv(void);
315
316/**
317 * Retrieve the Java instance of the Android activity class.
318 *
319 * The prototype of the function in SDL's code actually declares a void*
320 * return type, even if the implementation returns a jobject. The rationale
321 * being that the SDL headers can avoid including jni.h.
322 *
323 * The jobject returned by the function is a local reference and must be
324 * released by the caller. See the PushLocalFrame() and PopLocalFrame() or
325 * DeleteLocalRef() functions of the Java native interface:
326 *
327 * https://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html
328 *
329 * \returns the jobject representing the instance of the Activity class of the
330 * Android application, or NULL on failure; call SDL_GetError() for
331 * more information.
332 *
333 * \threadsafety It is safe to call this function from any thread.
334 *
335 * \since This function is available since SDL 3.2.0.
336 *
337 * \sa SDL_GetAndroidJNIEnv
338 */
339extern SDL_DECLSPEC void * SDLCALL SDL_GetAndroidActivity(void);
340
341/**
342 * Query Android API level of the current device.
343 *
344 * - API level 35: Android 15 (VANILLA_ICE_CREAM)
345 * - API level 34: Android 14 (UPSIDE_DOWN_CAKE)
346 * - API level 33: Android 13 (TIRAMISU)
347 * - API level 32: Android 12L (S_V2)
348 * - API level 31: Android 12 (S)
349 * - API level 30: Android 11 (R)
350 * - API level 29: Android 10 (Q)
351 * - API level 28: Android 9 (P)
352 * - API level 27: Android 8.1 (O_MR1)
353 * - API level 26: Android 8.0 (O)
354 * - API level 25: Android 7.1 (N_MR1)
355 * - API level 24: Android 7.0 (N)
356 * - API level 23: Android 6.0 (M)
357 * - API level 22: Android 5.1 (LOLLIPOP_MR1)
358 * - API level 21: Android 5.0 (LOLLIPOP, L)
359 * - API level 20: Android 4.4W (KITKAT_WATCH)
360 * - API level 19: Android 4.4 (KITKAT)
361 * - API level 18: Android 4.3 (JELLY_BEAN_MR2)
362 * - API level 17: Android 4.2 (JELLY_BEAN_MR1)
363 * - API level 16: Android 4.1 (JELLY_BEAN)
364 * - API level 15: Android 4.0.3 (ICE_CREAM_SANDWICH_MR1)
365 * - API level 14: Android 4.0 (ICE_CREAM_SANDWICH)
366 * - API level 13: Android 3.2 (HONEYCOMB_MR2)
367 * - API level 12: Android 3.1 (HONEYCOMB_MR1)
368 * - API level 11: Android 3.0 (HONEYCOMB)
369 * - API level 10: Android 2.3.3 (GINGERBREAD_MR1)
370 *
371 * \returns the Android API level.
372 *
373 * \since This function is available since SDL 3.2.0.
374 */
375extern SDL_DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
376
377/**
378 * Query if the application is running on a Chromebook.
379 *
380 * \returns true if this is a Chromebook, false otherwise.
381 *
382 * \since This function is available since SDL 3.2.0.
383 */
384extern SDL_DECLSPEC bool SDLCALL SDL_IsChromebook(void);
385
386/**
387 * Query if the application is running on a Samsung DeX docking station.
388 *
389 * \returns true if this is a DeX docking station, false otherwise.
390 *
391 * \since This function is available since SDL 3.2.0.
392 */
393extern SDL_DECLSPEC bool SDLCALL SDL_IsDeXMode(void);
394
395/**
396 * Trigger the Android system back button behavior.
397 *
398 * \threadsafety It is safe to call this function from any thread.
399 *
400 * \since This function is available since SDL 3.2.0.
401 */
402extern SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void);
403
404/**
405 * See the official Android developer guide for more information:
406 * http://developer.android.com/guide/topics/data/data-storage.html
407 *
408 * \since This macro is available since SDL 3.2.0.
409 */
410#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
411
412/**
413 * See the official Android developer guide for more information:
414 * http://developer.android.com/guide/topics/data/data-storage.html
415 *
416 * \since This macro is available since SDL 3.2.0.
417 */
418#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
419
420/**
421 * Get the path used for internal storage for this Android application.
422 *
423 * This path is unique to your application and cannot be written to by other
424 * applications.
425 *
426 * Your internal storage path is typically:
427 * `/data/data/your.app.package/files`.
428 *
429 * This is a C wrapper over `android.content.Context.getFilesDir()`:
430 *
431 * https://developer.android.com/reference/android/content/Context#getFilesDir()
432 *
433 * \returns the path used for internal storage or NULL on failure; call
434 * SDL_GetError() for more information.
435 *
436 * \since This function is available since SDL 3.2.0.
437 *
438 * \sa SDL_GetAndroidExternalStoragePath
439 * \sa SDL_GetAndroidCachePath
440 */
441extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidInternalStoragePath(void);
442
443/**
444 * Get the current state of external storage for this Android application.
445 *
446 * The current state of external storage, a bitmask of these values:
447 * `SDL_ANDROID_EXTERNAL_STORAGE_READ`, `SDL_ANDROID_EXTERNAL_STORAGE_WRITE`.
448 *
449 * If external storage is currently unavailable, this will return 0.
450 *
451 * \returns the current state of external storage, or 0 if external storage is
452 * currently unavailable.
453 *
454 * \since This function is available since SDL 3.2.0.
455 *
456 * \sa SDL_GetAndroidExternalStoragePath
457 */
458extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetAndroidExternalStorageState(void);
459
460/**
461 * Get the path used for external storage for this Android application.
462 *
463 * This path is unique to your application, but is public and can be written
464 * to by other applications.
465 *
466 * Your external storage path is typically:
467 * `/storage/sdcard0/Android/data/your.app.package/files`.
468 *
469 * This is a C wrapper over `android.content.Context.getExternalFilesDir()`:
470 *
471 * https://developer.android.com/reference/android/content/Context#getExternalFilesDir()
472 *
473 * \returns the path used for external storage for this application on success
474 * or NULL on failure; call SDL_GetError() for more information.
475 *
476 * \since This function is available since SDL 3.2.0.
477 *
478 * \sa SDL_GetAndroidExternalStorageState
479 * \sa SDL_GetAndroidInternalStoragePath
480 * \sa SDL_GetAndroidCachePath
481 */
482extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidExternalStoragePath(void);
483
484/**
485 * Get the path used for caching data for this Android application.
486 *
487 * This path is unique to your application, but is public and can be written
488 * to by other applications.
489 *
490 * Your cache path is typically: `/data/data/your.app.package/cache/`.
491 *
492 * This is a C wrapper over `android.content.Context.getCacheDir()`:
493 *
494 * https://developer.android.com/reference/android/content/Context#getCacheDir()
495 *
496 * \returns the path used for caches for this application on success or NULL
497 * on failure; call SDL_GetError() for more information.
498 *
499 * \since This function is available since SDL 3.2.0.
500 *
501 * \sa SDL_GetAndroidInternalStoragePath
502 * \sa SDL_GetAndroidExternalStoragePath
503 */
504extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidCachePath(void);
505
506/**
507 * Callback that presents a response from a SDL_RequestAndroidPermission call.
508 *
509 * \param userdata an app-controlled pointer that is passed to the callback.
510 * \param permission the Android-specific permission name that was requested.
511 * \param granted true if permission is granted, false if denied.
512 *
513 * \since This datatype is available since SDL 3.2.0.
514 *
515 * \sa SDL_RequestAndroidPermission
516 */
517typedef void (SDLCALL *SDL_RequestAndroidPermissionCallback)(void *userdata, const char *permission, bool granted);
518
519/**
520 * Request permissions at runtime, asynchronously.
521 *
522 * You do not need to call this for built-in functionality of SDL; recording
523 * from a microphone or reading images from a camera, using standard SDL APIs,
524 * will manage permission requests for you.
525 *
526 * This function never blocks. Instead, the app-supplied callback will be
527 * called when a decision has been made. This callback may happen on a
528 * different thread, and possibly much later, as it might wait on a user to
529 * respond to a system dialog. If permission has already been granted for a
530 * specific entitlement, the callback will still fire, probably on the current
531 * thread and before this function returns.
532 *
533 * If the request submission fails, this function returns -1 and the callback
534 * will NOT be called, but this should only happen in catastrophic conditions,
535 * like memory running out. Normally there will be a yes or no to the request
536 * through the callback.
537 *
538 * For the `permission` parameter, choose a value from here:
539 *
540 * https://developer.android.com/reference/android/Manifest.permission
541 *
542 * \param permission the permission to request.
543 * \param cb the callback to trigger when the request has a response.
544 * \param userdata an app-controlled pointer that is passed to the callback.
545 * \returns true if the request was submitted, false if there was an error
546 * submitting. The result of the request is only ever reported
547 * through the callback, not this return value.
548 *
549 * \threadsafety It is safe to call this function from any thread.
550 *
551 * \since This function is available since SDL 3.2.0.
552 */
553extern SDL_DECLSPEC bool SDLCALL SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPermissionCallback cb, void *userdata);
554
555/**
556 * Shows an Android toast notification.
557 *
558 * Toasts are a sort of lightweight notification that are unique to Android.
559 *
560 * https://developer.android.com/guide/topics/ui/notifiers/toasts
561 *
562 * Shows toast in UI thread.
563 *
564 * For the `gravity` parameter, choose a value from here, or -1 if you don't
565 * have a preference:
566 *
567 * https://developer.android.com/reference/android/view/Gravity
568 *
569 * \param message text message to be shown.
570 * \param duration 0=short, 1=long.
571 * \param gravity where the notification should appear on the screen.
572 * \param xoffset set this parameter only when gravity >=0.
573 * \param yoffset set this parameter only when gravity >=0.
574 * \returns true on success or false on failure; call SDL_GetError() for more
575 * information.
576 *
577 * \threadsafety It is safe to call this function from any thread.
578 *
579 * \since This function is available since SDL 3.2.0.
580 */
581extern SDL_DECLSPEC bool SDLCALL SDL_ShowAndroidToast(const char *message, int duration, int gravity, int xoffset, int yoffset);
582
583/**
584 * Send a user command to SDLActivity.
585 *
586 * Override "boolean onUnhandledMessage(Message msg)" to handle the message.
587 *
588 * \param command user command that must be greater or equal to 0x8000.
589 * \param param user parameter.
590 * \returns true on success or false on failure; call SDL_GetError() for more
591 * information.
592 *
593 * \threadsafety It is safe to call this function from any thread.
594 *
595 * \since This function is available since SDL 3.2.0.
596 */
597extern SDL_DECLSPEC bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int param);
598
599#endif /* SDL_PLATFORM_ANDROID */
600
601/**
602 * Query if the current device is a tablet.
603 *
604 * If SDL can't determine this, it will return false.
605 *
606 * \returns true if the device is a tablet, false otherwise.
607 *
608 * \since This function is available since SDL 3.2.0.
609 */
610extern SDL_DECLSPEC bool SDLCALL SDL_IsTablet(void);
611
612/**
613 * Query if the current device is a TV.
614 *
615 * If SDL can't determine this, it will return false.
616 *
617 * \returns true if the device is a TV, false otherwise.
618 *
619 * \since This function is available since SDL 3.2.0.
620 */
621extern SDL_DECLSPEC bool SDLCALL SDL_IsTV(void);
622
623/**
624 * Application sandbox environment.
625 *
626 * \since This enum is available since SDL 3.2.0.
627 */
628typedef enum SDL_Sandbox
629{
630 SDL_SANDBOX_NONE = 0,
631 SDL_SANDBOX_UNKNOWN_CONTAINER,
632 SDL_SANDBOX_FLATPAK,
633 SDL_SANDBOX_SNAP,
634 SDL_SANDBOX_MACOS
635} SDL_Sandbox;
636
637/**
638 * Get the application sandbox environment, if any.
639 *
640 * \returns the application sandbox environment or SDL_SANDBOX_NONE if the
641 * application is not running in a sandbox environment.
642 *
643 * \since This function is available since SDL 3.2.0.
644 */
645extern SDL_DECLSPEC SDL_Sandbox SDLCALL SDL_GetSandbox(void);
646
647
648/* Functions used by iOS app delegates to notify SDL about state changes. */
649
650/**
651 * Let iOS apps with external event handling report
652 * onApplicationWillTerminate.
653 *
654 * This functions allows iOS apps that have their own event handling to hook
655 * into SDL to generate SDL events. This maps directly to an iOS-specific
656 * event, but since it doesn't do anything iOS-specific internally, it is
657 * available on all platforms, in case it might be useful for some specific
658 * paradigm. Most apps do not need to use this directly; SDL's internal event
659 * code will handle all this for windows created by SDL_CreateWindow!
660 *
661 * \threadsafety It is safe to call this function from any thread.
662 *
663 * \since This function is available since SDL 3.2.0.
664 */
665extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void);
666
667/**
668 * Let iOS apps with external event handling report
669 * onApplicationDidReceiveMemoryWarning.
670 *
671 * This functions allows iOS apps that have their own event handling to hook
672 * into SDL to generate SDL events. This maps directly to an iOS-specific
673 * event, but since it doesn't do anything iOS-specific internally, it is
674 * available on all platforms, in case it might be useful for some specific
675 * paradigm. Most apps do not need to use this directly; SDL's internal event
676 * code will handle all this for windows created by SDL_CreateWindow!
677 *
678 * \threadsafety It is safe to call this function from any thread.
679 *
680 * \since This function is available since SDL 3.2.0.
681 */
682extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void);
683
684/**
685 * Let iOS apps with external event handling report
686 * onApplicationWillResignActive.
687 *
688 * This functions allows iOS apps that have their own event handling to hook
689 * into SDL to generate SDL events. This maps directly to an iOS-specific
690 * event, but since it doesn't do anything iOS-specific internally, it is
691 * available on all platforms, in case it might be useful for some specific
692 * paradigm. Most apps do not need to use this directly; SDL's internal event
693 * code will handle all this for windows created by SDL_CreateWindow!
694 *
695 * \threadsafety It is safe to call this function from any thread.
696 *
697 * \since This function is available since SDL 3.2.0.
698 */
699extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationWillEnterBackground(void);
700
701/**
702 * Let iOS apps with external event handling report
703 * onApplicationDidEnterBackground.
704 *
705 * This functions allows iOS apps that have their own event handling to hook
706 * into SDL to generate SDL events. This maps directly to an iOS-specific
707 * event, but since it doesn't do anything iOS-specific internally, it is
708 * available on all platforms, in case it might be useful for some specific
709 * paradigm. Most apps do not need to use this directly; SDL's internal event
710 * code will handle all this for windows created by SDL_CreateWindow!
711 *
712 * \threadsafety It is safe to call this function from any thread.
713 *
714 * \since This function is available since SDL 3.2.0.
715 */
716extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void);
717
718/**
719 * Let iOS apps with external event handling report
720 * onApplicationWillEnterForeground.
721 *
722 * This functions allows iOS apps that have their own event handling to hook
723 * into SDL to generate SDL events. This maps directly to an iOS-specific
724 * event, but since it doesn't do anything iOS-specific internally, it is
725 * available on all platforms, in case it might be useful for some specific
726 * paradigm. Most apps do not need to use this directly; SDL's internal event
727 * code will handle all this for windows created by SDL_CreateWindow!
728 *
729 * \threadsafety It is safe to call this function from any thread.
730 *
731 * \since This function is available since SDL 3.2.0.
732 */
733extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void);
734
735/**
736 * Let iOS apps with external event handling report
737 * onApplicationDidBecomeActive.
738 *
739 * This functions allows iOS apps that have their own event handling to hook
740 * into SDL to generate SDL events. This maps directly to an iOS-specific
741 * event, but since it doesn't do anything iOS-specific internally, it is
742 * available on all platforms, in case it might be useful for some specific
743 * paradigm. Most apps do not need to use this directly; SDL's internal event
744 * code will handle all this for windows created by SDL_CreateWindow!
745 *
746 * \threadsafety It is safe to call this function from any thread.
747 *
748 * \since This function is available since SDL 3.2.0.
749 */
750extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidEnterForeground(void);
751
752#ifdef SDL_PLATFORM_IOS
753
754/**
755 * Let iOS apps with external event handling report
756 * onApplicationDidChangeStatusBarOrientation.
757 *
758 * This functions allows iOS apps that have their own event handling to hook
759 * into SDL to generate SDL events. This maps directly to an iOS-specific
760 * event, but since it doesn't do anything iOS-specific internally, it is
761 * available on all platforms, in case it might be useful for some specific
762 * paradigm. Most apps do not need to use this directly; SDL's internal event
763 * code will handle all this for windows created by SDL_CreateWindow!
764 *
765 * \threadsafety It is safe to call this function from any thread.
766 *
767 * \since This function is available since SDL 3.2.0.
768 */
769extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
770#endif
771
772/*
773 * Functions used only by GDK
774 */
775#ifdef SDL_PLATFORM_GDK
776typedef struct XTaskQueueObject *XTaskQueueHandle;
777typedef struct XUser *XUserHandle;
778
779/**
780 * Gets a reference to the global async task queue handle for GDK,
781 * initializing if needed.
782 *
783 * Once you are done with the task queue, you should call
784 * XTaskQueueCloseHandle to reduce the reference count to avoid a resource
785 * leak.
786 *
787 * \param outTaskQueue a pointer to be filled in with task queue handle.
788 * \returns true on success or false on failure; call SDL_GetError() for more
789 * information.
790 *
791 * \since This function is available since SDL 3.2.0.
792 */
793extern SDL_DECLSPEC bool SDLCALL SDL_GetGDKTaskQueue(XTaskQueueHandle *outTaskQueue);
794
795/**
796 * Gets a reference to the default user handle for GDK.
797 *
798 * This is effectively a synchronous version of XUserAddAsync, which always
799 * prefers the default user and allows a sign-in UI.
800 *
801 * \param outUserHandle a pointer to be filled in with the default user
802 * handle.
803 * \returns true if success or false on failure; call SDL_GetError() for more
804 * information.
805 *
806 * \since This function is available since SDL 3.2.0.
807 */
808extern SDL_DECLSPEC bool SDLCALL SDL_GetGDKDefaultUser(XUserHandle *outUserHandle);
809
810#endif
811
812/* Ends C function definitions when using C++ */
813#ifdef __cplusplus
814}
815#endif
816#include <SDL3/SDL_close_code.h>
817
818#endif /* SDL_system_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test.h
new file mode 100644
index 0000000..8b28580
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test.h
@@ -0,0 +1,63 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * Include file for SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28#ifndef SDL_test_h_
29#define SDL_test_h_
30
31#include <SDL3/SDL.h>
32#include <SDL3/SDL_test_assert.h>
33#include <SDL3/SDL_test_common.h>
34#include <SDL3/SDL_test_compare.h>
35#include <SDL3/SDL_test_crc32.h>
36#include <SDL3/SDL_test_font.h>
37#include <SDL3/SDL_test_fuzzer.h>
38#include <SDL3/SDL_test_harness.h>
39#include <SDL3/SDL_test_log.h>
40#include <SDL3/SDL_test_md5.h>
41#include <SDL3/SDL_test_memory.h>
42
43#include <SDL3/SDL_begin_code.h>
44/* Set up for C function definitions, even when using C++ */
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/* Global definitions */
50
51/*
52 * Note: Maximum size of SDLTest log message is less than SDL's limit
53 * to ensure we can fit additional information such as the timestamp.
54 */
55#define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584
56
57/* Ends C function definitions when using C++ */
58#ifdef __cplusplus
59}
60#endif
61#include <SDL3/SDL_close_code.h>
62
63#endif /* SDL_test_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_assert.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_assert.h
new file mode 100644
index 0000000..c067608
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_assert.h
@@ -0,0 +1,98 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * Assertion functions of SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28/*
29 *
30 * Assert API for test code and test cases
31 *
32 */
33
34#ifndef SDL_test_assert_h_
35#define SDL_test_assert_h_
36
37#include <SDL3/SDL_stdinc.h>
38
39#include <SDL3/SDL_begin_code.h>
40/* Set up for C function definitions, even when using C++ */
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45/* Fails the assert. */
46#define ASSERT_FAIL 0
47
48/* Passes the assert. */
49#define ASSERT_PASS 1
50
51/*
52 * Assert that logs and break execution flow on failures.
53 *
54 * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
55 * \param assertDescription Message to log with the assert describing it.
56 */
57void SDLCALL SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
58
59/*
60 * Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.
61 *
62 * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
63 * \param assertDescription Message to log with the assert describing it.
64 *
65 * \returns the assertCondition so it can be used to externally to break execution flow if desired.
66 */
67int SDLCALL SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
68
69/*
70 * Explicitly pass without checking an assertion condition. Updates assertion counter.
71 *
72 * \param assertDescription Message to log with the assert describing it.
73 */
74void SDLCALL SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1);
75
76/*
77 * Resets the assert summary counters to zero.
78 */
79void SDLCALL SDLTest_ResetAssertSummary(void);
80
81/*
82 * Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
83 */
84void SDLCALL SDLTest_LogAssertSummary(void);
85
86/*
87 * Converts the current assert summary state to a test result.
88 *
89 * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT
90 */
91int SDLCALL SDLTest_AssertSummaryToTestResult(void);
92
93#ifdef __cplusplus
94}
95#endif
96#include <SDL3/SDL_close_code.h>
97
98#endif /* SDL_test_assert_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_common.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_common.h
new file mode 100644
index 0000000..91efe8a
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_common.h
@@ -0,0 +1,289 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * Common functions of SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28/* Ported from original test/common.h file. */
29
30#ifndef SDL_test_common_h_
31#define SDL_test_common_h_
32
33#include <SDL3/SDL.h>
34
35#ifdef SDL_PLATFORM_PSP
36#define DEFAULT_WINDOW_WIDTH 480
37#define DEFAULT_WINDOW_HEIGHT 272
38#elif defined(SDL_PLATFORM_VITA)
39#define DEFAULT_WINDOW_WIDTH 960
40#define DEFAULT_WINDOW_HEIGHT 544
41#else
42#define DEFAULT_WINDOW_WIDTH 640
43#define DEFAULT_WINDOW_HEIGHT 480
44#endif
45
46typedef Uint32 SDLTest_VerboseFlags;
47#define VERBOSE_VIDEO 0x00000001
48#define VERBOSE_MODES 0x00000002
49#define VERBOSE_RENDER 0x00000004
50#define VERBOSE_EVENT 0x00000008
51#define VERBOSE_AUDIO 0x00000010
52#define VERBOSE_MOTION 0x00000020
53
54/* !< Function pointer parsing one argument at argv[index], returning the number of parsed arguments,
55 * or a negative value when the argument is invalid */
56typedef int (SDLCALL *SDLTest_ParseArgumentsFp)(void *data, char **argv, int index);
57
58/* !< Finalize the argument parser. */
59typedef void (SDLCALL *SDLTest_FinalizeArgumentParserFp)(void *arg);
60
61typedef struct SDLTest_ArgumentParser
62{
63 /* !< Parse an argument. */
64 SDLTest_ParseArgumentsFp parse_arguments;
65 /* !< Finalize this argument parser. Called once before parsing the first argument. */
66 SDLTest_FinalizeArgumentParserFp finalize;
67 /* !< Null-terminated array of arguments. Printed when running with --help. */
68 const char **usage;
69 /* !< User data, passed to all callbacks. */
70 void *data;
71 /* !< Next argument parser. */
72 struct SDLTest_ArgumentParser *next;
73} SDLTest_ArgumentParser;
74
75typedef struct
76{
77 /* SDL init flags */
78 char **argv;
79 SDL_InitFlags flags;
80 SDLTest_VerboseFlags verbose;
81
82 /* Video info */
83 const char *videodriver;
84 int display_index;
85 SDL_DisplayID displayID;
86 const char *window_title;
87 const char *window_icon;
88 SDL_WindowFlags window_flags;
89 bool flash_on_focus_loss;
90 int window_x;
91 int window_y;
92 int window_w;
93 int window_h;
94 int window_minW;
95 int window_minH;
96 int window_maxW;
97 int window_maxH;
98 float window_min_aspect;
99 float window_max_aspect;
100 int logical_w;
101 int logical_h;
102 bool auto_scale_content;
103 SDL_RendererLogicalPresentation logical_presentation;
104 float scale;
105 int depth;
106 float refresh_rate;
107 bool fill_usable_bounds;
108 bool fullscreen_exclusive;
109 SDL_DisplayMode fullscreen_mode;
110 int num_windows;
111 SDL_Window **windows;
112 const char *gpudriver;
113
114 /* Renderer info */
115 const char *renderdriver;
116 int render_vsync;
117 bool skip_renderer;
118 SDL_Renderer **renderers;
119 SDL_Texture **targets;
120
121 /* Audio info */
122 const char *audiodriver;
123 SDL_AudioFormat audio_format;
124 int audio_channels;
125 int audio_freq;
126 SDL_AudioDeviceID audio_id;
127
128 /* GL settings */
129 int gl_red_size;
130 int gl_green_size;
131 int gl_blue_size;
132 int gl_alpha_size;
133 int gl_buffer_size;
134 int gl_depth_size;
135 int gl_stencil_size;
136 int gl_double_buffer;
137 int gl_accum_red_size;
138 int gl_accum_green_size;
139 int gl_accum_blue_size;
140 int gl_accum_alpha_size;
141 int gl_stereo;
142 int gl_release_behavior;
143 int gl_multisamplebuffers;
144 int gl_multisamplesamples;
145 int gl_retained_backing;
146 int gl_accelerated;
147 int gl_major_version;
148 int gl_minor_version;
149 int gl_debug;
150 int gl_profile_mask;
151
152 /* Mouse info */
153 SDL_Rect confine;
154 bool hide_cursor;
155
156 /* Options info */
157 SDLTest_ArgumentParser common_argparser;
158 SDLTest_ArgumentParser video_argparser;
159 SDLTest_ArgumentParser audio_argparser;
160
161 SDLTest_ArgumentParser *argparser;
162} SDLTest_CommonState;
163
164#include <SDL3/SDL_begin_code.h>
165/* Set up for C function definitions, even when using C++ */
166#ifdef __cplusplus
167extern "C" {
168#endif
169
170/* Function prototypes */
171
172/**
173 * Parse command line parameters and create common state.
174 *
175 * \param argv Array of command line parameters
176 * \param flags Flags indicating which subsystem to initialize (i.e. SDL_INIT_VIDEO | SDL_INIT_AUDIO)
177 *
178 * \returns a newly allocated common state object.
179 */
180SDLTest_CommonState * SDLCALL SDLTest_CommonCreateState(char **argv, SDL_InitFlags flags);
181
182/**
183 * Free the common state object.
184 *
185 * You should call SDL_Quit() before calling this function.
186 *
187 * \param state The common state object to destroy
188 */
189void SDLCALL SDLTest_CommonDestroyState(SDLTest_CommonState *state);
190
191/**
192 * Process one common argument.
193 *
194 * \param state The common state describing the test window to create.
195 * \param index The index of the argument to process in argv[].
196 *
197 * \returns the number of arguments processed (i.e. 1 for --fullscreen, 2 for --video [videodriver], or -1 on error.
198 */
199int SDLCALL SDLTest_CommonArg(SDLTest_CommonState *state, int index);
200
201
202/**
203 * Logs command line usage info.
204 *
205 * This logs the appropriate command line options for the subsystems in use
206 * plus other common options, and then any application-specific options.
207 * This uses the SDL_Log() function and splits up output to be friendly to
208 * 80-character-wide terminals.
209 *
210 * \param state The common state describing the test window for the app.
211 * \param argv0 argv[0], as passed to main/SDL_main.
212 * \param options an array of strings for application specific options. The last element of the array should be NULL.
213 */
214void SDLCALL SDLTest_CommonLogUsage(SDLTest_CommonState *state, const char *argv0, const char **options);
215
216/**
217 * Open test window.
218 *
219 * \param state The common state describing the test window to create.
220 *
221 * \returns true if initialization succeeded, false otherwise
222 */
223bool SDLCALL SDLTest_CommonInit(SDLTest_CommonState *state);
224
225/**
226 * Easy argument handling when test app doesn't need any custom args.
227 *
228 * \param state The common state describing the test window to create.
229 * \param argc argc, as supplied to SDL_main
230 * \param argv argv, as supplied to SDL_main
231 *
232 * \returns false if app should quit, true otherwise.
233 */
234bool SDLCALL SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, int argc, char **argv);
235
236/**
237 * Print the details of an event.
238 *
239 * This is automatically called by SDLTest_CommonEvent() as needed.
240 *
241 * \param event The event to print.
242 */
243void SDLCALL SDLTest_PrintEvent(const SDL_Event *event);
244
245/**
246 * Common event handler for test windows if you use a standard SDL_main.
247 *
248 * \param state The common state used to create test window.
249 * \param event The event to handle.
250 * \param done Flag indicating we are done.
251 */
252void SDLCALL SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done);
253
254/**
255 * Common event handler for test windows if you use SDL_AppEvent.
256 *
257 * This does _not_ free anything in `event`.
258 *
259 * \param state The common state used to create test window.
260 * \param event The event to handle.
261 * \returns Value suitable for returning from SDL_AppEvent().
262 */
263SDL_AppResult SDLCALL SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event *event);
264
265/**
266 * Close test window.
267 *
268 * \param state The common state used to create test window.
269 *
270 */
271void SDLCALL SDLTest_CommonQuit(SDLTest_CommonState *state);
272
273/**
274 * Draws various window information (position, size, etc.) to the renderer.
275 *
276 * \param renderer The renderer to draw to.
277 * \param window The window whose information should be displayed.
278 * \param usedHeight Returns the height used, so the caller can draw more below.
279 *
280 */
281void SDLCALL SDLTest_CommonDrawWindowInfo(SDL_Renderer *renderer, SDL_Window *window, float *usedHeight);
282
283/* Ends C function definitions when using C++ */
284#ifdef __cplusplus
285}
286#endif
287#include <SDL3/SDL_close_code.h>
288
289#endif /* SDL_test_common_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_compare.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_compare.h
new file mode 100644
index 0000000..7ff2477
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_compare.h
@@ -0,0 +1,76 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * Comparison function of SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28/*
29
30 Defines comparison functions (i.e. for surfaces).
31
32*/
33
34#ifndef SDL_test_compare_h_
35#define SDL_test_compare_h_
36
37#include <SDL3/SDL.h>
38
39#include <SDL3/SDL_begin_code.h>
40/* Set up for C function definitions, even when using C++ */
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45/**
46 * Compares a surface and with reference image data for equality
47 *
48 * \param surface Surface used in comparison
49 * \param referenceSurface Test Surface used in comparison
50 * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy.
51 *
52 * \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
53 */
54int SDLCALL SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);
55
56/**
57 * Compares 2 memory blocks for equality
58 *
59 * \param actual Memory used in comparison, displayed on the left
60 * \param size_actual Size of actual in bytes
61 * \param reference Reference memory, displayed on the right
62 * \param size_reference Size of reference in bytes
63 *
64 * \returns 0 if the left and right memory block are equal, non-zero if they are non-equal.
65 *
66 * \since This function is available since SDL 3.2.0.
67 */
68int SDLCALL SDLTest_CompareMemory(const void *actual, size_t size_actual, const void *reference, size_t size_reference);
69
70/* Ends C function definitions when using C++ */
71#ifdef __cplusplus
72}
73#endif
74#include <SDL3/SDL_close_code.h>
75
76#endif /* SDL_test_compare_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_crc32.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_crc32.h
new file mode 100644
index 0000000..94fe1a3
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_crc32.h
@@ -0,0 +1,121 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * CRC32 functions of SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28/*
29
30 Implements CRC32 calculations (default output is Perl String::CRC32 compatible).
31
32*/
33
34#ifndef SDL_test_crc32_h_
35#define SDL_test_crc32_h_
36
37#include <SDL3/SDL_stdinc.h>
38
39#include <SDL3/SDL_begin_code.h>
40/* Set up for C function definitions, even when using C++ */
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45/* ------------ Definitions --------- */
46
47/* Definition shared by all CRC routines */
48
49#ifndef CrcUint32
50 #define CrcUint32 unsigned int
51#endif
52#ifndef CrcUint8
53 #define CrcUint8 unsigned char
54#endif
55
56#ifdef ORIGINAL_METHOD
57 #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */
58#else
59 #define CRC32_POLY 0xEDB88320 /* Perl String::CRC32 compatible */
60#endif
61
62/*
63 * Data structure for CRC32 (checksum) computation
64 */
65 typedef struct SDLTest_Crc32Context {
66 CrcUint32 crc32_table[256]; /* CRC table */
67 } SDLTest_Crc32Context;
68
69/* ---------- Function Prototypes ------------- */
70
71/*
72 * Initialize the CRC context
73 *
74 * Note: The function initializes the crc table required for all crc calculations.
75 *
76 * \param crcContext pointer to context variable
77 *
78 * \returns true on success or false on failure; call SDL_GetError()
79 * for more information.
80 *
81 */
82bool SDLCALL SDLTest_Crc32Init(SDLTest_Crc32Context *crcContext);
83
84/*
85 * calculate a crc32 from a data block
86 *
87 * \param crcContext pointer to context variable
88 * \param inBuf input buffer to checksum
89 * \param inLen length of input buffer
90 * \param crc32 pointer to Uint32 to store the final CRC into
91 *
92 * \returns true on success or false on failure; call SDL_GetError()
93 * for more information.
94 *
95 */
96bool SDLCALL SDLTest_Crc32Calc(SDLTest_Crc32Context *crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
97
98/* Same routine broken down into three steps */
99bool SDLCALL SDLTest_Crc32CalcStart(SDLTest_Crc32Context *crcContext, CrcUint32 *crc32);
100bool SDLCALL SDLTest_Crc32CalcEnd(SDLTest_Crc32Context *crcContext, CrcUint32 *crc32);
101bool SDLCALL SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context *crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
102
103/*
104 * clean up CRC context
105 *
106 * \param crcContext pointer to context variable
107 *
108 * \returns true on success or false on failure; call SDL_GetError()
109 * for more information.
110 *
111*/
112
113bool SDLCALL SDLTest_Crc32Done(SDLTest_Crc32Context *crcContext);
114
115/* Ends C function definitions when using C++ */
116#ifdef __cplusplus
117}
118#endif
119#include <SDL3/SDL_close_code.h>
120
121#endif /* SDL_test_crc32_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_font.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_font.h
new file mode 100644
index 0000000..fb40794
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_font.h
@@ -0,0 +1,169 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/*
23 * Font related functions of SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28#ifndef SDL_test_font_h_
29#define SDL_test_font_h_
30
31#include <SDL3/SDL_stdinc.h>
32#include <SDL3/SDL_rect.h>
33#include <SDL3/SDL_render.h>
34
35#include <SDL3/SDL_begin_code.h>
36/* Set up for C function definitions, even when using C++ */
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/* Function prototypes */
42
43extern int FONT_CHARACTER_SIZE;
44
45#define FONT_LINE_HEIGHT (FONT_CHARACTER_SIZE + 2)
46
47/*
48 * Draw a string in the currently set font.
49 *
50 * \param renderer The renderer to draw on.
51 * \param x The X coordinate of the upper left corner of the character.
52 * \param y The Y coordinate of the upper left corner of the character.
53 * \param c The character to draw.
54 *
55 * \returns true on success, false on failure.
56 */
57bool SDLCALL SDLTest_DrawCharacter(SDL_Renderer *renderer, float x, float y, Uint32 c);
58
59/*
60 * Draw a UTF-8 string in the currently set font.
61 *
62 * The font currently only supports characters in the Basic Latin and Latin-1 Supplement sets.
63 *
64 * \param renderer The renderer to draw on.
65 * \param x The X coordinate of the upper left corner of the string.
66 * \param y The Y coordinate of the upper left corner of the string.
67 * \param s The string to draw.
68 *
69 * \returns true on success, false on failure.
70 */
71bool SDLCALL SDLTest_DrawString(SDL_Renderer *renderer, float x, float y, const char *s);
72
73/*
74 * Data used for multi-line text output
75 */
76typedef struct SDLTest_TextWindow
77{
78 SDL_FRect rect;
79 int current;
80 int numlines;
81 char **lines;
82} SDLTest_TextWindow;
83
84/*
85 * Create a multi-line text output window
86 *
87 * \param x The X coordinate of the upper left corner of the window.
88 * \param y The Y coordinate of the upper left corner of the window.
89 * \param w The width of the window (currently ignored)
90 * \param h The height of the window (currently ignored)
91 *
92 * \returns the new window, or NULL on failure.
93 *
94 * \since This function is available since SDL 3.2.0.
95 */
96SDLTest_TextWindow * SDLCALL SDLTest_TextWindowCreate(float x, float y, float w, float h);
97
98/*
99 * Display a multi-line text output window
100 *
101 * This function should be called every frame to display the text
102 *
103 * \param textwin The text output window
104 * \param renderer The renderer to use for display
105 *
106 * \since This function is available since SDL 3.2.0.
107 */
108void SDLCALL SDLTest_TextWindowDisplay(SDLTest_TextWindow *textwin, SDL_Renderer *renderer);
109
110/*
111 * Add text to a multi-line text output window
112 *
113 * Adds UTF-8 text to the end of the current text. The newline character starts a
114 * new line of text. The backspace character deletes the last character or, if the
115 * line is empty, deletes the line and goes to the end of the previous line.
116 *
117 * \param textwin The text output window
118 * \param fmt A printf() style format string
119 * \param ... additional parameters matching % tokens in the `fmt` string, if any
120 *
121 * \since This function is available since SDL 3.2.0.
122 */
123void SDLCALL SDLTest_TextWindowAddText(SDLTest_TextWindow *textwin, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
124
125/*
126 * Add text to a multi-line text output window
127 *
128 * Adds UTF-8 text to the end of the current text. The newline character starts a
129 * new line of text. The backspace character deletes the last character or, if the
130 * line is empty, deletes the line and goes to the end of the previous line.
131 *
132 * \param textwin The text output window
133 * \param text The text to add to the window
134 * \param len The length, in bytes, of the text to add to the window
135 *
136 * \since This function is available since SDL 3.2.0.
137 */
138void SDLCALL SDLTest_TextWindowAddTextWithLength(SDLTest_TextWindow *textwin, const char *text, size_t len);
139
140/*
141 * Clear the text in a multi-line text output window
142 *
143 * \param textwin The text output window
144 *
145 * \since This function is available since SDL 3.2.0.
146 */
147void SDLCALL SDLTest_TextWindowClear(SDLTest_TextWindow *textwin);
148
149/*
150 * Free the storage associated with a multi-line text output window
151 *
152 * \param textwin The text output window
153 *
154 * \since This function is available since SDL 3.2.0.
155 */
156void SDLCALL SDLTest_TextWindowDestroy(SDLTest_TextWindow *textwin);
157
158/*
159 * Cleanup textures used by font drawing functions.
160 */
161void SDLCALL SDLTest_CleanupTextDrawing(void);
162
163/* Ends C function definitions when using C++ */
164#ifdef __cplusplus
165}
166#endif
167#include <SDL3/SDL_close_code.h>
168
169#endif /* SDL_test_font_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_fuzzer.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_fuzzer.h
new file mode 100644
index 0000000..caf11f2
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_fuzzer.h
@@ -0,0 +1,371 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * Fuzzer functions of SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28/*
29
30 Data generators for fuzzing test data in a reproducible way.
31
32*/
33
34#ifndef SDL_test_fuzzer_h_
35#define SDL_test_fuzzer_h_
36
37#include <SDL3/SDL_stdinc.h>
38
39#include <SDL3/SDL_begin_code.h>
40/* Set up for C function definitions, even when using C++ */
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45/*
46 Based on GSOC code by Markus Kauppila <markus.kauppila@gmail.com>
47*/
48
49/**
50 * Note: The fuzzer implementation uses a static instance of random context
51 * internally which makes it thread-UNsafe.
52 */
53
54/**
55 * Initializes the fuzzer for a test
56 *
57 * \param execKey Execution "Key" that initializes the random number generator uniquely for the test.
58 *
59 */
60void SDLCALL SDLTest_FuzzerInit(Uint64 execKey);
61
62/**
63 * Returns a random Uint8
64 *
65 * \returns a generated integer
66 */
67Uint8 SDLCALL SDLTest_RandomUint8(void);
68
69/**
70 * Returns a random Sint8
71 *
72 * \returns a generated signed integer
73 */
74Sint8 SDLCALL SDLTest_RandomSint8(void);
75
76/**
77 * Returns a random Uint16
78 *
79 * \returns a generated integer
80 */
81Uint16 SDLCALL SDLTest_RandomUint16(void);
82
83/**
84 * Returns a random Sint16
85 *
86 * \returns a generated signed integer
87 */
88Sint16 SDLCALL SDLTest_RandomSint16(void);
89
90/**
91 * Returns a random integer
92 *
93 * \returns a generated integer
94 */
95Sint32 SDLCALL SDLTest_RandomSint32(void);
96
97/**
98 * Returns a random positive integer
99 *
100 * \returns a generated integer
101 */
102Uint32 SDLCALL SDLTest_RandomUint32(void);
103
104/**
105 * Returns random Uint64.
106 *
107 * \returns a generated integer
108 */
109Uint64 SDLTest_RandomUint64(void);
110
111/**
112 * Returns random Sint64.
113 *
114 * \returns a generated signed integer
115 */
116Sint64 SDLCALL SDLTest_RandomSint64(void);
117
118/**
119 * \returns a random float in range [0.0 - 1.0]
120 */
121float SDLCALL SDLTest_RandomUnitFloat(void);
122
123/**
124 * \returns a random double in range [0.0 - 1.0]
125 */
126double SDLCALL SDLTest_RandomUnitDouble(void);
127
128/**
129 * \returns a random float.
130 *
131 */
132float SDLCALL SDLTest_RandomFloat(void);
133
134/**
135 * \returns a random double.
136 *
137 */
138double SDLCALL SDLTest_RandomDouble(void);
139
140/**
141 * Returns a random boundary value for Uint8 within the given boundaries.
142 * Boundaries are inclusive, see the usage examples below. If validDomain
143 * is true, the function will only return valid boundaries, otherwise non-valid
144 * boundaries are also possible.
145 * If boundary1 > boundary2, the values are swapped
146 *
147 * Usage examples:
148 * RandomUint8BoundaryValue(10, 20, true) returns 10, 11, 19 or 20
149 * RandomUint8BoundaryValue(1, 20, false) returns 0 or 21
150 * RandomUint8BoundaryValue(0, 99, false) returns 100
151 * RandomUint8BoundaryValue(0, 255, false) returns 0 (error set)
152 *
153 * \param boundary1 Lower boundary limit
154 * \param boundary2 Upper boundary limit
155 * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
156 *
157 * \returns a random boundary value for the given range and domain or 0 with error set
158 */
159Uint8 SDLCALL SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, bool validDomain);
160
161/**
162 * Returns a random boundary value for Uint16 within the given boundaries.
163 * Boundaries are inclusive, see the usage examples below. If validDomain
164 * is true, the function will only return valid boundaries, otherwise non-valid
165 * boundaries are also possible.
166 * If boundary1 > boundary2, the values are swapped
167 *
168 * Usage examples:
169 * RandomUint16BoundaryValue(10, 20, true) returns 10, 11, 19 or 20
170 * RandomUint16BoundaryValue(1, 20, false) returns 0 or 21
171 * RandomUint16BoundaryValue(0, 99, false) returns 100
172 * RandomUint16BoundaryValue(0, 0xFFFF, false) returns 0 (error set)
173 *
174 * \param boundary1 Lower boundary limit
175 * \param boundary2 Upper boundary limit
176 * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
177 *
178 * \returns a random boundary value for the given range and domain or 0 with error set
179 */
180Uint16 SDLCALL SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, bool validDomain);
181
182/**
183 * Returns a random boundary value for Uint32 within the given boundaries.
184 * Boundaries are inclusive, see the usage examples below. If validDomain
185 * is true, the function will only return valid boundaries, otherwise non-valid
186 * boundaries are also possible.
187 * If boundary1 > boundary2, the values are swapped
188 *
189 * Usage examples:
190 * RandomUint32BoundaryValue(10, 20, true) returns 10, 11, 19 or 20
191 * RandomUint32BoundaryValue(1, 20, false) returns 0 or 21
192 * RandomUint32BoundaryValue(0, 99, false) returns 100
193 * RandomUint32BoundaryValue(0, 0xFFFFFFFF, false) returns 0 (with error set)
194 *
195 * \param boundary1 Lower boundary limit
196 * \param boundary2 Upper boundary limit
197 * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
198 *
199 * \returns a random boundary value for the given range and domain or 0 with error set
200 */
201Uint32 SDLCALL SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, bool validDomain);
202
203/**
204 * Returns a random boundary value for Uint64 within the given boundaries.
205 * Boundaries are inclusive, see the usage examples below. If validDomain
206 * is true, the function will only return valid boundaries, otherwise non-valid
207 * boundaries are also possible.
208 * If boundary1 > boundary2, the values are swapped
209 *
210 * Usage examples:
211 * RandomUint64BoundaryValue(10, 20, true) returns 10, 11, 19 or 20
212 * RandomUint64BoundaryValue(1, 20, false) returns 0 or 21
213 * RandomUint64BoundaryValue(0, 99, false) returns 100
214 * RandomUint64BoundaryValue(0, 0xFFFFFFFFFFFFFFFF, false) returns 0 (with error set)
215 *
216 * \param boundary1 Lower boundary limit
217 * \param boundary2 Upper boundary limit
218 * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
219 *
220 * \returns a random boundary value for the given range and domain or 0 with error set
221 */
222Uint64 SDLCALL SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, bool validDomain);
223
224/**
225 * Returns a random boundary value for Sint8 within the given boundaries.
226 * Boundaries are inclusive, see the usage examples below. If validDomain
227 * is true, the function will only return valid boundaries, otherwise non-valid
228 * boundaries are also possible.
229 * If boundary1 > boundary2, the values are swapped
230 *
231 * Usage examples:
232 * RandomSint8BoundaryValue(-10, 20, true) returns -11, -10, 19 or 20
233 * RandomSint8BoundaryValue(-100, -10, false) returns -101 or -9
234 * RandomSint8BoundaryValue(SINT8_MIN, 99, false) returns 100
235 * RandomSint8BoundaryValue(SINT8_MIN, SINT8_MAX, false) returns SINT8_MIN (== error value) with error set
236 *
237 * \param boundary1 Lower boundary limit
238 * \param boundary2 Upper boundary limit
239 * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
240 *
241 * \returns a random boundary value for the given range and domain or SINT8_MIN with error set
242 */
243Sint8 SDLCALL SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, bool validDomain);
244
245/**
246 * Returns a random boundary value for Sint16 within the given boundaries.
247 * Boundaries are inclusive, see the usage examples below. If validDomain
248 * is true, the function will only return valid boundaries, otherwise non-valid
249 * boundaries are also possible.
250 * If boundary1 > boundary2, the values are swapped
251 *
252 * Usage examples:
253 * RandomSint16BoundaryValue(-10, 20, true) returns -11, -10, 19 or 20
254 * RandomSint16BoundaryValue(-100, -10, false) returns -101 or -9
255 * RandomSint16BoundaryValue(SINT16_MIN, 99, false) returns 100
256 * RandomSint16BoundaryValue(SINT16_MIN, SINT16_MAX, false) returns SINT16_MIN (== error value) with error set
257 *
258 * \param boundary1 Lower boundary limit
259 * \param boundary2 Upper boundary limit
260 * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
261 *
262 * \returns a random boundary value for the given range and domain or SINT16_MIN with error set
263 */
264Sint16 SDLCALL SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, bool validDomain);
265
266/**
267 * Returns a random boundary value for Sint32 within the given boundaries.
268 * Boundaries are inclusive, see the usage examples below. If validDomain
269 * is true, the function will only return valid boundaries, otherwise non-valid
270 * boundaries are also possible.
271 * If boundary1 > boundary2, the values are swapped
272 *
273 * Usage examples:
274 * RandomSint32BoundaryValue(-10, 20, true) returns -11, -10, 19 or 20
275 * RandomSint32BoundaryValue(-100, -10, false) returns -101 or -9
276 * RandomSint32BoundaryValue(SINT32_MIN, 99, false) returns 100
277 * RandomSint32BoundaryValue(SINT32_MIN, SINT32_MAX, false) returns SINT32_MIN (== error value)
278 *
279 * \param boundary1 Lower boundary limit
280 * \param boundary2 Upper boundary limit
281 * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
282 *
283 * \returns a random boundary value for the given range and domain or SINT32_MIN with error set
284 */
285Sint32 SDLCALL SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, bool validDomain);
286
287/**
288 * Returns a random boundary value for Sint64 within the given boundaries.
289 * Boundaries are inclusive, see the usage examples below. If validDomain
290 * is true, the function will only return valid boundaries, otherwise non-valid
291 * boundaries are also possible.
292 * If boundary1 > boundary2, the values are swapped
293 *
294 * Usage examples:
295 * RandomSint64BoundaryValue(-10, 20, true) returns -11, -10, 19 or 20
296 * RandomSint64BoundaryValue(-100, -10, false) returns -101 or -9
297 * RandomSint64BoundaryValue(SINT64_MIN, 99, false) returns 100
298 * RandomSint64BoundaryValue(SINT64_MIN, SINT64_MAX, false) returns SINT64_MIN (== error value) and error set
299 *
300 * \param boundary1 Lower boundary limit
301 * \param boundary2 Upper boundary limit
302 * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
303 *
304 * \returns a random boundary value for the given range and domain or SINT64_MIN with error set
305 */
306Sint64 SDLCALL SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, bool validDomain);
307
308/**
309 * Returns integer in range [min, max] (inclusive).
310 * Min and max values can be negative values.
311 * If Max in smaller than min, then the values are swapped.
312 * Min and max are the same value, that value will be returned.
313 *
314 * \param min Minimum inclusive value of returned random number
315 * \param max Maximum inclusive value of returned random number
316 *
317 * \returns a generated random integer in range
318 */
319Sint32 SDLCALL SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max);
320
321/**
322 * Generates random null-terminated string. The minimum length for
323 * the string is 1 character, maximum length for the string is 255
324 * characters and it can contain ASCII characters from 32 to 126.
325 *
326 * Note: Returned string needs to be deallocated.
327 *
328 * \returns a newly allocated random string; or NULL if length was invalid or string could not be allocated.
329 */
330char * SDLCALL SDLTest_RandomAsciiString(void);
331
332/**
333 * Generates random null-terminated string. The maximum length for
334 * the string is defined by the maxLength parameter.
335 * String can contain ASCII characters from 32 to 126.
336 *
337 * Note: Returned string needs to be deallocated.
338 *
339 * \param maxLength The maximum length of the generated string.
340 *
341 * \returns a newly allocated random string; or NULL if maxLength was invalid or string could not be allocated.
342 */
343char * SDLCALL SDLTest_RandomAsciiStringWithMaximumLength(int maxLength);
344
345/**
346 * Generates random null-terminated string. The length for
347 * the string is defined by the size parameter.
348 * String can contain ASCII characters from 32 to 126.
349 *
350 * Note: Returned string needs to be deallocated.
351 *
352 * \param size The length of the generated string
353 *
354 * \returns a newly allocated random string; or NULL if size was invalid or string could not be allocated.
355 */
356char * SDLCALL SDLTest_RandomAsciiStringOfSize(int size);
357
358/**
359 * Get the invocation count for the fuzzer since last ...FuzzerInit.
360 *
361 * \returns the invocation count.
362 */
363int SDLCALL SDLTest_GetFuzzerInvocationCount(void);
364
365/* Ends C function definitions when using C++ */
366#ifdef __cplusplus
367}
368#endif
369#include <SDL3/SDL_close_code.h>
370
371#endif /* SDL_test_fuzzer_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_harness.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_harness.h
new file mode 100644
index 0000000..5d4963e
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_harness.h
@@ -0,0 +1,151 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * Test suite related functions of SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28/*
29 Defines types for test case definitions and the test execution harness API.
30
31 Based on original GSOC code by Markus Kauppila <markus.kauppila@gmail.com>
32*/
33
34#ifndef SDL_test_h_arness_h
35#define SDL_test_h_arness_h
36
37#include <SDL3/SDL_stdinc.h>
38#include <SDL3/SDL_test_common.h> /* SDLTest_CommonState */
39
40#include <SDL3/SDL_begin_code.h>
41/* Set up for C function definitions, even when using C++ */
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46/* ! Definitions for test case structures */
47#define TEST_ENABLED 1
48#define TEST_DISABLED 0
49
50/* ! Definition of all the possible test return values of the test case method */
51#define TEST_ABORTED -1
52#define TEST_STARTED 0
53#define TEST_COMPLETED 1
54#define TEST_SKIPPED 2
55
56/* ! Definition of all the possible test results for the harness */
57#define TEST_RESULT_PASSED 0
58#define TEST_RESULT_FAILED 1
59#define TEST_RESULT_NO_ASSERT 2
60#define TEST_RESULT_SKIPPED 3
61#define TEST_RESULT_SETUP_FAILURE 4
62
63/* !< Function pointer to a test case setup function (run before every test) */
64typedef void (SDLCALL *SDLTest_TestCaseSetUpFp)(void **arg);
65
66/* !< Function pointer to a test case function */
67typedef int (SDLCALL *SDLTest_TestCaseFp)(void *arg);
68
69/* !< Function pointer to a test case teardown function (run after every test) */
70typedef void (SDLCALL *SDLTest_TestCaseTearDownFp)(void *arg);
71
72/*
73 * Holds information about a single test case.
74 */
75typedef struct SDLTest_TestCaseReference {
76 /* !< Func2Stress */
77 SDLTest_TestCaseFp testCase;
78 /* !< Short name (or function name) "Func2Stress" */
79 const char *name;
80 /* !< Long name or full description "This test pushes func2() to the limit." */
81 const char *description;
82 /* !< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */
83 int enabled;
84} SDLTest_TestCaseReference;
85
86/*
87 * Holds information about a test suite (multiple test cases).
88 */
89typedef struct SDLTest_TestSuiteReference {
90 /* !< "PlatformSuite" */
91 const char *name;
92 /* !< The function that is run before each test. NULL skips. */
93 SDLTest_TestCaseSetUpFp testSetUp;
94 /* !< The test cases that are run as part of the suite. Last item should be NULL. */
95 const SDLTest_TestCaseReference **testCases;
96 /* !< The function that is run after each test. NULL skips. */
97 SDLTest_TestCaseTearDownFp testTearDown;
98} SDLTest_TestSuiteReference;
99
100
101/*
102 * Generates a random run seed string for the harness. The generated seed
103 * will contain alphanumeric characters (0-9A-Z).
104 *
105 * \param buffer Buffer in which to generate the random seed. Must have a capacity of at least length + 1 characters.
106 * \param length Number of alphanumeric characters to write to buffer, must be >0
107 *
108 * \returns A null-terminated seed string and equal to the in put buffer on success, NULL on failure
109 */
110char * SDLCALL SDLTest_GenerateRunSeed(char *buffer, int length);
111
112/*
113 * Holds information about the execution of test suites.
114 * */
115typedef struct SDLTest_TestSuiteRunner SDLTest_TestSuiteRunner;
116
117/*
118 * Create a new test suite runner, that will execute the given test suites.
119 * It will register the harness cli arguments to the common SDL state.
120 *
121 * \param state Common SDL state on which to register CLI arguments.
122 * \param testSuites NULL-terminated test suites containing test cases.
123 *
124 * \returns the test run result: 0 when all tests passed, 1 if any tests failed.
125 */
126SDLTest_TestSuiteRunner * SDLCALL SDLTest_CreateTestSuiteRunner(SDLTest_CommonState *state, SDLTest_TestSuiteReference *testSuites[]);
127
128/*
129 * Destroy a test suite runner.
130 * It will unregister the harness cli arguments to the common SDL state.
131 *
132 * \param runner The runner that should be destroyed.
133 */
134void SDLCALL SDLTest_DestroyTestSuiteRunner(SDLTest_TestSuiteRunner *runner);
135
136/*
137 * Execute a test suite, using the configured run seed, execution key, filter, etc.
138 *
139 * \param runner The runner that should be executed.
140 *
141 * \returns the test run result: 0 when all tests passed, 1 if any tests failed.
142 */
143int SDLCALL SDLTest_ExecuteTestSuiteRunner(SDLTest_TestSuiteRunner *runner);
144
145/* Ends C function definitions when using C++ */
146#ifdef __cplusplus
147}
148#endif
149#include <SDL3/SDL_close_code.h>
150
151#endif /* SDL_test_h_arness_h */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_log.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_log.h
new file mode 100644
index 0000000..0d48044
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_log.h
@@ -0,0 +1,75 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * Logging related functions of SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28/*
29 *
30 * Wrapper to log in the TEST category
31 *
32 */
33
34#ifndef SDL_test_log_h_
35#define SDL_test_log_h_
36
37#include <SDL3/SDL_stdinc.h>
38
39#include <SDL3/SDL_begin_code.h>
40/* Set up for C function definitions, even when using C++ */
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45/**
46 * Prints given message with a timestamp in the TEST category and INFO priority.
47 *
48 * \param fmt Message to be logged
49 */
50void SDLCALL SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
51
52/**
53 * Prints given prefix and buffer.
54 * Non-printible characters in the raw data are substituted by printible alternatives.
55 *
56 * \param prefix Prefix message.
57 * \param buffer Raw data to be escaped.
58 * \param size Number of bytes in buffer.
59 */
60void SDLCALL SDLTest_LogEscapedString(const char *prefix, const void *buffer, size_t size);
61
62/**
63 * Prints given message with a timestamp in the TEST category and the ERROR priority.
64 *
65 * \param fmt Message to be logged
66 */
67void SDLCALL SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
68
69/* Ends C function definitions when using C++ */
70#ifdef __cplusplus
71}
72#endif
73#include <SDL3/SDL_close_code.h>
74
75#endif /* SDL_test_log_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_md5.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_md5.h
new file mode 100644
index 0000000..e9d9639
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_md5.h
@@ -0,0 +1,122 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * MD5 related functions of SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28/*
29 ***********************************************************************
30 ** Header file for implementation of MD5 **
31 ** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
32 ** Created: 2/17/90 RLR **
33 ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
34 ** Revised (for MD5): RLR 4/27/91 **
35 ** -- G modified to have y&~z instead of y&z **
36 ** -- FF, GG, HH modified to add in last register done **
37 ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
38 ** -- distinct additive constant for each step **
39 ** -- round 4 added, working mod 7 **
40 ***********************************************************************
41*/
42
43/*
44 ***********************************************************************
45 ** Message-digest routines: **
46 ** To form the message digest for a message M **
47 ** (1) Initialize a context buffer mdContext using MD5Init **
48 ** (2) Call MD5Update on mdContext and M **
49 ** (3) Call MD5Final on mdContext **
50 ** The message digest is now in mdContext->digest[0...15] **
51 ***********************************************************************
52*/
53
54#ifndef SDL_test_md5_h_
55#define SDL_test_md5_h_
56
57#include <SDL3/SDL_stdinc.h>
58
59#include <SDL3/SDL_begin_code.h>
60/* Set up for C function definitions, even when using C++ */
61#ifdef __cplusplus
62extern "C" {
63#endif
64
65/* ------------ Definitions --------- */
66
67/* typedef a 32-bit type */
68typedef Uint32 MD5UINT4;
69
70/* Data structure for MD5 (Message-Digest) computation */
71typedef struct SDLTest_Md5Context {
72 MD5UINT4 i[2]; /* number of _bits_ handled mod 2^64 */
73 MD5UINT4 buf[4]; /* scratch buffer */
74 unsigned char in[64]; /* input buffer */
75 unsigned char digest[16]; /* actual digest after Md5Final call */
76} SDLTest_Md5Context;
77
78/* ---------- Function Prototypes ------------- */
79
80/**
81 * initialize the context
82 *
83 * \param mdContext pointer to context variable
84 *
85 * Note: The function initializes the message-digest context
86 * mdContext. Call before each new use of the context -
87 * all fields are set to zero.
88 */
89void SDLCALL SDLTest_Md5Init(SDLTest_Md5Context *mdContext);
90
91/**
92 * update digest from variable length data
93 *
94 * \param mdContext pointer to context variable
95 * \param inBuf pointer to data array/string
96 * \param inLen length of data array/string
97 *
98 * Note: The function updates the message-digest context to account
99 * for the presence of each of the characters inBuf[0..inLen-1]
100 * in the message whose digest is being computed.
101 */
102void SDLCALL SDLTest_Md5Update(SDLTest_Md5Context *mdContext, unsigned char *inBuf,
103 unsigned int inLen);
104
105/**
106 * complete digest computation
107 *
108 * \param mdContext pointer to context variable
109 *
110 * Note: The function terminates the message-digest computation and
111 * ends with the desired message digest in mdContext.digest[0..15].
112 * Always call before using the digest[] variable.
113 */
114void SDLCALL SDLTest_Md5Final(SDLTest_Md5Context *mdContext);
115
116/* Ends C function definitions when using C++ */
117#ifdef __cplusplus
118}
119#endif
120#include <SDL3/SDL_close_code.h>
121
122#endif /* SDL_test_md5_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_memory.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_memory.h
new file mode 100644
index 0000000..1bd9466
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_test_memory.h
@@ -0,0 +1,66 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * Memory tracking related functions of SDL test framework.
24 *
25 * This code is a part of the SDL test library, not the main SDL library.
26 */
27
28#ifndef SDL_test_memory_h_
29#define SDL_test_memory_h_
30
31#include <SDL3/SDL_stdinc.h>
32
33#include <SDL3/SDL_begin_code.h>
34/* Set up for C function definitions, even when using C++ */
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/**
40 * Start tracking SDL memory allocations
41 *
42 * \note This should be called before any other SDL functions for complete tracking coverage
43 */
44void SDLCALL SDLTest_TrackAllocations(void);
45
46/**
47 * Fill allocations with random data
48 *
49 * \note This implicitly calls SDLTest_TrackAllocations()
50 */
51void SDLCALL SDLTest_RandFillAllocations(void);
52
53/**
54 * Print a log of any outstanding allocations
55 *
56 * \note This can be called after SDL_Quit()
57 */
58void SDLCALL SDLTest_LogAllocations(void);
59
60/* Ends C function definitions when using C++ */
61#ifdef __cplusplus
62}
63#endif
64#include <SDL3/SDL_close_code.h>
65
66#endif /* SDL_test_memory_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_thread.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_thread.h
new file mode 100644
index 0000000..e981b54
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_thread.h
@@ -0,0 +1,578 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#ifndef SDL_thread_h_
23#define SDL_thread_h_
24
25/**
26 * # CategoryThread
27 *
28 * SDL offers cross-platform thread management functions. These are mostly
29 * concerned with starting threads, setting their priority, and dealing with
30 * their termination.
31 *
32 * In addition, there is support for Thread Local Storage (data that is unique
33 * to each thread, but accessed from a single key).
34 *
35 * On platforms without thread support (such as Emscripten when built without
36 * pthreads), these functions still exist, but things like SDL_CreateThread()
37 * will report failure without doing anything.
38 *
39 * If you're going to work with threads, you almost certainly need to have a
40 * good understanding of [CategoryMutex](CategoryMutex) as well.
41 */
42
43#include <SDL3/SDL_stdinc.h>
44#include <SDL3/SDL_error.h>
45#include <SDL3/SDL_properties.h>
46
47/* Thread synchronization primitives */
48#include <SDL3/SDL_atomic.h>
49
50#if defined(SDL_PLATFORM_WINDOWS)
51#include <process.h> /* _beginthreadex() and _endthreadex() */
52#endif
53
54#include <SDL3/SDL_begin_code.h>
55/* Set up for C function definitions, even when using C++ */
56#ifdef __cplusplus
57extern "C" {
58#endif
59
60/**
61 * The SDL thread object.
62 *
63 * These are opaque data.
64 *
65 * \since This datatype is available since SDL 3.2.0.
66 *
67 * \sa SDL_CreateThread
68 * \sa SDL_WaitThread
69 */
70typedef struct SDL_Thread SDL_Thread;
71
72/**
73 * A unique numeric ID that identifies a thread.
74 *
75 * These are different from SDL_Thread objects, which are generally what an
76 * application will operate on, but having a way to uniquely identify a thread
77 * can be useful at times.
78 *
79 * \since This datatype is available since SDL 3.2.0.
80 *
81 * \sa SDL_GetThreadID
82 * \sa SDL_GetCurrentThreadID
83 */
84typedef Uint64 SDL_ThreadID;
85
86/**
87 * Thread local storage ID.
88 *
89 * 0 is the invalid ID. An app can create these and then set data for these
90 * IDs that is unique to each thread.
91 *
92 * \since This datatype is available since SDL 3.2.0.
93 *
94 * \sa SDL_GetTLS
95 * \sa SDL_SetTLS
96 */
97typedef SDL_AtomicInt SDL_TLSID;
98
99/**
100 * The SDL thread priority.
101 *
102 * SDL will make system changes as necessary in order to apply the thread
103 * priority. Code which attempts to control thread state related to priority
104 * should be aware that calling SDL_SetCurrentThreadPriority may alter such
105 * state. SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of
106 * this behavior.
107 *
108 * \since This enum is available since SDL 3.2.0.
109 */
110typedef enum SDL_ThreadPriority {
111 SDL_THREAD_PRIORITY_LOW,
112 SDL_THREAD_PRIORITY_NORMAL,
113 SDL_THREAD_PRIORITY_HIGH,
114 SDL_THREAD_PRIORITY_TIME_CRITICAL
115} SDL_ThreadPriority;
116
117/**
118 * The SDL thread state.
119 *
120 * The current state of a thread can be checked by calling SDL_GetThreadState.
121 *
122 * \since This enum is available since SDL 3.2.0.
123 *
124 * \sa SDL_GetThreadState
125 */
126typedef enum SDL_ThreadState
127{
128 SDL_THREAD_UNKNOWN, /**< The thread is not valid */
129 SDL_THREAD_ALIVE, /**< The thread is currently running */
130 SDL_THREAD_DETACHED, /**< The thread is detached and can't be waited on */
131 SDL_THREAD_COMPLETE /**< The thread has finished and should be cleaned up with SDL_WaitThread() */
132} SDL_ThreadState;
133
134/**
135 * The function passed to SDL_CreateThread() as the new thread's entry point.
136 *
137 * \param data what was passed as `data` to SDL_CreateThread().
138 * \returns a value that can be reported through SDL_WaitThread().
139 *
140 * \since This datatype is available since SDL 3.2.0.
141 */
142typedef int (SDLCALL *SDL_ThreadFunction) (void *data);
143
144
145#ifdef SDL_WIKI_DOCUMENTATION_SECTION
146
147/*
148 * Note that these aren't the correct function signatures in this block, but
149 * this is what the API reference manual should look like for all intents and
150 * purposes.
151 *
152 * Technical details, not for the wiki (hello, header readers!)...
153 *
154 * On Windows (and maybe other platforms), a program might use a different
155 * C runtime than its libraries. Or, in SDL's case, it might use a C runtime
156 * while SDL uses none at all.
157 *
158 * C runtimes expect to initialize thread-specific details when a new thread
159 * is created, but to do this in SDL_CreateThread would require SDL to know
160 * intimate details about the caller's C runtime, which is not possible.
161 *
162 * So SDL_CreateThread has two extra parameters, which are
163 * hidden at compile time by macros: the C runtime's `_beginthreadex` and
164 * `_endthreadex` entry points. If these are not NULL, they are used to spin
165 * and terminate the new thread; otherwise the standard Win32 `CreateThread`
166 * function is used. When `SDL_CreateThread` is called from a compiler that
167 * needs this C runtime thread init function, macros insert the appropriate
168 * function pointers for SDL_CreateThread's caller (which might be a different
169 * compiler with a different runtime in different calls to SDL_CreateThread!).
170 *
171 * SDL_BeginThreadFunction defaults to `_beginthreadex` on Windows (and NULL
172 * everywhere else), but apps that have extremely specific special needs can
173 * define this to something else and the SDL headers will use it, passing the
174 * app-defined value to SDL_CreateThread calls. Redefine this with caution!
175 *
176 * Platforms that don't need _beginthread stuff (most everything) will fail
177 * SDL_CreateThread with an error if these pointers _aren't_ NULL.
178 *
179 * Unless you are doing something extremely complicated, like perhaps a
180 * language binding, **you should never deal with this directly**. Let SDL's
181 * macros handle this platform-specific detail transparently!
182 */
183
184/**
185 * Create a new thread with a default stack size.
186 *
187 * This is a convenience function, equivalent to calling
188 * SDL_CreateThreadWithProperties with the following properties set:
189 *
190 * - `SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER`: `fn`
191 * - `SDL_PROP_THREAD_CREATE_NAME_STRING`: `name`
192 * - `SDL_PROP_THREAD_CREATE_USERDATA_POINTER`: `data`
193 *
194 * Note that this "function" is actually a macro that calls an internal
195 * function with two extra parameters not listed here; they are hidden through
196 * preprocessor macros and are needed to support various C runtimes at the
197 * point of the function call. Language bindings that aren't using the C
198 * headers will need to deal with this.
199 *
200 * Usually, apps should just call this function the same way on every platform
201 * and let the macros hide the details.
202 *
203 * \param fn the SDL_ThreadFunction function to call in the new thread.
204 * \param name the name of the thread.
205 * \param data a pointer that is passed to `fn`.
206 * \returns an opaque pointer to the new thread object on success, NULL if the
207 * new thread could not be created; call SDL_GetError() for more
208 * information.
209 *
210 * \since This function is available since SDL 3.2.0.
211 *
212 * \sa SDL_CreateThreadWithProperties
213 * \sa SDL_WaitThread
214 */
215extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
216
217/**
218 * Create a new thread with with the specified properties.
219 *
220 * These are the supported properties:
221 *
222 * - `SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER`: an SDL_ThreadFunction
223 * value that will be called at the start of the new thread's life.
224 * Required.
225 * - `SDL_PROP_THREAD_CREATE_NAME_STRING`: the name of the new thread, which
226 * might be available to debuggers. Optional, defaults to NULL.
227 * - `SDL_PROP_THREAD_CREATE_USERDATA_POINTER`: an arbitrary app-defined
228 * pointer, which is passed to the entry function on the new thread, as its
229 * only parameter. Optional, defaults to NULL.
230 * - `SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER`: the size, in bytes, of the new
231 * thread's stack. Optional, defaults to 0 (system-defined default).
232 *
233 * SDL makes an attempt to report `SDL_PROP_THREAD_CREATE_NAME_STRING` to the
234 * system, so that debuggers can display it. Not all platforms support this.
235 *
236 * Thread naming is a little complicated: Most systems have very small limits
237 * for the string length (Haiku has 32 bytes, Linux currently has 16, Visual
238 * C++ 6.0 has _nine_!), and possibly other arbitrary rules. You'll have to
239 * see what happens with your system's debugger. The name should be UTF-8 (but
240 * using the naming limits of C identifiers is a better bet). There are no
241 * requirements for thread naming conventions, so long as the string is
242 * null-terminated UTF-8, but these guidelines are helpful in choosing a name:
243 *
244 * https://stackoverflow.com/questions/149932/naming-conventions-for-threads
245 *
246 * If a system imposes requirements, SDL will try to munge the string for it
247 * (truncate, etc), but the original string contents will be available from
248 * SDL_GetThreadName().
249 *
250 * The size (in bytes) of the new stack can be specified with
251 * `SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER`. Zero means "use the system
252 * default" which might be wildly different between platforms. x86 Linux
253 * generally defaults to eight megabytes, an embedded device might be a few
254 * kilobytes instead. You generally need to specify a stack that is a multiple
255 * of the system's page size (in many cases, this is 4 kilobytes, but check
256 * your system documentation).
257 *
258 * Note that this "function" is actually a macro that calls an internal
259 * function with two extra parameters not listed here; they are hidden through
260 * preprocessor macros and are needed to support various C runtimes at the
261 * point of the function call. Language bindings that aren't using the C
262 * headers will need to deal with this.
263 *
264 * The actual symbol in SDL is `SDL_CreateThreadWithPropertiesRuntime`, so
265 * there is no symbol clash, but trying to load an SDL shared library and look
266 * for "SDL_CreateThreadWithProperties" will fail.
267 *
268 * Usually, apps should just call this function the same way on every platform
269 * and let the macros hide the details.
270 *
271 * \param props the properties to use.
272 * \returns an opaque pointer to the new thread object on success, NULL if the
273 * new thread could not be created; call SDL_GetError() for more
274 * information.
275 *
276 * \since This function is available since SDL 3.2.0.
277 *
278 * \sa SDL_CreateThread
279 * \sa SDL_WaitThread
280 */
281extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithProperties(SDL_PropertiesID props);
282
283#define SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER "SDL.thread.create.entry_function"
284#define SDL_PROP_THREAD_CREATE_NAME_STRING "SDL.thread.create.name"
285#define SDL_PROP_THREAD_CREATE_USERDATA_POINTER "SDL.thread.create.userdata"
286#define SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER "SDL.thread.create.stacksize"
287
288/* end wiki documentation for macros that are meant to look like functions. */
289#endif
290
291
292/* The real implementation, hidden from the wiki, so it can show this as real functions that don't have macro magic. */
293#ifndef SDL_WIKI_DOCUMENTATION_SECTION
294# if defined(SDL_PLATFORM_WINDOWS)
295# ifndef SDL_BeginThreadFunction
296# define SDL_BeginThreadFunction _beginthreadex
297# endif
298# ifndef SDL_EndThreadFunction
299# define SDL_EndThreadFunction _endthreadex
300# endif
301# endif
302#endif
303
304/* currently no other platforms than Windows use _beginthreadex/_endthreadex things. */
305#ifndef SDL_WIKI_DOCUMENTATION_SECTION
306# ifndef SDL_BeginThreadFunction
307# define SDL_BeginThreadFunction NULL
308# endif
309#endif
310
311#ifndef SDL_WIKI_DOCUMENTATION_SECTION
312# ifndef SDL_EndThreadFunction
313# define SDL_EndThreadFunction NULL
314# endif
315#endif
316
317#ifndef SDL_WIKI_DOCUMENTATION_SECTION
318/* These are the actual functions exported from SDL! Don't use them directly! Use the SDL_CreateThread and SDL_CreateThreadWithProperties macros! */
319/**
320 * The actual entry point for SDL_CreateThread.
321 *
322 * \param fn the SDL_ThreadFunction function to call in the new thread
323 * \param name the name of the thread
324 * \param data a pointer that is passed to `fn`
325 * \param pfnBeginThread the C runtime's _beginthreadex (or whatnot). Can be NULL.
326 * \param pfnEndThread the C runtime's _endthreadex (or whatnot). Can be NULL.
327 * \returns an opaque pointer to the new thread object on success, NULL if the
328 * new thread could not be created; call SDL_GetError() for more
329 * information.
330 *
331 * \since This function is available since SDL 3.2.0.
332 */
333extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadRuntime(SDL_ThreadFunction fn, const char *name, void *data, SDL_FunctionPointer pfnBeginThread, SDL_FunctionPointer pfnEndThread);
334
335/**
336 * The actual entry point for SDL_CreateThreadWithProperties.
337 *
338 * \param props the properties to use
339 * \param pfnBeginThread the C runtime's _beginthreadex (or whatnot). Can be NULL.
340 * \param pfnEndThread the C runtime's _endthreadex (or whatnot). Can be NULL.
341 * \returns an opaque pointer to the new thread object on success, NULL if the
342 * new thread could not be created; call SDL_GetError() for more
343 * information.
344 *
345 * \since This function is available since SDL 3.2.0.
346 */
347extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithPropertiesRuntime(SDL_PropertiesID props, SDL_FunctionPointer pfnBeginThread, SDL_FunctionPointer pfnEndThread);
348
349#define SDL_CreateThread(fn, name, data) SDL_CreateThreadRuntime((fn), (name), (data), (SDL_FunctionPointer) (SDL_BeginThreadFunction), (SDL_FunctionPointer) (SDL_EndThreadFunction))
350#define SDL_CreateThreadWithProperties(props) SDL_CreateThreadWithPropertiesRuntime((props), (SDL_FunctionPointer) (SDL_BeginThreadFunction), (SDL_FunctionPointer) (SDL_EndThreadFunction))
351#define SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER "SDL.thread.create.entry_function"
352#define SDL_PROP_THREAD_CREATE_NAME_STRING "SDL.thread.create.name"
353#define SDL_PROP_THREAD_CREATE_USERDATA_POINTER "SDL.thread.create.userdata"
354#define SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER "SDL.thread.create.stacksize"
355#endif
356
357
358/**
359 * Get the thread name as it was specified in SDL_CreateThread().
360 *
361 * \param thread the thread to query.
362 * \returns a pointer to a UTF-8 string that names the specified thread, or
363 * NULL if it doesn't have a name.
364 *
365 * \since This function is available since SDL 3.2.0.
366 */
367extern SDL_DECLSPEC const char * SDLCALL SDL_GetThreadName(SDL_Thread *thread);
368
369/**
370 * Get the thread identifier for the current thread.
371 *
372 * This thread identifier is as reported by the underlying operating system.
373 * If SDL is running on a platform that does not support threads the return
374 * value will always be zero.
375 *
376 * This function also returns a valid thread ID when called from the main
377 * thread.
378 *
379 * \returns the ID of the current thread.
380 *
381 * \since This function is available since SDL 3.2.0.
382 *
383 * \sa SDL_GetThreadID
384 */
385extern SDL_DECLSPEC SDL_ThreadID SDLCALL SDL_GetCurrentThreadID(void);
386
387/**
388 * Get the thread identifier for the specified thread.
389 *
390 * This thread identifier is as reported by the underlying operating system.
391 * If SDL is running on a platform that does not support threads the return
392 * value will always be zero.
393 *
394 * \param thread the thread to query.
395 * \returns the ID of the specified thread, or the ID of the current thread if
396 * `thread` is NULL.
397 *
398 * \since This function is available since SDL 3.2.0.
399 *
400 * \sa SDL_GetCurrentThreadID
401 */
402extern SDL_DECLSPEC SDL_ThreadID SDLCALL SDL_GetThreadID(SDL_Thread *thread);
403
404/**
405 * Set the priority for the current thread.
406 *
407 * Note that some platforms will not let you alter the priority (or at least,
408 * promote the thread to a higher priority) at all, and some require you to be
409 * an administrator account. Be prepared for this to fail.
410 *
411 * \param priority the SDL_ThreadPriority to set.
412 * \returns true on success or false on failure; call SDL_GetError() for more
413 * information.
414 *
415 * \since This function is available since SDL 3.2.0.
416 */
417extern SDL_DECLSPEC bool SDLCALL SDL_SetCurrentThreadPriority(SDL_ThreadPriority priority);
418
419/**
420 * Wait for a thread to finish.
421 *
422 * Threads that haven't been detached will remain until this function cleans
423 * them up. Not doing so is a resource leak.
424 *
425 * Once a thread has been cleaned up through this function, the SDL_Thread
426 * that references it becomes invalid and should not be referenced again. As
427 * such, only one thread may call SDL_WaitThread() on another.
428 *
429 * The return code from the thread function is placed in the area pointed to
430 * by `status`, if `status` is not NULL.
431 *
432 * You may not wait on a thread that has been used in a call to
433 * SDL_DetachThread(). Use either that function or this one, but not both, or
434 * behavior is undefined.
435 *
436 * It is safe to pass a NULL thread to this function; it is a no-op.
437 *
438 * Note that the thread pointer is freed by this function and is not valid
439 * afterward.
440 *
441 * \param thread the SDL_Thread pointer that was returned from the
442 * SDL_CreateThread() call that started this thread.
443 * \param status a pointer filled in with the value returned from the thread
444 * function by its 'return', or -1 if the thread has been
445 * detached or isn't valid, may be NULL.
446 *
447 * \since This function is available since SDL 3.2.0.
448 *
449 * \sa SDL_CreateThread
450 * \sa SDL_DetachThread
451 */
452extern SDL_DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread *thread, int *status);
453
454/**
455 * Get the current state of a thread.
456 *
457 * \param thread the thread to query.
458 * \returns the current state of a thread, or SDL_THREAD_UNKNOWN if the thread
459 * isn't valid.
460 *
461 * \since This function is available since SDL 3.2.0.
462 *
463 * \sa SDL_ThreadState
464 */
465extern SDL_DECLSPEC SDL_ThreadState SDLCALL SDL_GetThreadState(SDL_Thread *thread);
466
467/**
468 * Let a thread clean up on exit without intervention.
469 *
470 * A thread may be "detached" to signify that it should not remain until
471 * another thread has called SDL_WaitThread() on it. Detaching a thread is
472 * useful for long-running threads that nothing needs to synchronize with or
473 * further manage. When a detached thread is done, it simply goes away.
474 *
475 * There is no way to recover the return code of a detached thread. If you
476 * need this, don't detach the thread and instead use SDL_WaitThread().
477 *
478 * Once a thread is detached, you should usually assume the SDL_Thread isn't
479 * safe to reference again, as it will become invalid immediately upon the
480 * detached thread's exit, instead of remaining until someone has called
481 * SDL_WaitThread() to finally clean it up. As such, don't detach the same
482 * thread more than once.
483 *
484 * If a thread has already exited when passed to SDL_DetachThread(), it will
485 * stop waiting for a call to SDL_WaitThread() and clean up immediately. It is
486 * not safe to detach a thread that might be used with SDL_WaitThread().
487 *
488 * You may not call SDL_WaitThread() on a thread that has been detached. Use
489 * either that function or this one, but not both, or behavior is undefined.
490 *
491 * It is safe to pass NULL to this function; it is a no-op.
492 *
493 * \param thread the SDL_Thread pointer that was returned from the
494 * SDL_CreateThread() call that started this thread.
495 *
496 * \since This function is available since SDL 3.2.0.
497 *
498 * \sa SDL_CreateThread
499 * \sa SDL_WaitThread
500 */
501extern SDL_DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread *thread);
502
503/**
504 * Get the current thread's value associated with a thread local storage ID.
505 *
506 * \param id a pointer to the thread local storage ID, may not be NULL.
507 * \returns the value associated with the ID for the current thread or NULL if
508 * no value has been set; call SDL_GetError() for more information.
509 *
510 * \threadsafety It is safe to call this function from any thread.
511 *
512 * \since This function is available since SDL 3.2.0.
513 *
514 * \sa SDL_SetTLS
515 */
516extern SDL_DECLSPEC void * SDLCALL SDL_GetTLS(SDL_TLSID *id);
517
518/**
519 * The callback used to cleanup data passed to SDL_SetTLS.
520 *
521 * This is called when a thread exits, to allow an app to free any resources.
522 *
523 * \param value a pointer previously handed to SDL_SetTLS.
524 *
525 * \since This datatype is available since SDL 3.2.0.
526 *
527 * \sa SDL_SetTLS
528 */
529typedef void (SDLCALL *SDL_TLSDestructorCallback)(void *value);
530
531/**
532 * Set the current thread's value associated with a thread local storage ID.
533 *
534 * If the thread local storage ID is not initialized (the value is 0), a new
535 * ID will be created in a thread-safe way, so all calls using a pointer to
536 * the same ID will refer to the same local storage.
537 *
538 * Note that replacing a value from a previous call to this function on the
539 * same thread does _not_ call the previous value's destructor!
540 *
541 * `destructor` can be NULL; it is assumed that `value` does not need to be
542 * cleaned up if so.
543 *
544 * \param id a pointer to the thread local storage ID, may not be NULL.
545 * \param value the value to associate with the ID for the current thread.
546 * \param destructor a function called when the thread exits, to free the
547 * value, may be NULL.
548 * \returns true on success or false on failure; call SDL_GetError() for more
549 * information.
550 *
551 * \threadsafety It is safe to call this function from any thread.
552 *
553 * \since This function is available since SDL 3.2.0.
554 *
555 * \sa SDL_GetTLS
556 */
557extern SDL_DECLSPEC bool SDLCALL SDL_SetTLS(SDL_TLSID *id, const void *value, SDL_TLSDestructorCallback destructor);
558
559/**
560 * Cleanup all TLS data for this thread.
561 *
562 * If you are creating your threads outside of SDL and then calling SDL
563 * functions, you should call this function before your thread exits, to
564 * properly clean up SDL memory.
565 *
566 * \threadsafety It is safe to call this function from any thread.
567 *
568 * \since This function is available since SDL 3.2.0.
569 */
570extern SDL_DECLSPEC void SDLCALL SDL_CleanupTLS(void);
571
572/* Ends C function definitions when using C++ */
573#ifdef __cplusplus
574}
575#endif
576#include <SDL3/SDL_close_code.h>
577
578#endif /* SDL_thread_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_time.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_time.h
new file mode 100644
index 0000000..b6d3f6d
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_time.h
@@ -0,0 +1,231 @@
1/*
2Simple DirectMedia Layer
3Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5This software is provided 'as-is', without any express or implied
6warranty. In no event will the authors be held liable for any damages
7arising from the use of this software.
8
9Permission is granted to anyone to use this software for any purpose,
10including commercial applications, and to alter it and redistribute it
11freely, subject to the following restrictions:
12
131. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
172. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
193. This notice may not be removed or altered from any source distribution.
20*/
21
22#ifndef SDL_time_h_
23#define SDL_time_h_
24
25/**
26 * # CategoryTime
27 *
28 * SDL realtime clock and date/time routines.
29 *
30 * There are two data types that are used in this category: SDL_Time, which
31 * represents the nanoseconds since a specific moment (an "epoch"), and
32 * SDL_DateTime, which breaks time down into human-understandable components:
33 * years, months, days, hours, etc.
34 *
35 * Much of the functionality is involved in converting those two types to
36 * other useful forms.
37 */
38
39#include <SDL3/SDL_error.h>
40#include <SDL3/SDL_stdinc.h>
41
42#include <SDL3/SDL_begin_code.h>
43/* Set up for C function definitions, even when using C++ */
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/**
49 * A structure holding a calendar date and time broken down into its
50 * components.
51 *
52 * \since This struct is available since SDL 3.2.0.
53 */
54typedef struct SDL_DateTime
55{
56 int year; /**< Year */
57 int month; /**< Month [01-12] */
58 int day; /**< Day of the month [01-31] */
59 int hour; /**< Hour [0-23] */
60 int minute; /**< Minute [0-59] */
61 int second; /**< Seconds [0-60] */
62 int nanosecond; /**< Nanoseconds [0-999999999] */
63 int day_of_week; /**< Day of the week [0-6] (0 being Sunday) */
64 int utc_offset; /**< Seconds east of UTC */
65} SDL_DateTime;
66
67/**
68 * The preferred date format of the current system locale.
69 *
70 * \since This enum is available since SDL 3.2.0.
71 *
72 * \sa SDL_GetDateTimeLocalePreferences
73 */
74typedef enum SDL_DateFormat
75{
76 SDL_DATE_FORMAT_YYYYMMDD = 0, /**< Year/Month/Day */
77 SDL_DATE_FORMAT_DDMMYYYY = 1, /**< Day/Month/Year */
78 SDL_DATE_FORMAT_MMDDYYYY = 2 /**< Month/Day/Year */
79} SDL_DateFormat;
80
81/**
82 * The preferred time format of the current system locale.
83 *
84 * \since This enum is available since SDL 3.2.0.
85 *
86 * \sa SDL_GetDateTimeLocalePreferences
87 */
88typedef enum SDL_TimeFormat
89{
90 SDL_TIME_FORMAT_24HR = 0, /**< 24 hour time */
91 SDL_TIME_FORMAT_12HR = 1 /**< 12 hour time */
92} SDL_TimeFormat;
93
94/**
95 * Gets the current preferred date and time format for the system locale.
96 *
97 * This might be a "slow" call that has to query the operating system. It's
98 * best to ask for this once and save the results. However, the preferred
99 * formats can change, usually because the user has changed a system
100 * preference outside of your program.
101 *
102 * \param dateFormat a pointer to the SDL_DateFormat to hold the returned date
103 * format, may be NULL.
104 * \param timeFormat a pointer to the SDL_TimeFormat to hold the returned time
105 * format, may be NULL.
106 * \returns true on success or false on failure; call SDL_GetError() for more
107 * information.
108 *
109 * \since This function is available since SDL 3.2.0.
110 */
111extern SDL_DECLSPEC bool SDLCALL SDL_GetDateTimeLocalePreferences(SDL_DateFormat *dateFormat, SDL_TimeFormat *timeFormat);
112
113/**
114 * Gets the current value of the system realtime clock in nanoseconds since
115 * Jan 1, 1970 in Universal Coordinated Time (UTC).
116 *
117 * \param ticks the SDL_Time to hold the returned tick count.
118 * \returns true on success or false on failure; call SDL_GetError() for more
119 * information.
120 *
121 * \since This function is available since SDL 3.2.0.
122 */
123extern SDL_DECLSPEC bool SDLCALL SDL_GetCurrentTime(SDL_Time *ticks);
124
125/**
126 * Converts an SDL_Time in nanoseconds since the epoch to a calendar time in
127 * the SDL_DateTime format.
128 *
129 * \param ticks the SDL_Time to be converted.
130 * \param dt the resulting SDL_DateTime.
131 * \param localTime the resulting SDL_DateTime will be expressed in local time
132 * if true, otherwise it will be in Universal Coordinated
133 * Time (UTC).
134 * \returns true on success or false on failure; call SDL_GetError() for more
135 * information.
136 *
137 * \since This function is available since SDL 3.2.0.
138 */
139extern SDL_DECLSPEC bool SDLCALL SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime *dt, bool localTime);
140
141/**
142 * Converts a calendar time to an SDL_Time in nanoseconds since the epoch.
143 *
144 * This function ignores the day_of_week member of the SDL_DateTime struct, so
145 * it may remain unset.
146 *
147 * \param dt the source SDL_DateTime.
148 * \param ticks the resulting SDL_Time.
149 * \returns true on success or false on failure; call SDL_GetError() for more
150 * information.
151 *
152 * \since This function is available since SDL 3.2.0.
153 */
154extern SDL_DECLSPEC bool SDLCALL SDL_DateTimeToTime(const SDL_DateTime *dt, SDL_Time *ticks);
155
156/**
157 * Converts an SDL time into a Windows FILETIME (100-nanosecond intervals
158 * since January 1, 1601).
159 *
160 * This function fills in the two 32-bit values of the FILETIME structure.
161 *
162 * \param ticks the time to convert.
163 * \param dwLowDateTime a pointer filled in with the low portion of the
164 * Windows FILETIME value.
165 * \param dwHighDateTime a pointer filled in with the high portion of the
166 * Windows FILETIME value.
167 *
168 * \since This function is available since SDL 3.2.0.
169 */
170extern SDL_DECLSPEC void SDLCALL SDL_TimeToWindows(SDL_Time ticks, Uint32 *dwLowDateTime, Uint32 *dwHighDateTime);
171
172/**
173 * Converts a Windows FILETIME (100-nanosecond intervals since January 1,
174 * 1601) to an SDL time.
175 *
176 * This function takes the two 32-bit values of the FILETIME structure as
177 * parameters.
178 *
179 * \param dwLowDateTime the low portion of the Windows FILETIME value.
180 * \param dwHighDateTime the high portion of the Windows FILETIME value.
181 * \returns the converted SDL time.
182 *
183 * \since This function is available since SDL 3.2.0.
184 */
185extern SDL_DECLSPEC SDL_Time SDLCALL SDL_TimeFromWindows(Uint32 dwLowDateTime, Uint32 dwHighDateTime);
186
187/**
188 * Get the number of days in a month for a given year.
189 *
190 * \param year the year.
191 * \param month the month [1-12].
192 * \returns the number of days in the requested month or -1 on failure; call
193 * SDL_GetError() for more information.
194 *
195 * \since This function is available since SDL 3.2.0.
196 */
197extern SDL_DECLSPEC int SDLCALL SDL_GetDaysInMonth(int year, int month);
198
199/**
200 * Get the day of year for a calendar date.
201 *
202 * \param year the year component of the date.
203 * \param month the month component of the date.
204 * \param day the day component of the date.
205 * \returns the day of year [0-365] if the date is valid or -1 on failure;
206 * call SDL_GetError() for more information.
207 *
208 * \since This function is available since SDL 3.2.0.
209 */
210extern SDL_DECLSPEC int SDLCALL SDL_GetDayOfYear(int year, int month, int day);
211
212/**
213 * Get the day of week for a calendar date.
214 *
215 * \param year the year component of the date.
216 * \param month the month component of the date.
217 * \param day the day component of the date.
218 * \returns a value between 0 and 6 (0 being Sunday) if the date is valid or
219 * -1 on failure; call SDL_GetError() for more information.
220 *
221 * \since This function is available since SDL 3.2.0.
222 */
223extern SDL_DECLSPEC int SDLCALL SDL_GetDayOfWeek(int year, int month, int day);
224
225/* Ends C function definitions when using C++ */
226#ifdef __cplusplus
227}
228#endif
229#include <SDL3/SDL_close_code.h>
230
231#endif /* SDL_time_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_timer.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_timer.h
new file mode 100644
index 0000000..cf94881
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_timer.h
@@ -0,0 +1,450 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#ifndef SDL_timer_h_
23#define SDL_timer_h_
24
25/**
26 * # CategoryTimer
27 *
28 * SDL provides time management functionality. It is useful for dealing with
29 * (usually) small durations of time.
30 *
31 * This is not to be confused with _calendar time_ management, which is
32 * provided by [CategoryTime](CategoryTime).
33 *
34 * This category covers measuring time elapsed (SDL_GetTicks(),
35 * SDL_GetPerformanceCounter()), putting a thread to sleep for a certain
36 * amount of time (SDL_Delay(), SDL_DelayNS(), SDL_DelayPrecise()), and firing
37 * a callback function after a certain amount of time has elasped
38 * (SDL_AddTimer(), etc).
39 *
40 * There are also useful macros to convert between time units, like
41 * SDL_SECONDS_TO_NS() and such.
42 */
43
44#include <SDL3/SDL_stdinc.h>
45#include <SDL3/SDL_error.h>
46
47#include <SDL3/SDL_begin_code.h>
48/* Set up for C function definitions, even when using C++ */
49#ifdef __cplusplus
50extern "C" {
51#endif
52
53/* SDL time constants */
54
55/**
56 * Number of milliseconds in a second.
57 *
58 * This is always 1000.
59 *
60 * \since This macro is available since SDL 3.2.0.
61 */
62#define SDL_MS_PER_SECOND 1000
63
64/**
65 * Number of microseconds in a second.
66 *
67 * This is always 1000000.
68 *
69 * \since This macro is available since SDL 3.2.0.
70 */
71#define SDL_US_PER_SECOND 1000000
72
73/**
74 * Number of nanoseconds in a second.
75 *
76 * This is always 1000000000.
77 *
78 * \since This macro is available since SDL 3.2.0.
79 */
80#define SDL_NS_PER_SECOND 1000000000LL
81
82/**
83 * Number of nanoseconds in a millisecond.
84 *
85 * This is always 1000000.
86 *
87 * \since This macro is available since SDL 3.2.0.
88 */
89#define SDL_NS_PER_MS 1000000
90
91/**
92 * Number of nanoseconds in a microsecond.
93 *
94 * This is always 1000.
95 *
96 * \since This macro is available since SDL 3.2.0.
97 */
98#define SDL_NS_PER_US 1000
99
100/**
101 * Convert seconds to nanoseconds.
102 *
103 * This only converts whole numbers, not fractional seconds.
104 *
105 * \param S the number of seconds to convert.
106 * \returns S, expressed in nanoseconds.
107 *
108 * \threadsafety It is safe to call this macro from any thread.
109 *
110 * \since This macro is available since SDL 3.2.0.
111 */
112#define SDL_SECONDS_TO_NS(S) (((Uint64)(S)) * SDL_NS_PER_SECOND)
113
114/**
115 * Convert nanoseconds to seconds.
116 *
117 * This performs a division, so the results can be dramatically different if
118 * `NS` is an integer or floating point value.
119 *
120 * \param NS the number of nanoseconds to convert.
121 * \returns NS, expressed in seconds.
122 *
123 * \threadsafety It is safe to call this macro from any thread.
124 *
125 * \since This macro is available since SDL 3.2.0.
126 */
127#define SDL_NS_TO_SECONDS(NS) ((NS) / SDL_NS_PER_SECOND)
128
129/**
130 * Convert milliseconds to nanoseconds.
131 *
132 * This only converts whole numbers, not fractional milliseconds.
133 *
134 * \param MS the number of milliseconds to convert.
135 * \returns MS, expressed in nanoseconds.
136 *
137 * \threadsafety It is safe to call this macro from any thread.
138 *
139 * \since This macro is available since SDL 3.2.0.
140 */
141#define SDL_MS_TO_NS(MS) (((Uint64)(MS)) * SDL_NS_PER_MS)
142
143/**
144 * Convert nanoseconds to milliseconds.
145 *
146 * This performs a division, so the results can be dramatically different if
147 * `NS` is an integer or floating point value.
148 *
149 * \param NS the number of nanoseconds to convert.
150 * \returns NS, expressed in milliseconds.
151 *
152 * \threadsafety It is safe to call this macro from any thread.
153 *
154 * \since This macro is available since SDL 3.2.0.
155 */
156#define SDL_NS_TO_MS(NS) ((NS) / SDL_NS_PER_MS)
157
158/**
159 * Convert microseconds to nanoseconds.
160 *
161 * This only converts whole numbers, not fractional microseconds.
162 *
163 * \param US the number of microseconds to convert.
164 * \returns US, expressed in nanoseconds.
165 *
166 * \threadsafety It is safe to call this macro from any thread.
167 *
168 * \since This macro is available since SDL 3.2.0.
169 */
170#define SDL_US_TO_NS(US) (((Uint64)(US)) * SDL_NS_PER_US)
171
172/**
173 * Convert nanoseconds to microseconds.
174 *
175 * This performs a division, so the results can be dramatically different if
176 * `NS` is an integer or floating point value.
177 *
178 * \param NS the number of nanoseconds to convert.
179 * \returns NS, expressed in microseconds.
180 *
181 * \threadsafety It is safe to call this macro from any thread.
182 *
183 * \since This macro is available since SDL 3.2.0.
184 */
185#define SDL_NS_TO_US(NS) ((NS) / SDL_NS_PER_US)
186
187/**
188 * Get the number of milliseconds since SDL library initialization.
189 *
190 * \returns an unsigned 64-bit value representing the number of milliseconds
191 * since the SDL library initialized.
192 *
193 * \threadsafety It is safe to call this function from any thread.
194 *
195 * \since This function is available since SDL 3.2.0.
196 */
197extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetTicks(void);
198
199/**
200 * Get the number of nanoseconds since SDL library initialization.
201 *
202 * \returns an unsigned 64-bit value representing the number of nanoseconds
203 * since the SDL library initialized.
204 *
205 * \threadsafety It is safe to call this function from any thread.
206 *
207 * \since This function is available since SDL 3.2.0.
208 */
209extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetTicksNS(void);
210
211/**
212 * Get the current value of the high resolution counter.
213 *
214 * This function is typically used for profiling.
215 *
216 * The counter values are only meaningful relative to each other. Differences
217 * between values can be converted to times by using
218 * SDL_GetPerformanceFrequency().
219 *
220 * \returns the current counter value.
221 *
222 * \threadsafety It is safe to call this function from any thread.
223 *
224 * \since This function is available since SDL 3.2.0.
225 *
226 * \sa SDL_GetPerformanceFrequency
227 */
228extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void);
229
230/**
231 * Get the count per second of the high resolution counter.
232 *
233 * \returns a platform-specific count per second.
234 *
235 * \threadsafety It is safe to call this function from any thread.
236 *
237 * \since This function is available since SDL 3.2.0.
238 *
239 * \sa SDL_GetPerformanceCounter
240 */
241extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void);
242
243/**
244 * Wait a specified number of milliseconds before returning.
245 *
246 * This function waits a specified number of milliseconds before returning. It
247 * waits at least the specified time, but possibly longer due to OS
248 * scheduling.
249 *
250 * \param ms the number of milliseconds to delay.
251 *
252 * \threadsafety It is safe to call this function from any thread.
253 *
254 * \since This function is available since SDL 3.2.0.
255 *
256 * \sa SDL_DelayNS
257 * \sa SDL_DelayPrecise
258 */
259extern SDL_DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
260
261/**
262 * Wait a specified number of nanoseconds before returning.
263 *
264 * This function waits a specified number of nanoseconds before returning. It
265 * waits at least the specified time, but possibly longer due to OS
266 * scheduling.
267 *
268 * \param ns the number of nanoseconds to delay.
269 *
270 * \threadsafety It is safe to call this function from any thread.
271 *
272 * \since This function is available since SDL 3.2.0.
273 *
274 * \sa SDL_Delay
275 * \sa SDL_DelayPrecise
276 */
277extern SDL_DECLSPEC void SDLCALL SDL_DelayNS(Uint64 ns);
278
279/**
280 * Wait a specified number of nanoseconds before returning.
281 *
282 * This function waits a specified number of nanoseconds before returning. It
283 * will attempt to wait as close to the requested time as possible, busy
284 * waiting if necessary, but could return later due to OS scheduling.
285 *
286 * \param ns the number of nanoseconds to delay.
287 *
288 * \threadsafety It is safe to call this function from any thread.
289 *
290 * \since This function is available since SDL 3.2.0.
291 *
292 * \sa SDL_Delay
293 * \sa SDL_DelayNS
294 */
295extern SDL_DECLSPEC void SDLCALL SDL_DelayPrecise(Uint64 ns);
296
297/**
298 * Definition of the timer ID type.
299 *
300 * \since This datatype is available since SDL 3.2.0.
301 */
302typedef Uint32 SDL_TimerID;
303
304/**
305 * Function prototype for the millisecond timer callback function.
306 *
307 * The callback function is passed the current timer interval and returns the
308 * next timer interval, in milliseconds. If the returned value is the same as
309 * the one passed in, the periodic alarm continues, otherwise a new alarm is
310 * scheduled. If the callback returns 0, the periodic alarm is canceled and
311 * will be removed.
312 *
313 * \param userdata an arbitrary pointer provided by the app through
314 * SDL_AddTimer, for its own use.
315 * \param timerID the current timer being processed.
316 * \param interval the current callback time interval.
317 * \returns the new callback time interval, or 0 to disable further runs of
318 * the callback.
319 *
320 * \threadsafety SDL may call this callback at any time from a background
321 * thread; the application is responsible for locking resources
322 * the callback touches that need to be protected.
323 *
324 * \since This datatype is available since SDL 3.2.0.
325 *
326 * \sa SDL_AddTimer
327 */
328typedef Uint32 (SDLCALL *SDL_TimerCallback)(void *userdata, SDL_TimerID timerID, Uint32 interval);
329
330/**
331 * Call a callback function at a future time.
332 *
333 * The callback function is passed the current timer interval and the user
334 * supplied parameter from the SDL_AddTimer() call and should return the next
335 * timer interval. If the value returned from the callback is 0, the timer is
336 * canceled and will be removed.
337 *
338 * The callback is run on a separate thread, and for short timeouts can
339 * potentially be called before this function returns.
340 *
341 * Timers take into account the amount of time it took to execute the
342 * callback. For example, if the callback took 250 ms to execute and returned
343 * 1000 (ms), the timer would only wait another 750 ms before its next
344 * iteration.
345 *
346 * Timing may be inexact due to OS scheduling. Be sure to note the current
347 * time with SDL_GetTicksNS() or SDL_GetPerformanceCounter() in case your
348 * callback needs to adjust for variances.
349 *
350 * \param interval the timer delay, in milliseconds, passed to `callback`.
351 * \param callback the SDL_TimerCallback function to call when the specified
352 * `interval` elapses.
353 * \param userdata a pointer that is passed to `callback`.
354 * \returns a timer ID or 0 on failure; call SDL_GetError() for more
355 * information.
356 *
357 * \threadsafety It is safe to call this function from any thread.
358 *
359 * \since This function is available since SDL 3.2.0.
360 *
361 * \sa SDL_AddTimerNS
362 * \sa SDL_RemoveTimer
363 */
364extern SDL_DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *userdata);
365
366/**
367 * Function prototype for the nanosecond timer callback function.
368 *
369 * The callback function is passed the current timer interval and returns the
370 * next timer interval, in nanoseconds. If the returned value is the same as
371 * the one passed in, the periodic alarm continues, otherwise a new alarm is
372 * scheduled. If the callback returns 0, the periodic alarm is canceled and
373 * will be removed.
374 *
375 * \param userdata an arbitrary pointer provided by the app through
376 * SDL_AddTimer, for its own use.
377 * \param timerID the current timer being processed.
378 * \param interval the current callback time interval.
379 * \returns the new callback time interval, or 0 to disable further runs of
380 * the callback.
381 *
382 * \threadsafety SDL may call this callback at any time from a background
383 * thread; the application is responsible for locking resources
384 * the callback touches that need to be protected.
385 *
386 * \since This datatype is available since SDL 3.2.0.
387 *
388 * \sa SDL_AddTimerNS
389 */
390typedef Uint64 (SDLCALL *SDL_NSTimerCallback)(void *userdata, SDL_TimerID timerID, Uint64 interval);
391
392/**
393 * Call a callback function at a future time.
394 *
395 * The callback function is passed the current timer interval and the user
396 * supplied parameter from the SDL_AddTimerNS() call and should return the
397 * next timer interval. If the value returned from the callback is 0, the
398 * timer is canceled and will be removed.
399 *
400 * The callback is run on a separate thread, and for short timeouts can
401 * potentially be called before this function returns.
402 *
403 * Timers take into account the amount of time it took to execute the
404 * callback. For example, if the callback took 250 ns to execute and returned
405 * 1000 (ns), the timer would only wait another 750 ns before its next
406 * iteration.
407 *
408 * Timing may be inexact due to OS scheduling. Be sure to note the current
409 * time with SDL_GetTicksNS() or SDL_GetPerformanceCounter() in case your
410 * callback needs to adjust for variances.
411 *
412 * \param interval the timer delay, in nanoseconds, passed to `callback`.
413 * \param callback the SDL_TimerCallback function to call when the specified
414 * `interval` elapses.
415 * \param userdata a pointer that is passed to `callback`.
416 * \returns a timer ID or 0 on failure; call SDL_GetError() for more
417 * information.
418 *
419 * \threadsafety It is safe to call this function from any thread.
420 *
421 * \since This function is available since SDL 3.2.0.
422 *
423 * \sa SDL_AddTimer
424 * \sa SDL_RemoveTimer
425 */
426extern SDL_DECLSPEC SDL_TimerID SDLCALL SDL_AddTimerNS(Uint64 interval, SDL_NSTimerCallback callback, void *userdata);
427
428/**
429 * Remove a timer created with SDL_AddTimer().
430 *
431 * \param id the ID of the timer to remove.
432 * \returns true on success or false on failure; call SDL_GetError() for more
433 * information.
434 *
435 * \threadsafety It is safe to call this function from any thread.
436 *
437 * \since This function is available since SDL 3.2.0.
438 *
439 * \sa SDL_AddTimer
440 */
441extern SDL_DECLSPEC bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);
442
443
444/* Ends C function definitions when using C++ */
445#ifdef __cplusplus
446}
447#endif
448#include <SDL3/SDL_close_code.h>
449
450#endif /* SDL_timer_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_touch.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_touch.h
new file mode 100644
index 0000000..64845a1
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_touch.h
@@ -0,0 +1,184 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryTouch
24 *
25 * SDL offers touch input, on platforms that support it. It can manage
26 * multiple touch devices and track multiple fingers on those devices.
27 *
28 * Touches are mostly dealt with through the event system, in the
29 * SDL_EVENT_FINGER_DOWN, SDL_EVENT_FINGER_MOTION, and SDL_EVENT_FINGER_UP
30 * events, but there are also functions to query for hardware details, etc.
31 *
32 * The touch system, by default, will also send virtual mouse events; this can
33 * be useful for making a some desktop apps work on a phone without
34 * significant changes. For apps that care about mouse and touch input
35 * separately, they should ignore mouse events that have a `which` field of
36 * SDL_TOUCH_MOUSEID.
37 */
38
39#ifndef SDL_touch_h_
40#define SDL_touch_h_
41
42#include <SDL3/SDL_stdinc.h>
43#include <SDL3/SDL_error.h>
44#include <SDL3/SDL_mouse.h>
45
46#include <SDL3/SDL_begin_code.h>
47/* Set up for C function definitions, even when using C++ */
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52/**
53 * A unique ID for a touch device.
54 *
55 * This ID is valid for the time the device is connected to the system, and is
56 * never reused for the lifetime of the application.
57 *
58 * The value 0 is an invalid ID.
59 *
60 * \since This datatype is available since SDL 3.2.0.
61 */
62typedef Uint64 SDL_TouchID;
63
64/**
65 * A unique ID for a single finger on a touch device.
66 *
67 * This ID is valid for the time the finger (stylus, etc) is touching and will
68 * be unique for all fingers currently in contact, so this ID tracks the
69 * lifetime of a single continuous touch. This value may represent an index, a
70 * pointer, or some other unique ID, depending on the platform.
71 *
72 * The value 0 is an invalid ID.
73 *
74 * \since This datatype is available since SDL 3.2.0.
75 */
76typedef Uint64 SDL_FingerID;
77
78/**
79 * An enum that describes the type of a touch device.
80 *
81 * \since This enum is available since SDL 3.2.0.
82 */
83typedef enum SDL_TouchDeviceType
84{
85 SDL_TOUCH_DEVICE_INVALID = -1,
86 SDL_TOUCH_DEVICE_DIRECT, /**< touch screen with window-relative coordinates */
87 SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /**< trackpad with absolute device coordinates */
88 SDL_TOUCH_DEVICE_INDIRECT_RELATIVE /**< trackpad with screen cursor-relative coordinates */
89} SDL_TouchDeviceType;
90
91/**
92 * Data about a single finger in a multitouch event.
93 *
94 * Each touch event is a collection of fingers that are simultaneously in
95 * contact with the touch device (so a "touch" can be a "multitouch," in
96 * reality), and this struct reports details of the specific fingers.
97 *
98 * \since This struct is available since SDL 3.2.0.
99 *
100 * \sa SDL_GetTouchFingers
101 */
102typedef struct SDL_Finger
103{
104 SDL_FingerID id; /**< the finger ID */
105 float x; /**< the x-axis location of the touch event, normalized (0...1) */
106 float y; /**< the y-axis location of the touch event, normalized (0...1) */
107 float pressure; /**< the quantity of pressure applied, normalized (0...1) */
108} SDL_Finger;
109
110/**
111 * The SDL_MouseID for mouse events simulated with touch input.
112 *
113 * \since This macro is available since SDL 3.2.0.
114 */
115#define SDL_TOUCH_MOUSEID ((SDL_MouseID)-1)
116
117/**
118 * The SDL_TouchID for touch events simulated with mouse input.
119 *
120 * \since This macro is available since SDL 3.2.0.
121 */
122#define SDL_MOUSE_TOUCHID ((SDL_TouchID)-1)
123
124
125/**
126 * Get a list of registered touch devices.
127 *
128 * On some platforms SDL first sees the touch device if it was actually used.
129 * Therefore the returned list might be empty, although devices are available.
130 * After using all devices at least once the number will be correct.
131 *
132 * \param count a pointer filled in with the number of devices returned, may
133 * be NULL.
134 * \returns a 0 terminated array of touch device IDs or NULL on failure; call
135 * SDL_GetError() for more information. This should be freed with
136 * SDL_free() when it is no longer needed.
137 *
138 * \since This function is available since SDL 3.2.0.
139 */
140extern SDL_DECLSPEC SDL_TouchID * SDLCALL SDL_GetTouchDevices(int *count);
141
142/**
143 * Get the touch device name as reported from the driver.
144 *
145 * \param touchID the touch device instance ID.
146 * \returns touch device name, or NULL on failure; call SDL_GetError() for
147 * more information.
148 *
149 * \since This function is available since SDL 3.2.0.
150 */
151extern SDL_DECLSPEC const char * SDLCALL SDL_GetTouchDeviceName(SDL_TouchID touchID);
152
153/**
154 * Get the type of the given touch device.
155 *
156 * \param touchID the ID of a touch device.
157 * \returns touch device type.
158 *
159 * \since This function is available since SDL 3.2.0.
160 */
161extern SDL_DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
162
163/**
164 * Get a list of active fingers for a given touch device.
165 *
166 * \param touchID the ID of a touch device.
167 * \param count a pointer filled in with the number of fingers returned, can
168 * be NULL.
169 * \returns a NULL terminated array of SDL_Finger pointers or NULL on failure;
170 * call SDL_GetError() for more information. This is a single
171 * allocation that should be freed with SDL_free() when it is no
172 * longer needed.
173 *
174 * \since This function is available since SDL 3.2.0.
175 */
176extern SDL_DECLSPEC SDL_Finger ** SDLCALL SDL_GetTouchFingers(SDL_TouchID touchID, int *count);
177
178/* Ends C function definitions when using C++ */
179#ifdef __cplusplus
180}
181#endif
182#include <SDL3/SDL_close_code.h>
183
184#endif /* SDL_touch_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_tray.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_tray.h
new file mode 100644
index 0000000..1780b0b
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_tray.h
@@ -0,0 +1,544 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryTray
24 *
25 * SDL offers a way to add items to the "system tray" (more correctly called
26 * the "notification area" on Windows). On platforms that offer this concept,
27 * an SDL app can add a tray icon, submenus, checkboxes, and clickable
28 * entries, and register a callback that is fired when the user clicks on
29 * these pieces.
30 */
31
32#ifndef SDL_tray_h_
33#define SDL_tray_h_
34
35#include <SDL3/SDL_stdinc.h>
36#include <SDL3/SDL_error.h>
37#include <SDL3/SDL_surface.h>
38#include <SDL3/SDL_video.h>
39
40#include <SDL3/SDL_begin_code.h>
41/* Set up for C function definitions, even when using C++ */
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46/**
47 * An opaque handle representing a toplevel system tray object.
48 *
49 * \since This struct is available since SDL 3.2.0.
50 */
51typedef struct SDL_Tray SDL_Tray;
52
53/**
54 * An opaque handle representing a menu/submenu on a system tray object.
55 *
56 * \since This struct is available since SDL 3.2.0.
57 */
58typedef struct SDL_TrayMenu SDL_TrayMenu;
59
60/**
61 * An opaque handle representing an entry on a system tray object.
62 *
63 * \since This struct is available since SDL 3.2.0.
64 */
65typedef struct SDL_TrayEntry SDL_TrayEntry;
66
67/**
68 * Flags that control the creation of system tray entries.
69 *
70 * Some of these flags are required; exactly one of them must be specified at
71 * the time a tray entry is created. Other flags are optional; zero or more of
72 * those can be OR'ed together with the required flag.
73 *
74 * \since This datatype is available since SDL 3.2.0.
75 *
76 * \sa SDL_InsertTrayEntryAt
77 */
78typedef Uint32 SDL_TrayEntryFlags;
79
80#define SDL_TRAYENTRY_BUTTON 0x00000001u /**< Make the entry a simple button. Required. */
81#define SDL_TRAYENTRY_CHECKBOX 0x00000002u /**< Make the entry a checkbox. Required. */
82#define SDL_TRAYENTRY_SUBMENU 0x00000004u /**< Prepare the entry to have a submenu. Required */
83#define SDL_TRAYENTRY_DISABLED 0x80000000u /**< Make the entry disabled. Optional. */
84#define SDL_TRAYENTRY_CHECKED 0x40000000u /**< Make the entry checked. This is valid only for checkboxes. Optional. */
85
86/**
87 * A callback that is invoked when a tray entry is selected.
88 *
89 * \param userdata an optional pointer to pass extra data to the callback when
90 * it will be invoked.
91 * \param entry the tray entry that was selected.
92 *
93 * \since This datatype is available since SDL 3.2.0.
94 *
95 * \sa SDL_SetTrayEntryCallback
96 */
97typedef void (SDLCALL *SDL_TrayCallback)(void *userdata, SDL_TrayEntry *entry);
98
99/**
100 * Create an icon to be placed in the operating system's tray, or equivalent.
101 *
102 * Many platforms advise not using a system tray unless persistence is a
103 * necessary feature. Avoid needlessly creating a tray icon, as the user may
104 * feel like it clutters their interface.
105 *
106 * Using tray icons require the video subsystem.
107 *
108 * \param icon a surface to be used as icon. May be NULL.
109 * \param tooltip a tooltip to be displayed when the mouse hovers the icon in
110 * UTF-8 encoding. Not supported on all platforms. May be NULL.
111 * \returns The newly created system tray icon.
112 *
113 * \threadsafety This function should only be called on the main thread.
114 *
115 * \since This function is available since SDL 3.2.0.
116 *
117 * \sa SDL_CreateTrayMenu
118 * \sa SDL_GetTrayMenu
119 * \sa SDL_DestroyTray
120 */
121extern SDL_DECLSPEC SDL_Tray * SDLCALL SDL_CreateTray(SDL_Surface *icon, const char *tooltip);
122
123/**
124 * Updates the system tray icon's icon.
125 *
126 * \param tray the tray icon to be updated.
127 * \param icon the new icon. May be NULL.
128 *
129 * \threadsafety This function should be called on the thread that created the
130 * tray.
131 *
132 * \since This function is available since SDL 3.2.0.
133 *
134 * \sa SDL_CreateTray
135 */
136extern SDL_DECLSPEC void SDLCALL SDL_SetTrayIcon(SDL_Tray *tray, SDL_Surface *icon);
137
138/**
139 * Updates the system tray icon's tooltip.
140 *
141 * \param tray the tray icon to be updated.
142 * \param tooltip the new tooltip in UTF-8 encoding. May be NULL.
143 *
144 * \threadsafety This function should be called on the thread that created the
145 * tray.
146 *
147 * \since This function is available since SDL 3.2.0.
148 *
149 * \sa SDL_CreateTray
150 */
151extern SDL_DECLSPEC void SDLCALL SDL_SetTrayTooltip(SDL_Tray *tray, const char *tooltip);
152
153/**
154 * Create a menu for a system tray.
155 *
156 * This should be called at most once per tray icon.
157 *
158 * This function does the same thing as SDL_CreateTraySubmenu(), except that
159 * it takes a SDL_Tray instead of a SDL_TrayEntry.
160 *
161 * A menu does not need to be destroyed; it will be destroyed with the tray.
162 *
163 * \param tray the tray to bind the menu to.
164 * \returns the newly created menu.
165 *
166 * \threadsafety This function should be called on the thread that created the
167 * tray.
168 *
169 * \since This function is available since SDL 3.2.0.
170 *
171 * \sa SDL_CreateTray
172 * \sa SDL_GetTrayMenu
173 * \sa SDL_GetTrayMenuParentTray
174 */
175extern SDL_DECLSPEC SDL_TrayMenu * SDLCALL SDL_CreateTrayMenu(SDL_Tray *tray);
176
177/**
178 * Create a submenu for a system tray entry.
179 *
180 * This should be called at most once per tray entry.
181 *
182 * This function does the same thing as SDL_CreateTrayMenu, except that it
183 * takes a SDL_TrayEntry instead of a SDL_Tray.
184 *
185 * A menu does not need to be destroyed; it will be destroyed with the tray.
186 *
187 * \param entry the tray entry to bind the menu to.
188 * \returns the newly created menu.
189 *
190 * \threadsafety This function should be called on the thread that created the
191 * tray.
192 *
193 * \since This function is available since SDL 3.2.0.
194 *
195 * \sa SDL_InsertTrayEntryAt
196 * \sa SDL_GetTraySubmenu
197 * \sa SDL_GetTrayMenuParentEntry
198 */
199extern SDL_DECLSPEC SDL_TrayMenu * SDLCALL SDL_CreateTraySubmenu(SDL_TrayEntry *entry);
200
201/**
202 * Gets a previously created tray menu.
203 *
204 * You should have called SDL_CreateTrayMenu() on the tray object. This
205 * function allows you to fetch it again later.
206 *
207 * This function does the same thing as SDL_GetTraySubmenu(), except that it
208 * takes a SDL_Tray instead of a SDL_TrayEntry.
209 *
210 * A menu does not need to be destroyed; it will be destroyed with the tray.
211 *
212 * \param tray the tray entry to bind the menu to.
213 * \returns the newly created menu.
214 *
215 * \threadsafety This function should be called on the thread that created the
216 * tray.
217 *
218 * \since This function is available since SDL 3.2.0.
219 *
220 * \sa SDL_CreateTray
221 * \sa SDL_CreateTrayMenu
222 */
223extern SDL_DECLSPEC SDL_TrayMenu * SDLCALL SDL_GetTrayMenu(SDL_Tray *tray);
224
225/**
226 * Gets a previously created tray entry submenu.
227 *
228 * You should have called SDL_CreateTraySubmenu() on the entry object. This
229 * function allows you to fetch it again later.
230 *
231 * This function does the same thing as SDL_GetTrayMenu(), except that it
232 * takes a SDL_TrayEntry instead of a SDL_Tray.
233 *
234 * A menu does not need to be destroyed; it will be destroyed with the tray.
235 *
236 * \param entry the tray entry to bind the menu to.
237 * \returns the newly created menu.
238 *
239 * \threadsafety This function should be called on the thread that created the
240 * tray.
241 *
242 * \since This function is available since SDL 3.2.0.
243 *
244 * \sa SDL_InsertTrayEntryAt
245 * \sa SDL_CreateTraySubmenu
246 */
247extern SDL_DECLSPEC SDL_TrayMenu * SDLCALL SDL_GetTraySubmenu(SDL_TrayEntry *entry);
248
249/**
250 * Returns a list of entries in the menu, in order.
251 *
252 * \param menu The menu to get entries from.
253 * \param count An optional pointer to obtain the number of entries in the
254 * menu.
255 * \returns a NULL-terminated list of entries within the given menu. The
256 * pointer becomes invalid when any function that inserts or deletes
257 * entries in the menu is called.
258 *
259 * \threadsafety This function should be called on the thread that created the
260 * tray.
261 *
262 * \since This function is available since SDL 3.2.0.
263 *
264 * \sa SDL_RemoveTrayEntry
265 * \sa SDL_InsertTrayEntryAt
266 */
267extern SDL_DECLSPEC const SDL_TrayEntry ** SDLCALL SDL_GetTrayEntries(SDL_TrayMenu *menu, int *count);
268
269/**
270 * Removes a tray entry.
271 *
272 * \param entry The entry to be deleted.
273 *
274 * \threadsafety This function should be called on the thread that created the
275 * tray.
276 *
277 * \since This function is available since SDL 3.2.0.
278 *
279 * \sa SDL_GetTrayEntries
280 * \sa SDL_InsertTrayEntryAt
281 */
282extern SDL_DECLSPEC void SDLCALL SDL_RemoveTrayEntry(SDL_TrayEntry *entry);
283
284/**
285 * Insert a tray entry at a given position.
286 *
287 * If label is NULL, the entry will be a separator. Many functions won't work
288 * for an entry that is a separator.
289 *
290 * An entry does not need to be destroyed; it will be destroyed with the tray.
291 *
292 * \param menu the menu to append the entry to.
293 * \param pos the desired position for the new entry. Entries at or following
294 * this place will be moved. If pos is -1, the entry is appended.
295 * \param label the text to be displayed on the entry, in UTF-8 encoding, or
296 * NULL for a separator.
297 * \param flags a combination of flags, some of which are mandatory.
298 * \returns the newly created entry, or NULL if pos is out of bounds.
299 *
300 * \threadsafety This function should be called on the thread that created the
301 * tray.
302 *
303 * \since This function is available since SDL 3.2.0.
304 *
305 * \sa SDL_TrayEntryFlags
306 * \sa SDL_GetTrayEntries
307 * \sa SDL_RemoveTrayEntry
308 * \sa SDL_GetTrayEntryParent
309 */
310extern SDL_DECLSPEC SDL_TrayEntry * SDLCALL SDL_InsertTrayEntryAt(SDL_TrayMenu *menu, int pos, const char *label, SDL_TrayEntryFlags flags);
311
312/**
313 * Sets the label of an entry.
314 *
315 * An entry cannot change between a separator and an ordinary entry; that is,
316 * it is not possible to set a non-NULL label on an entry that has a NULL
317 * label (separators), or to set a NULL label to an entry that has a non-NULL
318 * label. The function will silently fail if that happens.
319 *
320 * \param entry the entry to be updated.
321 * \param label the new label for the entry in UTF-8 encoding.
322 *
323 * \threadsafety This function should be called on the thread that created the
324 * tray.
325 *
326 * \since This function is available since SDL 3.2.0.
327 *
328 * \sa SDL_GetTrayEntries
329 * \sa SDL_InsertTrayEntryAt
330 * \sa SDL_GetTrayEntryLabel
331 */
332extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryLabel(SDL_TrayEntry *entry, const char *label);
333
334/**
335 * Gets the label of an entry.
336 *
337 * If the returned value is NULL, the entry is a separator.
338 *
339 * \param entry the entry to be read.
340 * \returns the label of the entry in UTF-8 encoding.
341 *
342 * \threadsafety This function should be called on the thread that created the
343 * tray.
344 *
345 * \since This function is available since SDL 3.2.0.
346 *
347 * \sa SDL_GetTrayEntries
348 * \sa SDL_InsertTrayEntryAt
349 * \sa SDL_SetTrayEntryLabel
350 */
351extern SDL_DECLSPEC const char * SDLCALL SDL_GetTrayEntryLabel(SDL_TrayEntry *entry);
352
353/**
354 * Sets whether or not an entry is checked.
355 *
356 * The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.
357 *
358 * \param entry the entry to be updated.
359 * \param checked true if the entry should be checked; false otherwise.
360 *
361 * \threadsafety This function should be called on the thread that created the
362 * tray.
363 *
364 * \since This function is available since SDL 3.2.0.
365 *
366 * \sa SDL_GetTrayEntries
367 * \sa SDL_InsertTrayEntryAt
368 * \sa SDL_GetTrayEntryChecked
369 */
370extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryChecked(SDL_TrayEntry *entry, bool checked);
371
372/**
373 * Gets whether or not an entry is checked.
374 *
375 * The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.
376 *
377 * \param entry the entry to be read.
378 * \returns true if the entry is checked; false otherwise.
379 *
380 * \threadsafety This function should be called on the thread that created the
381 * tray.
382 *
383 * \since This function is available since SDL 3.2.0.
384 *
385 * \sa SDL_GetTrayEntries
386 * \sa SDL_InsertTrayEntryAt
387 * \sa SDL_SetTrayEntryChecked
388 */
389extern SDL_DECLSPEC bool SDLCALL SDL_GetTrayEntryChecked(SDL_TrayEntry *entry);
390
391/**
392 * Sets whether or not an entry is enabled.
393 *
394 * \param entry the entry to be updated.
395 * \param enabled true if the entry should be enabled; false otherwise.
396 *
397 * \threadsafety This function should be called on the thread that created the
398 * tray.
399 *
400 * \since This function is available since SDL 3.2.0.
401 *
402 * \sa SDL_GetTrayEntries
403 * \sa SDL_InsertTrayEntryAt
404 * \sa SDL_GetTrayEntryEnabled
405 */
406extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryEnabled(SDL_TrayEntry *entry, bool enabled);
407
408/**
409 * Gets whether or not an entry is enabled.
410 *
411 * \param entry the entry to be read.
412 * \returns true if the entry is enabled; false otherwise.
413 *
414 * \threadsafety This function should be called on the thread that created the
415 * tray.
416 *
417 * \since This function is available since SDL 3.2.0.
418 *
419 * \sa SDL_GetTrayEntries
420 * \sa SDL_InsertTrayEntryAt
421 * \sa SDL_SetTrayEntryEnabled
422 */
423extern SDL_DECLSPEC bool SDLCALL SDL_GetTrayEntryEnabled(SDL_TrayEntry *entry);
424
425/**
426 * Sets a callback to be invoked when the entry is selected.
427 *
428 * \param entry the entry to be updated.
429 * \param callback a callback to be invoked when the entry is selected.
430 * \param userdata an optional pointer to pass extra data to the callback when
431 * it will be invoked.
432 *
433 * \threadsafety This function should be called on the thread that created the
434 * tray.
435 *
436 * \since This function is available since SDL 3.2.0.
437 *
438 * \sa SDL_GetTrayEntries
439 * \sa SDL_InsertTrayEntryAt
440 */
441extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryCallback(SDL_TrayEntry *entry, SDL_TrayCallback callback, void *userdata);
442
443/**
444 * Simulate a click on a tray entry.
445 *
446 * \param entry The entry to activate.
447 *
448 * \threadsafety This function should be called on the thread that created the
449 * tray.
450 *
451 * \since This function is available since SDL 3.2.0.
452 */
453extern SDL_DECLSPEC void SDLCALL SDL_ClickTrayEntry(SDL_TrayEntry *entry);
454
455/**
456 * Destroys a tray object.
457 *
458 * This also destroys all associated menus and entries.
459 *
460 * \param tray the tray icon to be destroyed.
461 *
462 * \threadsafety This function should be called on the thread that created the
463 * tray.
464 *
465 * \since This function is available since SDL 3.2.0.
466 *
467 * \sa SDL_CreateTray
468 */
469extern SDL_DECLSPEC void SDLCALL SDL_DestroyTray(SDL_Tray *tray);
470
471/**
472 * Gets the menu containing a certain tray entry.
473 *
474 * \param entry the entry for which to get the parent menu.
475 * \returns the parent menu.
476 *
477 * \threadsafety This function should be called on the thread that created the
478 * tray.
479 *
480 * \since This function is available since SDL 3.2.0.
481 *
482 * \sa SDL_InsertTrayEntryAt
483 */
484extern SDL_DECLSPEC SDL_TrayMenu * SDLCALL SDL_GetTrayEntryParent(SDL_TrayEntry *entry);
485
486/**
487 * Gets the entry for which the menu is a submenu, if the current menu is a
488 * submenu.
489 *
490 * Either this function or SDL_GetTrayMenuParentTray() will return non-NULL
491 * for any given menu.
492 *
493 * \param menu the menu for which to get the parent entry.
494 * \returns the parent entry, or NULL if this menu is not a submenu.
495 *
496 * \threadsafety This function should be called on the thread that created the
497 * tray.
498 *
499 * \since This function is available since SDL 3.2.0.
500 *
501 * \sa SDL_CreateTraySubmenu
502 * \sa SDL_GetTrayMenuParentTray
503 */
504extern SDL_DECLSPEC SDL_TrayEntry * SDLCALL SDL_GetTrayMenuParentEntry(SDL_TrayMenu *menu);
505
506/**
507 * Gets the tray for which this menu is the first-level menu, if the current
508 * menu isn't a submenu.
509 *
510 * Either this function or SDL_GetTrayMenuParentEntry() will return non-NULL
511 * for any given menu.
512 *
513 * \param menu the menu for which to get the parent enttrayry.
514 * \returns the parent tray, or NULL if this menu is a submenu.
515 *
516 * \threadsafety This function should be called on the thread that created the
517 * tray.
518 *
519 * \since This function is available since SDL 3.2.0.
520 *
521 * \sa SDL_CreateTrayMenu
522 * \sa SDL_GetTrayMenuParentEntry
523 */
524extern SDL_DECLSPEC SDL_Tray * SDLCALL SDL_GetTrayMenuParentTray(SDL_TrayMenu *menu);
525
526/**
527 * Update the trays.
528 *
529 * This is called automatically by the event loop and is only needed if you're
530 * using trays but aren't handling SDL events.
531 *
532 * \threadsafety This function should only be called on the main thread.
533 *
534 * \since This function is available since SDL 3.2.0.
535 */
536extern SDL_DECLSPEC void SDLCALL SDL_UpdateTrays(void);
537
538/* Ends C function definitions when using C++ */
539#ifdef __cplusplus
540}
541#endif
542#include <SDL3/SDL_close_code.h>
543
544#endif /* SDL_tray_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_version.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_version.h
new file mode 100644
index 0000000..7443d52
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_version.h
@@ -0,0 +1,183 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryVersion
24 *
25 * Functionality to query the current SDL version, both as headers the app was
26 * compiled against, and a library the app is linked to.
27 */
28
29#ifndef SDL_version_h_
30#define SDL_version_h_
31
32#include <SDL3/SDL_stdinc.h>
33
34#include <SDL3/SDL_begin_code.h>
35/* Set up for C function definitions, even when using C++ */
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40/**
41 * The current major version of SDL headers.
42 *
43 * If this were SDL version 3.2.1, this value would be 3.
44 *
45 * \since This macro is available since SDL 3.2.0.
46 */
47#define SDL_MAJOR_VERSION 3
48
49/**
50 * The current minor version of the SDL headers.
51 *
52 * If this were SDL version 3.2.1, this value would be 2.
53 *
54 * \since This macro is available since SDL 3.2.0.
55 */
56#define SDL_MINOR_VERSION 2
57
58/**
59 * The current micro (or patchlevel) version of the SDL headers.
60 *
61 * If this were SDL version 3.2.1, this value would be 1.
62 *
63 * \since This macro is available since SDL 3.2.0.
64 */
65#define SDL_MICRO_VERSION 20
66
67/**
68 * This macro turns the version numbers into a numeric value.
69 *
70 * (1,2,3) becomes 1002003.
71 *
72 * \param major the major version number.
73 * \param minor the minorversion number.
74 * \param patch the patch version number.
75 *
76 * \since This macro is available since SDL 3.2.0.
77 */
78#define SDL_VERSIONNUM(major, minor, patch) \
79 ((major) * 1000000 + (minor) * 1000 + (patch))
80
81/**
82 * This macro extracts the major version from a version number
83 *
84 * 1002003 becomes 1.
85 *
86 * \param version the version number.
87 *
88 * \since This macro is available since SDL 3.2.0.
89 */
90#define SDL_VERSIONNUM_MAJOR(version) ((version) / 1000000)
91
92/**
93 * This macro extracts the minor version from a version number
94 *
95 * 1002003 becomes 2.
96 *
97 * \param version the version number.
98 *
99 * \since This macro is available since SDL 3.2.0.
100 */
101#define SDL_VERSIONNUM_MINOR(version) (((version) / 1000) % 1000)
102
103/**
104 * This macro extracts the micro version from a version number
105 *
106 * 1002003 becomes 3.
107 *
108 * \param version the version number.
109 *
110 * \since This macro is available since SDL 3.2.0.
111 */
112#define SDL_VERSIONNUM_MICRO(version) ((version) % 1000)
113
114/**
115 * This is the version number macro for the current SDL version.
116 *
117 * \since This macro is available since SDL 3.2.0.
118 *
119 * \sa SDL_GetVersion
120 */
121#define SDL_VERSION \
122 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION)
123
124/**
125 * This macro will evaluate to true if compiled with SDL at least X.Y.Z.
126 *
127 * \since This macro is available since SDL 3.2.0.
128 */
129#define SDL_VERSION_ATLEAST(X, Y, Z) \
130 (SDL_VERSION >= SDL_VERSIONNUM(X, Y, Z))
131
132/**
133 * Get the version of SDL that is linked against your program.
134 *
135 * If you are linking to SDL dynamically, then it is possible that the current
136 * version will be different than the version you compiled against. This
137 * function returns the current version, while SDL_VERSION is the version you
138 * compiled with.
139 *
140 * This function may be called safely at any time, even before SDL_Init().
141 *
142 * \returns the version of the linked library.
143 *
144 * \since This function is available since SDL 3.2.0.
145 *
146 * \sa SDL_GetRevision
147 */
148extern SDL_DECLSPEC int SDLCALL SDL_GetVersion(void);
149
150/**
151 * Get the code revision of SDL that is linked against your program.
152 *
153 * This value is the revision of the code you are linked with and may be
154 * different from the code you are compiling with, which is found in the
155 * constant SDL_REVISION.
156 *
157 * The revision is arbitrary string (a hash value) uniquely identifying the
158 * exact revision of the SDL library in use, and is only useful in comparing
159 * against other revisions. It is NOT an incrementing number.
160 *
161 * If SDL wasn't built from a git repository with the appropriate tools, this
162 * will return an empty string.
163 *
164 * You shouldn't use this function for anything but logging it for debugging
165 * purposes. The string is not intended to be reliable in any way.
166 *
167 * \returns an arbitrary string, uniquely identifying the exact revision of
168 * the SDL library in use.
169 *
170 * \since This function is available since SDL 3.2.0.
171 *
172 * \sa SDL_GetVersion
173 */
174extern SDL_DECLSPEC const char * SDLCALL SDL_GetRevision(void);
175
176
177/* Ends C function definitions when using C++ */
178#ifdef __cplusplus
179}
180#endif
181#include <SDL3/SDL_close_code.h>
182
183#endif /* SDL_version_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_video.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_video.h
new file mode 100644
index 0000000..3b3676d
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_video.h
@@ -0,0 +1,3311 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryVideo
24 *
25 * SDL's video subsystem is largely interested in abstracting window
26 * management from the underlying operating system. You can create windows,
27 * manage them in various ways, set them fullscreen, and get events when
28 * interesting things happen with them, such as the mouse or keyboard
29 * interacting with a window.
30 *
31 * The video subsystem is also interested in abstracting away some
32 * platform-specific differences in OpenGL: context creation, swapping
33 * buffers, etc. This may be crucial to your app, but also you are not
34 * required to use OpenGL at all. In fact, SDL can provide rendering to those
35 * windows as well, either with an easy-to-use
36 * [2D API](https://wiki.libsdl.org/SDL3/CategoryRender)
37 * or with a more-powerful
38 * [GPU API](https://wiki.libsdl.org/SDL3/CategoryGPU)
39 * . Of course, it can simply get out of your way and give you the window
40 * handles you need to use Vulkan, Direct3D, Metal, or whatever else you like
41 * directly, too.
42 *
43 * The video subsystem covers a lot of functionality, out of necessity, so it
44 * is worth perusing the list of functions just to see what's available, but
45 * most apps can get by with simply creating a window and listening for
46 * events, so start with SDL_CreateWindow() and SDL_PollEvent().
47 */
48
49#ifndef SDL_video_h_
50#define SDL_video_h_
51
52#include <SDL3/SDL_stdinc.h>
53#include <SDL3/SDL_error.h>
54#include <SDL3/SDL_pixels.h>
55#include <SDL3/SDL_properties.h>
56#include <SDL3/SDL_rect.h>
57#include <SDL3/SDL_surface.h>
58
59#include <SDL3/SDL_begin_code.h>
60/* Set up for C function definitions, even when using C++ */
61#ifdef __cplusplus
62extern "C" {
63#endif
64
65/**
66 * This is a unique ID for a display for the time it is connected to the
67 * system, and is never reused for the lifetime of the application.
68 *
69 * If the display is disconnected and reconnected, it will get a new ID.
70 *
71 * The value 0 is an invalid ID.
72 *
73 * \since This datatype is available since SDL 3.2.0.
74 */
75typedef Uint32 SDL_DisplayID;
76
77/**
78 * This is a unique ID for a window.
79 *
80 * The value 0 is an invalid ID.
81 *
82 * \since This datatype is available since SDL 3.2.0.
83 */
84typedef Uint32 SDL_WindowID;
85
86/* Global video properties... */
87
88/**
89 * The pointer to the global `wl_display` object used by the Wayland video
90 * backend.
91 *
92 * Can be set before the video subsystem is initialized to import an external
93 * `wl_display` object from an application or toolkit for use in SDL, or read
94 * after initialization to export the `wl_display` used by the Wayland video
95 * backend. Setting this property after the video subsystem has been
96 * initialized has no effect, and reading it when the video subsystem is
97 * uninitialized will either return the user provided value, if one was set
98 * prior to initialization, or NULL. See docs/README-wayland.md for more
99 * information.
100 */
101#define SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER "SDL.video.wayland.wl_display"
102
103/**
104 * System theme.
105 *
106 * \since This enum is available since SDL 3.2.0.
107 */
108typedef enum SDL_SystemTheme
109{
110 SDL_SYSTEM_THEME_UNKNOWN, /**< Unknown system theme */
111 SDL_SYSTEM_THEME_LIGHT, /**< Light colored system theme */
112 SDL_SYSTEM_THEME_DARK /**< Dark colored system theme */
113} SDL_SystemTheme;
114
115/**
116 * Internal display mode data.
117 *
118 * This lives as a field in SDL_DisplayMode, as opaque data.
119 *
120 * \since This struct is available since SDL 3.2.0.
121 *
122 * \sa SDL_DisplayMode
123 */
124typedef struct SDL_DisplayModeData SDL_DisplayModeData;
125
126/**
127 * The structure that defines a display mode.
128 *
129 * \since This struct is available since SDL 3.2.0.
130 *
131 * \sa SDL_GetFullscreenDisplayModes
132 * \sa SDL_GetDesktopDisplayMode
133 * \sa SDL_GetCurrentDisplayMode
134 * \sa SDL_SetWindowFullscreenMode
135 * \sa SDL_GetWindowFullscreenMode
136 */
137typedef struct SDL_DisplayMode
138{
139 SDL_DisplayID displayID; /**< the display this mode is associated with */
140 SDL_PixelFormat format; /**< pixel format */
141 int w; /**< width */
142 int h; /**< height */
143 float pixel_density; /**< scale converting size to pixels (e.g. a 1920x1080 mode with 2.0 scale would have 3840x2160 pixels) */
144 float refresh_rate; /**< refresh rate (or 0.0f for unspecified) */
145 int refresh_rate_numerator; /**< precise refresh rate numerator (or 0 for unspecified) */
146 int refresh_rate_denominator; /**< precise refresh rate denominator */
147
148 SDL_DisplayModeData *internal; /**< Private */
149
150} SDL_DisplayMode;
151
152/**
153 * Display orientation values; the way a display is rotated.
154 *
155 * \since This enum is available since SDL 3.2.0.
156 */
157typedef enum SDL_DisplayOrientation
158{
159 SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */
160 SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */
161 SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */
162 SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */
163 SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */
164} SDL_DisplayOrientation;
165
166/**
167 * The struct used as an opaque handle to a window.
168 *
169 * \since This struct is available since SDL 3.2.0.
170 *
171 * \sa SDL_CreateWindow
172 */
173typedef struct SDL_Window SDL_Window;
174
175/**
176 * The flags on a window.
177 *
178 * These cover a lot of true/false, or on/off, window state. Some of it is
179 * immutable after being set through SDL_CreateWindow(), some of it can be
180 * changed on existing windows by the app, and some of it might be altered by
181 * the user or system outside of the app's control.
182 *
183 * \since This datatype is available since SDL 3.2.0.
184 *
185 * \sa SDL_GetWindowFlags
186 */
187typedef Uint64 SDL_WindowFlags;
188
189#define SDL_WINDOW_FULLSCREEN SDL_UINT64_C(0x0000000000000001) /**< window is in fullscreen mode */
190#define SDL_WINDOW_OPENGL SDL_UINT64_C(0x0000000000000002) /**< window usable with OpenGL context */
191#define SDL_WINDOW_OCCLUDED SDL_UINT64_C(0x0000000000000004) /**< window is occluded */
192#define SDL_WINDOW_HIDDEN SDL_UINT64_C(0x0000000000000008) /**< window is neither mapped onto the desktop nor shown in the taskbar/dock/window list; SDL_ShowWindow() is required for it to become visible */
193#define SDL_WINDOW_BORDERLESS SDL_UINT64_C(0x0000000000000010) /**< no window decoration */
194#define SDL_WINDOW_RESIZABLE SDL_UINT64_C(0x0000000000000020) /**< window can be resized */
195#define SDL_WINDOW_MINIMIZED SDL_UINT64_C(0x0000000000000040) /**< window is minimized */
196#define SDL_WINDOW_MAXIMIZED SDL_UINT64_C(0x0000000000000080) /**< window is maximized */
197#define SDL_WINDOW_MOUSE_GRABBED SDL_UINT64_C(0x0000000000000100) /**< window has grabbed mouse input */
198#define SDL_WINDOW_INPUT_FOCUS SDL_UINT64_C(0x0000000000000200) /**< window has input focus */
199#define SDL_WINDOW_MOUSE_FOCUS SDL_UINT64_C(0x0000000000000400) /**< window has mouse focus */
200#define SDL_WINDOW_EXTERNAL SDL_UINT64_C(0x0000000000000800) /**< window not created by SDL */
201#define SDL_WINDOW_MODAL SDL_UINT64_C(0x0000000000001000) /**< window is modal */
202#define SDL_WINDOW_HIGH_PIXEL_DENSITY SDL_UINT64_C(0x0000000000002000) /**< window uses high pixel density back buffer if possible */
203#define SDL_WINDOW_MOUSE_CAPTURE SDL_UINT64_C(0x0000000000004000) /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
204#define SDL_WINDOW_MOUSE_RELATIVE_MODE SDL_UINT64_C(0x0000000000008000) /**< window has relative mode enabled */
205#define SDL_WINDOW_ALWAYS_ON_TOP SDL_UINT64_C(0x0000000000010000) /**< window should always be above others */
206#define SDL_WINDOW_UTILITY SDL_UINT64_C(0x0000000000020000) /**< window should be treated as a utility window, not showing in the task bar and window list */
207#define SDL_WINDOW_TOOLTIP SDL_UINT64_C(0x0000000000040000) /**< window should be treated as a tooltip and does not get mouse or keyboard focus, requires a parent window */
208#define SDL_WINDOW_POPUP_MENU SDL_UINT64_C(0x0000000000080000) /**< window should be treated as a popup menu, requires a parent window */
209#define SDL_WINDOW_KEYBOARD_GRABBED SDL_UINT64_C(0x0000000000100000) /**< window has grabbed keyboard input */
210#define SDL_WINDOW_VULKAN SDL_UINT64_C(0x0000000010000000) /**< window usable for Vulkan surface */
211#define SDL_WINDOW_METAL SDL_UINT64_C(0x0000000020000000) /**< window usable for Metal view */
212#define SDL_WINDOW_TRANSPARENT SDL_UINT64_C(0x0000000040000000) /**< window with transparent buffer */
213#define SDL_WINDOW_NOT_FOCUSABLE SDL_UINT64_C(0x0000000080000000) /**< window should not be focusable */
214
215
216/**
217 * A magic value used with SDL_WINDOWPOS_UNDEFINED.
218 *
219 * Generally this macro isn't used directly, but rather through
220 * SDL_WINDOWPOS_UNDEFINED or SDL_WINDOWPOS_UNDEFINED_DISPLAY.
221 *
222 * \since This macro is available since SDL 3.2.0.
223 */
224#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
225
226/**
227 * Used to indicate that you don't care what the window position is.
228 *
229 * If you _really_ don't care, SDL_WINDOWPOS_UNDEFINED is the same, but always
230 * uses the primary display instead of specifying one.
231 *
232 * \param X the SDL_DisplayID of the display to use.
233 *
234 * \since This macro is available since SDL 3.2.0.
235 */
236#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
237
238/**
239 * Used to indicate that you don't care what the window position/display is.
240 *
241 * This always uses the primary display.
242 *
243 * \since This macro is available since SDL 3.2.0.
244 */
245#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
246
247/**
248 * A macro to test if the window position is marked as "undefined."
249 *
250 * \param X the window position value.
251 *
252 * \since This macro is available since SDL 3.2.0.
253 */
254#define SDL_WINDOWPOS_ISUNDEFINED(X) (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
255
256/**
257 * A magic value used with SDL_WINDOWPOS_CENTERED.
258 *
259 * Generally this macro isn't used directly, but rather through
260 * SDL_WINDOWPOS_CENTERED or SDL_WINDOWPOS_CENTERED_DISPLAY.
261 *
262 * \since This macro is available since SDL 3.2.0.
263 */
264#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
265
266/**
267 * Used to indicate that the window position should be centered.
268 *
269 * SDL_WINDOWPOS_CENTERED is the same, but always uses the primary display
270 * instead of specifying one.
271 *
272 * \param X the SDL_DisplayID of the display to use.
273 *
274 * \since This macro is available since SDL 3.2.0.
275 */
276#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
277
278/**
279 * Used to indicate that the window position should be centered.
280 *
281 * This always uses the primary display.
282 *
283 * \since This macro is available since SDL 3.2.0.
284 */
285#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
286
287/**
288 * A macro to test if the window position is marked as "centered."
289 *
290 * \param X the window position value.
291 *
292 * \since This macro is available since SDL 3.2.0.
293 */
294#define SDL_WINDOWPOS_ISCENTERED(X) \
295 (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
296
297
298/**
299 * Window flash operation.
300 *
301 * \since This enum is available since SDL 3.2.0.
302 */
303typedef enum SDL_FlashOperation
304{
305 SDL_FLASH_CANCEL, /**< Cancel any window flash state */
306 SDL_FLASH_BRIEFLY, /**< Flash the window briefly to get attention */
307 SDL_FLASH_UNTIL_FOCUSED /**< Flash the window until it gets focus */
308} SDL_FlashOperation;
309
310/**
311 * An opaque handle to an OpenGL context.
312 *
313 * \since This datatype is available since SDL 3.2.0.
314 *
315 * \sa SDL_GL_CreateContext
316 */
317typedef struct SDL_GLContextState *SDL_GLContext;
318
319/**
320 * Opaque type for an EGL display.
321 *
322 * \since This datatype is available since SDL 3.2.0.
323 */
324typedef void *SDL_EGLDisplay;
325
326/**
327 * Opaque type for an EGL config.
328 *
329 * \since This datatype is available since SDL 3.2.0.
330 */
331typedef void *SDL_EGLConfig;
332
333/**
334 * Opaque type for an EGL surface.
335 *
336 * \since This datatype is available since SDL 3.2.0.
337 */
338typedef void *SDL_EGLSurface;
339
340/**
341 * An EGL attribute, used when creating an EGL context.
342 *
343 * \since This datatype is available since SDL 3.2.0.
344 */
345typedef intptr_t SDL_EGLAttrib;
346
347/**
348 * An EGL integer attribute, used when creating an EGL surface.
349 *
350 * \since This datatype is available since SDL 3.2.0.
351 */
352typedef int SDL_EGLint;
353
354/**
355 * EGL platform attribute initialization callback.
356 *
357 * This is called when SDL is attempting to create an EGL context, to let the
358 * app add extra attributes to its eglGetPlatformDisplay() call.
359 *
360 * The callback should return a pointer to an EGL attribute array terminated
361 * with `EGL_NONE`. If this function returns NULL, the SDL_CreateWindow
362 * process will fail gracefully.
363 *
364 * The returned pointer should be allocated with SDL_malloc() and will be
365 * passed to SDL_free().
366 *
367 * The arrays returned by each callback will be appended to the existing
368 * attribute arrays defined by SDL.
369 *
370 * \param userdata an app-controlled pointer that is passed to the callback.
371 * \returns a newly-allocated array of attributes, terminated with `EGL_NONE`.
372 *
373 * \since This datatype is available since SDL 3.2.0.
374 *
375 * \sa SDL_EGL_SetAttributeCallbacks
376 */
377typedef SDL_EGLAttrib *(SDLCALL *SDL_EGLAttribArrayCallback)(void *userdata);
378
379/**
380 * EGL surface/context attribute initialization callback types.
381 *
382 * This is called when SDL is attempting to create an EGL surface, to let the
383 * app add extra attributes to its eglCreateWindowSurface() or
384 * eglCreateContext calls.
385 *
386 * For convenience, the EGLDisplay and EGLConfig to use are provided to the
387 * callback.
388 *
389 * The callback should return a pointer to an EGL attribute array terminated
390 * with `EGL_NONE`. If this function returns NULL, the SDL_CreateWindow
391 * process will fail gracefully.
392 *
393 * The returned pointer should be allocated with SDL_malloc() and will be
394 * passed to SDL_free().
395 *
396 * The arrays returned by each callback will be appended to the existing
397 * attribute arrays defined by SDL.
398 *
399 * \param userdata an app-controlled pointer that is passed to the callback.
400 * \param display the EGL display to be used.
401 * \param config the EGL config to be used.
402 * \returns a newly-allocated array of attributes, terminated with `EGL_NONE`.
403 *
404 * \since This datatype is available since SDL 3.2.0.
405 *
406 * \sa SDL_EGL_SetAttributeCallbacks
407 */
408typedef SDL_EGLint *(SDLCALL *SDL_EGLIntArrayCallback)(void *userdata, SDL_EGLDisplay display, SDL_EGLConfig config);
409
410/**
411 * An enumeration of OpenGL configuration attributes.
412 *
413 * While you can set most OpenGL attributes normally, the attributes listed
414 * above must be known before SDL creates the window that will be used with
415 * the OpenGL context. These attributes are set and read with
416 * SDL_GL_SetAttribute() and SDL_GL_GetAttribute().
417 *
418 * In some cases, these attributes are minimum requests; the GL does not
419 * promise to give you exactly what you asked for. It's possible to ask for a
420 * 16-bit depth buffer and get a 24-bit one instead, for example, or to ask
421 * for no stencil buffer and still have one available. Context creation should
422 * fail if the GL can't provide your requested attributes at a minimum, but
423 * you should check to see exactly what you got.
424 *
425 * \since This enum is available since SDL 3.2.0.
426 */
427typedef enum SDL_GLAttr
428{
429 SDL_GL_RED_SIZE, /**< the minimum number of bits for the red channel of the color buffer; defaults to 8. */
430 SDL_GL_GREEN_SIZE, /**< the minimum number of bits for the green channel of the color buffer; defaults to 8. */
431 SDL_GL_BLUE_SIZE, /**< the minimum number of bits for the blue channel of the color buffer; defaults to 8. */
432 SDL_GL_ALPHA_SIZE, /**< the minimum number of bits for the alpha channel of the color buffer; defaults to 8. */
433 SDL_GL_BUFFER_SIZE, /**< the minimum number of bits for frame buffer size; defaults to 0. */
434 SDL_GL_DOUBLEBUFFER, /**< whether the output is single or double buffered; defaults to double buffering on. */
435 SDL_GL_DEPTH_SIZE, /**< the minimum number of bits in the depth buffer; defaults to 16. */
436 SDL_GL_STENCIL_SIZE, /**< the minimum number of bits in the stencil buffer; defaults to 0. */
437 SDL_GL_ACCUM_RED_SIZE, /**< the minimum number of bits for the red channel of the accumulation buffer; defaults to 0. */
438 SDL_GL_ACCUM_GREEN_SIZE, /**< the minimum number of bits for the green channel of the accumulation buffer; defaults to 0. */
439 SDL_GL_ACCUM_BLUE_SIZE, /**< the minimum number of bits for the blue channel of the accumulation buffer; defaults to 0. */
440 SDL_GL_ACCUM_ALPHA_SIZE, /**< the minimum number of bits for the alpha channel of the accumulation buffer; defaults to 0. */
441 SDL_GL_STEREO, /**< whether the output is stereo 3D; defaults to off. */
442 SDL_GL_MULTISAMPLEBUFFERS, /**< the number of buffers used for multisample anti-aliasing; defaults to 0. */
443 SDL_GL_MULTISAMPLESAMPLES, /**< the number of samples used around the current pixel used for multisample anti-aliasing. */
444 SDL_GL_ACCELERATED_VISUAL, /**< set to 1 to require hardware acceleration, set to 0 to force software rendering; defaults to allow either. */
445 SDL_GL_RETAINED_BACKING, /**< not used (deprecated). */
446 SDL_GL_CONTEXT_MAJOR_VERSION, /**< OpenGL context major version. */
447 SDL_GL_CONTEXT_MINOR_VERSION, /**< OpenGL context minor version. */
448 SDL_GL_CONTEXT_FLAGS, /**< some combination of 0 or more of elements of the SDL_GLContextFlag enumeration; defaults to 0. */
449 SDL_GL_CONTEXT_PROFILE_MASK, /**< type of GL context (Core, Compatibility, ES). See SDL_GLProfile; default value depends on platform. */
450 SDL_GL_SHARE_WITH_CURRENT_CONTEXT, /**< OpenGL context sharing; defaults to 0. */
451 SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, /**< requests sRGB capable visual; defaults to 0. */
452 SDL_GL_CONTEXT_RELEASE_BEHAVIOR, /**< sets context the release behavior. See SDL_GLContextReleaseFlag; defaults to FLUSH. */
453 SDL_GL_CONTEXT_RESET_NOTIFICATION, /**< set context reset notification. See SDL_GLContextResetNotification; defaults to NO_NOTIFICATION. */
454 SDL_GL_CONTEXT_NO_ERROR,
455 SDL_GL_FLOATBUFFERS,
456 SDL_GL_EGL_PLATFORM
457} SDL_GLAttr;
458
459/**
460 * Possible values to be set for the SDL_GL_CONTEXT_PROFILE_MASK attribute.
461 *
462 * \since This datatype is available since SDL 3.2.0.
463 */
464typedef Uint32 SDL_GLProfile;
465
466#define SDL_GL_CONTEXT_PROFILE_CORE 0x0001 /**< OpenGL Core Profile context */
467#define SDL_GL_CONTEXT_PROFILE_COMPATIBILITY 0x0002 /**< OpenGL Compatibility Profile context */
468#define SDL_GL_CONTEXT_PROFILE_ES 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
469
470
471/**
472 * Possible flags to be set for the SDL_GL_CONTEXT_FLAGS attribute.
473 *
474 * \since This datatype is available since SDL 3.2.0.
475 */
476typedef Uint32 SDL_GLContextFlag;
477
478#define SDL_GL_CONTEXT_DEBUG_FLAG 0x0001
479#define SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG 0x0002
480#define SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG 0x0004
481#define SDL_GL_CONTEXT_RESET_ISOLATION_FLAG 0x0008
482
483
484/**
485 * Possible values to be set for the SDL_GL_CONTEXT_RELEASE_BEHAVIOR
486 * attribute.
487 *
488 * \since This datatype is available since SDL 3.2.0.
489 */
490typedef Uint32 SDL_GLContextReleaseFlag;
491
492#define SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE 0x0000
493#define SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x0001
494
495
496/**
497 * Possible values to be set SDL_GL_CONTEXT_RESET_NOTIFICATION attribute.
498 *
499 * \since This datatype is available since SDL 3.2.0.
500 */
501typedef Uint32 SDL_GLContextResetNotification;
502
503#define SDL_GL_CONTEXT_RESET_NO_NOTIFICATION 0x0000
504#define SDL_GL_CONTEXT_RESET_LOSE_CONTEXT 0x0001
505
506
507/* Function prototypes */
508
509/**
510 * Get the number of video drivers compiled into SDL.
511 *
512 * \returns the number of built in video drivers.
513 *
514 * \threadsafety This function should only be called on the main thread.
515 *
516 * \since This function is available since SDL 3.2.0.
517 *
518 * \sa SDL_GetVideoDriver
519 */
520extern SDL_DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
521
522/**
523 * Get the name of a built in video driver.
524 *
525 * The video drivers are presented in the order in which they are normally
526 * checked during initialization.
527 *
528 * The names of drivers are all simple, low-ASCII identifiers, like "cocoa",
529 * "x11" or "windows". These never have Unicode characters, and are not meant
530 * to be proper names.
531 *
532 * \param index the index of a video driver.
533 * \returns the name of the video driver with the given **index**.
534 *
535 * \threadsafety This function should only be called on the main thread.
536 *
537 * \since This function is available since SDL 3.2.0.
538 *
539 * \sa SDL_GetNumVideoDrivers
540 */
541extern SDL_DECLSPEC const char * SDLCALL SDL_GetVideoDriver(int index);
542
543/**
544 * Get the name of the currently initialized video driver.
545 *
546 * The names of drivers are all simple, low-ASCII identifiers, like "cocoa",
547 * "x11" or "windows". These never have Unicode characters, and are not meant
548 * to be proper names.
549 *
550 * \returns the name of the current video driver or NULL if no driver has been
551 * initialized.
552 *
553 * \threadsafety This function should only be called on the main thread.
554 *
555 * \since This function is available since SDL 3.2.0.
556 *
557 * \sa SDL_GetNumVideoDrivers
558 * \sa SDL_GetVideoDriver
559 */
560extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentVideoDriver(void);
561
562/**
563 * Get the current system theme.
564 *
565 * \returns the current system theme, light, dark, or unknown.
566 *
567 * \threadsafety This function should only be called on the main thread.
568 *
569 * \since This function is available since SDL 3.2.0.
570 */
571extern SDL_DECLSPEC SDL_SystemTheme SDLCALL SDL_GetSystemTheme(void);
572
573/**
574 * Get a list of currently connected displays.
575 *
576 * \param count a pointer filled in with the number of displays returned, may
577 * be NULL.
578 * \returns a 0 terminated array of display instance IDs or NULL on failure;
579 * call SDL_GetError() for more information. This should be freed
580 * with SDL_free() when it is no longer needed.
581 *
582 * \threadsafety This function should only be called on the main thread.
583 *
584 * \since This function is available since SDL 3.2.0.
585 */
586extern SDL_DECLSPEC SDL_DisplayID * SDLCALL SDL_GetDisplays(int *count);
587
588/**
589 * Return the primary display.
590 *
591 * \returns the instance ID of the primary display on success or 0 on failure;
592 * call SDL_GetError() for more information.
593 *
594 * \threadsafety This function should only be called on the main thread.
595 *
596 * \since This function is available since SDL 3.2.0.
597 *
598 * \sa SDL_GetDisplays
599 */
600extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetPrimaryDisplay(void);
601
602/**
603 * Get the properties associated with a display.
604 *
605 * The following read-only properties are provided by SDL:
606 *
607 * - `SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN`: true if the display has HDR
608 * headroom above the SDR white point. This is for informational and
609 * diagnostic purposes only, as not all platforms provide this information
610 * at the display level.
611 *
612 * On KMS/DRM:
613 *
614 * - `SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER`: the "panel
615 * orientation" property for the display in degrees of clockwise rotation.
616 * Note that this is provided only as a hint, and the application is
617 * responsible for any coordinate transformations needed to conform to the
618 * requested display orientation.
619 *
620 * \param displayID the instance ID of the display to query.
621 * \returns a valid property ID on success or 0 on failure; call
622 * SDL_GetError() for more information.
623 *
624 * \threadsafety This function should only be called on the main thread.
625 *
626 * \since This function is available since SDL 3.2.0.
627 */
628extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetDisplayProperties(SDL_DisplayID displayID);
629
630#define SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN "SDL.display.HDR_enabled"
631#define SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER "SDL.display.KMSDRM.panel_orientation"
632
633/**
634 * Get the name of a display in UTF-8 encoding.
635 *
636 * \param displayID the instance ID of the display to query.
637 * \returns the name of a display or NULL on failure; call SDL_GetError() for
638 * more information.
639 *
640 * \threadsafety This function should only be called on the main thread.
641 *
642 * \since This function is available since SDL 3.2.0.
643 *
644 * \sa SDL_GetDisplays
645 */
646extern SDL_DECLSPEC const char * SDLCALL SDL_GetDisplayName(SDL_DisplayID displayID);
647
648/**
649 * Get the desktop area represented by a display.
650 *
651 * The primary display is often located at (0,0), but may be placed at a
652 * different location depending on monitor layout.
653 *
654 * \param displayID the instance ID of the display to query.
655 * \param rect the SDL_Rect structure filled in with the display bounds.
656 * \returns true on success or false on failure; call SDL_GetError() for more
657 * information.
658 *
659 * \threadsafety This function should only be called on the main thread.
660 *
661 * \since This function is available since SDL 3.2.0.
662 *
663 * \sa SDL_GetDisplayUsableBounds
664 * \sa SDL_GetDisplays
665 */
666extern SDL_DECLSPEC bool SDLCALL SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect *rect);
667
668/**
669 * Get the usable desktop area represented by a display, in screen
670 * coordinates.
671 *
672 * This is the same area as SDL_GetDisplayBounds() reports, but with portions
673 * reserved by the system removed. For example, on Apple's macOS, this
674 * subtracts the area occupied by the menu bar and dock.
675 *
676 * Setting a window to be fullscreen generally bypasses these unusable areas,
677 * so these are good guidelines for the maximum space available to a
678 * non-fullscreen window.
679 *
680 * \param displayID the instance ID of the display to query.
681 * \param rect the SDL_Rect structure filled in with the display bounds.
682 * \returns true on success or false on failure; call SDL_GetError() for more
683 * information.
684 *
685 * \threadsafety This function should only be called on the main thread.
686 *
687 * \since This function is available since SDL 3.2.0.
688 *
689 * \sa SDL_GetDisplayBounds
690 * \sa SDL_GetDisplays
691 */
692extern SDL_DECLSPEC bool SDLCALL SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect *rect);
693
694/**
695 * Get the orientation of a display when it is unrotated.
696 *
697 * \param displayID the instance ID of the display to query.
698 * \returns the SDL_DisplayOrientation enum value of the display, or
699 * `SDL_ORIENTATION_UNKNOWN` if it isn't available.
700 *
701 * \threadsafety This function should only be called on the main thread.
702 *
703 * \since This function is available since SDL 3.2.0.
704 *
705 * \sa SDL_GetDisplays
706 */
707extern SDL_DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetNaturalDisplayOrientation(SDL_DisplayID displayID);
708
709/**
710 * Get the orientation of a display.
711 *
712 * \param displayID the instance ID of the display to query.
713 * \returns the SDL_DisplayOrientation enum value of the display, or
714 * `SDL_ORIENTATION_UNKNOWN` if it isn't available.
715 *
716 * \threadsafety This function should only be called on the main thread.
717 *
718 * \since This function is available since SDL 3.2.0.
719 *
720 * \sa SDL_GetDisplays
721 */
722extern SDL_DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetCurrentDisplayOrientation(SDL_DisplayID displayID);
723
724/**
725 * Get the content scale of a display.
726 *
727 * The content scale is the expected scale for content based on the DPI
728 * settings of the display. For example, a 4K display might have a 2.0 (200%)
729 * display scale, which means that the user expects UI elements to be twice as
730 * big on this display, to aid in readability.
731 *
732 * After window creation, SDL_GetWindowDisplayScale() should be used to query
733 * the content scale factor for individual windows instead of querying the
734 * display for a window and calling this function, as the per-window content
735 * scale factor may differ from the base value of the display it is on,
736 * particularly on high-DPI and/or multi-monitor desktop configurations.
737 *
738 * \param displayID the instance ID of the display to query.
739 * \returns the content scale of the display, or 0.0f on failure; call
740 * SDL_GetError() for more information.
741 *
742 * \threadsafety This function should only be called on the main thread.
743 *
744 * \since This function is available since SDL 3.2.0.
745 *
746 * \sa SDL_GetWindowDisplayScale
747 * \sa SDL_GetDisplays
748 */
749extern SDL_DECLSPEC float SDLCALL SDL_GetDisplayContentScale(SDL_DisplayID displayID);
750
751/**
752 * Get a list of fullscreen display modes available on a display.
753 *
754 * The display modes are sorted in this priority:
755 *
756 * - w -> largest to smallest
757 * - h -> largest to smallest
758 * - bits per pixel -> more colors to fewer colors
759 * - packed pixel layout -> largest to smallest
760 * - refresh rate -> highest to lowest
761 * - pixel density -> lowest to highest
762 *
763 * \param displayID the instance ID of the display to query.
764 * \param count a pointer filled in with the number of display modes returned,
765 * may be NULL.
766 * \returns a NULL terminated array of display mode pointers or NULL on
767 * failure; call SDL_GetError() for more information. This is a
768 * single allocation that should be freed with SDL_free() when it is
769 * no longer needed.
770 *
771 * \threadsafety This function should only be called on the main thread.
772 *
773 * \since This function is available since SDL 3.2.0.
774 *
775 * \sa SDL_GetDisplays
776 */
777extern SDL_DECLSPEC SDL_DisplayMode ** SDLCALL SDL_GetFullscreenDisplayModes(SDL_DisplayID displayID, int *count);
778
779/**
780 * Get the closest match to the requested display mode.
781 *
782 * The available display modes are scanned and `closest` is filled in with the
783 * closest mode matching the requested mode and returned. The mode format and
784 * refresh rate default to the desktop mode if they are set to 0. The modes
785 * are scanned with size being first priority, format being second priority,
786 * and finally checking the refresh rate. If all the available modes are too
787 * small, then false is returned.
788 *
789 * \param displayID the instance ID of the display to query.
790 * \param w the width in pixels of the desired display mode.
791 * \param h the height in pixels of the desired display mode.
792 * \param refresh_rate the refresh rate of the desired display mode, or 0.0f
793 * for the desktop refresh rate.
794 * \param include_high_density_modes boolean to include high density modes in
795 * the search.
796 * \param closest a pointer filled in with the closest display mode equal to
797 * or larger than the desired mode.
798 * \returns true on success or false on failure; call SDL_GetError() for more
799 * information.
800 *
801 * \threadsafety This function should only be called on the main thread.
802 *
803 * \since This function is available since SDL 3.2.0.
804 *
805 * \sa SDL_GetDisplays
806 * \sa SDL_GetFullscreenDisplayModes
807 */
808extern SDL_DECLSPEC bool SDLCALL SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, bool include_high_density_modes, SDL_DisplayMode *closest);
809
810/**
811 * Get information about the desktop's display mode.
812 *
813 * There's a difference between this function and SDL_GetCurrentDisplayMode()
814 * when SDL runs fullscreen and has changed the resolution. In that case this
815 * function will return the previous native display mode, and not the current
816 * display mode.
817 *
818 * \param displayID the instance ID of the display to query.
819 * \returns a pointer to the desktop display mode or NULL on failure; call
820 * SDL_GetError() for more information.
821 *
822 * \threadsafety This function should only be called on the main thread.
823 *
824 * \since This function is available since SDL 3.2.0.
825 *
826 * \sa SDL_GetCurrentDisplayMode
827 * \sa SDL_GetDisplays
828 */
829extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetDesktopDisplayMode(SDL_DisplayID displayID);
830
831/**
832 * Get information about the current display mode.
833 *
834 * There's a difference between this function and SDL_GetDesktopDisplayMode()
835 * when SDL runs fullscreen and has changed the resolution. In that case this
836 * function will return the current display mode, and not the previous native
837 * display mode.
838 *
839 * \param displayID the instance ID of the display to query.
840 * \returns a pointer to the desktop display mode or NULL on failure; call
841 * SDL_GetError() for more information.
842 *
843 * \threadsafety This function should only be called on the main thread.
844 *
845 * \since This function is available since SDL 3.2.0.
846 *
847 * \sa SDL_GetDesktopDisplayMode
848 * \sa SDL_GetDisplays
849 */
850extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetCurrentDisplayMode(SDL_DisplayID displayID);
851
852/**
853 * Get the display containing a point.
854 *
855 * \param point the point to query.
856 * \returns the instance ID of the display containing the point or 0 on
857 * failure; call SDL_GetError() for more information.
858 *
859 * \threadsafety This function should only be called on the main thread.
860 *
861 * \since This function is available since SDL 3.2.0.
862 *
863 * \sa SDL_GetDisplayBounds
864 * \sa SDL_GetDisplays
865 */
866extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetDisplayForPoint(const SDL_Point *point);
867
868/**
869 * Get the display primarily containing a rect.
870 *
871 * \param rect the rect to query.
872 * \returns the instance ID of the display entirely containing the rect or
873 * closest to the center of the rect on success or 0 on failure; call
874 * SDL_GetError() for more information.
875 *
876 * \threadsafety This function should only be called on the main thread.
877 *
878 * \since This function is available since SDL 3.2.0.
879 *
880 * \sa SDL_GetDisplayBounds
881 * \sa SDL_GetDisplays
882 */
883extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetDisplayForRect(const SDL_Rect *rect);
884
885/**
886 * Get the display associated with a window.
887 *
888 * \param window the window to query.
889 * \returns the instance ID of the display containing the center of the window
890 * on success or 0 on failure; call SDL_GetError() for more
891 * information.
892 *
893 * \threadsafety This function should only be called on the main thread.
894 *
895 * \since This function is available since SDL 3.2.0.
896 *
897 * \sa SDL_GetDisplayBounds
898 * \sa SDL_GetDisplays
899 */
900extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetDisplayForWindow(SDL_Window *window);
901
902/**
903 * Get the pixel density of a window.
904 *
905 * This is a ratio of pixel size to window size. For example, if the window is
906 * 1920x1080 and it has a high density back buffer of 3840x2160 pixels, it
907 * would have a pixel density of 2.0.
908 *
909 * \param window the window to query.
910 * \returns the pixel density or 0.0f on failure; call SDL_GetError() for more
911 * information.
912 *
913 * \threadsafety This function should only be called on the main thread.
914 *
915 * \since This function is available since SDL 3.2.0.
916 *
917 * \sa SDL_GetWindowDisplayScale
918 */
919extern SDL_DECLSPEC float SDLCALL SDL_GetWindowPixelDensity(SDL_Window *window);
920
921/**
922 * Get the content display scale relative to a window's pixel size.
923 *
924 * This is a combination of the window pixel density and the display content
925 * scale, and is the expected scale for displaying content in this window. For
926 * example, if a 3840x2160 window had a display scale of 2.0, the user expects
927 * the content to take twice as many pixels and be the same physical size as
928 * if it were being displayed in a 1920x1080 window with a display scale of
929 * 1.0.
930 *
931 * Conceptually this value corresponds to the scale display setting, and is
932 * updated when that setting is changed, or the window moves to a display with
933 * a different scale setting.
934 *
935 * \param window the window to query.
936 * \returns the display scale, or 0.0f on failure; call SDL_GetError() for
937 * more information.
938 *
939 * \threadsafety This function should only be called on the main thread.
940 *
941 * \since This function is available since SDL 3.2.0.
942 */
943extern SDL_DECLSPEC float SDLCALL SDL_GetWindowDisplayScale(SDL_Window *window);
944
945/**
946 * Set the display mode to use when a window is visible and fullscreen.
947 *
948 * This only affects the display mode used when the window is fullscreen. To
949 * change the window size when the window is not fullscreen, use
950 * SDL_SetWindowSize().
951 *
952 * If the window is currently in the fullscreen state, this request is
953 * asynchronous on some windowing systems and the new mode dimensions may not
954 * be applied immediately upon the return of this function. If an immediate
955 * change is required, call SDL_SyncWindow() to block until the changes have
956 * taken effect.
957 *
958 * When the new mode takes effect, an SDL_EVENT_WINDOW_RESIZED and/or an
959 * SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event will be emitted with the new mode
960 * dimensions.
961 *
962 * \param window the window to affect.
963 * \param mode a pointer to the display mode to use, which can be NULL for
964 * borderless fullscreen desktop mode, or one of the fullscreen
965 * modes returned by SDL_GetFullscreenDisplayModes() to set an
966 * exclusive fullscreen mode.
967 * \returns true on success or false on failure; call SDL_GetError() for more
968 * information.
969 *
970 * \threadsafety This function should only be called on the main thread.
971 *
972 * \since This function is available since SDL 3.2.0.
973 *
974 * \sa SDL_GetWindowFullscreenMode
975 * \sa SDL_SetWindowFullscreen
976 * \sa SDL_SyncWindow
977 */
978extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowFullscreenMode(SDL_Window *window, const SDL_DisplayMode *mode);
979
980/**
981 * Query the display mode to use when a window is visible at fullscreen.
982 *
983 * \param window the window to query.
984 * \returns a pointer to the exclusive fullscreen mode to use or NULL for
985 * borderless fullscreen desktop mode.
986 *
987 * \threadsafety This function should only be called on the main thread.
988 *
989 * \since This function is available since SDL 3.2.0.
990 *
991 * \sa SDL_SetWindowFullscreenMode
992 * \sa SDL_SetWindowFullscreen
993 */
994extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetWindowFullscreenMode(SDL_Window *window);
995
996/**
997 * Get the raw ICC profile data for the screen the window is currently on.
998 *
999 * \param window the window to query.
1000 * \param size the size of the ICC profile.
1001 * \returns the raw ICC profile data on success or NULL on failure; call
1002 * SDL_GetError() for more information. This should be freed with
1003 * SDL_free() when it is no longer needed.
1004 *
1005 * \threadsafety This function should only be called on the main thread.
1006 *
1007 * \since This function is available since SDL 3.2.0.
1008 */
1009extern SDL_DECLSPEC void * SDLCALL SDL_GetWindowICCProfile(SDL_Window *window, size_t *size);
1010
1011/**
1012 * Get the pixel format associated with the window.
1013 *
1014 * \param window the window to query.
1015 * \returns the pixel format of the window on success or
1016 * SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more
1017 * information.
1018 *
1019 * \threadsafety This function should only be called on the main thread.
1020 *
1021 * \since This function is available since SDL 3.2.0.
1022 */
1023extern SDL_DECLSPEC SDL_PixelFormat SDLCALL SDL_GetWindowPixelFormat(SDL_Window *window);
1024
1025/**
1026 * Get a list of valid windows.
1027 *
1028 * \param count a pointer filled in with the number of windows returned, may
1029 * be NULL.
1030 * \returns a NULL terminated array of SDL_Window pointers or NULL on failure;
1031 * call SDL_GetError() for more information. This is a single
1032 * allocation that should be freed with SDL_free() when it is no
1033 * longer needed.
1034 *
1035 * \threadsafety This function should only be called on the main thread.
1036 *
1037 * \since This function is available since SDL 3.2.0.
1038 */
1039extern SDL_DECLSPEC SDL_Window ** SDLCALL SDL_GetWindows(int *count);
1040
1041/**
1042 * Create a window with the specified dimensions and flags.
1043 *
1044 * The window size is a request and may be different than expected based on
1045 * the desktop layout and window manager policies. Your application should be
1046 * prepared to handle a window of any size.
1047 *
1048 * `flags` may be any of the following OR'd together:
1049 *
1050 * - `SDL_WINDOW_FULLSCREEN`: fullscreen window at desktop resolution
1051 * - `SDL_WINDOW_OPENGL`: window usable with an OpenGL context
1052 * - `SDL_WINDOW_OCCLUDED`: window partially or completely obscured by another
1053 * window
1054 * - `SDL_WINDOW_HIDDEN`: window is not visible
1055 * - `SDL_WINDOW_BORDERLESS`: no window decoration
1056 * - `SDL_WINDOW_RESIZABLE`: window can be resized
1057 * - `SDL_WINDOW_MINIMIZED`: window is minimized
1058 * - `SDL_WINDOW_MAXIMIZED`: window is maximized
1059 * - `SDL_WINDOW_MOUSE_GRABBED`: window has grabbed mouse focus
1060 * - `SDL_WINDOW_INPUT_FOCUS`: window has input focus
1061 * - `SDL_WINDOW_MOUSE_FOCUS`: window has mouse focus
1062 * - `SDL_WINDOW_EXTERNAL`: window not created by SDL
1063 * - `SDL_WINDOW_MODAL`: window is modal
1064 * - `SDL_WINDOW_HIGH_PIXEL_DENSITY`: window uses high pixel density back
1065 * buffer if possible
1066 * - `SDL_WINDOW_MOUSE_CAPTURE`: window has mouse captured (unrelated to
1067 * MOUSE_GRABBED)
1068 * - `SDL_WINDOW_ALWAYS_ON_TOP`: window should always be above others
1069 * - `SDL_WINDOW_UTILITY`: window should be treated as a utility window, not
1070 * showing in the task bar and window list
1071 * - `SDL_WINDOW_TOOLTIP`: window should be treated as a tooltip and does not
1072 * get mouse or keyboard focus, requires a parent window
1073 * - `SDL_WINDOW_POPUP_MENU`: window should be treated as a popup menu,
1074 * requires a parent window
1075 * - `SDL_WINDOW_KEYBOARD_GRABBED`: window has grabbed keyboard input
1076 * - `SDL_WINDOW_VULKAN`: window usable with a Vulkan instance
1077 * - `SDL_WINDOW_METAL`: window usable with a Metal instance
1078 * - `SDL_WINDOW_TRANSPARENT`: window with transparent buffer
1079 * - `SDL_WINDOW_NOT_FOCUSABLE`: window should not be focusable
1080 *
1081 * The SDL_Window is implicitly shown if SDL_WINDOW_HIDDEN is not set.
1082 *
1083 * On Apple's macOS, you **must** set the NSHighResolutionCapable Info.plist
1084 * property to YES, otherwise you will not receive a High-DPI OpenGL canvas.
1085 *
1086 * The window pixel size may differ from its window coordinate size if the
1087 * window is on a high pixel density display. Use SDL_GetWindowSize() to query
1088 * the client area's size in window coordinates, and
1089 * SDL_GetWindowSizeInPixels() or SDL_GetRenderOutputSize() to query the
1090 * drawable size in pixels. Note that the drawable size can vary after the
1091 * window is created and should be queried again if you get an
1092 * SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event.
1093 *
1094 * If the window is created with any of the SDL_WINDOW_OPENGL or
1095 * SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
1096 * (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
1097 * corresponding UnloadLibrary function is called by SDL_DestroyWindow().
1098 *
1099 * If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
1100 * SDL_CreateWindow() will fail, because SDL_Vulkan_LoadLibrary() will fail.
1101 *
1102 * If SDL_WINDOW_METAL is specified on an OS that does not support Metal,
1103 * SDL_CreateWindow() will fail.
1104 *
1105 * If you intend to use this window with an SDL_Renderer, you should use
1106 * SDL_CreateWindowAndRenderer() instead of this function, to avoid window
1107 * flicker.
1108 *
1109 * On non-Apple devices, SDL requires you to either not link to the Vulkan
1110 * loader or link to a dynamic library version. This limitation may be removed
1111 * in a future version of SDL.
1112 *
1113 * \param title the title of the window, in UTF-8 encoding.
1114 * \param w the width of the window.
1115 * \param h the height of the window.
1116 * \param flags 0, or one or more SDL_WindowFlags OR'd together.
1117 * \returns the window that was created or NULL on failure; call
1118 * SDL_GetError() for more information.
1119 *
1120 * \threadsafety This function should only be called on the main thread.
1121 *
1122 * \since This function is available since SDL 3.2.0.
1123 *
1124 * \sa SDL_CreateWindowAndRenderer
1125 * \sa SDL_CreatePopupWindow
1126 * \sa SDL_CreateWindowWithProperties
1127 * \sa SDL_DestroyWindow
1128 */
1129extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title, int w, int h, SDL_WindowFlags flags);
1130
1131/**
1132 * Create a child popup window of the specified parent window.
1133 *
1134 * The window size is a request and may be different than expected based on
1135 * the desktop layout and window manager policies. Your application should be
1136 * prepared to handle a window of any size.
1137 *
1138 * The flags parameter **must** contain at least one of the following:
1139 *
1140 * - `SDL_WINDOW_TOOLTIP`: The popup window is a tooltip and will not pass any
1141 * input events.
1142 * - `SDL_WINDOW_POPUP_MENU`: The popup window is a popup menu. The topmost
1143 * popup menu will implicitly gain the keyboard focus.
1144 *
1145 * The following flags are not relevant to popup window creation and will be
1146 * ignored:
1147 *
1148 * - `SDL_WINDOW_MINIMIZED`
1149 * - `SDL_WINDOW_MAXIMIZED`
1150 * - `SDL_WINDOW_FULLSCREEN`
1151 * - `SDL_WINDOW_BORDERLESS`
1152 *
1153 * The following flags are incompatible with popup window creation and will
1154 * cause it to fail:
1155 *
1156 * - `SDL_WINDOW_UTILITY`
1157 * - `SDL_WINDOW_MODAL`
1158 *
1159 * The parent parameter **must** be non-null and a valid window. The parent of
1160 * a popup window can be either a regular, toplevel window, or another popup
1161 * window.
1162 *
1163 * Popup windows cannot be minimized, maximized, made fullscreen, raised,
1164 * flash, be made a modal window, be the parent of a toplevel window, or grab
1165 * the mouse and/or keyboard. Attempts to do so will fail.
1166 *
1167 * Popup windows implicitly do not have a border/decorations and do not appear
1168 * on the taskbar/dock or in lists of windows such as alt-tab menus.
1169 *
1170 * By default, popup window positions will automatically be constrained to keep
1171 * the entire window within display bounds. This can be overridden with the
1172 * `SDL_PROP_WINDOW_CREATE_CONSTRAIN_POPUP_BOOLEAN` property.
1173 *
1174 * By default, popup menus will automatically grab keyboard focus from the parent
1175 * when shown. This behavior can be overridden by setting the `SDL_WINDOW_NOT_FOCUSABLE`
1176 * flag, setting the `SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN` property to false, or
1177 * toggling it after creation via the `SDL_SetWindowFocusable()` function.
1178 *
1179 * If a parent window is hidden or destroyed, any child popup windows will be
1180 * recursively hidden or destroyed as well. Child popup windows not explicitly
1181 * hidden will be restored when the parent is shown.
1182 *
1183 * \param parent the parent of the window, must not be NULL.
1184 * \param offset_x the x position of the popup window relative to the origin
1185 * of the parent.
1186 * \param offset_y the y position of the popup window relative to the origin
1187 * of the parent window.
1188 * \param w the width of the window.
1189 * \param h the height of the window.
1190 * \param flags SDL_WINDOW_TOOLTIP or SDL_WINDOW_POPUP_MENU, and zero or more
1191 * additional SDL_WindowFlags OR'd together.
1192 * \returns the window that was created or NULL on failure; call
1193 * SDL_GetError() for more information.
1194 *
1195 * \threadsafety This function should only be called on the main thread.
1196 *
1197 * \since This function is available since SDL 3.2.0.
1198 *
1199 * \sa SDL_CreateWindow
1200 * \sa SDL_CreateWindowWithProperties
1201 * \sa SDL_DestroyWindow
1202 * \sa SDL_GetWindowParent
1203 */
1204extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreatePopupWindow(SDL_Window *parent, int offset_x, int offset_y, int w, int h, SDL_WindowFlags flags);
1205
1206/**
1207 * Create a window with the specified properties.
1208 *
1209 * The window size is a request and may be different than expected based on
1210 * the desktop layout and window manager policies. Your application should be
1211 * prepared to handle a window of any size.
1212 *
1213 * These are the supported properties:
1214 *
1215 * - `SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN`: true if the window should
1216 * be always on top
1217 * - `SDL_PROP_WINDOW_CREATE_BORDERLESS_BOOLEAN`: true if the window has no
1218 * window decoration
1219 * - `SDL_PROP_WINDOW_CREATE_CONSTRAIN_POPUP_BOOLEAN`: true if the "tooltip" and
1220 * "menu" window types should be automatically constrained to be entirely within
1221 * display bounds (default), false if no constraints on the position are desired.
1222 * - `SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN`: true if the
1223 * window will be used with an externally managed graphics context.
1224 * - `SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN`: true if the window should
1225 * accept keyboard input (defaults true)
1226 * - `SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN`: true if the window should
1227 * start in fullscreen mode at desktop resolution
1228 * - `SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER`: the height of the window
1229 * - `SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN`: true if the window should start
1230 * hidden
1231 * - `SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN`: true if the window
1232 * uses a high pixel density buffer if possible
1233 * - `SDL_PROP_WINDOW_CREATE_MAXIMIZED_BOOLEAN`: true if the window should
1234 * start maximized
1235 * - `SDL_PROP_WINDOW_CREATE_MENU_BOOLEAN`: true if the window is a popup menu
1236 * - `SDL_PROP_WINDOW_CREATE_METAL_BOOLEAN`: true if the window will be used
1237 * with Metal rendering
1238 * - `SDL_PROP_WINDOW_CREATE_MINIMIZED_BOOLEAN`: true if the window should
1239 * start minimized
1240 * - `SDL_PROP_WINDOW_CREATE_MODAL_BOOLEAN`: true if the window is modal to
1241 * its parent
1242 * - `SDL_PROP_WINDOW_CREATE_MOUSE_GRABBED_BOOLEAN`: true if the window starts
1243 * with grabbed mouse focus
1244 * - `SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN`: true if the window will be used
1245 * with OpenGL rendering
1246 * - `SDL_PROP_WINDOW_CREATE_PARENT_POINTER`: an SDL_Window that will be the
1247 * parent of this window, required for windows with the "tooltip", "menu",
1248 * and "modal" properties
1249 * - `SDL_PROP_WINDOW_CREATE_RESIZABLE_BOOLEAN`: true if the window should be
1250 * resizable
1251 * - `SDL_PROP_WINDOW_CREATE_TITLE_STRING`: the title of the window, in UTF-8
1252 * encoding
1253 * - `SDL_PROP_WINDOW_CREATE_TRANSPARENT_BOOLEAN`: true if the window show
1254 * transparent in the areas with alpha of 0
1255 * - `SDL_PROP_WINDOW_CREATE_TOOLTIP_BOOLEAN`: true if the window is a tooltip
1256 * - `SDL_PROP_WINDOW_CREATE_UTILITY_BOOLEAN`: true if the window is a utility
1257 * window, not showing in the task bar and window list
1258 * - `SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN`: true if the window will be used
1259 * with Vulkan rendering
1260 * - `SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER`: the width of the window
1261 * - `SDL_PROP_WINDOW_CREATE_X_NUMBER`: the x position of the window, or
1262 * `SDL_WINDOWPOS_CENTERED`, defaults to `SDL_WINDOWPOS_UNDEFINED`. This is
1263 * relative to the parent for windows with the "tooltip" or "menu" property
1264 * set.
1265 * - `SDL_PROP_WINDOW_CREATE_Y_NUMBER`: the y position of the window, or
1266 * `SDL_WINDOWPOS_CENTERED`, defaults to `SDL_WINDOWPOS_UNDEFINED`. This is
1267 * relative to the parent for windows with the "tooltip" or "menu" property
1268 * set.
1269 *
1270 * These are additional supported properties on macOS:
1271 *
1272 * - `SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER`: the
1273 * `(__unsafe_unretained)` NSWindow associated with the window, if you want
1274 * to wrap an existing window.
1275 * - `SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER`: the `(__unsafe_unretained)`
1276 * NSView associated with the window, defaults to `[window contentView]`
1277 *
1278 * These are additional supported properties on Wayland:
1279 *
1280 * - `SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN` - true if
1281 * the application wants to use the Wayland surface for a custom role and
1282 * does not want it attached to an XDG toplevel window. See
1283 * [README/wayland](README/wayland) for more information on using custom
1284 * surfaces.
1285 * - `SDL_PROP_WINDOW_CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN` - true if the
1286 * application wants an associated `wl_egl_window` object to be created and
1287 * attached to the window, even if the window does not have the OpenGL
1288 * property or `SDL_WINDOW_OPENGL` flag set.
1289 * - `SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER` - the wl_surface
1290 * associated with the window, if you want to wrap an existing window. See
1291 * [README/wayland](README/wayland) for more information.
1292 *
1293 * These are additional supported properties on Windows:
1294 *
1295 * - `SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER`: the HWND associated with the
1296 * window, if you want to wrap an existing window.
1297 * - `SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER`: optional,
1298 * another window to share pixel format with, useful for OpenGL windows
1299 *
1300 * These are additional supported properties with X11:
1301 *
1302 * - `SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER`: the X11 Window associated
1303 * with the window, if you want to wrap an existing window.
1304 *
1305 * The window is implicitly shown if the "hidden" property is not set.
1306 *
1307 * Windows with the "tooltip" and "menu" properties are popup windows and have
1308 * the behaviors and guidelines outlined in SDL_CreatePopupWindow().
1309 *
1310 * If this window is being created to be used with an SDL_Renderer, you should
1311 * not add a graphics API specific property
1312 * (`SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN`, etc), as SDL will handle that
1313 * internally when it chooses a renderer. However, SDL might need to recreate
1314 * your window at that point, which may cause the window to appear briefly,
1315 * and then flicker as it is recreated. The correct approach to this is to
1316 * create the window with the `SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN` property
1317 * set to true, then create the renderer, then show the window with
1318 * SDL_ShowWindow().
1319 *
1320 * \param props the properties to use.
1321 * \returns the window that was created or NULL on failure; call
1322 * SDL_GetError() for more information.
1323 *
1324 * \threadsafety This function should only be called on the main thread.
1325 *
1326 * \since This function is available since SDL 3.2.0.
1327 *
1328 * \sa SDL_CreateProperties
1329 * \sa SDL_CreateWindow
1330 * \sa SDL_DestroyWindow
1331 */
1332extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowWithProperties(SDL_PropertiesID props);
1333
1334#define SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN "SDL.window.create.always_on_top"
1335#define SDL_PROP_WINDOW_CREATE_BORDERLESS_BOOLEAN "SDL.window.create.borderless"
1336#define SDL_PROP_WINDOW_CREATE_CONSTRAIN_POPUP_BOOLEAN "SDL.window.create.constrain_popup"
1337#define SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN "SDL.window.create.focusable"
1338#define SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN "SDL.window.create.external_graphics_context"
1339#define SDL_PROP_WINDOW_CREATE_FLAGS_NUMBER "SDL.window.create.flags"
1340#define SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN "SDL.window.create.fullscreen"
1341#define SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER "SDL.window.create.height"
1342#define SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN "SDL.window.create.hidden"
1343#define SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN "SDL.window.create.high_pixel_density"
1344#define SDL_PROP_WINDOW_CREATE_MAXIMIZED_BOOLEAN "SDL.window.create.maximized"
1345#define SDL_PROP_WINDOW_CREATE_MENU_BOOLEAN "SDL.window.create.menu"
1346#define SDL_PROP_WINDOW_CREATE_METAL_BOOLEAN "SDL.window.create.metal"
1347#define SDL_PROP_WINDOW_CREATE_MINIMIZED_BOOLEAN "SDL.window.create.minimized"
1348#define SDL_PROP_WINDOW_CREATE_MODAL_BOOLEAN "SDL.window.create.modal"
1349#define SDL_PROP_WINDOW_CREATE_MOUSE_GRABBED_BOOLEAN "SDL.window.create.mouse_grabbed"
1350#define SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN "SDL.window.create.opengl"
1351#define SDL_PROP_WINDOW_CREATE_PARENT_POINTER "SDL.window.create.parent"
1352#define SDL_PROP_WINDOW_CREATE_RESIZABLE_BOOLEAN "SDL.window.create.resizable"
1353#define SDL_PROP_WINDOW_CREATE_TITLE_STRING "SDL.window.create.title"
1354#define SDL_PROP_WINDOW_CREATE_TRANSPARENT_BOOLEAN "SDL.window.create.transparent"
1355#define SDL_PROP_WINDOW_CREATE_TOOLTIP_BOOLEAN "SDL.window.create.tooltip"
1356#define SDL_PROP_WINDOW_CREATE_UTILITY_BOOLEAN "SDL.window.create.utility"
1357#define SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN "SDL.window.create.vulkan"
1358#define SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER "SDL.window.create.width"
1359#define SDL_PROP_WINDOW_CREATE_X_NUMBER "SDL.window.create.x"
1360#define SDL_PROP_WINDOW_CREATE_Y_NUMBER "SDL.window.create.y"
1361#define SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER "SDL.window.create.cocoa.window"
1362#define SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER "SDL.window.create.cocoa.view"
1363#define SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN "SDL.window.create.wayland.surface_role_custom"
1364#define SDL_PROP_WINDOW_CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN "SDL.window.create.wayland.create_egl_window"
1365#define SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER "SDL.window.create.wayland.wl_surface"
1366#define SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER "SDL.window.create.win32.hwnd"
1367#define SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER "SDL.window.create.win32.pixel_format_hwnd"
1368#define SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER "SDL.window.create.x11.window"
1369
1370/**
1371 * Get the numeric ID of a window.
1372 *
1373 * The numeric ID is what SDL_WindowEvent references, and is necessary to map
1374 * these events to specific SDL_Window objects.
1375 *
1376 * \param window the window to query.
1377 * \returns the ID of the window on success or 0 on failure; call
1378 * SDL_GetError() for more information.
1379 *
1380 * \threadsafety This function should only be called on the main thread.
1381 *
1382 * \since This function is available since SDL 3.2.0.
1383 *
1384 * \sa SDL_GetWindowFromID
1385 */
1386extern SDL_DECLSPEC SDL_WindowID SDLCALL SDL_GetWindowID(SDL_Window *window);
1387
1388/**
1389 * Get a window from a stored ID.
1390 *
1391 * The numeric ID is what SDL_WindowEvent references, and is necessary to map
1392 * these events to specific SDL_Window objects.
1393 *
1394 * \param id the ID of the window.
1395 * \returns the window associated with `id` or NULL if it doesn't exist; call
1396 * SDL_GetError() for more information.
1397 *
1398 * \threadsafety This function should only be called on the main thread.
1399 *
1400 * \since This function is available since SDL 3.2.0.
1401 *
1402 * \sa SDL_GetWindowID
1403 */
1404extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(SDL_WindowID id);
1405
1406/**
1407 * Get parent of a window.
1408 *
1409 * \param window the window to query.
1410 * \returns the parent of the window on success or NULL if the window has no
1411 * parent.
1412 *
1413 * \threadsafety This function should only be called on the main thread.
1414 *
1415 * \since This function is available since SDL 3.2.0.
1416 *
1417 * \sa SDL_CreatePopupWindow
1418 */
1419extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowParent(SDL_Window *window);
1420
1421/**
1422 * Get the properties associated with a window.
1423 *
1424 * The following read-only properties are provided by SDL:
1425 *
1426 * - `SDL_PROP_WINDOW_SHAPE_POINTER`: the surface associated with a shaped
1427 * window
1428 * - `SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN`: true if the window has HDR
1429 * headroom above the SDR white point. This property can change dynamically
1430 * when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
1431 * - `SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT`: the value of SDR white in the
1432 * SDL_COLORSPACE_SRGB_LINEAR colorspace. On Windows this corresponds to the
1433 * SDR white level in scRGB colorspace, and on Apple platforms this is
1434 * always 1.0 for EDR content. This property can change dynamically when
1435 * SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
1436 * - `SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT`: the additional high dynamic range
1437 * that can be displayed, in terms of the SDR white point. When HDR is not
1438 * enabled, this will be 1.0. This property can change dynamically when
1439 * SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
1440 *
1441 * On Android:
1442 *
1443 * - `SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER`: the ANativeWindow associated
1444 * with the window
1445 * - `SDL_PROP_WINDOW_ANDROID_SURFACE_POINTER`: the EGLSurface associated with
1446 * the window
1447 *
1448 * On iOS:
1449 *
1450 * - `SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER`: the `(__unsafe_unretained)`
1451 * UIWindow associated with the window
1452 * - `SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER`: the NSInteger tag
1453 * associated with metal views on the window
1454 * - `SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER`: the OpenGL view's
1455 * framebuffer object. It must be bound when rendering to the screen using
1456 * OpenGL.
1457 * - `SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER`: the OpenGL view's
1458 * renderbuffer object. It must be bound when SDL_GL_SwapWindow is called.
1459 * - `SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER`: the OpenGL
1460 * view's resolve framebuffer, when MSAA is used.
1461 *
1462 * On KMS/DRM:
1463 *
1464 * - `SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER`: the device index associated
1465 * with the window (e.g. the X in /dev/dri/cardX)
1466 * - `SDL_PROP_WINDOW_KMSDRM_DRM_FD_NUMBER`: the DRM FD associated with the
1467 * window
1468 * - `SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER`: the GBM device associated
1469 * with the window
1470 *
1471 * On macOS:
1472 *
1473 * - `SDL_PROP_WINDOW_COCOA_WINDOW_POINTER`: the `(__unsafe_unretained)`
1474 * NSWindow associated with the window
1475 * - `SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER`: the NSInteger tag
1476 * assocated with metal views on the window
1477 *
1478 * On OpenVR:
1479 *
1480 * - `SDL_PROP_WINDOW_OPENVR_OVERLAY_ID`: the OpenVR Overlay Handle ID for the
1481 * associated overlay window.
1482 *
1483 * On Vivante:
1484 *
1485 * - `SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER`: the EGLNativeDisplayType
1486 * associated with the window
1487 * - `SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER`: the EGLNativeWindowType
1488 * associated with the window
1489 * - `SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER`: the EGLSurface associated with
1490 * the window
1491 *
1492 * On Windows:
1493 *
1494 * - `SDL_PROP_WINDOW_WIN32_HWND_POINTER`: the HWND associated with the window
1495 * - `SDL_PROP_WINDOW_WIN32_HDC_POINTER`: the HDC associated with the window
1496 * - `SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER`: the HINSTANCE associated with
1497 * the window
1498 *
1499 * On Wayland:
1500 *
1501 * Note: The `xdg_*` window objects do not internally persist across window
1502 * show/hide calls. They will be null if the window is hidden and must be
1503 * queried each time it is shown.
1504 *
1505 * - `SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER`: the wl_display associated with
1506 * the window
1507 * - `SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER`: the wl_surface associated with
1508 * the window
1509 * - `SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER`: the wp_viewport associated
1510 * with the window
1511 * - `SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER`: the wl_egl_window
1512 * associated with the window
1513 * - `SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER`: the xdg_surface associated
1514 * with the window
1515 * - `SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER`: the xdg_toplevel role
1516 * associated with the window
1517 * - 'SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING': the export
1518 * handle associated with the window
1519 * - `SDL_PROP_WINDOW_WAYLAND_XDG_POPUP_POINTER`: the xdg_popup role
1520 * associated with the window
1521 * - `SDL_PROP_WINDOW_WAYLAND_XDG_POSITIONER_POINTER`: the xdg_positioner
1522 * associated with the window, in popup mode
1523 *
1524 * On X11:
1525 *
1526 * - `SDL_PROP_WINDOW_X11_DISPLAY_POINTER`: the X11 Display associated with
1527 * the window
1528 * - `SDL_PROP_WINDOW_X11_SCREEN_NUMBER`: the screen number associated with
1529 * the window
1530 * - `SDL_PROP_WINDOW_X11_WINDOW_NUMBER`: the X11 Window associated with the
1531 * window
1532 *
1533 * \param window the window to query.
1534 * \returns a valid property ID on success or 0 on failure; call
1535 * SDL_GetError() for more information.
1536 *
1537 * \threadsafety This function should only be called on the main thread.
1538 *
1539 * \since This function is available since SDL 3.2.0.
1540 */
1541extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window *window);
1542
1543#define SDL_PROP_WINDOW_SHAPE_POINTER "SDL.window.shape"
1544#define SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN "SDL.window.HDR_enabled"
1545#define SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT "SDL.window.SDR_white_level"
1546#define SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT "SDL.window.HDR_headroom"
1547#define SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER "SDL.window.android.window"
1548#define SDL_PROP_WINDOW_ANDROID_SURFACE_POINTER "SDL.window.android.surface"
1549#define SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER "SDL.window.uikit.window"
1550#define SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER "SDL.window.uikit.metal_view_tag"
1551#define SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER "SDL.window.uikit.opengl.framebuffer"
1552#define SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER "SDL.window.uikit.opengl.renderbuffer"
1553#define SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER "SDL.window.uikit.opengl.resolve_framebuffer"
1554#define SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER "SDL.window.kmsdrm.dev_index"
1555#define SDL_PROP_WINDOW_KMSDRM_DRM_FD_NUMBER "SDL.window.kmsdrm.drm_fd"
1556#define SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER "SDL.window.kmsdrm.gbm_dev"
1557#define SDL_PROP_WINDOW_COCOA_WINDOW_POINTER "SDL.window.cocoa.window"
1558#define SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER "SDL.window.cocoa.metal_view_tag"
1559#define SDL_PROP_WINDOW_OPENVR_OVERLAY_ID "SDL.window.openvr.overlay_id"
1560#define SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER "SDL.window.vivante.display"
1561#define SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER "SDL.window.vivante.window"
1562#define SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER "SDL.window.vivante.surface"
1563#define SDL_PROP_WINDOW_WIN32_HWND_POINTER "SDL.window.win32.hwnd"
1564#define SDL_PROP_WINDOW_WIN32_HDC_POINTER "SDL.window.win32.hdc"
1565#define SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER "SDL.window.win32.instance"
1566#define SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER "SDL.window.wayland.display"
1567#define SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER "SDL.window.wayland.surface"
1568#define SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER "SDL.window.wayland.viewport"
1569#define SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER "SDL.window.wayland.egl_window"
1570#define SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER "SDL.window.wayland.xdg_surface"
1571#define SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER "SDL.window.wayland.xdg_toplevel"
1572#define SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING "SDL.window.wayland.xdg_toplevel_export_handle"
1573#define SDL_PROP_WINDOW_WAYLAND_XDG_POPUP_POINTER "SDL.window.wayland.xdg_popup"
1574#define SDL_PROP_WINDOW_WAYLAND_XDG_POSITIONER_POINTER "SDL.window.wayland.xdg_positioner"
1575#define SDL_PROP_WINDOW_X11_DISPLAY_POINTER "SDL.window.x11.display"
1576#define SDL_PROP_WINDOW_X11_SCREEN_NUMBER "SDL.window.x11.screen"
1577#define SDL_PROP_WINDOW_X11_WINDOW_NUMBER "SDL.window.x11.window"
1578
1579/**
1580 * Get the window flags.
1581 *
1582 * \param window the window to query.
1583 * \returns a mask of the SDL_WindowFlags associated with `window`.
1584 *
1585 * \threadsafety This function should only be called on the main thread.
1586 *
1587 * \since This function is available since SDL 3.2.0.
1588 *
1589 * \sa SDL_CreateWindow
1590 * \sa SDL_HideWindow
1591 * \sa SDL_MaximizeWindow
1592 * \sa SDL_MinimizeWindow
1593 * \sa SDL_SetWindowFullscreen
1594 * \sa SDL_SetWindowMouseGrab
1595 * \sa SDL_ShowWindow
1596 */
1597extern SDL_DECLSPEC SDL_WindowFlags SDLCALL SDL_GetWindowFlags(SDL_Window *window);
1598
1599/**
1600 * Set the title of a window.
1601 *
1602 * This string is expected to be in UTF-8 encoding.
1603 *
1604 * \param window the window to change.
1605 * \param title the desired window title in UTF-8 format.
1606 * \returns true on success or false on failure; call SDL_GetError() for more
1607 * information.
1608 *
1609 * \threadsafety This function should only be called on the main thread.
1610 *
1611 * \since This function is available since SDL 3.2.0.
1612 *
1613 * \sa SDL_GetWindowTitle
1614 */
1615extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowTitle(SDL_Window *window, const char *title);
1616
1617/**
1618 * Get the title of a window.
1619 *
1620 * \param window the window to query.
1621 * \returns the title of the window in UTF-8 format or "" if there is no
1622 * title.
1623 *
1624 * \threadsafety This function should only be called on the main thread.
1625 *
1626 * \since This function is available since SDL 3.2.0.
1627 *
1628 * \sa SDL_SetWindowTitle
1629 */
1630extern SDL_DECLSPEC const char * SDLCALL SDL_GetWindowTitle(SDL_Window *window);
1631
1632/**
1633 * Set the icon for a window.
1634 *
1635 * If this function is passed a surface with alternate representations, the
1636 * surface will be interpreted as the content to be used for 100% display
1637 * scale, and the alternate representations will be used for high DPI
1638 * situations. For example, if the original surface is 32x32, then on a 2x
1639 * macOS display or 200% display scale on Windows, a 64x64 version of the
1640 * image will be used, if available. If a matching version of the image isn't
1641 * available, the closest larger size image will be downscaled to the
1642 * appropriate size and be used instead, if available. Otherwise, the closest
1643 * smaller image will be upscaled and be used instead.
1644 *
1645 * \param window the window to change.
1646 * \param icon an SDL_Surface structure containing the icon for the window.
1647 * \returns true on success or false on failure; call SDL_GetError() for more
1648 * information.
1649 *
1650 * \threadsafety This function should only be called on the main thread.
1651 *
1652 * \since This function is available since SDL 3.2.0.
1653 */
1654extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon);
1655
1656/**
1657 * Request that the window's position be set.
1658 *
1659 * If the window is in an exclusive fullscreen or maximized state, this
1660 * request has no effect.
1661 *
1662 * This can be used to reposition fullscreen-desktop windows onto a different
1663 * display, however, as exclusive fullscreen windows are locked to a specific
1664 * display, they can only be repositioned programmatically via
1665 * SDL_SetWindowFullscreenMode().
1666 *
1667 * On some windowing systems this request is asynchronous and the new
1668 * coordinates may not have have been applied immediately upon the return of
1669 * this function. If an immediate change is required, call SDL_SyncWindow() to
1670 * block until the changes have taken effect.
1671 *
1672 * When the window position changes, an SDL_EVENT_WINDOW_MOVED event will be
1673 * emitted with the window's new coordinates. Note that the new coordinates
1674 * may not match the exact coordinates requested, as some windowing systems
1675 * can restrict the position of the window in certain scenarios (e.g.
1676 * constraining the position so the window is always within desktop bounds).
1677 * Additionally, as this is just a request, it can be denied by the windowing
1678 * system.
1679 *
1680 * \param window the window to reposition.
1681 * \param x the x coordinate of the window, or `SDL_WINDOWPOS_CENTERED` or
1682 * `SDL_WINDOWPOS_UNDEFINED`.
1683 * \param y the y coordinate of the window, or `SDL_WINDOWPOS_CENTERED` or
1684 * `SDL_WINDOWPOS_UNDEFINED`.
1685 * \returns true on success or false on failure; call SDL_GetError() for more
1686 * information.
1687 *
1688 * \threadsafety This function should only be called on the main thread.
1689 *
1690 * \since This function is available since SDL 3.2.0.
1691 *
1692 * \sa SDL_GetWindowPosition
1693 * \sa SDL_SyncWindow
1694 */
1695extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowPosition(SDL_Window *window, int x, int y);
1696
1697/**
1698 * Get the position of a window.
1699 *
1700 * This is the current position of the window as last reported by the
1701 * windowing system.
1702 *
1703 * If you do not need the value for one of the positions a NULL may be passed
1704 * in the `x` or `y` parameter.
1705 *
1706 * \param window the window to query.
1707 * \param x a pointer filled in with the x position of the window, may be
1708 * NULL.
1709 * \param y a pointer filled in with the y position of the window, may be
1710 * NULL.
1711 * \returns true on success or false on failure; call SDL_GetError() for more
1712 * information.
1713 *
1714 * \threadsafety This function should only be called on the main thread.
1715 *
1716 * \since This function is available since SDL 3.2.0.
1717 *
1718 * \sa SDL_SetWindowPosition
1719 */
1720extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowPosition(SDL_Window *window, int *x, int *y);
1721
1722/**
1723 * Request that the size of a window's client area be set.
1724 *
1725 * If the window is in a fullscreen or maximized state, this request has no
1726 * effect.
1727 *
1728 * To change the exclusive fullscreen mode of a window, use
1729 * SDL_SetWindowFullscreenMode().
1730 *
1731 * On some windowing systems, this request is asynchronous and the new window
1732 * size may not have have been applied immediately upon the return of this
1733 * function. If an immediate change is required, call SDL_SyncWindow() to
1734 * block until the changes have taken effect.
1735 *
1736 * When the window size changes, an SDL_EVENT_WINDOW_RESIZED event will be
1737 * emitted with the new window dimensions. Note that the new dimensions may
1738 * not match the exact size requested, as some windowing systems can restrict
1739 * the window size in certain scenarios (e.g. constraining the size of the
1740 * content area to remain within the usable desktop bounds). Additionally, as
1741 * this is just a request, it can be denied by the windowing system.
1742 *
1743 * \param window the window to change.
1744 * \param w the width of the window, must be > 0.
1745 * \param h the height of the window, must be > 0.
1746 * \returns true on success or false on failure; call SDL_GetError() for more
1747 * information.
1748 *
1749 * \threadsafety This function should only be called on the main thread.
1750 *
1751 * \since This function is available since SDL 3.2.0.
1752 *
1753 * \sa SDL_GetWindowSize
1754 * \sa SDL_SetWindowFullscreenMode
1755 * \sa SDL_SyncWindow
1756 */
1757extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowSize(SDL_Window *window, int w, int h);
1758
1759/**
1760 * Get the size of a window's client area.
1761 *
1762 * The window pixel size may differ from its window coordinate size if the
1763 * window is on a high pixel density display. Use SDL_GetWindowSizeInPixels()
1764 * or SDL_GetRenderOutputSize() to get the real client area size in pixels.
1765 *
1766 * \param window the window to query the width and height from.
1767 * \param w a pointer filled in with the width of the window, may be NULL.
1768 * \param h a pointer filled in with the height of the window, may be NULL.
1769 * \returns true on success or false on failure; call SDL_GetError() for more
1770 * information.
1771 *
1772 * \threadsafety This function should only be called on the main thread.
1773 *
1774 * \since This function is available since SDL 3.2.0.
1775 *
1776 * \sa SDL_GetRenderOutputSize
1777 * \sa SDL_GetWindowSizeInPixels
1778 * \sa SDL_SetWindowSize
1779 */
1780extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSize(SDL_Window *window, int *w, int *h);
1781
1782/**
1783 * Get the safe area for this window.
1784 *
1785 * Some devices have portions of the screen which are partially obscured or
1786 * not interactive, possibly due to on-screen controls, curved edges, camera
1787 * notches, TV overscan, etc. This function provides the area of the window
1788 * which is safe to have interactable content. You should continue rendering
1789 * into the rest of the window, but it should not contain visually important
1790 * or interactible content.
1791 *
1792 * \param window the window to query.
1793 * \param rect a pointer filled in with the client area that is safe for
1794 * interactive content.
1795 * \returns true on success or false on failure; call SDL_GetError() for more
1796 * information.
1797 *
1798 * \threadsafety This function should only be called on the main thread.
1799 *
1800 * \since This function is available since SDL 3.2.0.
1801 */
1802extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSafeArea(SDL_Window *window, SDL_Rect *rect);
1803
1804/**
1805 * Request that the aspect ratio of a window's client area be set.
1806 *
1807 * The aspect ratio is the ratio of width divided by height, e.g. 2560x1600
1808 * would be 1.6. Larger aspect ratios are wider and smaller aspect ratios are
1809 * narrower.
1810 *
1811 * If, at the time of this request, the window in a fixed-size state, such as
1812 * maximized or fullscreen, the request will be deferred until the window
1813 * exits this state and becomes resizable again.
1814 *
1815 * On some windowing systems, this request is asynchronous and the new window
1816 * aspect ratio may not have have been applied immediately upon the return of
1817 * this function. If an immediate change is required, call SDL_SyncWindow() to
1818 * block until the changes have taken effect.
1819 *
1820 * When the window size changes, an SDL_EVENT_WINDOW_RESIZED event will be
1821 * emitted with the new window dimensions. Note that the new dimensions may
1822 * not match the exact aspect ratio requested, as some windowing systems can
1823 * restrict the window size in certain scenarios (e.g. constraining the size
1824 * of the content area to remain within the usable desktop bounds).
1825 * Additionally, as this is just a request, it can be denied by the windowing
1826 * system.
1827 *
1828 * \param window the window to change.
1829 * \param min_aspect the minimum aspect ratio of the window, or 0.0f for no
1830 * limit.
1831 * \param max_aspect the maximum aspect ratio of the window, or 0.0f for no
1832 * limit.
1833 * \returns true on success or false on failure; call SDL_GetError() for more
1834 * information.
1835 *
1836 * \threadsafety This function should only be called on the main thread.
1837 *
1838 * \since This function is available since SDL 3.2.0.
1839 *
1840 * \sa SDL_GetWindowAspectRatio
1841 * \sa SDL_SyncWindow
1842 */
1843extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowAspectRatio(SDL_Window *window, float min_aspect, float max_aspect);
1844
1845/**
1846 * Get the size of a window's client area.
1847 *
1848 * \param window the window to query the width and height from.
1849 * \param min_aspect a pointer filled in with the minimum aspect ratio of the
1850 * window, may be NULL.
1851 * \param max_aspect a pointer filled in with the maximum aspect ratio of the
1852 * window, may be NULL.
1853 * \returns true on success or false on failure; call SDL_GetError() for more
1854 * information.
1855 *
1856 * \threadsafety This function should only be called on the main thread.
1857 *
1858 * \since This function is available since SDL 3.2.0.
1859 *
1860 * \sa SDL_SetWindowAspectRatio
1861 */
1862extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowAspectRatio(SDL_Window *window, float *min_aspect, float *max_aspect);
1863
1864/**
1865 * Get the size of a window's borders (decorations) around the client area.
1866 *
1867 * Note: If this function fails (returns false), the size values will be
1868 * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as if the
1869 * window in question was borderless.
1870 *
1871 * Note: This function may fail on systems where the window has not yet been
1872 * decorated by the display server (for example, immediately after calling
1873 * SDL_CreateWindow). It is recommended that you wait at least until the
1874 * window has been presented and composited, so that the window system has a
1875 * chance to decorate the window and provide the border dimensions to SDL.
1876 *
1877 * This function also returns false if getting the information is not
1878 * supported.
1879 *
1880 * \param window the window to query the size values of the border
1881 * (decorations) from.
1882 * \param top pointer to variable for storing the size of the top border; NULL
1883 * is permitted.
1884 * \param left pointer to variable for storing the size of the left border;
1885 * NULL is permitted.
1886 * \param bottom pointer to variable for storing the size of the bottom
1887 * border; NULL is permitted.
1888 * \param right pointer to variable for storing the size of the right border;
1889 * NULL is permitted.
1890 * \returns true on success or false on failure; call SDL_GetError() for more
1891 * information.
1892 *
1893 * \threadsafety This function should only be called on the main thread.
1894 *
1895 * \since This function is available since SDL 3.2.0.
1896 *
1897 * \sa SDL_GetWindowSize
1898 */
1899extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right);
1900
1901/**
1902 * Get the size of a window's client area, in pixels.
1903 *
1904 * \param window the window from which the drawable size should be queried.
1905 * \param w a pointer to variable for storing the width in pixels, may be
1906 * NULL.
1907 * \param h a pointer to variable for storing the height in pixels, may be
1908 * NULL.
1909 * \returns true on success or false on failure; call SDL_GetError() for more
1910 * information.
1911 *
1912 * \threadsafety This function should only be called on the main thread.
1913 *
1914 * \since This function is available since SDL 3.2.0.
1915 *
1916 * \sa SDL_CreateWindow
1917 * \sa SDL_GetWindowSize
1918 */
1919extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h);
1920
1921/**
1922 * Set the minimum size of a window's client area.
1923 *
1924 * \param window the window to change.
1925 * \param min_w the minimum width of the window, or 0 for no limit.
1926 * \param min_h the minimum height of the window, or 0 for no limit.
1927 * \returns true on success or false on failure; call SDL_GetError() for more
1928 * information.
1929 *
1930 * \threadsafety This function should only be called on the main thread.
1931 *
1932 * \since This function is available since SDL 3.2.0.
1933 *
1934 * \sa SDL_GetWindowMinimumSize
1935 * \sa SDL_SetWindowMaximumSize
1936 */
1937extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h);
1938
1939/**
1940 * Get the minimum size of a window's client area.
1941 *
1942 * \param window the window to query.
1943 * \param w a pointer filled in with the minimum width of the window, may be
1944 * NULL.
1945 * \param h a pointer filled in with the minimum height of the window, may be
1946 * NULL.
1947 * \returns true on success or false on failure; call SDL_GetError() for more
1948 * information.
1949 *
1950 * \threadsafety This function should only be called on the main thread.
1951 *
1952 * \since This function is available since SDL 3.2.0.
1953 *
1954 * \sa SDL_GetWindowMaximumSize
1955 * \sa SDL_SetWindowMinimumSize
1956 */
1957extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h);
1958
1959/**
1960 * Set the maximum size of a window's client area.
1961 *
1962 * \param window the window to change.
1963 * \param max_w the maximum width of the window, or 0 for no limit.
1964 * \param max_h the maximum height of the window, or 0 for no limit.
1965 * \returns true on success or false on failure; call SDL_GetError() for more
1966 * information.
1967 *
1968 * \threadsafety This function should only be called on the main thread.
1969 *
1970 * \since This function is available since SDL 3.2.0.
1971 *
1972 * \sa SDL_GetWindowMaximumSize
1973 * \sa SDL_SetWindowMinimumSize
1974 */
1975extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h);
1976
1977/**
1978 * Get the maximum size of a window's client area.
1979 *
1980 * \param window the window to query.
1981 * \param w a pointer filled in with the maximum width of the window, may be
1982 * NULL.
1983 * \param h a pointer filled in with the maximum height of the window, may be
1984 * NULL.
1985 * \returns true on success or false on failure; call SDL_GetError() for more
1986 * information.
1987 *
1988 * \threadsafety This function should only be called on the main thread.
1989 *
1990 * \since This function is available since SDL 3.2.0.
1991 *
1992 * \sa SDL_GetWindowMinimumSize
1993 * \sa SDL_SetWindowMaximumSize
1994 */
1995extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h);
1996
1997/**
1998 * Set the border state of a window.
1999 *
2000 * This will add or remove the window's `SDL_WINDOW_BORDERLESS` flag and add
2001 * or remove the border from the actual window. This is a no-op if the
2002 * window's border already matches the requested state.
2003 *
2004 * You can't change the border state of a fullscreen window.
2005 *
2006 * \param window the window of which to change the border state.
2007 * \param bordered false to remove border, true to add border.
2008 * \returns true on success or false on failure; call SDL_GetError() for more
2009 * information.
2010 *
2011 * \threadsafety This function should only be called on the main thread.
2012 *
2013 * \since This function is available since SDL 3.2.0.
2014 *
2015 * \sa SDL_GetWindowFlags
2016 */
2017extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowBordered(SDL_Window *window, bool bordered);
2018
2019/**
2020 * Set the user-resizable state of a window.
2021 *
2022 * This will add or remove the window's `SDL_WINDOW_RESIZABLE` flag and
2023 * allow/disallow user resizing of the window. This is a no-op if the window's
2024 * resizable state already matches the requested state.
2025 *
2026 * You can't change the resizable state of a fullscreen window.
2027 *
2028 * \param window the window of which to change the resizable state.
2029 * \param resizable true to allow resizing, false to disallow.
2030 * \returns true on success or false on failure; call SDL_GetError() for more
2031 * information.
2032 *
2033 * \threadsafety This function should only be called on the main thread.
2034 *
2035 * \since This function is available since SDL 3.2.0.
2036 *
2037 * \sa SDL_GetWindowFlags
2038 */
2039extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowResizable(SDL_Window *window, bool resizable);
2040
2041/**
2042 * Set the window to always be above the others.
2043 *
2044 * This will add or remove the window's `SDL_WINDOW_ALWAYS_ON_TOP` flag. This
2045 * will bring the window to the front and keep the window above the rest.
2046 *
2047 * \param window the window of which to change the always on top state.
2048 * \param on_top true to set the window always on top, false to disable.
2049 * \returns true on success or false on failure; call SDL_GetError() for more
2050 * information.
2051 *
2052 * \threadsafety This function should only be called on the main thread.
2053 *
2054 * \since This function is available since SDL 3.2.0.
2055 *
2056 * \sa SDL_GetWindowFlags
2057 */
2058extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window *window, bool on_top);
2059
2060/**
2061 * Show a window.
2062 *
2063 * \param window the window to show.
2064 * \returns true on success or false on failure; call SDL_GetError() for more
2065 * information.
2066 *
2067 * \threadsafety This function should only be called on the main thread.
2068 *
2069 * \since This function is available since SDL 3.2.0.
2070 *
2071 * \sa SDL_HideWindow
2072 * \sa SDL_RaiseWindow
2073 */
2074extern SDL_DECLSPEC bool SDLCALL SDL_ShowWindow(SDL_Window *window);
2075
2076/**
2077 * Hide a window.
2078 *
2079 * \param window the window to hide.
2080 * \returns true on success or false on failure; call SDL_GetError() for more
2081 * information.
2082 *
2083 * \threadsafety This function should only be called on the main thread.
2084 *
2085 * \since This function is available since SDL 3.2.0.
2086 *
2087 * \sa SDL_ShowWindow
2088 * \sa SDL_WINDOW_HIDDEN
2089 */
2090extern SDL_DECLSPEC bool SDLCALL SDL_HideWindow(SDL_Window *window);
2091
2092/**
2093 * Request that a window be raised above other windows and gain the input
2094 * focus.
2095 *
2096 * The result of this request is subject to desktop window manager policy,
2097 * particularly if raising the requested window would result in stealing focus
2098 * from another application. If the window is successfully raised and gains
2099 * input focus, an SDL_EVENT_WINDOW_FOCUS_GAINED event will be emitted, and
2100 * the window will have the SDL_WINDOW_INPUT_FOCUS flag set.
2101 *
2102 * \param window the window to raise.
2103 * \returns true on success or false on failure; call SDL_GetError() for more
2104 * information.
2105 *
2106 * \threadsafety This function should only be called on the main thread.
2107 *
2108 * \since This function is available since SDL 3.2.0.
2109 */
2110extern SDL_DECLSPEC bool SDLCALL SDL_RaiseWindow(SDL_Window *window);
2111
2112/**
2113 * Request that the window be made as large as possible.
2114 *
2115 * Non-resizable windows can't be maximized. The window must have the
2116 * SDL_WINDOW_RESIZABLE flag set, or this will have no effect.
2117 *
2118 * On some windowing systems this request is asynchronous and the new window
2119 * state may not have have been applied immediately upon the return of this
2120 * function. If an immediate change is required, call SDL_SyncWindow() to
2121 * block until the changes have taken effect.
2122 *
2123 * When the window state changes, an SDL_EVENT_WINDOW_MAXIMIZED event will be
2124 * emitted. Note that, as this is just a request, the windowing system can
2125 * deny the state change.
2126 *
2127 * When maximizing a window, whether the constraints set via
2128 * SDL_SetWindowMaximumSize() are honored depends on the policy of the window
2129 * manager. Win32 and macOS enforce the constraints when maximizing, while X11
2130 * and Wayland window managers may vary.
2131 *
2132 * \param window the window to maximize.
2133 * \returns true on success or false on failure; call SDL_GetError() for more
2134 * information.
2135 *
2136 * \threadsafety This function should only be called on the main thread.
2137 *
2138 * \since This function is available since SDL 3.2.0.
2139 *
2140 * \sa SDL_MinimizeWindow
2141 * \sa SDL_RestoreWindow
2142 * \sa SDL_SyncWindow
2143 */
2144extern SDL_DECLSPEC bool SDLCALL SDL_MaximizeWindow(SDL_Window *window);
2145
2146/**
2147 * Request that the window be minimized to an iconic representation.
2148 *
2149 * If the window is in a fullscreen state, this request has no direct effect.
2150 * It may alter the state the window is returned to when leaving fullscreen.
2151 *
2152 * On some windowing systems this request is asynchronous and the new window
2153 * state may not have been applied immediately upon the return of this
2154 * function. If an immediate change is required, call SDL_SyncWindow() to
2155 * block until the changes have taken effect.
2156 *
2157 * When the window state changes, an SDL_EVENT_WINDOW_MINIMIZED event will be
2158 * emitted. Note that, as this is just a request, the windowing system can
2159 * deny the state change.
2160 *
2161 * \param window the window to minimize.
2162 * \returns true on success or false on failure; call SDL_GetError() for more
2163 * information.
2164 *
2165 * \threadsafety This function should only be called on the main thread.
2166 *
2167 * \since This function is available since SDL 3.2.0.
2168 *
2169 * \sa SDL_MaximizeWindow
2170 * \sa SDL_RestoreWindow
2171 * \sa SDL_SyncWindow
2172 */
2173extern SDL_DECLSPEC bool SDLCALL SDL_MinimizeWindow(SDL_Window *window);
2174
2175/**
2176 * Request that the size and position of a minimized or maximized window be
2177 * restored.
2178 *
2179 * If the window is in a fullscreen state, this request has no direct effect.
2180 * It may alter the state the window is returned to when leaving fullscreen.
2181 *
2182 * On some windowing systems this request is asynchronous and the new window
2183 * state may not have have been applied immediately upon the return of this
2184 * function. If an immediate change is required, call SDL_SyncWindow() to
2185 * block until the changes have taken effect.
2186 *
2187 * When the window state changes, an SDL_EVENT_WINDOW_RESTORED event will be
2188 * emitted. Note that, as this is just a request, the windowing system can
2189 * deny the state change.
2190 *
2191 * \param window the window to restore.
2192 * \returns true on success or false on failure; call SDL_GetError() for more
2193 * information.
2194 *
2195 * \threadsafety This function should only be called on the main thread.
2196 *
2197 * \since This function is available since SDL 3.2.0.
2198 *
2199 * \sa SDL_MaximizeWindow
2200 * \sa SDL_MinimizeWindow
2201 * \sa SDL_SyncWindow
2202 */
2203extern SDL_DECLSPEC bool SDLCALL SDL_RestoreWindow(SDL_Window *window);
2204
2205/**
2206 * Request that the window's fullscreen state be changed.
2207 *
2208 * By default a window in fullscreen state uses borderless fullscreen desktop
2209 * mode, but a specific exclusive display mode can be set using
2210 * SDL_SetWindowFullscreenMode().
2211 *
2212 * On some windowing systems this request is asynchronous and the new
2213 * fullscreen state may not have have been applied immediately upon the return
2214 * of this function. If an immediate change is required, call SDL_SyncWindow()
2215 * to block until the changes have taken effect.
2216 *
2217 * When the window state changes, an SDL_EVENT_WINDOW_ENTER_FULLSCREEN or
2218 * SDL_EVENT_WINDOW_LEAVE_FULLSCREEN event will be emitted. Note that, as this
2219 * is just a request, it can be denied by the windowing system.
2220 *
2221 * \param window the window to change.
2222 * \param fullscreen true for fullscreen mode, false for windowed mode.
2223 * \returns true on success or false on failure; call SDL_GetError() for more
2224 * information.
2225 *
2226 * \threadsafety This function should only be called on the main thread.
2227 *
2228 * \since This function is available since SDL 3.2.0.
2229 *
2230 * \sa SDL_GetWindowFullscreenMode
2231 * \sa SDL_SetWindowFullscreenMode
2232 * \sa SDL_SyncWindow
2233 * \sa SDL_WINDOW_FULLSCREEN
2234 */
2235extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowFullscreen(SDL_Window *window, bool fullscreen);
2236
2237/**
2238 * Block until any pending window state is finalized.
2239 *
2240 * On asynchronous windowing systems, this acts as a synchronization barrier
2241 * for pending window state. It will attempt to wait until any pending window
2242 * state has been applied and is guaranteed to return within finite time. Note
2243 * that for how long it can potentially block depends on the underlying window
2244 * system, as window state changes may involve somewhat lengthy animations
2245 * that must complete before the window is in its final requested state.
2246 *
2247 * On windowing systems where changes are immediate, this does nothing.
2248 *
2249 * \param window the window for which to wait for the pending state to be
2250 * applied.
2251 * \returns true on success or false if the operation timed out before the
2252 * window was in the requested state.
2253 *
2254 * \threadsafety This function should only be called on the main thread.
2255 *
2256 * \since This function is available since SDL 3.2.0.
2257 *
2258 * \sa SDL_SetWindowSize
2259 * \sa SDL_SetWindowPosition
2260 * \sa SDL_SetWindowFullscreen
2261 * \sa SDL_MinimizeWindow
2262 * \sa SDL_MaximizeWindow
2263 * \sa SDL_RestoreWindow
2264 * \sa SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS
2265 */
2266extern SDL_DECLSPEC bool SDLCALL SDL_SyncWindow(SDL_Window *window);
2267
2268/**
2269 * Return whether the window has a surface associated with it.
2270 *
2271 * \param window the window to query.
2272 * \returns true if there is a surface associated with the window, or false
2273 * otherwise.
2274 *
2275 * \threadsafety This function should only be called on the main thread.
2276 *
2277 * \since This function is available since SDL 3.2.0.
2278 *
2279 * \sa SDL_GetWindowSurface
2280 */
2281extern SDL_DECLSPEC bool SDLCALL SDL_WindowHasSurface(SDL_Window *window);
2282
2283/**
2284 * Get the SDL surface associated with the window.
2285 *
2286 * A new surface will be created with the optimal format for the window, if
2287 * necessary. This surface will be freed when the window is destroyed. Do not
2288 * free this surface.
2289 *
2290 * This surface will be invalidated if the window is resized. After resizing a
2291 * window this function must be called again to return a valid surface.
2292 *
2293 * You may not combine this with 3D or the rendering API on this window.
2294 *
2295 * This function is affected by `SDL_HINT_FRAMEBUFFER_ACCELERATION`.
2296 *
2297 * \param window the window to query.
2298 * \returns the surface associated with the window, or NULL on failure; call
2299 * SDL_GetError() for more information.
2300 *
2301 * \threadsafety This function should only be called on the main thread.
2302 *
2303 * \since This function is available since SDL 3.2.0.
2304 *
2305 * \sa SDL_DestroyWindowSurface
2306 * \sa SDL_WindowHasSurface
2307 * \sa SDL_UpdateWindowSurface
2308 * \sa SDL_UpdateWindowSurfaceRects
2309 */
2310extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window *window);
2311
2312/**
2313 * Toggle VSync for the window surface.
2314 *
2315 * When a window surface is created, vsync defaults to
2316 * SDL_WINDOW_SURFACE_VSYNC_DISABLED.
2317 *
2318 * The `vsync` parameter can be 1 to synchronize present with every vertical
2319 * refresh, 2 to synchronize present with every second vertical refresh, etc.,
2320 * SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync),
2321 * or SDL_WINDOW_SURFACE_VSYNC_DISABLED to disable. Not every value is
2322 * supported by every driver, so you should check the return value to see
2323 * whether the requested setting is supported.
2324 *
2325 * \param window the window.
2326 * \param vsync the vertical refresh sync interval.
2327 * \returns true on success or false on failure; call SDL_GetError() for more
2328 * information.
2329 *
2330 * \threadsafety This function should only be called on the main thread.
2331 *
2332 * \since This function is available since SDL 3.2.0.
2333 *
2334 * \sa SDL_GetWindowSurfaceVSync
2335 */
2336extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowSurfaceVSync(SDL_Window *window, int vsync);
2337
2338#define SDL_WINDOW_SURFACE_VSYNC_DISABLED 0
2339#define SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE (-1)
2340
2341/**
2342 * Get VSync for the window surface.
2343 *
2344 * \param window the window to query.
2345 * \param vsync an int filled with the current vertical refresh sync interval.
2346 * See SDL_SetWindowSurfaceVSync() for the meaning of the value.
2347 * \returns true on success or false on failure; call SDL_GetError() for more
2348 * information.
2349 *
2350 * \threadsafety This function should only be called on the main thread.
2351 *
2352 * \since This function is available since SDL 3.2.0.
2353 *
2354 * \sa SDL_SetWindowSurfaceVSync
2355 */
2356extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowSurfaceVSync(SDL_Window *window, int *vsync);
2357
2358/**
2359 * Copy the window surface to the screen.
2360 *
2361 * This is the function you use to reflect any changes to the surface on the
2362 * screen.
2363 *
2364 * This function is equivalent to the SDL 1.2 API SDL_Flip().
2365 *
2366 * \param window the window to update.
2367 * \returns true on success or false on failure; call SDL_GetError() for more
2368 * information.
2369 *
2370 * \threadsafety This function should only be called on the main thread.
2371 *
2372 * \since This function is available since SDL 3.2.0.
2373 *
2374 * \sa SDL_GetWindowSurface
2375 * \sa SDL_UpdateWindowSurfaceRects
2376 */
2377extern SDL_DECLSPEC bool SDLCALL SDL_UpdateWindowSurface(SDL_Window *window);
2378
2379/**
2380 * Copy areas of the window surface to the screen.
2381 *
2382 * This is the function you use to reflect changes to portions of the surface
2383 * on the screen.
2384 *
2385 * This function is equivalent to the SDL 1.2 API SDL_UpdateRects().
2386 *
2387 * Note that this function will update _at least_ the rectangles specified,
2388 * but this is only intended as an optimization; in practice, this might
2389 * update more of the screen (or all of the screen!), depending on what method
2390 * SDL uses to send pixels to the system.
2391 *
2392 * \param window the window to update.
2393 * \param rects an array of SDL_Rect structures representing areas of the
2394 * surface to copy, in pixels.
2395 * \param numrects the number of rectangles.
2396 * \returns true on success or false on failure; call SDL_GetError() for more
2397 * information.
2398 *
2399 * \threadsafety This function should only be called on the main thread.
2400 *
2401 * \since This function is available since SDL 3.2.0.
2402 *
2403 * \sa SDL_GetWindowSurface
2404 * \sa SDL_UpdateWindowSurface
2405 */
2406extern SDL_DECLSPEC bool SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, int numrects);
2407
2408/**
2409 * Destroy the surface associated with the window.
2410 *
2411 * \param window the window to update.
2412 * \returns true on success or false on failure; call SDL_GetError() for more
2413 * information.
2414 *
2415 * \threadsafety This function should only be called on the main thread.
2416 *
2417 * \since This function is available since SDL 3.2.0.
2418 *
2419 * \sa SDL_GetWindowSurface
2420 * \sa SDL_WindowHasSurface
2421 */
2422extern SDL_DECLSPEC bool SDLCALL SDL_DestroyWindowSurface(SDL_Window *window);
2423
2424/**
2425 * Set a window's keyboard grab mode.
2426 *
2427 * Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or
2428 * the Meta/Super key. Note that not all system keyboard shortcuts can be
2429 * captured by applications (one example is Ctrl+Alt+Del on Windows).
2430 *
2431 * This is primarily intended for specialized applications such as VNC clients
2432 * or VM frontends. Normal games should not use keyboard grab.
2433 *
2434 * When keyboard grab is enabled, SDL will continue to handle Alt+Tab when the
2435 * window is full-screen to ensure the user is not trapped in your
2436 * application. If you have a custom keyboard shortcut to exit fullscreen
2437 * mode, you may suppress this behavior with
2438 * `SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED`.
2439 *
2440 * If the caller enables a grab while another window is currently grabbed, the
2441 * other window loses its grab in favor of the caller's window.
2442 *
2443 * \param window the window for which the keyboard grab mode should be set.
2444 * \param grabbed this is true to grab keyboard, and false to release.
2445 * \returns true on success or false on failure; call SDL_GetError() for more
2446 * information.
2447 *
2448 * \threadsafety This function should only be called on the main thread.
2449 *
2450 * \since This function is available since SDL 3.2.0.
2451 *
2452 * \sa SDL_GetWindowKeyboardGrab
2453 * \sa SDL_SetWindowMouseGrab
2454 */
2455extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window *window, bool grabbed);
2456
2457/**
2458 * Set a window's mouse grab mode.
2459 *
2460 * Mouse grab confines the mouse cursor to the window.
2461 *
2462 * \param window the window for which the mouse grab mode should be set.
2463 * \param grabbed this is true to grab mouse, and false to release.
2464 * \returns true on success or false on failure; call SDL_GetError() for more
2465 * information.
2466 *
2467 * \threadsafety This function should only be called on the main thread.
2468 *
2469 * \since This function is available since SDL 3.2.0.
2470 *
2471 * \sa SDL_GetWindowMouseRect
2472 * \sa SDL_SetWindowMouseRect
2473 * \sa SDL_SetWindowMouseGrab
2474 * \sa SDL_SetWindowKeyboardGrab
2475 */
2476extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowMouseGrab(SDL_Window *window, bool grabbed);
2477
2478/**
2479 * Get a window's keyboard grab mode.
2480 *
2481 * \param window the window to query.
2482 * \returns true if keyboard is grabbed, and false otherwise.
2483 *
2484 * \threadsafety This function should only be called on the main thread.
2485 *
2486 * \since This function is available since SDL 3.2.0.
2487 *
2488 * \sa SDL_SetWindowKeyboardGrab
2489 */
2490extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window *window);
2491
2492/**
2493 * Get a window's mouse grab mode.
2494 *
2495 * \param window the window to query.
2496 * \returns true if mouse is grabbed, and false otherwise.
2497 *
2498 * \threadsafety This function should only be called on the main thread.
2499 *
2500 * \since This function is available since SDL 3.2.0.
2501 *
2502 * \sa SDL_GetWindowMouseRect
2503 * \sa SDL_SetWindowMouseRect
2504 * \sa SDL_SetWindowMouseGrab
2505 * \sa SDL_SetWindowKeyboardGrab
2506 */
2507extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window *window);
2508
2509/**
2510 * Get the window that currently has an input grab enabled.
2511 *
2512 * \returns the window if input is grabbed or NULL otherwise.
2513 *
2514 * \threadsafety This function should only be called on the main thread.
2515 *
2516 * \since This function is available since SDL 3.2.0.
2517 *
2518 * \sa SDL_SetWindowMouseGrab
2519 * \sa SDL_SetWindowKeyboardGrab
2520 */
2521extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
2522
2523/**
2524 * Confines the cursor to the specified area of a window.
2525 *
2526 * Note that this does NOT grab the cursor, it only defines the area a cursor
2527 * is restricted to when the window has mouse focus.
2528 *
2529 * \param window the window that will be associated with the barrier.
2530 * \param rect a rectangle area in window-relative coordinates. If NULL the
2531 * barrier for the specified window will be destroyed.
2532 * \returns true on success or false on failure; call SDL_GetError() for more
2533 * information.
2534 *
2535 * \threadsafety This function should only be called on the main thread.
2536 *
2537 * \since This function is available since SDL 3.2.0.
2538 *
2539 * \sa SDL_GetWindowMouseRect
2540 * \sa SDL_GetWindowMouseGrab
2541 * \sa SDL_SetWindowMouseGrab
2542 */
2543extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect);
2544
2545/**
2546 * Get the mouse confinement rectangle of a window.
2547 *
2548 * \param window the window to query.
2549 * \returns a pointer to the mouse confinement rectangle of a window, or NULL
2550 * if there isn't one.
2551 *
2552 * \threadsafety This function should only be called on the main thread.
2553 *
2554 * \since This function is available since SDL 3.2.0.
2555 *
2556 * \sa SDL_SetWindowMouseRect
2557 * \sa SDL_GetWindowMouseGrab
2558 * \sa SDL_SetWindowMouseGrab
2559 */
2560extern SDL_DECLSPEC const SDL_Rect * SDLCALL SDL_GetWindowMouseRect(SDL_Window *window);
2561
2562/**
2563 * Set the opacity for a window.
2564 *
2565 * The parameter `opacity` will be clamped internally between 0.0f
2566 * (transparent) and 1.0f (opaque).
2567 *
2568 * This function also returns false if setting the opacity isn't supported.
2569 *
2570 * \param window the window which will be made transparent or opaque.
2571 * \param opacity the opacity value (0.0f - transparent, 1.0f - opaque).
2572 * \returns true on success or false on failure; call SDL_GetError() for more
2573 * information.
2574 *
2575 * \threadsafety This function should only be called on the main thread.
2576 *
2577 * \since This function is available since SDL 3.2.0.
2578 *
2579 * \sa SDL_GetWindowOpacity
2580 */
2581extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowOpacity(SDL_Window *window, float opacity);
2582
2583/**
2584 * Get the opacity of a window.
2585 *
2586 * If transparency isn't supported on this platform, opacity will be returned
2587 * as 1.0f without error.
2588 *
2589 * \param window the window to get the current opacity value from.
2590 * \returns the opacity, (0.0f - transparent, 1.0f - opaque), or -1.0f on
2591 * failure; call SDL_GetError() for more information.
2592 *
2593 * \threadsafety This function should only be called on the main thread.
2594 *
2595 * \since This function is available since SDL 3.2.0.
2596 *
2597 * \sa SDL_SetWindowOpacity
2598 */
2599extern SDL_DECLSPEC float SDLCALL SDL_GetWindowOpacity(SDL_Window *window);
2600
2601/**
2602 * Set the window as a child of a parent window.
2603 *
2604 * If the window is already the child of an existing window, it will be
2605 * reparented to the new owner. Setting the parent window to NULL unparents
2606 * the window and removes child window status.
2607 *
2608 * If a parent window is hidden or destroyed, the operation will be
2609 * recursively applied to child windows. Child windows hidden with the parent
2610 * that did not have their hidden status explicitly set will be restored when
2611 * the parent is shown.
2612 *
2613 * Attempting to set the parent of a window that is currently in the modal
2614 * state will fail. Use SDL_SetWindowModal() to cancel the modal status before
2615 * attempting to change the parent.
2616 *
2617 * Popup windows cannot change parents and attempts to do so will fail.
2618 *
2619 * Setting a parent window that is currently the sibling or descendent of the
2620 * child window results in undefined behavior.
2621 *
2622 * \param window the window that should become the child of a parent.
2623 * \param parent the new parent window for the child window.
2624 * \returns true on success or false on failure; call SDL_GetError() for more
2625 * information.
2626 *
2627 * \threadsafety This function should only be called on the main thread.
2628 *
2629 * \since This function is available since SDL 3.2.0.
2630 *
2631 * \sa SDL_SetWindowModal
2632 */
2633extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowParent(SDL_Window *window, SDL_Window *parent);
2634
2635/**
2636 * Toggle the state of the window as modal.
2637 *
2638 * To enable modal status on a window, the window must currently be the child
2639 * window of a parent, or toggling modal status on will fail.
2640 *
2641 * \param window the window on which to set the modal state.
2642 * \param modal true to toggle modal status on, false to toggle it off.
2643 * \returns true on success or false on failure; call SDL_GetError() for more
2644 * information.
2645 *
2646 * \threadsafety This function should only be called on the main thread.
2647 *
2648 * \since This function is available since SDL 3.2.0.
2649 *
2650 * \sa SDL_SetWindowParent
2651 * \sa SDL_WINDOW_MODAL
2652 */
2653extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowModal(SDL_Window *window, bool modal);
2654
2655/**
2656 * Set whether the window may have input focus.
2657 *
2658 * \param window the window to set focusable state.
2659 * \param focusable true to allow input focus, false to not allow input focus.
2660 * \returns true on success or false on failure; call SDL_GetError() for more
2661 * information.
2662 *
2663 * \threadsafety This function should only be called on the main thread.
2664 *
2665 * \since This function is available since SDL 3.2.0.
2666 */
2667extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowFocusable(SDL_Window *window, bool focusable);
2668
2669
2670/**
2671 * Display the system-level window menu.
2672 *
2673 * This default window menu is provided by the system and on some platforms
2674 * provides functionality for setting or changing privileged state on the
2675 * window, such as moving it between workspaces or displays, or toggling the
2676 * always-on-top property.
2677 *
2678 * On platforms or desktops where this is unsupported, this function does
2679 * nothing.
2680 *
2681 * \param window the window for which the menu will be displayed.
2682 * \param x the x coordinate of the menu, relative to the origin (top-left) of
2683 * the client area.
2684 * \param y the y coordinate of the menu, relative to the origin (top-left) of
2685 * the client area.
2686 * \returns true on success or false on failure; call SDL_GetError() for more
2687 * information.
2688 *
2689 * \threadsafety This function should only be called on the main thread.
2690 *
2691 * \since This function is available since SDL 3.2.0.
2692 */
2693extern SDL_DECLSPEC bool SDLCALL SDL_ShowWindowSystemMenu(SDL_Window *window, int x, int y);
2694
2695/**
2696 * Possible return values from the SDL_HitTest callback.
2697 *
2698 * \threadsafety This function should only be called on the main thread.
2699 *
2700 * \since This enum is available since SDL 3.2.0.
2701 *
2702 * \sa SDL_HitTest
2703 */
2704typedef enum SDL_HitTestResult
2705{
2706 SDL_HITTEST_NORMAL, /**< Region is normal. No special properties. */
2707 SDL_HITTEST_DRAGGABLE, /**< Region can drag entire window. */
2708 SDL_HITTEST_RESIZE_TOPLEFT, /**< Region is the resizable top-left corner border. */
2709 SDL_HITTEST_RESIZE_TOP, /**< Region is the resizable top border. */
2710 SDL_HITTEST_RESIZE_TOPRIGHT, /**< Region is the resizable top-right corner border. */
2711 SDL_HITTEST_RESIZE_RIGHT, /**< Region is the resizable right border. */
2712 SDL_HITTEST_RESIZE_BOTTOMRIGHT, /**< Region is the resizable bottom-right corner border. */
2713 SDL_HITTEST_RESIZE_BOTTOM, /**< Region is the resizable bottom border. */
2714 SDL_HITTEST_RESIZE_BOTTOMLEFT, /**< Region is the resizable bottom-left corner border. */
2715 SDL_HITTEST_RESIZE_LEFT /**< Region is the resizable left border. */
2716} SDL_HitTestResult;
2717
2718/**
2719 * Callback used for hit-testing.
2720 *
2721 * \param win the SDL_Window where hit-testing was set on.
2722 * \param area an SDL_Point which should be hit-tested.
2723 * \param data what was passed as `callback_data` to SDL_SetWindowHitTest().
2724 * \returns an SDL_HitTestResult value.
2725 *
2726 * \sa SDL_SetWindowHitTest
2727 */
2728typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
2729 const SDL_Point *area,
2730 void *data);
2731
2732/**
2733 * Provide a callback that decides if a window region has special properties.
2734 *
2735 * Normally windows are dragged and resized by decorations provided by the
2736 * system window manager (a title bar, borders, etc), but for some apps, it
2737 * makes sense to drag them from somewhere else inside the window itself; for
2738 * example, one might have a borderless window that wants to be draggable from
2739 * any part, or simulate its own title bar, etc.
2740 *
2741 * This function lets the app provide a callback that designates pieces of a
2742 * given window as special. This callback is run during event processing if we
2743 * need to tell the OS to treat a region of the window specially; the use of
2744 * this callback is known as "hit testing."
2745 *
2746 * Mouse input may not be delivered to your application if it is within a
2747 * special area; the OS will often apply that input to moving the window or
2748 * resizing the window and not deliver it to the application.
2749 *
2750 * Specifying NULL for a callback disables hit-testing. Hit-testing is
2751 * disabled by default.
2752 *
2753 * Platforms that don't support this functionality will return false
2754 * unconditionally, even if you're attempting to disable hit-testing.
2755 *
2756 * Your callback may fire at any time, and its firing does not indicate any
2757 * specific behavior (for example, on Windows, this certainly might fire when
2758 * the OS is deciding whether to drag your window, but it fires for lots of
2759 * other reasons, too, some unrelated to anything you probably care about _and
2760 * when the mouse isn't actually at the location it is testing_). Since this
2761 * can fire at any time, you should try to keep your callback efficient,
2762 * devoid of allocations, etc.
2763 *
2764 * \param window the window to set hit-testing on.
2765 * \param callback the function to call when doing a hit-test.
2766 * \param callback_data an app-defined void pointer passed to **callback**.
2767 * \returns true on success or false on failure; call SDL_GetError() for more
2768 * information.
2769 *
2770 * \threadsafety This function should only be called on the main thread.
2771 *
2772 * \since This function is available since SDL 3.2.0.
2773 */
2774extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data);
2775
2776/**
2777 * Set the shape of a transparent window.
2778 *
2779 * This sets the alpha channel of a transparent window and any fully
2780 * transparent areas are also transparent to mouse clicks. If you are using
2781 * something besides the SDL render API, then you are responsible for drawing
2782 * the alpha channel of the window to match the shape alpha channel to get
2783 * consistent cross-platform results.
2784 *
2785 * The shape is copied inside this function, so you can free it afterwards. If
2786 * your shape surface changes, you should call SDL_SetWindowShape() again to
2787 * update the window. This is an expensive operation, so should be done
2788 * sparingly.
2789 *
2790 * The window must have been created with the SDL_WINDOW_TRANSPARENT flag.
2791 *
2792 * \param window the window.
2793 * \param shape the surface representing the shape of the window, or NULL to
2794 * remove any current shape.
2795 * \returns true on success or false on failure; call SDL_GetError() for more
2796 * information.
2797 *
2798 * \threadsafety This function should only be called on the main thread.
2799 *
2800 * \since This function is available since SDL 3.2.0.
2801 */
2802extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowShape(SDL_Window *window, SDL_Surface *shape);
2803
2804/**
2805 * Request a window to demand attention from the user.
2806 *
2807 * \param window the window to be flashed.
2808 * \param operation the operation to perform.
2809 * \returns true on success or false on failure; call SDL_GetError() for more
2810 * information.
2811 *
2812 * \threadsafety This function should only be called on the main thread.
2813 *
2814 * \since This function is available since SDL 3.2.0.
2815 */
2816extern SDL_DECLSPEC bool SDLCALL SDL_FlashWindow(SDL_Window *window, SDL_FlashOperation operation);
2817
2818/**
2819 * Destroy a window.
2820 *
2821 * Any child windows owned by the window will be recursively destroyed as
2822 * well.
2823 *
2824 * Note that on some platforms, the visible window may not actually be removed
2825 * from the screen until the SDL event loop is pumped again, even though the
2826 * SDL_Window is no longer valid after this call.
2827 *
2828 * \param window the window to destroy.
2829 *
2830 * \threadsafety This function should only be called on the main thread.
2831 *
2832 * \since This function is available since SDL 3.2.0.
2833 *
2834 * \sa SDL_CreatePopupWindow
2835 * \sa SDL_CreateWindow
2836 * \sa SDL_CreateWindowWithProperties
2837 */
2838extern SDL_DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window *window);
2839
2840
2841/**
2842 * Check whether the screensaver is currently enabled.
2843 *
2844 * The screensaver is disabled by default.
2845 *
2846 * The default can also be changed using `SDL_HINT_VIDEO_ALLOW_SCREENSAVER`.
2847 *
2848 * \returns true if the screensaver is enabled, false if it is disabled.
2849 *
2850 * \threadsafety This function should only be called on the main thread.
2851 *
2852 * \since This function is available since SDL 3.2.0.
2853 *
2854 * \sa SDL_DisableScreenSaver
2855 * \sa SDL_EnableScreenSaver
2856 */
2857extern SDL_DECLSPEC bool SDLCALL SDL_ScreenSaverEnabled(void);
2858
2859/**
2860 * Allow the screen to be blanked by a screen saver.
2861 *
2862 * \returns true on success or false on failure; call SDL_GetError() for more
2863 * information.
2864 *
2865 * \threadsafety This function should only be called on the main thread.
2866 *
2867 * \since This function is available since SDL 3.2.0.
2868 *
2869 * \sa SDL_DisableScreenSaver
2870 * \sa SDL_ScreenSaverEnabled
2871 */
2872extern SDL_DECLSPEC bool SDLCALL SDL_EnableScreenSaver(void);
2873
2874/**
2875 * Prevent the screen from being blanked by a screen saver.
2876 *
2877 * If you disable the screensaver, it is automatically re-enabled when SDL
2878 * quits.
2879 *
2880 * The screensaver is disabled by default, but this may by changed by
2881 * SDL_HINT_VIDEO_ALLOW_SCREENSAVER.
2882 *
2883 * \returns true on success or false on failure; call SDL_GetError() for more
2884 * information.
2885 *
2886 * \threadsafety This function should only be called on the main thread.
2887 *
2888 * \since This function is available since SDL 3.2.0.
2889 *
2890 * \sa SDL_EnableScreenSaver
2891 * \sa SDL_ScreenSaverEnabled
2892 */
2893extern SDL_DECLSPEC bool SDLCALL SDL_DisableScreenSaver(void);
2894
2895
2896/**
2897 * \name OpenGL support functions
2898 */
2899/* @{ */
2900
2901/**
2902 * Dynamically load an OpenGL library.
2903 *
2904 * This should be done after initializing the video driver, but before
2905 * creating any OpenGL windows. If no OpenGL library is loaded, the default
2906 * library will be loaded upon creation of the first OpenGL window.
2907 *
2908 * If you do this, you need to retrieve all of the GL functions used in your
2909 * program from the dynamic library using SDL_GL_GetProcAddress().
2910 *
2911 * \param path the platform dependent OpenGL library name, or NULL to open the
2912 * default OpenGL library.
2913 * \returns true on success or false on failure; call SDL_GetError() for more
2914 * information.
2915 *
2916 * \threadsafety This function should only be called on the main thread.
2917 *
2918 * \since This function is available since SDL 3.2.0.
2919 *
2920 * \sa SDL_GL_GetProcAddress
2921 * \sa SDL_GL_UnloadLibrary
2922 */
2923extern SDL_DECLSPEC bool SDLCALL SDL_GL_LoadLibrary(const char *path);
2924
2925/**
2926 * Get an OpenGL function by name.
2927 *
2928 * If the GL library is loaded at runtime with SDL_GL_LoadLibrary(), then all
2929 * GL functions must be retrieved this way. Usually this is used to retrieve
2930 * function pointers to OpenGL extensions.
2931 *
2932 * There are some quirks to looking up OpenGL functions that require some
2933 * extra care from the application. If you code carefully, you can handle
2934 * these quirks without any platform-specific code, though:
2935 *
2936 * - On Windows, function pointers are specific to the current GL context;
2937 * this means you need to have created a GL context and made it current
2938 * before calling SDL_GL_GetProcAddress(). If you recreate your context or
2939 * create a second context, you should assume that any existing function
2940 * pointers aren't valid to use with it. This is (currently) a
2941 * Windows-specific limitation, and in practice lots of drivers don't suffer
2942 * this limitation, but it is still the way the wgl API is documented to
2943 * work and you should expect crashes if you don't respect it. Store a copy
2944 * of the function pointers that comes and goes with context lifespan.
2945 * - On X11, function pointers returned by this function are valid for any
2946 * context, and can even be looked up before a context is created at all.
2947 * This means that, for at least some common OpenGL implementations, if you
2948 * look up a function that doesn't exist, you'll get a non-NULL result that
2949 * is _NOT_ safe to call. You must always make sure the function is actually
2950 * available for a given GL context before calling it, by checking for the
2951 * existence of the appropriate extension with SDL_GL_ExtensionSupported(),
2952 * or verifying that the version of OpenGL you're using offers the function
2953 * as core functionality.
2954 * - Some OpenGL drivers, on all platforms, *will* return NULL if a function
2955 * isn't supported, but you can't count on this behavior. Check for
2956 * extensions you use, and if you get a NULL anyway, act as if that
2957 * extension wasn't available. This is probably a bug in the driver, but you
2958 * can code defensively for this scenario anyhow.
2959 * - Just because you're on Linux/Unix, don't assume you'll be using X11.
2960 * Next-gen display servers are waiting to replace it, and may or may not
2961 * make the same promises about function pointers.
2962 * - OpenGL function pointers must be declared `APIENTRY` as in the example
2963 * code. This will ensure the proper calling convention is followed on
2964 * platforms where this matters (Win32) thereby avoiding stack corruption.
2965 *
2966 * \param proc the name of an OpenGL function.
2967 * \returns a pointer to the named OpenGL function. The returned pointer
2968 * should be cast to the appropriate function signature.
2969 *
2970 * \threadsafety This function should only be called on the main thread.
2971 *
2972 * \since This function is available since SDL 3.2.0.
2973 *
2974 * \sa SDL_GL_ExtensionSupported
2975 * \sa SDL_GL_LoadLibrary
2976 * \sa SDL_GL_UnloadLibrary
2977 */
2978extern SDL_DECLSPEC SDL_FunctionPointer SDLCALL SDL_GL_GetProcAddress(const char *proc);
2979
2980/**
2981 * Get an EGL library function by name.
2982 *
2983 * If an EGL library is loaded, this function allows applications to get entry
2984 * points for EGL functions. This is useful to provide to an EGL API and
2985 * extension loader.
2986 *
2987 * \param proc the name of an EGL function.
2988 * \returns a pointer to the named EGL function. The returned pointer should
2989 * be cast to the appropriate function signature.
2990 *
2991 * \threadsafety This function should only be called on the main thread.
2992 *
2993 * \since This function is available since SDL 3.2.0.
2994 *
2995 * \sa SDL_EGL_GetCurrentDisplay
2996 */
2997extern SDL_DECLSPEC SDL_FunctionPointer SDLCALL SDL_EGL_GetProcAddress(const char *proc);
2998
2999/**
3000 * Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
3001 *
3002 * \threadsafety This function should only be called on the main thread.
3003 *
3004 * \since This function is available since SDL 3.2.0.
3005 *
3006 * \sa SDL_GL_LoadLibrary
3007 */
3008extern SDL_DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
3009
3010/**
3011 * Check if an OpenGL extension is supported for the current context.
3012 *
3013 * This function operates on the current GL context; you must have created a
3014 * context and it must be current before calling this function. Do not assume
3015 * that all contexts you create will have the same set of extensions
3016 * available, or that recreating an existing context will offer the same
3017 * extensions again.
3018 *
3019 * While it's probably not a massive overhead, this function is not an O(1)
3020 * operation. Check the extensions you care about after creating the GL
3021 * context and save that information somewhere instead of calling the function
3022 * every time you need to know.
3023 *
3024 * \param extension the name of the extension to check.
3025 * \returns true if the extension is supported, false otherwise.
3026 *
3027 * \threadsafety This function should only be called on the main thread.
3028 *
3029 * \since This function is available since SDL 3.2.0.
3030 */
3031extern SDL_DECLSPEC bool SDLCALL SDL_GL_ExtensionSupported(const char *extension);
3032
3033/**
3034 * Reset all previously set OpenGL context attributes to their default values.
3035 *
3036 * \threadsafety This function should only be called on the main thread.
3037 *
3038 * \since This function is available since SDL 3.2.0.
3039 *
3040 * \sa SDL_GL_GetAttribute
3041 * \sa SDL_GL_SetAttribute
3042 */
3043extern SDL_DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
3044
3045/**
3046 * Set an OpenGL window attribute before window creation.
3047 *
3048 * This function sets the OpenGL attribute `attr` to `value`. The requested
3049 * attributes should be set before creating an OpenGL window. You should use
3050 * SDL_GL_GetAttribute() to check the values after creating the OpenGL
3051 * context, since the values obtained can differ from the requested ones.
3052 *
3053 * \param attr an SDL_GLAttr enum value specifying the OpenGL attribute to
3054 * set.
3055 * \param value the desired value for the attribute.
3056 * \returns true on success or false on failure; call SDL_GetError() for more
3057 * information.
3058 *
3059 * \threadsafety This function should only be called on the main thread.
3060 *
3061 * \since This function is available since SDL 3.2.0.
3062 *
3063 * \sa SDL_GL_GetAttribute
3064 * \sa SDL_GL_ResetAttributes
3065 */
3066extern SDL_DECLSPEC bool SDLCALL SDL_GL_SetAttribute(SDL_GLAttr attr, int value);
3067
3068/**
3069 * Get the actual value for an attribute from the current context.
3070 *
3071 * \param attr an SDL_GLAttr enum value specifying the OpenGL attribute to
3072 * get.
3073 * \param value a pointer filled in with the current value of `attr`.
3074 * \returns true on success or false on failure; call SDL_GetError() for more
3075 * information.
3076 *
3077 * \threadsafety This function should only be called on the main thread.
3078 *
3079 * \since This function is available since SDL 3.2.0.
3080 *
3081 * \sa SDL_GL_ResetAttributes
3082 * \sa SDL_GL_SetAttribute
3083 */
3084extern SDL_DECLSPEC bool SDLCALL SDL_GL_GetAttribute(SDL_GLAttr attr, int *value);
3085
3086/**
3087 * Create an OpenGL context for an OpenGL window, and make it current.
3088 *
3089 * Windows users new to OpenGL should note that, for historical reasons, GL
3090 * functions added after OpenGL version 1.1 are not available by default.
3091 * Those functions must be loaded at run-time, either with an OpenGL
3092 * extension-handling library or with SDL_GL_GetProcAddress() and its related
3093 * functions.
3094 *
3095 * SDL_GLContext is opaque to the application.
3096 *
3097 * \param window the window to associate with the context.
3098 * \returns the OpenGL context associated with `window` or NULL on failure;
3099 * call SDL_GetError() for more information.
3100 *
3101 * \threadsafety This function should only be called on the main thread.
3102 *
3103 * \since This function is available since SDL 3.2.0.
3104 *
3105 * \sa SDL_GL_DestroyContext
3106 * \sa SDL_GL_MakeCurrent
3107 */
3108extern SDL_DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *window);
3109
3110/**
3111 * Set up an OpenGL context for rendering into an OpenGL window.
3112 *
3113 * The context must have been created with a compatible window.
3114 *
3115 * \param window the window to associate with the context.
3116 * \param context the OpenGL context to associate with the window.
3117 * \returns true on success or false on failure; call SDL_GetError() for more
3118 * information.
3119 *
3120 * \threadsafety This function should only be called on the main thread.
3121 *
3122 * \since This function is available since SDL 3.2.0.
3123 *
3124 * \sa SDL_GL_CreateContext
3125 */
3126extern SDL_DECLSPEC bool SDLCALL SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context);
3127
3128/**
3129 * Get the currently active OpenGL window.
3130 *
3131 * \returns the currently active OpenGL window on success or NULL on failure;
3132 * call SDL_GetError() for more information.
3133 *
3134 * \threadsafety This function should only be called on the main thread.
3135 *
3136 * \since This function is available since SDL 3.2.0.
3137 */
3138extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GL_GetCurrentWindow(void);
3139
3140/**
3141 * Get the currently active OpenGL context.
3142 *
3143 * \returns the currently active OpenGL context or NULL on failure; call
3144 * SDL_GetError() for more information.
3145 *
3146 * \threadsafety This function should only be called on the main thread.
3147 *
3148 * \since This function is available since SDL 3.2.0.
3149 *
3150 * \sa SDL_GL_MakeCurrent
3151 */
3152extern SDL_DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
3153
3154/**
3155 * Get the currently active EGL display.
3156 *
3157 * \returns the currently active EGL display or NULL on failure; call
3158 * SDL_GetError() for more information.
3159 *
3160 * \threadsafety This function should only be called on the main thread.
3161 *
3162 * \since This function is available since SDL 3.2.0.
3163 */
3164extern SDL_DECLSPEC SDL_EGLDisplay SDLCALL SDL_EGL_GetCurrentDisplay(void);
3165
3166/**
3167 * Get the currently active EGL config.
3168 *
3169 * \returns the currently active EGL config or NULL on failure; call
3170 * SDL_GetError() for more information.
3171 *
3172 * \threadsafety This function should only be called on the main thread.
3173 *
3174 * \since This function is available since SDL 3.2.0.
3175 */
3176extern SDL_DECLSPEC SDL_EGLConfig SDLCALL SDL_EGL_GetCurrentConfig(void);
3177
3178/**
3179 * Get the EGL surface associated with the window.
3180 *
3181 * \param window the window to query.
3182 * \returns the EGLSurface pointer associated with the window, or NULL on
3183 * failure.
3184 *
3185 * \threadsafety This function should only be called on the main thread.
3186 *
3187 * \since This function is available since SDL 3.2.0.
3188 */
3189extern SDL_DECLSPEC SDL_EGLSurface SDLCALL SDL_EGL_GetWindowSurface(SDL_Window *window);
3190
3191/**
3192 * Sets the callbacks for defining custom EGLAttrib arrays for EGL
3193 * initialization.
3194 *
3195 * Callbacks that aren't needed can be set to NULL.
3196 *
3197 * NOTE: These callback pointers will be reset after SDL_GL_ResetAttributes.
3198 *
3199 * \param platformAttribCallback callback for attributes to pass to
3200 * eglGetPlatformDisplay. May be NULL.
3201 * \param surfaceAttribCallback callback for attributes to pass to
3202 * eglCreateSurface. May be NULL.
3203 * \param contextAttribCallback callback for attributes to pass to
3204 * eglCreateContext. May be NULL.
3205 * \param userdata a pointer that is passed to the callbacks.
3206 *
3207 * \threadsafety This function should only be called on the main thread.
3208 *
3209 * \since This function is available since SDL 3.2.0.
3210 */
3211extern SDL_DECLSPEC void SDLCALL SDL_EGL_SetAttributeCallbacks(SDL_EGLAttribArrayCallback platformAttribCallback,
3212 SDL_EGLIntArrayCallback surfaceAttribCallback,
3213 SDL_EGLIntArrayCallback contextAttribCallback, void *userdata);
3214
3215/**
3216 * Set the swap interval for the current OpenGL context.
3217 *
3218 * Some systems allow specifying -1 for the interval, to enable adaptive
3219 * vsync. Adaptive vsync works the same as vsync, but if you've already missed
3220 * the vertical retrace for a given frame, it swaps buffers immediately, which
3221 * might be less jarring for the user during occasional framerate drops. If an
3222 * application requests adaptive vsync and the system does not support it,
3223 * this function will fail and return false. In such a case, you should
3224 * probably retry the call with 1 for the interval.
3225 *
3226 * Adaptive vsync is implemented for some glX drivers with
3227 * GLX_EXT_swap_control_tear, and for some Windows drivers with
3228 * WGL_EXT_swap_control_tear.
3229 *
3230 * Read more on the Khronos wiki:
3231 * https://www.khronos.org/opengl/wiki/Swap_Interval#Adaptive_Vsync
3232 *
3233 * \param interval 0 for immediate updates, 1 for updates synchronized with
3234 * the vertical retrace, -1 for adaptive vsync.
3235 * \returns true on success or false on failure; call SDL_GetError() for more
3236 * information.
3237 *
3238 * \threadsafety This function should only be called on the main thread.
3239 *
3240 * \since This function is available since SDL 3.2.0.
3241 *
3242 * \sa SDL_GL_GetSwapInterval
3243 */
3244extern SDL_DECLSPEC bool SDLCALL SDL_GL_SetSwapInterval(int interval);
3245
3246/**
3247 * Get the swap interval for the current OpenGL context.
3248 *
3249 * If the system can't determine the swap interval, or there isn't a valid
3250 * current context, this function will set *interval to 0 as a safe default.
3251 *
3252 * \param interval output interval value. 0 if there is no vertical retrace
3253 * synchronization, 1 if the buffer swap is synchronized with
3254 * the vertical retrace, and -1 if late swaps happen
3255 * immediately instead of waiting for the next retrace.
3256 * \returns true on success or false on failure; call SDL_GetError() for more
3257 * information.
3258 *
3259 * \threadsafety This function should only be called on the main thread.
3260 *
3261 * \since This function is available since SDL 3.2.0.
3262 *
3263 * \sa SDL_GL_SetSwapInterval
3264 */
3265extern SDL_DECLSPEC bool SDLCALL SDL_GL_GetSwapInterval(int *interval);
3266
3267/**
3268 * Update a window with OpenGL rendering.
3269 *
3270 * This is used with double-buffered OpenGL contexts, which are the default.
3271 *
3272 * On macOS, make sure you bind 0 to the draw framebuffer before swapping the
3273 * window, otherwise nothing will happen. If you aren't using
3274 * glBindFramebuffer(), this is the default and you won't have to do anything
3275 * extra.
3276 *
3277 * \param window the window to change.
3278 * \returns true on success or false on failure; call SDL_GetError() for more
3279 * information.
3280 *
3281 * \threadsafety This function should only be called on the main thread.
3282 *
3283 * \since This function is available since SDL 3.2.0.
3284 */
3285extern SDL_DECLSPEC bool SDLCALL SDL_GL_SwapWindow(SDL_Window *window);
3286
3287/**
3288 * Delete an OpenGL context.
3289 *
3290 * \param context the OpenGL context to be deleted.
3291 * \returns true on success or false on failure; call SDL_GetError() for more
3292 * information.
3293 *
3294 * \threadsafety This function should only be called on the main thread.
3295 *
3296 * \since This function is available since SDL 3.2.0.
3297 *
3298 * \sa SDL_GL_CreateContext
3299 */
3300extern SDL_DECLSPEC bool SDLCALL SDL_GL_DestroyContext(SDL_GLContext context);
3301
3302/* @} *//* OpenGL support functions */
3303
3304
3305/* Ends C function definitions when using C++ */
3306#ifdef __cplusplus
3307}
3308#endif
3309#include <SDL3/SDL_close_code.h>
3310
3311#endif /* SDL_video_h_ */
diff --git a/src/contrib/SDL-3.2.20/include/SDL3/SDL_vulkan.h b/src/contrib/SDL-3.2.20/include/SDL3/SDL_vulkan.h
new file mode 100644
index 0000000..e91e148
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/include/SDL3/SDL_vulkan.h
@@ -0,0 +1,287 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 2017, Mark Callow
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryVulkan
24 *
25 * Functions for creating Vulkan surfaces on SDL windows.
26 *
27 * For the most part, Vulkan operates independent of SDL, but it benefits from
28 * a little support during setup.
29 *
30 * Use SDL_Vulkan_GetInstanceExtensions() to get platform-specific bits for
31 * creating a VkInstance, then SDL_Vulkan_GetVkGetInstanceProcAddr() to get
32 * the appropriate function for querying Vulkan entry points. Then
33 * SDL_Vulkan_CreateSurface() will get you the final pieces you need to
34 * prepare for rendering into an SDL_Window with Vulkan.
35 *
36 * Unlike OpenGL, most of the details of "context" creation and window buffer
37 * swapping are handled by the Vulkan API directly, so SDL doesn't provide
38 * Vulkan equivalents of SDL_GL_SwapWindow(), etc; they aren't necessary.
39 */
40
41#ifndef SDL_vulkan_h_
42#define SDL_vulkan_h_
43
44#include <SDL3/SDL_stdinc.h>
45#include <SDL3/SDL_error.h>
46#include <SDL3/SDL_video.h>
47
48#include <SDL3/SDL_begin_code.h>
49/* Set up for C function definitions, even when using C++ */
50#ifdef __cplusplus
51extern "C" {
52#endif
53
54/* Avoid including vulkan_core.h, don't define VkInstance if it's already included */
55#ifdef VULKAN_CORE_H_
56#define NO_SDL_VULKAN_TYPEDEFS
57#endif
58#ifndef NO_SDL_VULKAN_TYPEDEFS
59#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
60
61#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) || (defined(__riscv) && __riscv_xlen == 64)
62#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
63#else
64#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
65#endif
66
67VK_DEFINE_HANDLE(VkInstance)
68VK_DEFINE_HANDLE(VkPhysicalDevice)
69VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
70struct VkAllocationCallbacks;
71
72/* Make sure to undef to avoid issues in case of later vulkan include */
73#undef VK_DEFINE_HANDLE
74#undef VK_DEFINE_NON_DISPATCHABLE_HANDLE
75
76#endif /* !NO_SDL_VULKAN_TYPEDEFS */
77
78/**
79 * \name Vulkan support functions
80 */
81/* @{ */
82
83/**
84 * Dynamically load the Vulkan loader library.
85 *
86 * This should be called after initializing the video driver, but before
87 * creating any Vulkan windows. If no Vulkan loader library is loaded, the
88 * default library will be loaded upon creation of the first Vulkan window.
89 *
90 * SDL keeps a counter of how many times this function has been successfully
91 * called, so it is safe to call this function multiple times, so long as it
92 * is eventually paired with an equivalent number of calls to
93 * SDL_Vulkan_UnloadLibrary. The `path` argument is ignored unless there is no
94 * library currently loaded, and and the library isn't actually unloaded until
95 * there have been an equivalent number of calls to SDL_Vulkan_UnloadLibrary.
96 *
97 * It is fairly common for Vulkan applications to link with libvulkan instead
98 * of explicitly loading it at run time. This will work with SDL provided the
99 * application links to a dynamic library and both it and SDL use the same
100 * search path.
101 *
102 * If you specify a non-NULL `path`, an application should retrieve all of the
103 * Vulkan functions it uses from the dynamic library using
104 * SDL_Vulkan_GetVkGetInstanceProcAddr unless you can guarantee `path` points
105 * to the same vulkan loader library the application linked to.
106 *
107 * On Apple devices, if `path` is NULL, SDL will attempt to find the
108 * `vkGetInstanceProcAddr` address within all the Mach-O images of the current
109 * process. This is because it is fairly common for Vulkan applications to
110 * link with libvulkan (and historically MoltenVK was provided as a static
111 * library). If it is not found, on macOS, SDL will attempt to load
112 * `vulkan.framework/vulkan`, `libvulkan.1.dylib`,
113 * `MoltenVK.framework/MoltenVK`, and `libMoltenVK.dylib`, in that order. On
114 * iOS, SDL will attempt to load `libMoltenVK.dylib`. Applications using a
115 * dynamic framework or .dylib must ensure it is included in its application
116 * bundle.
117 *
118 * On non-Apple devices, application linking with a static libvulkan is not
119 * supported. Either do not link to the Vulkan loader or link to a dynamic
120 * library version.
121 *
122 * \param path the platform dependent Vulkan loader library name or NULL.
123 * \returns true on success or false on failure; call SDL_GetError() for more
124 * information.
125 *
126 * \threadsafety This function is not thread safe.
127 *
128 * \since This function is available since SDL 3.2.0.
129 *
130 * \sa SDL_Vulkan_GetVkGetInstanceProcAddr
131 * \sa SDL_Vulkan_UnloadLibrary
132 */
133extern SDL_DECLSPEC bool SDLCALL SDL_Vulkan_LoadLibrary(const char *path);
134
135/**
136 * Get the address of the `vkGetInstanceProcAddr` function.
137 *
138 * This should be called after either calling SDL_Vulkan_LoadLibrary() or
139 * creating an SDL_Window with the `SDL_WINDOW_VULKAN` flag.
140 *
141 * The actual type of the returned function pointer is
142 * PFN_vkGetInstanceProcAddr, but that isn't available because the Vulkan
143 * headers are not included here. You should cast the return value of this
144 * function to that type, e.g.
145 *
146 * `vkGetInstanceProcAddr =
147 * (PFN_vkGetInstanceProcAddr)SDL_Vulkan_GetVkGetInstanceProcAddr();`
148 *
149 * \returns the function pointer for `vkGetInstanceProcAddr` or NULL on
150 * failure; call SDL_GetError() for more information.
151 *
152 * \since This function is available since SDL 3.2.0.
153 */
154extern SDL_DECLSPEC SDL_FunctionPointer SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void);
155
156/**
157 * Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary().
158 *
159 * SDL keeps a counter of how many times this function has been called, so it
160 * is safe to call this function multiple times, so long as it is paired with
161 * an equivalent number of calls to SDL_Vulkan_LoadLibrary. The library isn't
162 * actually unloaded until there have been an equivalent number of calls to
163 * SDL_Vulkan_UnloadLibrary.
164 *
165 * Once the library has actually been unloaded, if any Vulkan instances
166 * remain, they will likely crash the program. Clean up any existing Vulkan
167 * resources, and destroy appropriate windows, renderers and GPU devices
168 * before calling this function.
169 *
170 * \threadsafety This function is not thread safe.
171 *
172 * \since This function is available since SDL 3.2.0.
173 *
174 * \sa SDL_Vulkan_LoadLibrary
175 */
176extern SDL_DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
177
178/**
179 * Get the Vulkan instance extensions needed for vkCreateInstance.
180 *
181 * This should be called after either calling SDL_Vulkan_LoadLibrary() or
182 * creating an SDL_Window with the `SDL_WINDOW_VULKAN` flag.
183 *
184 * On return, the variable pointed to by `count` will be set to the number of
185 * elements returned, suitable for using with
186 * VkInstanceCreateInfo::enabledExtensionCount, and the returned array can be
187 * used with VkInstanceCreateInfo::ppEnabledExtensionNames, for calling
188 * Vulkan's vkCreateInstance API.
189 *
190 * You should not free the returned array; it is owned by SDL.
191 *
192 * \param count a pointer filled in with the number of extensions returned.
193 * \returns an array of extension name strings on success, NULL on failure;
194 * call SDL_GetError() for more information.
195 *
196 * \since This function is available since SDL 3.2.0.
197 *
198 * \sa SDL_Vulkan_CreateSurface
199 */
200extern SDL_DECLSPEC char const * const * SDLCALL SDL_Vulkan_GetInstanceExtensions(Uint32 *count);
201
202/**
203 * Create a Vulkan rendering surface for a window.
204 *
205 * The `window` must have been created with the `SDL_WINDOW_VULKAN` flag and
206 * `instance` must have been created with extensions returned by
207 * SDL_Vulkan_GetInstanceExtensions() enabled.
208 *
209 * If `allocator` is NULL, Vulkan will use the system default allocator. This
210 * argument is passed directly to Vulkan and isn't used by SDL itself.
211 *
212 * \param window the window to which to attach the Vulkan surface.
213 * \param instance the Vulkan instance handle.
214 * \param allocator a VkAllocationCallbacks struct, which lets the app set the
215 * allocator that creates the surface. Can be NULL.
216 * \param surface a pointer to a VkSurfaceKHR handle to output the newly
217 * created surface.
218 * \returns true on success or false on failure; call SDL_GetError() for more
219 * information.
220 *
221 * \since This function is available since SDL 3.2.0.
222 *
223 * \sa SDL_Vulkan_GetInstanceExtensions
224 * \sa SDL_Vulkan_DestroySurface
225 */
226extern SDL_DECLSPEC bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window,
227 VkInstance instance,
228 const struct VkAllocationCallbacks *allocator,
229 VkSurfaceKHR *surface);
230
231/**
232 * Destroy the Vulkan rendering surface of a window.
233 *
234 * This should be called before SDL_DestroyWindow, if SDL_Vulkan_CreateSurface
235 * was called after SDL_CreateWindow.
236 *
237 * The `instance` must have been created with extensions returned by
238 * SDL_Vulkan_GetInstanceExtensions() enabled and `surface` must have been
239 * created successfully by an SDL_Vulkan_CreateSurface() call.
240 *
241 * If `allocator` is NULL, Vulkan will use the system default allocator. This
242 * argument is passed directly to Vulkan and isn't used by SDL itself.
243 *
244 * \param instance the Vulkan instance handle.
245 * \param surface vkSurfaceKHR handle to destroy.
246 * \param allocator a VkAllocationCallbacks struct, which lets the app set the
247 * allocator that destroys the surface. Can be NULL.
248 *
249 * \since This function is available since SDL 3.2.0.
250 *
251 * \sa SDL_Vulkan_GetInstanceExtensions
252 * \sa SDL_Vulkan_CreateSurface
253 */
254extern SDL_DECLSPEC void SDLCALL SDL_Vulkan_DestroySurface(VkInstance instance,
255 VkSurfaceKHR surface,
256 const struct VkAllocationCallbacks *allocator);
257
258/**
259 * Query support for presentation via a given physical device and queue
260 * family.
261 *
262 * The `instance` must have been created with extensions returned by
263 * SDL_Vulkan_GetInstanceExtensions() enabled.
264 *
265 * \param instance the Vulkan instance handle.
266 * \param physicalDevice a valid Vulkan physical device handle.
267 * \param queueFamilyIndex a valid queue family index for the given physical
268 * device.
269 * \returns true if supported, false if unsupported or an error occurred.
270 *
271 * \since This function is available since SDL 3.2.0.
272 *
273 * \sa SDL_Vulkan_GetInstanceExtensions
274 */
275extern SDL_DECLSPEC bool SDLCALL SDL_Vulkan_GetPresentationSupport(VkInstance instance,
276 VkPhysicalDevice physicalDevice,
277 Uint32 queueFamilyIndex);
278
279/* @} *//* Vulkan support functions */
280
281/* Ends C function definitions when using C++ */
282#ifdef __cplusplus
283}
284#endif
285#include <SDL3/SDL_close_code.h>
286
287#endif /* SDL_vulkan_h_ */