[][src]Struct luminance_glutin::GlutinSurface

pub struct GlutinSurface {
    pub ctx: WindowedContext<PossiblyCurrent>,
    pub event_loop: EventsLoop,
    // some fields omitted
}

The Glutin surface.

You want to create such an object in order to use any luminance construct.

Fields

ctx: WindowedContext<PossiblyCurrent>

The windowed context.

event_loop: EventsLoop

Associated events loop.

Methods

impl GlutinSurface[src]

pub fn new(
    dim: WindowDim,
    title: &str,
    win_opt: WindowOpt
) -> Result<Self, GlutinError>
[src]

Create a new GlutinSurface from scratch.

pub fn size(&self) -> [u32; 2][src]

Get the underlying size (in physical pixels) of the surface.

This is equivalent to getting the inner size of the windowed context and converting it to a physical size by using the HiDPI factor of the windowed context.

pub fn back_buffer(
    &mut self
) -> Result<Framebuffer<Flat, Dim2, (), ()>, GlutinError>
[src]

Get access to the back buffer.

pub fn swap_buffers(&mut self)[src]

Swap the back and front buffers.

Trait Implementations

impl GraphicsContext for GlutinSurface[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.