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

A struct organizing windows and their corresponding renderers. This makes it easy to handle multiple windows.

Examples

use vulkano_util::context::{VulkanoConfig, VulkanoContext};
use winit::event_loop::EventLoop;
use vulkano_util::window::VulkanoWindows;

#[test]
fn test() {
    let context = VulkanoContext::new(VulkanoConfig::default());
    let event_loop = EventLoop::new();
    let mut vulkano_windows = VulkanoWindows::default();
    let _id1 = vulkano_windows.create_window(&event_loop, &context, &Default::default(), |_| {});
    let _id2 = vulkano_windows.create_window(&event_loop, &context, &Default::default(), |_| {});

    // You should now have two windows.
}

Implementations

Creates a winit window with VulkanoWindowRenderer based on the given WindowDescriptor input and swapchain creation modifications.

Get a mutable reference to the primary window’s renderer.

Get a reference to the primary window’s renderer.

Get a reference to the primary winit window.

Get a mutable reference to the renderer by winit window id.

Get a reference to the renderer by winit window id.

Get a reference to the winit window by winit window id.

Return primary window id.

Remove renderer by window id.

Return iterator over window renderers.

Return iterator over mutable window renderers.

Trait Implementations

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 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.