Struct bevy::render::settings::WgpuSettings
pub struct WgpuSettings {
pub device_label: Option<Cow<'static, str>>,
pub backends: Option<Backends>,
pub power_preference: PowerPreference,
pub priority: WgpuSettingsPriority,
pub features: Features,
pub disabled_features: Option<Features>,
pub limits: Limits,
pub constrained_limits: Option<Limits>,
pub dx12_shader_compiler: Dx12Compiler,
}
Expand description
Provides configuration for renderer initialization. Use RenderDevice::features
,
RenderDevice::limits
, and the RenderAdapterInfo
resource to get runtime information about the actual adapter, backend, features, and limits.
NOTE: Backends::DX12
, Backends::METAL
, and
Backends::VULKAN
are enabled by default for non-web and the best choice
is automatically selected. Web using the webgl
feature uses Backends::GL
.
NOTE: If you want to use Backends::GL
in a native app on Windows
and/or macOS
, you must
use ANGLE
. This is because wgpu requires EGL to
create a GL context without a window and only ANGLE supports that.
Fields§
§device_label: Option<Cow<'static, str>>
§backends: Option<Backends>
§power_preference: PowerPreference
§priority: WgpuSettingsPriority
§features: Features
The features to ensure are enabled regardless of what the adapter/backend supports. Setting these explicitly may cause renderer initialization to fail.
disabled_features: Option<Features>
The features to ensure are disabled regardless of what the adapter/backend supports
limits: Limits
The imposed limits.
constrained_limits: Option<Limits>
The constraints on limits allowed regardless of what the adapter/backend supports
dx12_shader_compiler: Dx12Compiler
The shader compiler to use for the DX12 backend.
Trait Implementations§
§impl Clone for WgpuSettings
impl Clone for WgpuSettings
§fn clone(&self) -> WgpuSettings
fn clone(&self) -> WgpuSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Default for WgpuSettings
impl Default for WgpuSettings
§fn default() -> WgpuSettings
fn default() -> WgpuSettings
§impl From<WgpuSettings> for RenderCreation
impl From<WgpuSettings> for RenderCreation
§fn from(value: WgpuSettings) -> RenderCreation
fn from(value: WgpuSettings) -> RenderCreation
Auto Trait Implementations§
impl RefUnwindSafe for WgpuSettings
impl Send for WgpuSettings
impl Sync for WgpuSettings
impl Unpin for WgpuSettings
impl UnwindSafe for WgpuSettings
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere U: ShaderType, &'a T: for<'a> Into<U>,
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
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
.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§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.§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.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self
using data from the given World
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
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()
.