pub struct VideoSubsystem { /* private fields */ }

Implementations

Obtain an SDL context.

Obtains access to the OpenGL window attributes.

Initializes a new WindowBuilder; a convenience method that calls WindowBuilder::new().

Get the name of the display at the index display_name.

Will return an error if the index is out of bounds or if SDL experienced a failure; inspect the returned string for further info.

Return a triplet (ddpi, hdpi, vdpi) containing the diagonal, horizontal and vertical dots/pixels-per-inch of a display

Return orientation of a display or Unknown if orientation could not be determined.

Loads the default OpenGL library.

This should be done after initializing the video driver, but before creating any OpenGL windows. If no OpenGL library is loaded, the default library will be loaded upon creation of the first OpenGL window.

If a different library is already loaded, this function will return an error.

Loads the OpenGL library using a platform-dependent OpenGL library name (usually a file path).

This should be done after initializing the video driver, but before creating any OpenGL windows. If no OpenGL library is loaded, the default library will be loaded upon creation of the first OpenGL window.

If a different library is already loaded, this function will return an error.

Unloads the current OpenGL library.

To completely unload the library, this should be called for every successful load of the OpenGL library.

Gets the pointer to the named OpenGL function.

This is useful for OpenGL wrappers such as gl-rs.

Releases the thread’s current OpenGL context, i.e. sets the current OpenGL context to nothing.

Loads the default Vulkan library.

This should be done after initializing the video driver, but before creating any Vulkan windows. If no Vulkan library is loaded, the default library will be loaded upon creation of the first Vulkan window.

If a different library is already loaded, this function will return an error.

Loads the Vulkan library using a platform-dependent Vulkan library name (usually a file path).

This should be done after initializing the video driver, but before creating any Vulkan windows. If no Vulkan library is loaded, the default library will be loaded upon creation of the first Vulkan window.

If a different library is already loaded, this function will return an error.

Unloads the current Vulkan library.

To completely unload the library, this should be called for every successful load of the Vulkan library.

Gets the pointer to the vkGetInstanceProcAddr Vulkan function. This function can be called to retrieve the address of other Vulkan functions.

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

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

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.