Struct luminance_glfw::GlfwSurface
source · [−]pub struct GlfwSurface {
pub events_rx: Receiver<(f64, WindowEvent)>,
pub context: GL33Context,
}
Expand description
GLFW surface.
This type is a helper that exposes two important concepts: the GLFW event receiver that you can use it with to
poll events and the GL33Context
, which allows you to perform the rendering part.
Fields
events_rx: Receiver<(f64, WindowEvent)>
Wrapped GLFW events queue.
context: GL33Context
Wrapped luminance context.
Implementations
sourceimpl GlfwSurface
impl GlfwSurface
sourcepub fn new<E>(
create_window: impl FnOnce(&mut Glfw) -> Result<(Window, Receiver<(f64, WindowEvent)>), GlfwSurfaceError<E>>
) -> Result<Self, GlfwSurfaceError<E>>
pub fn new<E>(
create_window: impl FnOnce(&mut Glfw) -> Result<(Window, Receiver<(f64, WindowEvent)>), GlfwSurfaceError<E>>
) -> Result<Self, GlfwSurfaceError<E>>
Initialize GLFW to provide a luminance environment.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for GlfwSurface
impl !Send for GlfwSurface
impl !Sync for GlfwSurface
impl Unpin for GlfwSurface
impl !UnwindSafe for GlfwSurface
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more