Function show_image::create_window[][src]

pub fn create_window(
    title: impl Into<String>,
    options: WindowOptions
) -> Result<WindowProxy, CreateWindowError>
Expand description

Create a new window with the global context.

If you manually spawn threads that try to access the context before calling run_context, you introduce a race condition. Instead, you should pass a function to run_context that will be started in a new thread after the context is initialized.

Panics

This panics if the global context is not yet fully initialized.