pub struct BstOptions { /* private fields */ }
Expand description

Options for Basalt’s creation and operation.

Implementations

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.

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.

Default: false

Notes
  • Basalt will return an Err if the extension is not present.

Ignore dpi hints provided by the platform.

Default: false

Set the inner size of the window to be created

Default: 1920, 1080

Set the title of the window to be created

Default: "Basalt"

Set the initial scale of the UI

Default: 1.0

Notes
  • This is independant of DPI Scaling.

Set the the amount of MSAA of the UI

Default: BstMSAALevel::Four

Prefer integrated graphics if they are available

Add additional instance extensions

Add additional device extensions

Enables validation layer

Notes
  • Basalt will return an Err if the layer is not present or extension is not available.

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()
    }
)

Default: basalt_required_vk_features()

Set the composite alpha mode used when creating the swapchain. Only effective when using app loop.

Default: CompositeAlpha::Opaque

Setting this to true, will set the environment variable WINIT_UNIX_BACKEND=x11 forcing winit to use x11 over wayland. 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.

Default: false

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.

Default: true

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.

Default: ImtFillQuality::Normal

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.

Default:: ImtSampleQuality::Normal

Specify how many threads to use for parallel Bin updates.

Default: 1/3 of available threads (rounded up)

Only update interface image on UI/Surface change.

Default: false

Notes:
  • This is for application mode applications only. See app_loop().
  • This feature is EXPERIMENTAL and may not always work correctly.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.