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:
GLFW_EXPOSE_NATIVE_WIN32
GLFW_EXPOSE_NATIVE_COCOA
GLFW_EXPOSE_NATIVE_X11
GLFW_EXPOSE_NATIVE_WAYLAND
The available context API macros are:
GLFW_EXPOSE_NATIVE_WGL
GLFW_EXPOSE_NATIVE_NSGL
GLFW_EXPOSE_NATIVE_GLX
GLFW_EXPOSE_NATIVE_EGL
GLFW_EXPOSE_NATIVE_OSMESA
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.
Functions | |
const char * | glfwGetWin32Adapter (GLFWmonitor *monitor) |
Returns the adapter device name of the specified monitor. More... | |
const char * | glfwGetWin32Monitor (GLFWmonitor *monitor) |
Returns the display device name of the specified monitor. More... | |
HWND | glfwGetWin32Window (GLFWwindow *window) |
Returns the HWND of the specified window. More... | |
HGLRC | glfwGetWGLContext (GLFWwindow *window) |
Returns the HGLRC of the specified window. More... | |
CGDirectDisplayID | glfwGetCocoaMonitor (GLFWmonitor *monitor) |
Returns the CGDirectDisplayID of the specified monitor. More... | |
id | glfwGetCocoaWindow (GLFWwindow *window) |
Returns the NSWindow of the specified window. More... | |
id | glfwGetNSGLContext (GLFWwindow *window) |
Returns the NSOpenGLContext of the specified window. More... | |
Display * | glfwGetX11Display (void) |
Returns the Display used by GLFW. More... | |
RRCrtc | glfwGetX11Adapter (GLFWmonitor *monitor) |
Returns the RRCrtc of the specified monitor. More... | |
RROutput | glfwGetX11Monitor (GLFWmonitor *monitor) |
Returns the RROutput of the specified monitor. More... | |
Window | glfwGetX11Window (GLFWwindow *window) |
Returns the Window of the specified window. More... | |
void | glfwSetX11SelectionString (const char *string) |
Sets the current primary selection to the specified string. More... | |
const char * | glfwGetX11SelectionString (void) |
Returns the contents of the current primary selection as a string. More... | |
GLXContext | glfwGetGLXContext (GLFWwindow *window) |
Returns the GLXContext of the specified window. More... | |
GLXWindow | glfwGetGLXWindow (GLFWwindow *window) |
Returns the GLXWindow of the specified window. More... | |
struct wl_display * | glfwGetWaylandDisplay (void) |
Returns the struct wl_display* used by GLFW. More... | |
struct wl_output * | glfwGetWaylandMonitor (GLFWmonitor *monitor) |
Returns the struct wl_output* of the specified monitor. More... | |
struct wl_surface * | glfwGetWaylandWindow (GLFWwindow *window) |
Returns the main struct wl_surface* of the specified window. More... | |
EGLDisplay | glfwGetEGLDisplay (void) |
Returns the EGLDisplay used by GLFW. More... | |
EGLContext | glfwGetEGLContext (GLFWwindow *window) |
Returns the EGLContext of the specified window. More... | |
EGLSurface | glfwGetEGLSurface (GLFWwindow *window) |
Returns the EGLSurface of the specified window. More... | |
int | glfwGetOSMesaColorBuffer (GLFWwindow *window, int *width, int *height, int *format, void **buffer) |
Retrieves the color buffer associated with the specified window. More... | |
int | glfwGetOSMesaDepthBuffer (GLFWwindow *window, int *width, int *height, int *bytesPerValue, void **buffer) |
Retrieves the depth buffer associated with the specified window. More... | |
OSMesaContext | glfwGetOSMesaContext (GLFWwindow *window) |
Returns the OSMesaContext of the specified window. More... | |
const char * glfwGetWin32Adapter | ( | GLFWmonitor * | monitor | ) |
\\.\DISPLAY1
) of the specified monitor, or NULL
if an error occurred.const char * glfwGetWin32Monitor | ( | GLFWmonitor * | monitor | ) |
\\.\DISPLAY1\Monitor0
) of the specified monitor, or NULL
if an error occurred.HWND glfwGetWin32Window | ( | GLFWwindow * | window | ) |
HWND
of the specified window, or NULL
if an error occurred.HDC
associated with the window can be queried with the GetDC function. HGLRC glfwGetWGLContext | ( | GLFWwindow * | window | ) |
HGLRC
of the specified window, or NULL
if an error occurred.HDC
associated with the window can be queried with the GetDC function. CGDirectDisplayID glfwGetCocoaMonitor | ( | GLFWmonitor * | monitor | ) |
CGDirectDisplayID
of the specified monitor, or kCGNullDirectDisplay
if an error occurred.id glfwGetCocoaWindow | ( | GLFWwindow * | window | ) |
NSWindow
of the specified window, or nil
if an error occurred.id glfwGetNSGLContext | ( | GLFWwindow * | window | ) |
NSOpenGLContext
of the specified window, or nil
if an error occurred.Display * glfwGetX11Display | ( | void | ) |
Display
used by GLFW, or NULL
if an error occurred.RRCrtc glfwGetX11Adapter | ( | GLFWmonitor * | monitor | ) |
RRCrtc
of the specified monitor, or None
if an error occurred.RROutput glfwGetX11Monitor | ( | GLFWmonitor * | monitor | ) |
RROutput
of the specified monitor, or None
if an error occurred.Window glfwGetX11Window | ( | GLFWwindow * | window | ) |
Window
of the specified window, or None
if an error occurred.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.
NULL
if an error occurred.GLXContext glfwGetGLXContext | ( | GLFWwindow * | window | ) |
GLXContext
of the specified window, or NULL
if an error occurred.GLXWindow glfwGetGLXWindow | ( | GLFWwindow * | window | ) |
GLXWindow
of the specified window, or None
if an error occurred.struct wl_display * glfwGetWaylandDisplay | ( | void | ) |
struct wl_display*
used by GLFW, or NULL
if an error occurred.struct wl_output * glfwGetWaylandMonitor | ( | GLFWmonitor * | monitor | ) |
struct wl_output*
of the specified monitor, or NULL
if an error occurred.struct wl_surface * glfwGetWaylandWindow | ( | GLFWwindow * | window | ) |
struct wl_surface*
of the specified window, or NULL
if an error occurred.EGLDisplay glfwGetEGLDisplay | ( | void | ) |
EGLDisplay
used by GLFW, or EGL_NO_DISPLAY
if an error occurred.EGLContext glfwGetEGLContext | ( | GLFWwindow * | window | ) |
EGLContext
of the specified window, or EGL_NO_CONTEXT
if an error occurred.EGLSurface glfwGetEGLSurface | ( | GLFWwindow * | window | ) |
EGLSurface
of the specified window, or EGL_NO_SURFACE
if an error occurred.int glfwGetOSMesaColorBuffer | ( | GLFWwindow * | window, |
int * | width, | ||
int * | height, | ||
int * | format, | ||
void ** | buffer | ||
) |
[in] | window | 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 . |
GLFW_TRUE
if successful, or GLFW_FALSE
if an error occurred.int glfwGetOSMesaDepthBuffer | ( | GLFWwindow * | window, |
int * | width, | ||
int * | height, | ||
int * | bytesPerValue, | ||
void ** | buffer | ||
) |
[in] | window | 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 . |
GLFW_TRUE
if successful, or GLFW_FALSE
if an error occurred.OSMesaContext glfwGetOSMesaContext | ( | GLFWwindow * | window | ) |
OSMesaContext
of the specified window, or NULL
if an error occurred.Last update on Thu Oct 28 2021 for GLFW 3.3.5