Struct sdl2::VideoSubsystem
[−]
[src]
pub struct VideoSubsystem { // some fields omitted }
Methods
impl VideoSubsystem
[src]
fn clipboard(&self) -> ClipboardUtil
impl VideoSubsystem
[src]
fn text_input(&self) -> TextInputUtil
impl VideoSubsystem
[src]
impl VideoSubsystem
[src]
fn window(&self, title: &str, width: u32, height: u32) -> WindowBuilder
Initializes a new WindowBuilder
; a convenience method that calls WindowBuilder::new()
.
fn current_video_driver(&self) -> &'static str
fn num_video_displays(&self) -> SdlResult<i32>
fn display_name(&self, display_index: i32) -> String
fn display_bounds(&self, display_index: i32) -> SdlResult<Rect>
fn num_display_modes(&self, display_index: i32) -> SdlResult<i32>
fn display_mode(&self, display_index: i32, mode_index: i32) -> SdlResult<DisplayMode>
fn desktop_display_mode(&self, display_index: i32) -> SdlResult<DisplayMode>
fn current_display_mode(&self, display_index: i32) -> SdlResult<DisplayMode>
fn closest_display_mode(&self, display_index: i32, mode: &DisplayMode) -> SdlResult<DisplayMode>
fn is_screen_saver_enabled(&self) -> bool
fn enable_screen_saver(&self)
fn disable_screen_saver(&self)
fn gl_load_library_default(&self) -> SdlResult<()>
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.
fn gl_load_library<P: AsRef<Path>>(&self, path: P) -> SdlResult<()>
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.
fn gl_unload_library(&self)
Unloads the current OpenGL library.
To completely unload the library, this should be called for every successful load of the OpenGL library.
fn gl_get_proc_address(&self, procname: &str) -> *const c_void
Gets the pointer to the named OpenGL function.
This is useful for OpenGL wrappers such as gl-rs
.
fn gl_extension_supported(&self, extension: &str) -> bool
fn gl_get_current_window_id(&self) -> SdlResult<u32>
fn gl_release_current_context(&self) -> SdlResult<()>
Releases the thread's current OpenGL context, i.e. sets the current OpenGL context to nothing.
fn gl_set_swap_interval(&self, interval: i32) -> bool
fn gl_get_swap_interval(&self) -> i32
impl VideoSubsystem
[src]
Trait Implementations
impl Clone for VideoSubsystem
[src]
fn clone(&self) -> VideoSubsystem
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more