pub struct Options { /* private fields */ }
Expand description
Options for Basalt’s creation and operation.
Implementations
sourceimpl Options
impl Options
sourcepub fn app_loop(self) -> Self
pub fn app_loop(self) -> Self
Configure Basalt to run in app mode. The swapchain will be managed by Basalt and all renderering to the swapchain will be done by Basalt. Additional rendering to the swapchain will be unavailable. This is useful for applications that are UI only.
sourcepub fn use_exclusive_fullscreen(self, to: bool) -> Self
pub fn use_exclusive_fullscreen(self, to: bool) -> Self
Defaults to false
. Enables the device extension required for exclusive fullscreen.
Generally this extension is only present on Windows. Basalt will return an error upon
creation if this feature isn’t supported. With this option enabled
BasaltWindow::enable_fullscreen()
will use exclusive fullscreen; otherwise,
borderless window will be used.
sourcepub fn ignore_dpi(self, to: bool) -> Self
pub fn ignore_dpi(self, to: bool) -> Self
Defaults to false
. Ignore dpi hints provided by the platform.
sourcepub fn window_size(self, width: u32, height: u32) -> Self
pub fn window_size(self, width: u32, height: u32) -> Self
Set the inner size of the window to be created
sourcepub fn msaa(self, to: BstMSAALevel) -> Self
pub fn msaa(self, to: BstMSAALevel) -> Self
Set the the amount of MSAA of the UI
sourcepub fn prefer_integrated_gpu(self) -> Self
pub fn prefer_integrated_gpu(self) -> Self
Prefer integrated graphics if they are available
sourcepub fn instance_ext_union(self, ext: &InstanceExtensions) -> Self
pub fn instance_ext_union(self, ext: &InstanceExtensions) -> Self
Add additional instance extensions
sourcepub fn device_ext_union(self, ext: &DeviceExtensions) -> Self
pub fn device_ext_union(self, ext: &DeviceExtensions) -> Self
Add additional device extensions
pub fn enable_validation(self) -> Self
sourcepub fn with_features(self, features: VkFeatures) -> Self
pub fn with_features(self, features: VkFeatures) -> Self
Specifify a custom set of vulkan features. This should be used with
basalt_required_vk_features()
to ensure Basalt functions correctly. For example:
.with_features(
Features {
storage_buffer16_bit_access: true,
.. basalt_required_vk_features()
}
)
sourcepub fn composite_alpha(self, to: CompositeAlpha) -> Self
pub fn composite_alpha(self, to: CompositeAlpha) -> Self
Set the composite alpha mode used when creating the swapchain. Only effective when using app loop.
sourcepub fn force_unix_backend_x11(self, to: bool) -> Self
pub fn force_unix_backend_x11(self, to: bool) -> Self
Setting this to true, will set the environment variable WINIT_UNIX_BACKEND=x11
forcing
winit to use x11 over wayland. This is false
by default, but it is recommended to set
this to true
if you intend to use Basalt::capture_cursor()
. With winit on wayland,
MouseMotion
will not be emitted.
sourcepub fn imt_gpu_accelerated(self, to: bool) -> Self
pub fn imt_gpu_accelerated(self, to: bool) -> Self
Basalt uses ilmenite in the backend for text. Setting this option to true will allow ilmenite to use a gpu code path which will have some performance gain; however, this code path may be broken on some systems. This defaults to true.
sourcepub fn imt_fill_quality(self, q: ImtFillQuality) -> Self
pub fn imt_fill_quality(self, q: ImtFillQuality) -> Self
Basalt uses ilmenite in the backend for text. This option allows for modifying the fill quality (the amount of casted rays) that ilmenite will use. This defaults to `ImtFillQuality::Normal“.
sourcepub fn imt_sample_quality(self, q: ImtSampleQuality) -> Self
pub fn imt_sample_quality(self, q: ImtSampleQuality) -> Self
Basalt uses ilmenite in the backend for text. This option allows for modifying the sample quality (the amount of samples in a subpixel) that ilmenite will use. This defaults to `ImtSampleQuality::Normal.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
sourcefn 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()
.
sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian()
.
sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian()
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more