Struct basalt::Options[][src]

pub struct Options { /* fields omitted */ }
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. Enabling app mode also automatically enables the interface_limit_draw option. If this is not wanted after app_loop() use interface_limit_draw(false).

Defaults to true in app mode. Limits interface redraws where possible. In the app loop the application will only render frames when there are updates. In an external loop when ItfRenderer is not rendering to the swapchain directly it will avoid redrawing to the interface image if there are no updates needed. Note this is currently unstable outside of the app mode. Please use with caution!

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.

Defaults to false. Ignore dpi hints provided by the platform.

Set the inner size of the window to be created

Set the title of the window to be created

Set the initial scale of the UI

Set the the amount of MSAA of the UI

Prefer integrated graphics if they are available

Add additional instance extensions

Add additional device extensions

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

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.

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

Builds a pointer to this type from a raw pointer.

Returns true if the size is suitable to store a type like this.

Returns the size of an individual element.

Performs the conversion.

Performs the conversion.

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.