Home -> IFrameBuffer -> BindWindow

Description

The BindWindow method binds a window-like target to the framebuffer, allowing the renderer to present rendered color output to a native operating system window, or to a renderer-owned headless target when a native window is not being used.

The windowInfo argument must be one of the platform-specific structures documented under PlatformBindings, such as WindowInfoHeadless, WindowInfoWin32, WindowInfoXlib, WindowInfoWayland, or WindowInfoAppKit.

ImportantImportant

The window information structure includes the current drawable size in pixels. When the drawable size changes, call NotifyWindowResized with the updated pixel size.

Usage

SuccessToken BindWindow(const WindowInfoBase& windowInfo, WindowDepthStencilMode depthStencilMode, WindowColorSpaceMode colorSpaceMode = WindowColorSpaceMode::Default, WindowBindingFlags bindingFlags = WindowBindingFlags::None);

Argument list

windowInfo [const WindowInfoBase&]
The platform-specific window information structure for the target window, or a WindowInfoHeadless structure for a headless window-sized target.
depthStencilMode [WindowDepthStencilMode]
The depth and stencil attachment configuration to create for the window framebuffer.
colorSpaceMode [WindowColorSpaceMode]
The color space mode requested for the window color attachment.
bindingFlags [WindowBindingFlags]
Optional flags controlling presentation behavior for the window binding.

Return value

[SuccessToken]
True if the operation succeeded, false otherwise. An assertion will be raised in debug builds if the result is not tested.

See also