pub struct Window(/* private fields */);Expand description
A wrapper type around GLFWwindow.
Implementations§
source§impl Window
impl Window
sourcepub fn from_c(window: *mut GLFWwindow) -> Self
pub fn from_c(window: *mut GLFWwindow) -> Self
Constructs this Window from an underlying c::GLFWwindow instance.
This will panic if window is null.
sourcepub fn make_context_current(&self)
pub fn make_context_current(&self)
Makes this window’s context current.
For more details, see glfwMakeContextCurrent.
sourcepub fn should_close(&self) -> bool
pub fn should_close(&self) -> bool
Queries whether this Window should be closed.
sourcepub fn ptr(&self) -> *const GLFWwindow
pub fn ptr(&self) -> *const GLFWwindow
Gets a constant pointer to the underlying c::GLFWwindow.
sourcepub fn ptr_mut(&self) -> *mut GLFWwindow
pub fn ptr_mut(&self) -> *mut GLFWwindow
Gets a mutable pointer to the underlying c::GLFWwindow.
sourcepub fn swap_buffers(&self)
pub fn swap_buffers(&self)
Swaps the underlying buffers of this window.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Window
impl RefUnwindSafe for Window
impl !Send for Window
impl !Sync for Window
impl Unpin for Window
impl UnwindSafe for Window
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more