Skip to main content

Module winitutils

Module winitutils 

Source
Available on crate features winit only.
Expand description

Utilities for working with windows & surfaces.

To bundle a winit::window::Window with its wgpu::Surface, you’re looking for SurfaceWindow.

For an abstraction over WebGL’s retardedness having to provide a surface before you can get a wgpu adapter, see DeferredContext.

Structs§

ActiveSurfaceWindow
A borrowed form of SurfaceWindow which guarantees that its surface exists & is configured, ready to be rendered to.
DeferredContext
Defer the contstruction of the RenderContext until a surface is constructed.
SurfaceConfigOptions
Persistent configuration for surfaces, which may be destroyed & re-created. Overrides defaults of wgpu::SurfaceConfiguration.
SurfaceWindow
A combined winit::window::Window & wgpu::Surface.

Enums§

BuildDeferredContextError
Error returned when waiting for a RenderContext to be built.
ConfigSurfaceError
Error returned when configuring a surface or making a texture view for the surface.
CreateWindowError
Error returned when trying to create a window.
GetDeferredContextError
Error returned trying to get the RenderContext from a DeferredContext.