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. 
◆ glfwGetWin32Adapter()
      
        
          | const char* glfwGetWin32Adapter | ( | GLFWmonitor * | monitor | ) |  | 
      
 
- Returns
- The UTF-8 encoded adapter device name (for example \\.\DISPLAY1) of the specified monitor, orNULLif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.1. 
 
 
◆ glfwGetWin32Monitor()
      
        
          | const char* glfwGetWin32Monitor | ( | GLFWmonitor * | monitor | ) |  | 
      
 
- Returns
- The UTF-8 encoded display device name (for example \\.\DISPLAY1\Monitor0) of the specified monitor, orNULLif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.1. 
 
 
◆ glfwGetWin32Window()
- Returns
- The HWNDof the specified window, orNULLif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.0. 
 
 
◆ glfwGetWGLContext()
- Returns
- The HGLRCof the specified window, orNULLif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.0. 
 
 
◆ glfwGetCocoaMonitor()
      
        
          | CGDirectDisplayID glfwGetCocoaMonitor | ( | GLFWmonitor * | monitor | ) |  | 
      
 
- Returns
- The CGDirectDisplayIDof the specified monitor, orkCGNullDirectDisplayif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.1. 
 
 
◆ glfwGetCocoaWindow()
- Returns
- The NSWindowof the specified window, ornilif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.0. 
 
 
◆ glfwGetNSGLContext()
- Returns
- The NSOpenGLContextof the specified window, ornilif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.0. 
 
 
◆ glfwGetX11Display()
      
        
          | Display* glfwGetX11Display | ( | void |  | ) |  | 
      
 
- Returns
- The Displayused by GLFW, orNULLif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.0. 
 
 
◆ glfwGetX11Adapter()
- Returns
- The RRCrtcof the specified monitor, orNoneif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.1. 
 
 
◆ glfwGetX11Monitor()
- Returns
- The RROutputof the specified monitor, orNoneif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.1. 
 
 
◆ glfwGetX11Window()
- Returns
- The Windowof the specified window, orNoneif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.0. 
 
 
◆ glfwSetX11SelectionString()
      
        
          | void glfwSetX11SelectionString | ( | const char * | string | ) |  | 
      
 
 
◆ glfwGetX11SelectionString()
      
        
          | const char* glfwGetX11SelectionString | ( | void |  | ) |  | 
      
 
 
◆ glfwGetGLXContext()
      
        
          | GLXContext glfwGetGLXContext | ( | GLFWwindow * | window | ) |  | 
      
 
- Returns
- The GLXContextof the specified window, orNULLif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.0. 
 
 
◆ glfwGetGLXWindow()
- Returns
- The GLXWindowof the specified window, orNoneif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.2. 
 
 
◆ glfwGetWaylandDisplay()
      
        
          | struct wl_display* glfwGetWaylandDisplay | ( | void |  | ) |  | 
      
 
- Returns
- The struct wl_display*used by GLFW, orNULLif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.2. 
 
 
◆ glfwGetWaylandMonitor()
      
        
          | struct wl_output* glfwGetWaylandMonitor | ( | GLFWmonitor * | monitor | ) |  | 
      
 
- Returns
- The struct wl_output*of the specified monitor, orNULLif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.2. 
 
 
◆ glfwGetWaylandWindow()
      
        
          | struct wl_surface* glfwGetWaylandWindow | ( | GLFWwindow * | window | ) |  | 
      
 
- Returns
- The main struct wl_surface*of the specified window, orNULLif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.2. 
 
 
◆ glfwGetEGLDisplay()
      
        
          | EGLDisplay glfwGetEGLDisplay | ( | void |  | ) |  | 
      
 
- Returns
- The EGLDisplayused by GLFW, orEGL_NO_DISPLAYif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.0. 
 
 
◆ glfwGetEGLContext()
      
        
          | EGLContext glfwGetEGLContext | ( | GLFWwindow * | window | ) |  | 
      
 
- Returns
- The EGLContextof the specified window, orEGL_NO_CONTEXTif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.0. 
 
 
◆ glfwGetEGLSurface()
      
        
          | EGLSurface glfwGetEGLSurface | ( | GLFWwindow * | window | ) |  | 
      
 
- Returns
- The EGLSurfaceof the specified window, orEGL_NO_SURFACEif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.0. 
 
 
◆ glfwGetOSMesaColorBuffer()
      
        
          | int glfwGetOSMesaColorBuffer | ( | GLFWwindow * | window, | 
        
          |  |  | int * | width, | 
        
          |  |  | int * | height, | 
        
          |  |  | int * | format, | 
        
          |  |  | void ** | buffer | 
        
          |  | ) |  |  | 
      
 
- Parameters
- 
  
    | [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. |  
 
- Returns
- GLFW_TRUEif successful, or- GLFW_FALSEif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.3. 
 
 
◆ glfwGetOSMesaDepthBuffer()
      
        
          | int glfwGetOSMesaDepthBuffer | ( | GLFWwindow * | window, | 
        
          |  |  | int * | width, | 
        
          |  |  | int * | height, | 
        
          |  |  | int * | bytesPerValue, | 
        
          |  |  | void ** | buffer | 
        
          |  | ) |  |  | 
      
 
- Parameters
- 
  
    | [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. |  
 
- Returns
- GLFW_TRUEif successful, or- GLFW_FALSEif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.3. 
 
 
◆ glfwGetOSMesaContext()
      
        
          | OSMesaContext glfwGetOSMesaContext | ( | GLFWwindow * | window | ) |  | 
      
 
- Returns
- The OSMesaContextof the specified window, orNULLif an error occurred.
- Thread safety
- This function may be called from any thread. Access is not synchronized.
- Since
- Added in version 3.3.