Trait glfw::Context [−][src]
pub trait Context { fn window_ptr(&self) -> *mut GLFWwindow; fn window_id(&self) -> WindowId { ... } fn swap_buffers(&mut self) { ... } fn is_current(&self) -> bool { ... } fn make_current(&mut self) { ... } fn should_close(&self) -> bool { ... } fn set_should_close(&mut self, value: bool) { ... } fn post_empty_event(&self) { ... } }
Methods common to renderable contexts
Required methods
fn window_ptr(&self) -> *mut GLFWwindow
[src]
Returns the pointer to the underlying GLFWwindow
.
Provided methods
fn window_id(&self) -> WindowId
[src]
Returns the unique identifier for this window.
fn swap_buffers(&mut self)
[src]
Swaps the front and back buffers of the window. If the swap interval is greater than zero, the GPU driver waits the specified number of screen updates before swapping the buffers.
Wrapper for glfwSwapBuffers
.
fn is_current(&self) -> bool
[src]
Returns true
if the window is the current context.
fn make_current(&mut self)
[src]
Wrapper for glfwMakeContextCurrent
fn should_close(&self) -> bool
[src]
Wrapper for glfwWindowShouldClose
.
fn set_should_close(&mut self, value: bool)
[src]
Wrapper for glfwSetWindowShouldClose
.
fn post_empty_event(&self)
[src]
Wrapper for glfwPostEmptyEvent
.
Implementors
impl Context for RenderContext
[src]
impl Context for RenderContext
[src]fn window_ptr(&self) -> *mut GLFWwindow
[src]
impl Context for Window
[src]
impl Context for Window
[src]