Struct basalt::BasaltOptions
source · pub struct BasaltOptions { /* private fields */ }
Expand description
Options for Basalt’s creation and operation.
Implementations§
source§impl BasaltOptions
impl BasaltOptions
sourcepub fn require_instance_extensions(self, extensions: InstanceExtensions) -> Self
pub fn require_instance_extensions(self, extensions: InstanceExtensions) -> Self
Add required instance extensions
Note: This will cause an error if an extension is not supported. If this is not desired
use the prefer_instance_extensions
method instead.
sourcepub fn prefer_instance_extensions(self, extensions: InstanceExtensions) -> Self
pub fn prefer_instance_extensions(self, extensions: InstanceExtensions) -> Self
Add preferred instance extensions
sourcepub fn allow_portability_subset(self) -> Self
pub fn allow_portability_subset(self) -> Self
Allow a portability subset device to be selected when enumerating PhysicalDevice
’s.
sourcepub fn prefer_integrated_gpu(self) -> Self
pub fn prefer_integrated_gpu(self) -> Self
Prefer selecting integrated graphics over dedicated graphics on a hybrid system.
sourcepub fn prefer_dedicated_gpu(self) -> Self
pub fn prefer_dedicated_gpu(self) -> Self
Prefer selecting dedicated graphics over integrated graphics on a hybrid system.
sourcepub fn require_device_extensions(self, extensions: DeviceExtensions) -> Self
pub fn require_device_extensions(self, extensions: DeviceExtensions) -> Self
Add required device extensions
Note: This will cause an error if an extension is not supported. If this is not desired
use the prefer_device_extensions
method instead.
sourcepub fn prefer_device_extensions(self, extensions: DeviceExtensions) -> Self
pub fn prefer_device_extensions(self, extensions: DeviceExtensions) -> Self
Add preferred device extensions
sourcepub fn require_device_features(self, features: DeviceFeatures) -> Self
pub fn require_device_features(self, features: DeviceFeatures) -> Self
Add required device features
Note: This will cause an error if an feature is not supported. If this is not desired
use the prefer_device_features
method instead.
sourcepub fn prefer_device_features(self, features: DeviceFeatures) -> Self
pub fn prefer_device_features(self, features: DeviceFeatures) -> Self
Add preferred device features
sourcepub fn winit_force_x11(self) -> Self
pub fn winit_force_x11(self) -> Self
On systems with wayland use of xwayland instead.
sourcepub fn window_ignore_dpi(self) -> Self
pub fn window_ignore_dpi(self) -> Self
Ignore dpi hints provided from windows disabling dpi scaling.
Default: false
sourcepub fn window_default_scale(self, scale: f32) -> Self
pub fn window_default_scale(self, scale: f32) -> Self
Set the default scale used for the interface when a window is created.
Default: 1.0
Note: 1.0
equals 100%
sourcepub fn render_default_msaa(self, msaa: MSAA) -> Self
pub fn render_default_msaa(self, msaa: MSAA) -> Self
Set the default MSAA
used for rendering the interface when a Renderer
is created.
Default: MSAA::X1
sourcepub fn render_default_vsync(self, vsync: VSync) -> Self
pub fn render_default_vsync(self, vsync: VSync) -> Self
Set the default VSync
used for rendering when a Renderer
is created.
Default: Vsync::Enable
sourcepub fn render_default_consv_draw(self, enabled: bool) -> Self
pub fn render_default_consv_draw(self, enabled: bool) -> Self
Set the default value used when creating a Renderer
for conservative draw feature.
Default: false
Note: For Renderer
’s where a user renderer is provided, this is ignored. It is
generally not ideal to use this in those cases.
sourcepub fn render_default_worker_threads(self, threads: usize) -> Self
pub fn render_default_worker_threads(self, threads: usize) -> Self
Set the default count of worker threads used for a Renderer
.
Default: 1/3 of available threads (rounded up)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BasaltOptions
impl !RefUnwindSafe for BasaltOptions
impl Send for BasaltOptions
impl Sync for BasaltOptions
impl Unpin for BasaltOptions
impl !UnwindSafe for BasaltOptions
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> 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> 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 moresource§impl<T> Pointable for T
impl<T> Pointable for T
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()
.