pub struct RenderContext { /* private fields */ }
Expand description
A rendering context that can be shared between tasks.
Implementations§
Source§impl RenderContext
impl RenderContext
Sourcepub fn get_proc_address(&mut self, procname: &str) -> *const c_void
pub fn get_proc_address(&mut self, procname: &str) -> *const c_void
Wrapper function, please refer to Window::get_proc_address
Trait Implementations§
Source§impl Context for RenderContext
impl Context for RenderContext
Source§fn window_ptr(&self) -> *mut GLFWwindow
fn window_ptr(&self) -> *mut GLFWwindow
Returns the pointer to the underlying
GLFWwindow
.Source§fn swap_buffers(&mut self)
fn swap_buffers(&mut self)
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. Read more
Source§fn is_current(&self) -> bool
fn is_current(&self) -> bool
Returns
true
if the window is the current context.Source§fn make_current(&mut self)
fn make_current(&mut self)
Wrapper for
glfwMakeContextCurrent
Source§fn should_close(&self) -> bool
fn should_close(&self) -> bool
Wrapper for
glfwWindowShouldClose
.Source§fn set_should_close(&mut self, value: bool)
fn set_should_close(&mut self, value: bool)
Wrapper for
glfwSetWindowShouldClose
.Source§fn post_empty_event(&self)
fn post_empty_event(&self)
Wrapper for
glfwPostEmptyEvent
.Source§impl Debug for RenderContext
impl Debug for RenderContext
Source§impl HasDisplayHandle for RenderContext
impl HasDisplayHandle for RenderContext
Source§fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>
fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>
Get a handle to the display controller of the windowing system.
Source§impl HasWindowHandle for RenderContext
impl HasWindowHandle for RenderContext
Source§fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>
fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>
Get a handle to the window.
impl Send for RenderContext
Auto Trait Implementations§
impl Freeze for RenderContext
impl RefUnwindSafe for RenderContext
impl !Sync for RenderContext
impl Unpin for RenderContext
impl UnwindSafe for RenderContext
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
Source§impl<T> HasRawDisplayHandle for Twhere
T: HasDisplayHandle + ?Sized,
impl<T> HasRawDisplayHandle for Twhere
T: HasDisplayHandle + ?Sized,
Source§fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>
fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>
👎Deprecated: Use
HasDisplayHandle
insteadSource§impl<T> HasRawWindowHandle for Twhere
T: HasWindowHandle + ?Sized,
impl<T> HasRawWindowHandle for Twhere
T: HasWindowHandle + ?Sized,
Source§fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>
fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>
👎Deprecated: Use
HasWindowHandle
insteadSource§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more