Struct three_d::Window [−][src]
pub struct Window { /* fields omitted */ }
Expand description
Default window and event handler for easy setup.
Implementations
impl Window
[src]
impl Window
[src]pub fn new(settings: WindowSettings) -> Result<Window, WindowError>
[src]
pub fn new(settings: WindowSettings) -> Result<Window, WindowError>
[src]Constructs a new window with the given settings.
pub fn render_loop<F: 'static>(self, callback: F) -> Result<(), WindowError> where
F: FnMut(FrameInput) -> FrameOutput,
[src]
pub fn render_loop<F: 'static>(self, callback: F) -> Result<(), WindowError> where
F: FnMut(FrameInput) -> FrameOutput,
[src]Start the main render loop which calls the callback
closure each frame.
pub fn size(&self) -> Result<(usize, usize), WindowError>
[src]
pub fn size(&self) -> Result<(usize, usize), WindowError>
[src]Return the current logical size of the window.
pub fn viewport(&self) -> Result<Viewport, WindowError>
[src]
pub fn viewport(&self) -> Result<Viewport, WindowError>
[src]Returns the current viewport of the window in physical pixels (the size of the screen).
pub fn gl(&self) -> Result<Context, WindowError>
[src]
pub fn gl(&self) -> Result<Context, WindowError>
[src]Returns the graphics context for this window.