Expand description
Render capability system for declaring GPU feature/limit requirements.
Renderers implement RenderCapability to declare their GPU requirements.
These are collected via crate::GraphicsContextDescriptor::require_capability and
crate::GraphicsContextDescriptor::request_capability to configure device creation.
§Example
ⓘ
use astrelis_render::{GraphicsContext, GraphicsContextDescriptor, GpuRequirements, RenderCapability};
use astrelis_render::batched::BestBatchCapability;
let ctx = pollster::block_on(
GraphicsContext::new_owned_with_descriptor(
GraphicsContextDescriptor::new()
.request_capability::<BestBatchCapability>()
)
).unwrap();Structs§
- GpuRequirements
- GPU requirements for a render capability.
Traits§
- Render
Capability - A trait for renderers to declare their GPU feature and limit requirements.
Functions§
- clamp_
limits_ to_ adapter - Clamp requested limits to what the adapter actually supports.
- merge_
limits_ max - Merge two
wgpu::Limitsby taking the maximum of each “maximum” field and the minimum of each “minimum” field (alignment fields).