mirror of
https://github.com/glfw/glfw.git
synced 2025-12-19 13:41:54 +00:00
Compare commits
2 Commits
dbadda2683
...
e1bbdd4f5f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1bbdd4f5f | ||
|
|
4b5ca4e23f |
@ -124,6 +124,7 @@ video tutorials.
|
|||||||
- Josh Kilmer
|
- Josh Kilmer
|
||||||
- Byunghoon Kim
|
- Byunghoon Kim
|
||||||
- Cameron King
|
- Cameron King
|
||||||
|
- knokko
|
||||||
- Peter Knut
|
- Peter Knut
|
||||||
- Christoph Kubisch
|
- Christoph Kubisch
|
||||||
- Yuri Kunde Schlesner
|
- Yuri Kunde Schlesner
|
||||||
|
|||||||
@ -122,6 +122,8 @@ information on what to include when reporting a bug.
|
|||||||
|
|
||||||
- Added `GLFW_UNLIMITED_MOUSE_BUTTONS` input mode that allows mouse buttons beyond
|
- Added `GLFW_UNLIMITED_MOUSE_BUTTONS` input mode that allows mouse buttons beyond
|
||||||
the limit of the mouse button tokens to be reported (#2423)
|
the limit of the mouse button tokens to be reported (#2423)
|
||||||
|
- Added `glfwGetEGLConfig` function to query the `EGLConfig` of a window (#2045)
|
||||||
|
- Added `glfwGetGLXFBConfig` function to query the `GLXFBConfig` of a window (#1925)
|
||||||
- Updated minimum CMake version to 3.16 (#2541)
|
- Updated minimum CMake version to 3.16 (#2541)
|
||||||
- Removed support for building with original MinGW (#2540)
|
- Removed support for building with original MinGW (#2540)
|
||||||
- [Win32] Removed support for Windows XP and Vista (#2505)
|
- [Win32] Removed support for Windows XP and Vista (#2505)
|
||||||
|
|||||||
17
docs/news.md
17
docs/news.md
@ -14,6 +14,19 @@ values over 8. For compatibility with older versions, the
|
|||||||
@ref GLFW_UNLIMITED_MOUSE_BUTTONS input mode needs to be set to make use of
|
@ref GLFW_UNLIMITED_MOUSE_BUTTONS input mode needs to be set to make use of
|
||||||
this.
|
this.
|
||||||
|
|
||||||
|
|
||||||
|
### EGL config native access function {#eglconfig}
|
||||||
|
|
||||||
|
GLFW now provides the @ref glfwGetEGLConfig native access function for querying
|
||||||
|
the `EGLConfig` of a window that has a `EGLSurface`.
|
||||||
|
|
||||||
|
|
||||||
|
### GLXFBConfig native access function {#glxfbconfig}
|
||||||
|
|
||||||
|
GLFW now provides the @ref glfwGetGLXFBConfig native access function for
|
||||||
|
querying the `GLXFBConfig` of a window that has a `GLXWindow`.
|
||||||
|
|
||||||
|
|
||||||
## Caveats {#caveats}
|
## Caveats {#caveats}
|
||||||
|
|
||||||
## Deprecations {#deprecations}
|
## Deprecations {#deprecations}
|
||||||
@ -39,6 +52,10 @@ actively maintained and available on many platforms.
|
|||||||
|
|
||||||
### New functions {#new_functions}
|
### New functions {#new_functions}
|
||||||
|
|
||||||
|
- @ref glfwGetEGLConfig
|
||||||
|
- @ref glfwGetGLXFBConfig
|
||||||
|
|
||||||
|
|
||||||
### New types {#new_types}
|
### New types {#new_types}
|
||||||
|
|
||||||
### New constants {#new_constants}
|
### New constants {#new_constants}
|
||||||
|
|||||||
@ -478,6 +478,29 @@ GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
|
|||||||
* @ingroup native
|
* @ingroup native
|
||||||
*/
|
*/
|
||||||
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
|
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
|
||||||
|
|
||||||
|
/*! @brief Retrieves the `GLXFBConfig` of the specified window's `GLXWindow`.
|
||||||
|
*
|
||||||
|
* @param[in] window The window whose `GLXWindow` to query.
|
||||||
|
* @param[out] config The `GLXFBConfig` of the window `GLXWindow`, if available.
|
||||||
|
* @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
|
||||||
|
* [error](@ref error_handling) occurred.
|
||||||
|
*
|
||||||
|
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
|
||||||
|
* GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_UNAVAILABLE.
|
||||||
|
*
|
||||||
|
* @remark `GLXFBConfig` is an opaque type. Unlike other GLFW functions, the
|
||||||
|
* @p config out parameter is not cleared on error, as core GLX does not define
|
||||||
|
* any invalid value.
|
||||||
|
*
|
||||||
|
* @thread_safety This function may be called from any thread. Access is not
|
||||||
|
* synchronized.
|
||||||
|
*
|
||||||
|
* @since Added in version 3.5
|
||||||
|
*
|
||||||
|
* @ingroup native
|
||||||
|
*/
|
||||||
|
GLFWAPI int glfwGetGLXFBConfig(GLFWwindow* window, GLXFBConfig* config);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
||||||
@ -586,6 +609,29 @@ GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
|
|||||||
* @ingroup native
|
* @ingroup native
|
||||||
*/
|
*/
|
||||||
GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
|
GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
|
||||||
|
|
||||||
|
/*! @brief Retrieves the `EGLConfig` of the specified window's `EGLSurface`.
|
||||||
|
*
|
||||||
|
* @param[in] window The window whose `EGLSurface` to query.
|
||||||
|
* @param[out] config The `EGLConfig` of the window `EGLSurface`, if available.
|
||||||
|
* @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
|
||||||
|
* [error](@ref error_handling) occurred.
|
||||||
|
*
|
||||||
|
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||||
|
* GLFW_NO_WINDOW_CONTEXT.
|
||||||
|
*
|
||||||
|
* @remark `EGLConfig` is an opaque type. Unlike other GLFW functions, the @p
|
||||||
|
* config out parameter is not cleared on error, as core EGL does not define
|
||||||
|
* any invalid value.
|
||||||
|
*
|
||||||
|
* @thread_safety This function may be called from any thread. Access is not
|
||||||
|
* synchronized.
|
||||||
|
*
|
||||||
|
* @since Added in version 3.5.
|
||||||
|
*
|
||||||
|
* @ingroup native
|
||||||
|
*/
|
||||||
|
GLFWAPI int glfwGetEGLConfig(GLFWwindow* window, EGLConfig* config);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
|
#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
|
||||||
|
|||||||
@ -946,3 +946,25 @@ GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* handle)
|
|||||||
return window->context.egl.surface;
|
return window->context.egl.surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLFWAPI int glfwGetEGLConfig(GLFWwindow* handle, EGLConfig* config)
|
||||||
|
{
|
||||||
|
_GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
|
||||||
|
|
||||||
|
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||||
|
assert(window != NULL);
|
||||||
|
assert(config != NULL);
|
||||||
|
|
||||||
|
if (window->context.source != GLFW_EGL_CONTEXT_API)
|
||||||
|
{
|
||||||
|
if (_glfw.platform.platformID != GLFW_PLATFORM_WAYLAND ||
|
||||||
|
window->context.source != GLFW_NATIVE_CONTEXT_API)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
|
||||||
|
return GLFW_FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*config = window->context.egl.config;
|
||||||
|
return GLFW_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -626,6 +626,8 @@ GLFWbool _glfwCreateContextGLX(_GLFWwindow* window,
|
|||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window->context.glx.fbconfig = native;
|
||||||
|
|
||||||
window->context.makeCurrent = makeContextCurrentGLX;
|
window->context.makeCurrent = makeContextCurrentGLX;
|
||||||
window->context.swapBuffers = swapBuffersGLX;
|
window->context.swapBuffers = swapBuffersGLX;
|
||||||
window->context.swapInterval = swapIntervalGLX;
|
window->context.swapInterval = swapIntervalGLX;
|
||||||
@ -719,5 +721,29 @@ GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* handle)
|
|||||||
return window->context.glx.window;
|
return window->context.glx.window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLFWAPI int glfwGetGLXFBConfig(GLFWwindow* handle, GLXFBConfig* config)
|
||||||
|
{
|
||||||
|
_GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
|
||||||
|
|
||||||
|
if (_glfw.platform.platformID != GLFW_PLATFORM_X11)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_PLATFORM_UNAVAILABLE, "GLX: Platform not initialized");
|
||||||
|
return GLFW_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||||
|
assert(window != NULL);
|
||||||
|
assert(config != NULL);
|
||||||
|
|
||||||
|
if (window->context.source != GLFW_NATIVE_CONTEXT_API)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
|
||||||
|
return GLFW_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*config = window->context.glx.fbconfig;
|
||||||
|
return GLFW_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
#endif // _GLFW_X11
|
#endif // _GLFW_X11
|
||||||
|
|
||||||
|
|||||||
@ -470,6 +470,7 @@ typedef struct _GLFWcontextGLX
|
|||||||
{
|
{
|
||||||
GLXContext handle;
|
GLXContext handle;
|
||||||
GLXWindow window;
|
GLXWindow window;
|
||||||
|
GLXFBConfig fbconfig;
|
||||||
} _GLFWcontextGLX;
|
} _GLFWcontextGLX;
|
||||||
|
|
||||||
// GLX-specific global data
|
// GLX-specific global data
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user