Struct sdl2::VideoSubsystem [−][src]
pub struct VideoSubsystem { /* fields omitted */ }
Implementations
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.
pub fn display_mode(
&self,
display_index: i32,
mode_index: i32
) -> Result<DisplayMode, String>
pub fn closest_display_mode(
&self,
display_index: i32,
mode: &DisplayMode
) -> Result<DisplayMode, String>
Return a triplet (ddpi, hdpi, vdpi)
containing the diagonal, horizontal and vertical
dots/pixels-per-inch of a display
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
Auto Trait Implementations
impl !RefUnwindSafe for VideoSubsystem
impl !Send for VideoSubsystem
impl !Sync for VideoSubsystem
impl Unpin for VideoSubsystem
impl !UnwindSafe for VideoSubsystem
Blanket Implementations
Mutably borrows from an owned value. Read more