Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Window Handling

vk-graph does not directly provide any window implementation. Instead an accessory crate, vk-graph-window is provided, based on winit.

Tip

vk-graph-window provides additional documentation and examples.

Presentation

The core crate and window crate intentionally separate low-level Vulkan presentation from the frame-oriented helper used by most windowed applications.

TypeUsage
vk_graph::driver::swapchain::SwapchainVulkan swapchain smart pointer, contains β€œraw” functions
vk_graph_window::graphchain::GraphchainHigh-level frame-presentation helper for window handlers

Graphchain acquires the next swapchain image, exposes it through FrameContext, submits the frame graph, and presents it. Applications normally use Window::run and write to frame.swapchain_image rather than calling low-level acquire/present functions directly.

GraphchainInfo controls presentation policy such as frame_capacity, min_image_count, present_mode, acquire_timeout, and composite_alpha. The effective runtime values are exposed through EffectiveGraphchainInfo because surface capabilities may force different values at runtime.

Resize and surface transitions may cause a frame to be skipped internally. If the surface is lost, the window layer tears down the current surface/graphchain and recreates them on a later draw request.

OpenXR

Virtual reality support via OpenXR is provided as an example which also implements a swapchain.