pub struct RendererInitConfig {
pub backends: Option<Backends>,
pub power_preference: PowerPreference,
pub required_features: Features,
pub required_limits: Limits,
pub depth_format: TextureFormat,
}Expand description
Static initialization parameters for the GPU context.
Consumed once during [Renderer::init] to create the wgpu instance,
adapter, device, and core resources. These values cannot be changed
at runtime without destroying and rebuilding the entire GPU context.
§Example
use myth::render::RendererInitConfig;
let config = RendererInitConfig {
power_preference: wgpu::PowerPreference::LowPower,
..Default::default()
};Fields§
§backends: Option<Backends>Force a specific wgpu backend (Vulkan, Metal, DX12, …).
None lets wgpu choose the best available backend for the platform.
Override this only when debugging backend-specific issues.
power_preference: PowerPreferenceGPU adapter selection preference.
HighPerformance: Prefer discrete / dedicated GPU (default)LowPower: Prefer integrated GPU (better battery life)
required_features: FeaturesRequired wgpu features that must be supported by the adapter.
The engine will fail to initialize if these features are unavailable. Use with caution on WebGPU targets where feature support varies.
required_limits: LimitsRequired wgpu limits (max buffer sizes, binding counts, etc.).
depth_format: TextureFormatDepth buffer texture format.
Defaults to Depth32Float — pure 32-bit floating-point depth with
maximum precision and full COPY_SRC/COPY_DST support on all
backends (including WebGPU).
Trait Implementations§
Source§impl Clone for RendererInitConfig
impl Clone for RendererInitConfig
Source§fn clone(&self) -> RendererInitConfig
fn clone(&self) -> RendererInitConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RendererInitConfig
impl Debug for RendererInitConfig
Source§impl Default for RendererInitConfig
impl Default for RendererInitConfig
Source§fn default() -> RendererInitConfig
fn default() -> RendererInitConfig
Auto Trait Implementations§
impl Freeze for RendererInitConfig
impl RefUnwindSafe for RendererInitConfig
impl Send for RendererInitConfig
impl Sync for RendererInitConfig
impl Unpin for RendererInitConfig
impl UnsafeUnpin for RendererInitConfig
impl UnwindSafe for RendererInitConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().