mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Rename framebuffer transparency hint
This is a breaking change of an unreleased API.
This commit is contained in:
@@ -82,8 +82,8 @@ extension, regular accelerated mouse motion will be used.
|
||||
|
||||
GLFW uses both the XRender extension and the compositing manager to support
|
||||
transparent window framebuffers. If the running X server does not support this
|
||||
extension or there is no running compositing manager, the `GLFW_TRANSPARENT`
|
||||
framebuffer hint will have no effect.
|
||||
extension or there is no running compositing manager, the
|
||||
`GLFW_TRANSPARENT_FRAMEBUFFER` framebuffer hint will have no effect.
|
||||
|
||||
|
||||
@section compat_glx GLX extensions
|
||||
|
||||
@@ -97,8 +97,9 @@ be disabled with the @ref GLFW_JOYSTICK_HAT_BUTTONS init hint.
|
||||
@subsection news_33_transparent Support for transparent window framebuffer
|
||||
|
||||
GLFW now supports the creation of windows with transparent framebuffers on
|
||||
systems with desktop compositing enabled with the @ref GLFW_TRANSPARENT window
|
||||
hint and attribute. Any window decorations will still be opaque.
|
||||
systems with desktop compositing enabled with the @ref
|
||||
GLFW_TRANSPARENT_FRAMEBUFFER window hint and attribute. Any window decorations
|
||||
will still be opaque.
|
||||
|
||||
|
||||
@subsection news_33_centercursor Cursor centering window hint
|
||||
|
||||
@@ -225,9 +225,9 @@ __GLFW_CENTER_CURSOR__ specifies whether the cursor should be centered over
|
||||
newly created full screen windows. Possible values are `GLFW_TRUE` and
|
||||
`GLFW_FALSE`. This hint is ignored for windowed mode windows.
|
||||
|
||||
@anchor GLFW_TRANSPARENT_hint
|
||||
__GLFW_TRANSPARENT__ specifies whether the window framebuffer will be
|
||||
transparent. If enabled and supported by the system, the window framebuffer
|
||||
@anchor GLFW_TRANSPARENT_FRAMEBUFFER_hint
|
||||
__GLFW_TRANSPARENT_FRAMEBUFFER__ specifies whether the window framebuffer will
|
||||
be transparent. If enabled and supported by the system, the window framebuffer
|
||||
alpha channel will be used to combine the framebuffer with the background. This
|
||||
does not affect window decorations. Possible values are `GLFW_TRUE` and
|
||||
`GLFW_FALSE`.
|
||||
@@ -477,7 +477,7 @@ GLFW_AUTO_ICONIFY | `GLFW_TRUE` | `GLFW_TRUE` or `GL
|
||||
GLFW_FLOATING | `GLFW_FALSE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
GLFW_MAXIMIZED | `GLFW_FALSE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
GLFW_CENTER_CURSOR | `GLFW_TRUE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
GLFW_TRANSPARENT | `GLFW_FALSE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
GLFW_TRANSPARENT_FRAMEBUFFER | `GLFW_FALSE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
GLFW_RED_BITS | 8 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
GLFW_GREEN_BITS | 8 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
GLFW_BLUE_BITS | 8 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
@@ -1092,21 +1092,24 @@ the window or framebuffer is resized.
|
||||
@subsection window_transparency Window transparency
|
||||
|
||||
Window framebuffers can be made transparent on a per-pixel per-frame basis with
|
||||
the [GLFW_TRANSPARENT](@ref GLFW_TRANSPARENT_hint) window hint.
|
||||
the [GLFW_TRANSPARENT_FRAMEBUFFER](@ref GLFW_TRANSPARENT_FRAMEBUFFER_hint)
|
||||
window hint.
|
||||
|
||||
@code
|
||||
glfwWindowHint(GLFW_TRANSPARENT, GLFW_TRUE);
|
||||
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
|
||||
@endcode
|
||||
|
||||
If supported by the system, the window framebuffer will be composited with the
|
||||
If supported by the system, the window content area will be composited with the
|
||||
background using the framebuffer per-pixel alpha channel. This requires desktop
|
||||
compositing to be enabled on the system. It does not affect window decorations.
|
||||
|
||||
You can check whether the window framebuffer was successfully made transparent
|
||||
with the [GLFW_TRANSPARENT](@ref GLFW_TRANSPARENT_attrib) window attribute.
|
||||
with the
|
||||
[GLFW_TRANSPARENT_FRAMEBUFFER](@ref GLFW_TRANSPARENT_FRAMEBUFFER_attrib)
|
||||
window attribute.
|
||||
|
||||
@code
|
||||
if (glfwGetWindowAttrib(window, GLFW_TRANSPARENT))
|
||||
if (glfwGetWindowAttrib(window, GLFW_TRANSPARENT_FRAMEBUFFER))
|
||||
{
|
||||
// window framebuffer is currently transparent
|
||||
}
|
||||
@@ -1182,10 +1185,11 @@ called topmost or always-on-top. This can be set before creation with the
|
||||
[GLFW_FLOATING](@ref GLFW_FLOATING_hint) window hint or after with @ref
|
||||
glfwSetWindowAttrib.
|
||||
|
||||
@anchor GLFW_TRANSPARENT_attrib
|
||||
__GLFW_TRANSPARENT__ indicates whether the specified window has a transparent
|
||||
framebuffer, i.e. the window contents is composited with the background using
|
||||
the window framebuffer alpha channel. See @ref window_transparency for details.
|
||||
@anchor GLFW_TRANSPARENT_FRAMEBUFFER_attrib
|
||||
__GLFW_TRANSPARENT_FRAMEBUFFER__ indicates whether the specified window has
|
||||
a transparent framebuffer, i.e. the window contents is composited with the
|
||||
background using the window framebuffer alpha channel. See @ref
|
||||
window_transparency for details.
|
||||
|
||||
|
||||
@subsubsection window_attribs_ctx Context related attributes
|
||||
|
||||
Reference in New Issue
Block a user