Struct RendererOptions
pub struct RendererOptions {
pub use_cpu: bool,
pub antialiasing_support: AaSupport,
pub num_init_threads: Option<NonZero<usize>>,
pub pipeline_cache: Option<PipelineCache>,
}Expand description
Options which are set at renderer creation time, used in Renderer::new.
Fields§
§use_cpu: boolIf true, run all stages up to fine rasterization on the CPU.
This is not a recommended configuration as it is expected to have poor performance, but it can be useful for debugging.
antialiasing_support: AaSupportRepresents the enabled set of AA configurations. This will be used to determine which pipeline permutations should be compiled at startup.
By default this will be all modes, to support the widest range of. It is recommended that most users configure this.
num_init_threads: Option<NonZero<usize>>How many threads to use for initialisation of shaders.
Use Some(1) to use a single thread. This is recommended when on macOS
(see https://github.com/bevyengine/bevy/pull/10812#discussion_r1496138004)
Set to None to use a heuristic which will use many but not all threads
Has no effect on WebAssembly
Will default to None on most platforms, Some(1) on macOS.
pipeline_cache: Option<PipelineCache>The pipeline cache to use when creating the shaders.
For much more discussion of expected usage patterns, see the documentation on that type.
Trait Implementations§
§impl Default for RendererOptions
Available on crate feature wgpu only.
impl Default for RendererOptions
wgpu only.§fn default() -> RendererOptions
fn default() -> RendererOptions
Auto Trait Implementations§
impl Freeze for RendererOptions
impl !RefUnwindSafe for RendererOptions
impl Send for RendererOptions
impl Sync for RendererOptions
impl Unpin for RendererOptions
impl UnsafeUnpin for RendererOptions
impl !UnwindSafe for RendererOptions
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more