Struct draw2d::GlfwWindow[][src]

pub struct GlfwWindow {
    pub glfw: Glfw,
    pub window: Window,
    pub event_receiver: EventReceiver,
    // some fields omitted
}
Expand description

Resources required for rendering to a single GLFW window.

Fields

glfw: Glfw

The glfw library instance

window: Window

The glfw window

event_receiver: EventReceiver

The event reciever. Usually consumed by the application’s main loop.

Implementations

Create a new application window and vulkan surface.

It’s safe to clone the the resulting window, but it is not safe to use glfw window functions from any thread but the main thread. (the thread where this new function was invoked).

Create a new fullscreen window using the primary monitor.

Create a new non-fullscreen window.

Poll glfw for window events

Trait Implementations

Executes the destructor for this type. Read more

clone the instance created by this window surface

Yield the window’s current framebuffer size.

The size is in physical pixels and is meant to be used directly in the swapchain extent.

Get the raw surface handle.

Unsafe because the the WindowSurface itself is responsible for the lifetime of the real surface object. The caller should not retain this handle except for the creation of other vulkan resources which will not outlive the window surface.

Check that a physical device supports rendering to this surface.

Unsafe because the device’s supported extensions must be checked prior to querying for queue presentation support.

Returns the set of all supported formats for this device.

Unsafe because the device’s supported extensions must be checked prior to querying the surface formats.

Returns the set of all supported presentation modes for this device.

Unsafe because the device’s supported extensions must be checked prior to querying the presentation modes.

Returns the set of all supported surface capabilities.

Unsafe because the device’s supported extensions must be checked prior to querying the surface capabilities.

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

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

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

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.