mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 00:59:48 +00:00
Add GLFW_SCALE_FRAMEBUFFER window hint
This adds the GLFW_SCALE_FRAMEBUFFER window hint, enabling control of framebuffer scaling across Wayland and macOS. On macOS, this window hint is a new name for GLFW_COCOA_RETINA_FRAMEBUFFER, and both hint names will modify the same hint. This is now a more symmetric counterpart to GLFW_SCALE_TO_MONITOR and, weirdly, they each apply neatly to half of the supported platforms. This commit is mostly documentation updates to better integrate and contrast these two scaling mechanisms.
This commit is contained in:
@@ -85,6 +85,22 @@ function pointers corresponding to the standard library functions `malloc`,
|
||||
For more information see @ref init_allocator.
|
||||
|
||||
|
||||
#### Window hint for framebuffer scaling {#scale_framebuffer_34}
|
||||
|
||||
GLFW now allows provides the
|
||||
[GLFW_SCALE_FRAMEBUFFER](@ref GLFW_SCALE_FRAMEBUFFER_hint) window hint for
|
||||
controlling framebuffer scaling on platforms that handle scaling by keeping the
|
||||
window size the same while resizing the framebuffer. The default value is to
|
||||
allow framebuffer scaling.
|
||||
|
||||
This was already possible on macOS via the
|
||||
[GLFW_COCOA_RETINA_FRAMEBUFFER](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint) window
|
||||
hint. This hint is now another name for
|
||||
[GLFW_SCALE_FRAMEBUFFER](@ref GLFW_SCALE_FRAMEBUFFER_hint).
|
||||
|
||||
For more information, see @ref window_scale.
|
||||
|
||||
|
||||
#### Window hints for initial position {#features_34_position_hint}
|
||||
|
||||
GLFW now provides the @ref GLFW_POSITION_X and @ref GLFW_POSITION_Y window hints for
|
||||
@@ -288,6 +304,7 @@ then GLFW will fail to initialize.
|
||||
- @ref GLFW_WAYLAND_LIBDECOR
|
||||
- @ref GLFW_WAYLAND_PREFER_LIBDECOR
|
||||
- @ref GLFW_WAYLAND_DISABLE_LIBDECOR
|
||||
- @ref GLFW_SCALE_FRAMEBUFFER
|
||||
|
||||
|
||||
## Release notes for earlier versions {#news_archive}
|
||||
|
||||
Reference in New Issue
Block a user