Expand description
The GPU context and its asynchronous request.
A scene is set up once the adapter and device exist, and the setup
needs a mutable world β so the request is a future the world itself
runs, driven by whoever drives the world, and the ready callback lands
as a command between two event callbacks. Nothing outside this module
needs to know any of that: request_gpu runs the request and calls
back when the context is ready.
Re-exportsΒ§
use std::cell::RefCell;πuse std::rc::Rc;πuse unlit_ecs::Command;πuse unlit_ecs::Entity;πuse unlit_ecs::EntityAccessError;πuse unlit_ecs::World;πuse crate::executor::LocalTasks;πuse unlit_wgpu::capabilities::DeviceCapabilities;πuse unlit_wgpu::capabilities::DeviceTier;πuse unlit3d::frame::FrameBehaviourOrder;πuse unlit3d::frame::OnFrame;πuse unlit3d::winit::builtin::DisplayHandle;πuse unlit3d::winit::builtin::ExitRequest;πuse unlit3d::winit::builtin::Resumed;πuse unlit3d::winit::builtin::window;π
StructsΒ§
- Gpu
- The GPU context a scene draws with.
- RunGpu
Ready π - Run the GPU requestβs ready callback with a mutable world.
EnumsΒ§
- GpuRequest π
- The answer a GPU request settles on.
- GpuRequest
Error - Why a GPU request could not start the renderer.
- Request
Stage π - The stages a GPU request moves through, one per frame behaviour.
ConstantsΒ§
- REQUEST_
GPU_ πORDER - The frame-behaviour order the GPU request runs at: before the default band, so the GPU is there before any behaviour that states no order runs.
FunctionsΒ§
- request_
adapter π - Ask
instancefor a high-performance adapter that can present tosurface, when one is given. - request_
gpu - Start the appβs GPU request once the window exists, and run
readywith the context once it lands.