[−][src]Struct luminance_glutin::GlutinSurface
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]
dim: WindowDim,
title: &str,
win_opt: WindowOpt
) -> Result<Self, GlutinError>
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]
&mut self
) -> Result<Framebuffer<Flat, Dim2, (), ()>, GlutinError>
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]
fn state(&self) -> &Rc<RefCell<GraphicsState>>
[src]
fn pipeline_builder(&mut self) -> Builder<Self>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for GlutinSurface
impl !Send for GlutinSurface
impl !Sync for GlutinSurface
impl Unpin for GlutinSurface
impl !UnwindSafe for GlutinSurface
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,