Logo

index : raylib-jai

---

  • summary
  • about
  • tree
  • log
  • branches
<< path: root/public/raylib-jai.git/html/Raylib/raylib/src/external/glfw/include/GLFW/glfw3native.h blob: 92f0d32444b06eacd192069c9bb47ab9866b3d97 [raw] [clear marker]

        
0/*************************************************************************
1 * GLFW 3.4 - www.glfw.org
2 * A library for OpenGL, window and input
3 *------------------------------------------------------------------------
4 * Copyright (c) 2002-2006 Marcus Geelnard
5 * Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
6 *
7 * This software is provided 'as-is', without any express or implied
8 * warranty. In no event will the authors be held liable for any damages
9 * arising from the use of this software.
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software. If you use this software
17 * in a product, an acknowledgment in the product documentation would
18 * be appreciated but is not required.
19 *
20 * 2. Altered source versions must be plainly marked as such, and must not
21 * be misrepresented as being the original software.
22 *
23 * 3. This notice may not be removed or altered from any source
24 * distribution.
25 *
26 *************************************************************************/
27
28#ifndef _glfw3_native_h_
29#define _glfw3_native_h_
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36/*************************************************************************
37 * Doxygen documentation
38 *************************************************************************/
39
40/*! @file glfw3native.h
41 * @brief The header of the native access functions.
42 *
43 * This is the header file of the native access functions. See @ref native for
44 * more information.
45 */
46/*! @defgroup native Native access
47 * @brief Functions related to accessing native handles.
48 *
49 * **By using the native access functions you assert that you know what you're
50 * doing and how to fix problems caused by using them. If you don't, you
51 * shouldn't be using them.**
52 *
53 * Before the inclusion of @ref glfw3native.h, you may define zero or more
54 * window system API macro and zero or more context creation API macros.
55 *
56 * The chosen backends must match those the library was compiled for. Failure
57 * to do this will cause a link-time error.
58 *
59 * The available window API macros are:
60 * * `GLFW_EXPOSE_NATIVE_WIN32`
61 * * `GLFW_EXPOSE_NATIVE_COCOA`
62 * * `GLFW_EXPOSE_NATIVE_X11`
63 * * `GLFW_EXPOSE_NATIVE_WAYLAND`
64 *
65 * The available context API macros are:
66 * * `GLFW_EXPOSE_NATIVE_WGL`
67 * * `GLFW_EXPOSE_NATIVE_NSGL`
68 * * `GLFW_EXPOSE_NATIVE_GLX`
69 * * `GLFW_EXPOSE_NATIVE_EGL`
70 * * `GLFW_EXPOSE_NATIVE_OSMESA`
71 *
72 * These macros select which of the native access functions that are declared
73 * and which platform-specific headers to include. It is then up your (by
74 * definition platform-specific) code to handle which of these should be
75 * defined.
76 *
77 * If you do not want the platform-specific headers to be included, define
78 * `GLFW_NATIVE_INCLUDE_NONE` before including the @ref glfw3native.h header.
79 *
80 * @code
81 * #define GLFW_EXPOSE_NATIVE_WIN32
82 * #define GLFW_EXPOSE_NATIVE_WGL
83 * #define GLFW_NATIVE_INCLUDE_NONE
84 * #include <GLFW/glfw3native.h>
85 * @endcode
86 */
87
88
89/*************************************************************************
90 * System headers and types
91 *************************************************************************/
92
93#if !defined(GLFW_NATIVE_INCLUDE_NONE)
94
95 #if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)
96 /* This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
97 * example to allow applications to correctly declare a GL_KHR_debug callback)
98 * but windows.h assumes no one will define APIENTRY before it does
99 */
100 #if defined(GLFW_APIENTRY_DEFINED)
101 #undef APIENTRY
102 #undef GLFW_APIENTRY_DEFINED
103 #endif
104 #include <windows.h>
105 #endif
106
107 #if defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
108 #if defined(__OBJC__)
109 #import <Cocoa/Cocoa.h>
110 #else
111 #include <ApplicationServices/ApplicationServices.h>
112 #include <objc/objc.h>
113 #endif
114 #endif
115
116 #if defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
117 #include <X11/Xlib.h>
118 #include <X11/extensions/Xrandr.h>
119 #endif
120
121 #if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
122 #include <wayland-client.h>
123 #endif
124
125 #if defined(GLFW_EXPOSE_NATIVE_WGL)
126 /* WGL is declared by windows.h */
127 #endif
128 #if defined(GLFW_EXPOSE_NATIVE_NSGL)
129 /* NSGL is declared by Cocoa.h */
130 #endif
131 #if defined(GLFW_EXPOSE_NATIVE_GLX)
132 /* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by
133 * default it also acts as an OpenGL header
134 * However, glx.h will include gl.h, which will define it unconditionally
135 */
136 #if defined(GLFW_GLAPIENTRY_DEFINED)
137 #undef GLAPIENTRY
138 #undef GLFW_GLAPIENTRY_DEFINED
139 #endif
140 #include <GL/glx.h>
141 #endif
142 #if defined(GLFW_EXPOSE_NATIVE_EGL)
143 #include <EGL/egl.h>
144 #endif
145 #if defined(GLFW_EXPOSE_NATIVE_OSMESA)
146 /* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by
147 * default it also acts as an OpenGL header
148 * However, osmesa.h will include gl.h, which will define it unconditionally
149 */
150 #if defined(GLFW_GLAPIENTRY_DEFINED)
151 #undef GLAPIENTRY
152 #undef GLFW_GLAPIENTRY_DEFINED
153 #endif
154 #include <GL/osmesa.h>
155 #endif
156
157#endif /*GLFW_NATIVE_INCLUDE_NONE*/
158
159
160/*************************************************************************
161 * Functions
162 *************************************************************************/
163
164#if defined(GLFW_EXPOSE_NATIVE_WIN32)
165/*! @brief Returns the adapter device name of the specified monitor.
166 *
167 * @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`)
168 * of the specified monitor, or `NULL` if an [error](@ref error_handling)
169 * occurred.
170 *
171 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
172 * GLFW_PLATFORM_UNAVAILABLE.
173 *
174 * @thread_safety This function may be called from any thread. Access is not
175 * synchronized.
176 *
177 * @since Added in version 3.1.
178 *
179 * @ingroup native
180 */
181GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
182
183/*! @brief Returns the display device name of the specified monitor.
184 *
185 * @return The UTF-8 encoded display device name (for example
186 * `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
187 * [error](@ref error_handling) occurred.
188 *
189 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
190 * GLFW_PLATFORM_UNAVAILABLE.
191 *
192 * @thread_safety This function may be called from any thread. Access is not
193 * synchronized.
194 *
195 * @since Added in version 3.1.
196 *
197 * @ingroup native
198 */
199GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
200
201/*! @brief Returns the `HWND` of the specified window.
202 *
203 * @return The `HWND` of the specified window, or `NULL` if an
204 * [error](@ref error_handling) occurred.
205 *
206 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
207 * GLFW_PLATFORM_UNAVAILABLE.
208 *
209 * @remark The `HDC` associated with the window can be queried with the
210 * [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
211 * function.
212 * @code
213 * HDC dc = GetDC(glfwGetWin32Window(window));
214 * @endcode
215 * This DC is private and does not need to be released.
216 *
217 * @thread_safety This function may be called from any thread. Access is not
218 * synchronized.
219 *
220 * @since Added in version 3.0.
221 *
222 * @ingroup native
223 */
224GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
225#endif
226
227#if defined(GLFW_EXPOSE_NATIVE_WGL)
228/*! @brief Returns the `HGLRC` of the specified window.
229 *
230 * @return The `HGLRC` of the specified window, or `NULL` if an
231 * [error](@ref error_handling) occurred.
232 *
233 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
234 * GLFW_PLATFORM_UNAVAILABLE and @ref GLFW_NO_WINDOW_CONTEXT.
235 *
236 * @remark The `HDC` associated with the window can be queried with the
237 * [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
238 * function.
239 * @code
240 * HDC dc = GetDC(glfwGetWin32Window(window));
241 * @endcode
242 * This DC is private and does not need to be released.
243 *
244 * @thread_safety This function may be called from any thread. Access is not
245 * synchronized.
246 *
247 * @since Added in version 3.0.
248 *
249 * @ingroup native
250 */
251GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
252#endif
253
254#if defined(GLFW_EXPOSE_NATIVE_COCOA)
255/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.
256 *
257 * @return The `CGDirectDisplayID` of the specified monitor, or
258 * `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
259 *
260 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
261 * GLFW_PLATFORM_UNAVAILABLE.
262 *
263 * @thread_safety This function may be called from any thread. Access is not
264 * synchronized.
265 *
266 * @since Added in version 3.1.
267 *
268 * @ingroup native
269 */
270GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
271
272/*! @brief Returns the `NSWindow` of the specified window.
273 *
274 * @return The `NSWindow` of the specified window, or `nil` if an
275 * [error](@ref error_handling) occurred.
276 *
277 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
278 * GLFW_PLATFORM_UNAVAILABLE.
279 *
280 * @thread_safety This function may be called from any thread. Access is not
281 * synchronized.
282 *
283 * @since Added in version 3.0.
284 *
285 * @ingroup native
286 */
287GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
288
289/*! @brief Returns the `NSView` of the specified window.
290 *
291 * @return The `NSView` of the specified window, or `nil` if an
292 * [error](@ref error_handling) occurred.
293 *
294 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
295 * GLFW_PLATFORM_UNAVAILABLE.
296 *
297 * @thread_safety This function may be called from any thread. Access is not
298 * synchronized.
299 *
300 * @since Added in version 3.4.
301 *
302 * @ingroup native
303 */
304GLFWAPI id glfwGetCocoaView(GLFWwindow* window);
305#endif
306
307#if defined(GLFW_EXPOSE_NATIVE_NSGL)
308/*! @brief Returns the `NSOpenGLContext` of the specified window.
309 *
310 * @return The `NSOpenGLContext` of the specified window, or `nil` if an
311 * [error](@ref error_handling) occurred.
312 *
313 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
314 * GLFW_PLATFORM_UNAVAILABLE and @ref GLFW_NO_WINDOW_CONTEXT.
315 *
316 * @thread_safety This function may be called from any thread. Access is not
317 * synchronized.
318 *
319 * @since Added in version 3.0.
320 *
321 * @ingroup native
322 */
323GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
324#endif
325
326#if defined(GLFW_EXPOSE_NATIVE_X11)
327/*! @brief Returns the `Display` used by GLFW.
328 *
329 * @return The `Display` used by GLFW, or `NULL` if an
330 * [error](@ref error_handling) occurred.
331 *
332 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
333 * GLFW_PLATFORM_UNAVAILABLE.
334 *
335 * @thread_safety This function may be called from any thread. Access is not
336 * synchronized.
337 *
338 * @since Added in version 3.0.
339 *
340 * @ingroup native
341 */
342GLFWAPI Display* glfwGetX11Display(void);
343
344/*! @brief Returns the `RRCrtc` of the specified monitor.
345 *
346 * @return The `RRCrtc` of the specified monitor, or `None` if an
347 * [error](@ref error_handling) occurred.
348 *
349 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
350 * GLFW_PLATFORM_UNAVAILABLE.
351 *
352 * @thread_safety This function may be called from any thread. Access is not
353 * synchronized.
354 *
355 * @since Added in version 3.1.
356 *
357 * @ingroup native
358 */
359GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
360
361/*! @brief Returns the `RROutput` of the specified monitor.
362 *
363 * @return The `RROutput` of the specified monitor, or `None` if an
364 * [error](@ref error_handling) occurred.
365 *
366 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
367 * GLFW_PLATFORM_UNAVAILABLE.
368 *
369 * @thread_safety This function may be called from any thread. Access is not
370 * synchronized.
371 *
372 * @since Added in version 3.1.
373 *
374 * @ingroup native
375 */
376GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
377
378/*! @brief Returns the `Window` of the specified window.
379 *
380 * @return The `Window` of the specified window, or `None` if an
381 * [error](@ref error_handling) occurred.
382 *
383 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
384 * GLFW_PLATFORM_UNAVAILABLE.
385 *
386 * @thread_safety This function may be called from any thread. Access is not
387 * synchronized.
388 *
389 * @since Added in version 3.0.
390 *
391 * @ingroup native
392 */
393GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
394
395/*! @brief Sets the current primary selection to the specified string.
396 *
397 * @param[in] string A UTF-8 encoded string.
398 *
399 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
400 * GLFW_PLATFORM_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
401 *
402 * @pointer_lifetime The specified string is copied before this function
403 * returns.
404 *
405 * @thread_safety This function must only be called from the main thread.
406 *
407 * @sa @ref clipboard
408 * @sa glfwGetX11SelectionString
409 * @sa glfwSetClipboardString
410 *
411 * @since Added in version 3.3.
412 *
413 * @ingroup native
414 */
415GLFWAPI void glfwSetX11SelectionString(const char* string);
416
417/*! @brief Returns the contents of the current primary selection as a string.
418 *
419 * If the selection is empty or if its contents cannot be converted, `NULL`
420 * is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated.
421 *
422 * @return The contents of the selection as a UTF-8 encoded string, or `NULL`
423 * if an [error](@ref error_handling) occurred.
424 *
425 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
426 * GLFW_PLATFORM_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.
427 *
428 * @pointer_lifetime The returned string is allocated and freed by GLFW. You
429 * should not free it yourself. It is valid until the next call to @ref
430 * glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the
431 * library is terminated.
432 *
433 * @thread_safety This function must only be called from the main thread.
434 *
435 * @sa @ref clipboard
436 * @sa glfwSetX11SelectionString
437 * @sa glfwGetClipboardString
438 *
439 * @since Added in version 3.3.
440 *
441 * @ingroup native
442 */
443GLFWAPI const char* glfwGetX11SelectionString(void);
444#endif
445
446#if defined(GLFW_EXPOSE_NATIVE_GLX)
447/*! @brief Returns the `GLXContext` of the specified window.
448 *
449 * @return The `GLXContext` of the specified window, or `NULL` if an
450 * [error](@ref error_handling) occurred.
451 *
452 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
453 * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_UNAVAILABLE.
454 *
455 * @thread_safety This function may be called from any thread. Access is not
456 * synchronized.
457 *
458 * @since Added in version 3.0.
459 *
460 * @ingroup native
461 */
462GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
463
464/*! @brief Returns the `GLXWindow` of the specified window.
465 *
466 * @return The `GLXWindow` of the specified window, or `None` if an
467 * [error](@ref error_handling) occurred.
468 *
469 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
470 * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_UNAVAILABLE.
471 *
472 * @thread_safety This function may be called from any thread. Access is not
473 * synchronized.
474 *
475 * @since Added in version 3.2.
476 *
477 * @ingroup native
478 */
479GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
480#endif
481
482#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
483/*! @brief Returns the `struct wl_display*` used by GLFW.
484 *
485 * @return The `struct wl_display*` used by GLFW, or `NULL` if an
486 * [error](@ref error_handling) occurred.
487 *
488 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
489 * GLFW_PLATFORM_UNAVAILABLE.
490 *
491 * @thread_safety This function may be called from any thread. Access is not
492 * synchronized.
493 *
494 * @since Added in version 3.2.
495 *
496 * @ingroup native
497 */
498GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
499
500/*! @brief Returns the `struct wl_output*` of the specified monitor.
501 *
502 * @return The `struct wl_output*` of the specified monitor, or `NULL` if an
503 * [error](@ref error_handling) occurred.
504 *
505 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
506 * GLFW_PLATFORM_UNAVAILABLE.
507 *
508 * @thread_safety This function may be called from any thread. Access is not
509 * synchronized.
510 *
511 * @since Added in version 3.2.
512 *
513 * @ingroup native
514 */
515GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
516
517/*! @brief Returns the main `struct wl_surface*` of the specified window.
518 *
519 * @return The main `struct wl_surface*` of the specified window, or `NULL` if
520 * an [error](@ref error_handling) occurred.
521 *
522 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
523 * GLFW_PLATFORM_UNAVAILABLE.
524 *
525 * @thread_safety This function may be called from any thread. Access is not
526 * synchronized.
527 *
528 * @since Added in version 3.2.
529 *
530 * @ingroup native
531 */
532GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
533#endif
534
535#if defined(GLFW_EXPOSE_NATIVE_EGL)
536/*! @brief Returns the `EGLDisplay` used by GLFW.
537 *
538 * @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
539 * [error](@ref error_handling) occurred.
540 *
541 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
542 *
543 * @remark Because EGL is initialized on demand, this function will return
544 * `EGL_NO_DISPLAY` until the first context has been created via EGL.
545 *
546 * @thread_safety This function may be called from any thread. Access is not
547 * synchronized.
548 *
549 * @since Added in version 3.0.
550 *
551 * @ingroup native
552 */
553GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
554
555/*! @brief Returns the `EGLContext` of the specified window.
556 *
557 * @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
558 * [error](@ref error_handling) occurred.
559 *
560 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
561 * GLFW_NO_WINDOW_CONTEXT.
562 *
563 * @thread_safety This function may be called from any thread. Access is not
564 * synchronized.
565 *
566 * @since Added in version 3.0.
567 *
568 * @ingroup native
569 */
570GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
571
572/*! @brief Returns the `EGLSurface` of the specified window.
573 *
574 * @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
575 * [error](@ref error_handling) occurred.
576 *
577 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
578 * GLFW_NO_WINDOW_CONTEXT.
579 *
580 * @thread_safety This function may be called from any thread. Access is not
581 * synchronized.
582 *
583 * @since Added in version 3.0.
584 *
585 * @ingroup native
586 */
587GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
588#endif
589
590#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
591/*! @brief Retrieves the color buffer associated with the specified window.
592 *
593 * @param[in] window The window whose color buffer to retrieve.
594 * @param[out] width Where to store the width of the color buffer, or `NULL`.
595 * @param[out] height Where to store the height of the color buffer, or `NULL`.
596 * @param[out] format Where to store the OSMesa pixel format of the color
597 * buffer, or `NULL`.
598 * @param[out] buffer Where to store the address of the color buffer, or
599 * `NULL`.
600 * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
601 * [error](@ref error_handling) occurred.
602 *
603 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
604 * GLFW_NO_WINDOW_CONTEXT.
605 *
606 * @thread_safety This function may be called from any thread. Access is not
607 * synchronized.
608 *
609 * @since Added in version 3.3.
610 *
611 * @ingroup native
612 */
613GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
614
615/*! @brief Retrieves the depth buffer associated with the specified window.
616 *
617 * @param[in] window The window whose depth buffer to retrieve.
618 * @param[out] width Where to store the width of the depth buffer, or `NULL`.
619 * @param[out] height Where to store the height of the depth buffer, or `NULL`.
620 * @param[out] bytesPerValue Where to store the number of bytes per depth
621 * buffer element, or `NULL`.
622 * @param[out] buffer Where to store the address of the depth buffer, or
623 * `NULL`.
624 * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
625 * [error](@ref error_handling) occurred.
626 *
627 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
628 * GLFW_NO_WINDOW_CONTEXT.
629 *
630 * @thread_safety This function may be called from any thread. Access is not
631 * synchronized.
632 *
633 * @since Added in version 3.3.
634 *
635 * @ingroup native
636 */
637GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
638
639/*! @brief Returns the `OSMesaContext` of the specified window.
640 *
641 * @return The `OSMesaContext` of the specified window, or `NULL` if an
642 * [error](@ref error_handling) occurred.
643 *
644 * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
645 * GLFW_NO_WINDOW_CONTEXT.
646 *
647 * @thread_safety This function may be called from any thread. Access is not
648 * synchronized.
649 *
650 * @since Added in version 3.3.
651 *
652 * @ingroup native
653 */
654GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
655#endif
656
657#ifdef __cplusplus
658}
659#endif
660
661#endif /* _glfw3_native_h_ */
662
663
Copyright 2026  E766CB298A6D1E64 | Git-Thing heavily inspired by cgit