mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Add glfwGetGLXWindow
This commit is contained in:
parent
d4079ad3a2
commit
e046d0696b
@ -71,6 +71,7 @@ used by the tests and examples and are not required to build the library.
|
|||||||
- Added `GLFW_NO_API` for creating window without contexts
|
- Added `GLFW_NO_API` for creating window without contexts
|
||||||
- Added `GLFW_CONTEXT_NO_ERROR` context hint for `GL_KHR_no_error` support
|
- Added `GLFW_CONTEXT_NO_ERROR` context hint for `GL_KHR_no_error` support
|
||||||
- Added `GLFW_TRUE` and `GLFW_FALSE` as client API independent boolean values
|
- Added `GLFW_TRUE` and `GLFW_FALSE` as client API independent boolean values
|
||||||
|
- Added `glfwGetGLXWindow` to query the `GLXWindow` of a window
|
||||||
- Removed dependency on external OpenGL or OpenGL ES headers
|
- Removed dependency on external OpenGL or OpenGL ES headers
|
||||||
- [Win32] Added support for Windows 8.1 per-monitor DPI
|
- [Win32] Added support for Windows 8.1 per-monitor DPI
|
||||||
- [Cocoa] Removed support for OS X 10.6
|
- [Cocoa] Removed support for OS X 10.6
|
||||||
|
@ -314,6 +314,21 @@ GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
|
|||||||
* @ingroup native
|
* @ingroup native
|
||||||
*/
|
*/
|
||||||
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
|
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
|
||||||
|
|
||||||
|
/*! @brief Returns the `GLXWindow` of the specified window.
|
||||||
|
*
|
||||||
|
* @return The `GLXWindow` of the specified window, or `None` if an
|
||||||
|
* [error](@ref error_handling) occurred.
|
||||||
|
*
|
||||||
|
* @par Thread Safety
|
||||||
|
* This function may be called from any thread. Access is not synchronized.
|
||||||
|
*
|
||||||
|
* @par History
|
||||||
|
* Added in GLFW 3.2.
|
||||||
|
*
|
||||||
|
* @ingroup native
|
||||||
|
*/
|
||||||
|
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
||||||
|
@ -616,3 +616,17 @@ GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* handle)
|
|||||||
return window->context.glx.handle;
|
return window->context.glx.handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* handle)
|
||||||
|
{
|
||||||
|
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||||
|
_GLFW_REQUIRE_INIT_OR_RETURN(None);
|
||||||
|
|
||||||
|
if (window->context.api == GLFW_NO_API)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
|
return window->context.glx.window;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user