Struct luminance_surfman::SurfmanSurface[][src]

pub struct SurfmanSurface { /* fields omitted */ }

Implementations

impl SurfmanSurface[src]

pub fn from_winit_window(
    window: &Window,
    shader_version: ShaderVersion
) -> Result<Self, SurfmanError>
[src]

Create a surface from a winit window

⚠️ Warning: Because the surfman surface does not have access to the window event loop you will need to manualy call [set_size] on the surface when the window is resized.

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

Get the back buffer

pub fn swap_buffers(&mut self) -> Result<(), SurfmanError>[src]

Swap the front and back buffers

pub fn set_size(&mut self, size: [u32; 2]) -> Result<(), SurfmanError>[src]

Set the size of the surface

Trait Implementations

impl Drop for SurfmanSurface[src]

impl GraphicsContext for SurfmanSurface[src]

type Backend = Glow

Internal type used by the backend to cache, optimize and store data. This roughly represents the GPU data / context a backend implementation needs to work correctly. Read more

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.