By using the native access functions you assert that you know what you're doing and how to fix problems caused by using them. If you don't, you shouldn't be using them.
Before the inclusion of glfw3native.h, you may define zero or more window system API macro and zero or more context creation API macros.
The chosen backends must match those the library was compiled for. Failure to do this will cause a link-time error.
The available window API macros are:
The available context API macros are:
These macros select which of the native access functions that are declared and which platform-specific headers to include. It is then up your (by definition platform-specific) code to handle which of these should be defined.
If you do not want the platform-specific headers to be included, define GLFW_NATIVE_INCLUDE_NONE before including the glfw3native.h header.
Functions | |
| const char * | glfwGetWin32Adapter (GLFWmonitor *monitor) |
| Returns the adapter device name of the specified monitor. | |
| const char * | glfwGetWin32Monitor (GLFWmonitor *monitor) |
| Returns the display device name of the specified monitor. | |
| HWND | glfwGetWin32Window (GLFWwindow *window) |
| Returns the HWND of the specified window. | |
| HGLRC | glfwGetWGLContext (GLFWwindow *window) |
| Returns the HGLRC of the specified window. | |
| CGDirectDisplayID | glfwGetCocoaMonitor (GLFWmonitor *monitor) |
| Returns the CGDirectDisplayID of the specified monitor. | |
| id | glfwGetCocoaWindow (GLFWwindow *window) |
| Returns the NSWindow of the specified window. | |
| id | glfwGetCocoaView (GLFWwindow *window) |
| Returns the NSView of the specified window. | |
| id | glfwGetNSGLContext (GLFWwindow *window) |
| Returns the NSOpenGLContext of the specified window. | |
| Display * | glfwGetX11Display (void) |
| Returns the Display used by GLFW. | |
| RRCrtc | glfwGetX11Adapter (GLFWmonitor *monitor) |
| Returns the RRCrtc of the specified monitor. | |
| RROutput | glfwGetX11Monitor (GLFWmonitor *monitor) |
| Returns the RROutput of the specified monitor. | |
| Window | glfwGetX11Window (GLFWwindow *window) |
| Returns the Window of the specified window. | |
| void | glfwSetX11SelectionString (const char *string) |
| Sets the current primary selection to the specified string. | |
| const char * | glfwGetX11SelectionString (void) |
| Returns the contents of the current primary selection as a string. | |
| GLXContext | glfwGetGLXContext (GLFWwindow *window) |
| Returns the GLXContext of the specified window. | |
| GLXWindow | glfwGetGLXWindow (GLFWwindow *window) |
| Returns the GLXWindow of the specified window. | |
| struct wl_display * | glfwGetWaylandDisplay (void) |
| Returns the struct wl_display* used by GLFW. | |
| struct wl_output * | glfwGetWaylandMonitor (GLFWmonitor *monitor) |
| Returns the struct wl_output* of the specified monitor. | |
| struct wl_surface * | glfwGetWaylandWindow (GLFWwindow *window) |
| Returns the main struct wl_surface* of the specified window. | |
| EGLDisplay | glfwGetEGLDisplay (void) |
| Returns the EGLDisplay used by GLFW. | |
| EGLContext | glfwGetEGLContext (GLFWwindow *window) |
| Returns the EGLContext of the specified window. | |
| EGLSurface | glfwGetEGLSurface (GLFWwindow *window) |
| Returns the EGLSurface of the specified window. | |
| int | glfwGetOSMesaColorBuffer (GLFWwindow *window, int *width, int *height, int *format, void **buffer) |
| Retrieves the color buffer associated with the specified window. | |
| int | glfwGetOSMesaDepthBuffer (GLFWwindow *window, int *width, int *height, int *bytesPerValue, void **buffer) |
| Retrieves the depth buffer associated with the specified window. | |
| OSMesaContext | glfwGetOSMesaContext (GLFWwindow *window) |
| Returns the OSMesaContext of the specified window. | |
| const char * glfwGetWin32Adapter | ( | GLFWmonitor * | monitor | ) |
| const char * glfwGetWin32Monitor | ( | GLFWmonitor * | monitor | ) |
| HWND glfwGetWin32Window | ( | GLFWwindow * | window | ) |
| HGLRC glfwGetWGLContext | ( | GLFWwindow * | window | ) |
| CGDirectDisplayID glfwGetCocoaMonitor | ( | GLFWmonitor * | monitor | ) |
| id glfwGetCocoaWindow | ( | GLFWwindow * | window | ) |
| id glfwGetCocoaView | ( | GLFWwindow * | window | ) |
| id glfwGetNSGLContext | ( | GLFWwindow * | window | ) |
| Display * glfwGetX11Display | ( | void | ) |
| RRCrtc glfwGetX11Adapter | ( | GLFWmonitor * | monitor | ) |
| RROutput glfwGetX11Monitor | ( | GLFWmonitor * | monitor | ) |
| Window glfwGetX11Window | ( | GLFWwindow * | window | ) |
| void glfwSetX11SelectionString | ( | const char * | string | ) |
| [in] | string | A UTF-8 encoded string. |
| const char * glfwGetX11SelectionString | ( | void | ) |
If the selection is empty or if its contents cannot be converted, NULL is returned and a GLFW_FORMAT_UNAVAILABLE error is generated.
| GLXContext glfwGetGLXContext | ( | GLFWwindow * | window | ) |
| GLXWindow glfwGetGLXWindow | ( | GLFWwindow * | window | ) |
| struct wl_display * glfwGetWaylandDisplay | ( | void | ) |
| struct wl_output * glfwGetWaylandMonitor | ( | GLFWmonitor * | monitor | ) |
| struct wl_surface * glfwGetWaylandWindow | ( | GLFWwindow * | window | ) |
| EGLDisplay glfwGetEGLDisplay | ( | void | ) |
| EGLContext glfwGetEGLContext | ( | GLFWwindow * | window | ) |
| EGLSurface glfwGetEGLSurface | ( | GLFWwindow * | window | ) |
| int glfwGetOSMesaColorBuffer | ( | GLFWwindow * | window, |
| int * | width, | ||
| int * | height, | ||
| int * | format, | ||
| void ** | buffer ) |
| [in] | Window reference | The window whose color buffer to retrieve. |
| [out] | width | Where to store the width of the color buffer, or NULL. |
| [out] | height | Where to store the height of the color buffer, or NULL. |
| [out] | format | Where to store the OSMesa pixel format of the color buffer, or NULL. |
| [out] | buffer | Where to store the address of the color buffer, or NULL. |
| int glfwGetOSMesaDepthBuffer | ( | GLFWwindow * | window, |
| int * | width, | ||
| int * | height, | ||
| int * | bytesPerValue, | ||
| void ** | buffer ) |
| [in] | Window reference | The window whose depth buffer to retrieve. |
| [out] | width | Where to store the width of the depth buffer, or NULL. |
| [out] | height | Where to store the height of the depth buffer, or NULL. |
| [out] | bytesPerValue | Where to store the number of bytes per depth buffer element, or NULL. |
| [out] | buffer | Where to store the address of the depth buffer, or NULL. |
| OSMesaContext glfwGetOSMesaContext | ( | GLFWwindow * | window | ) |
Last update on for GLFW 3.4.0