pub struct Settings {
pub present_mode: PresentMode,
pub internal_backend: Backends,
pub default_font: Font,
pub default_text_size: Pixels,
pub antialiasing: Option<Antialiasing>,
}
Expand description
The settings of a Backend
.
Fields§
§present_mode: PresentMode
The present mode of the Backend
.
internal_backend: Backends
The internal graphics backend to use.
default_font: Font
The default [Font
] to use.
default_text_size: Pixels
The default size of text.
By default, it will be set to 16.0
.
antialiasing: Option<Antialiasing>
The antialiasing strategy that will be used for triangle primitives.
By default, it is None
.
Implementations§
source§impl Settings
impl Settings
sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Creates new Settings
using environment configuration.
Specifically:
- The
internal_backend
can be configured using theWGPU_BACKEND
environment variable. If the variable is not set, the primary backend will be used. The following values are allowed:vulkan
metal
dx12
dx11
gl
webgpu
primary
Trait Implementations§
source§impl PartialEq for Settings
impl PartialEq for Settings
impl Copy for Settings
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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
Mutably borrows from an owned value. Read more
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>
§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>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.