Struct luminance_glutin::GlutinSurface[][src]

pub struct GlutinSurface {
    pub ctx: WindowedContext<PossiblyCurrent>,
    // 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.

Implementations

impl GlutinSurface[src]

pub fn new_gl33_from_builders<'a, WB, CB>(
    window_builder: WB,
    ctx_builder: CB
) -> Result<(Self, EventLoop<()>), GlutinError> where
    WB: FnOnce(&mut EventLoop<()>, WindowBuilder) -> WindowBuilder,
    CB: FnOnce(&mut EventLoop<()>, ContextBuilder<'a, NotCurrent>) -> ContextBuilder<'a, NotCurrent>, 
[src]

Create a new GlutinSurface by consuming a [WindowBuilder].

This is an alternative method to new_gl33 that is more flexible as you have access to the whole glutin types.

window_builder is the default object when passed to your closure and ctx_builder is already initialized for the OpenGL context (you’re not supposed to change it!).

pub fn new_gl33(
    window_builder: WindowBuilder,
    samples: u16
) -> Result<(Self, EventLoop<()>), 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<GL33, Dim2, (), ()>, FramebufferError>
[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]

type Backend = GL33

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.