Struct luminance_glfw::GLFWDevice
[−]
[src]
pub struct GLFWDevice { /* fields omitted */ }
Device object.
Upon window and context creation, this type is used to add interaction and context handling.
Trait Implementations
impl Device for GLFWDevice
[src]
type Event = WindowEvent
Type of events.
type Error = GLFWDeviceError
Type of device errors.
fn new(
dim: WindowDim,
title: &str,
win_opt: WindowOpt
) -> Result<Self, Self::Error>
[src]
dim: WindowDim,
title: &str,
win_opt: WindowOpt
) -> Result<Self, Self::Error>
Create a device and bootstrap a luminance environment that lives as long as the device lives. Read more
fn size(&self) -> [u32; 2]
[src]
Size of the framebuffer attached to the window.
fn events<'a>(&'a mut self) -> Box<Iterator<Item = Self::Event> + 'a>
[src]
Retrieve an iterator over any pulled events.
fn draw<F>(&mut self, f: F) where
F: FnOnce(),
[src]
F: FnOnce(),
Perform a draw. You should recall that function each time you want to draw a single frame to the screen. Read more
fn width(&self) -> u32
[src]
Width of the framebuffer attached to the window. Read more
fn height(&self) -> u32
[src]
Height of the framebuffer attached to the window. Read more