pub struct PossiblyCurrentContext { /* private fields */ }
Expand description
A wrapper around GLXContext
that could be current for the current thread.
Implementations§
Source§impl PossiblyCurrentContext
impl PossiblyCurrentContext
Sourcepub fn make_current_surfaceless(&self) -> Result<()>
pub fn make_current_surfaceless(&self) -> Result<()>
Make this context current on the calling thread.
Requires the GLX_ARB_create_context extension and OpenGL 3.0 or greater.
Trait Implementations§
Source§impl AsRawContext for PossiblyCurrentContext
impl AsRawContext for PossiblyCurrentContext
Source§fn raw_context(&self) -> RawContext
fn raw_context(&self) -> RawContext
Get the raw context handle.
Source§impl Debug for PossiblyCurrentContext
impl Debug for PossiblyCurrentContext
Source§impl GetGlConfig for PossiblyCurrentContext
impl GetGlConfig for PossiblyCurrentContext
Source§impl GlContext for PossiblyCurrentContext
impl GlContext for PossiblyCurrentContext
Source§fn context_api(&self) -> ContextApi
fn context_api(&self) -> ContextApi
Get the
ContextApi
used by the context. Read moreSource§impl PossiblyCurrentGlContext for PossiblyCurrentContext
impl PossiblyCurrentGlContext for PossiblyCurrentContext
Source§type NotCurrentContext = NotCurrentContext
type NotCurrentContext = NotCurrentContext
The not current context type.
Source§type Surface<T: SurfaceTypeTrait> = Surface<T>
type Surface<T: SurfaceTypeTrait> = Surface<T>
The surface supported by the context.
Source§fn make_not_current(self) -> Result<Self::NotCurrentContext>
fn make_not_current(self) -> Result<Self::NotCurrentContext>
Make the context not current to the current thread and returns a
Self::NotCurrentContext
to indicate that the context is a not
current to allow sending it to the different thread. Read moreSource§fn make_not_current_in_place(&self) -> Result<()>
fn make_not_current_in_place(&self) -> Result<()>
Make the context not current to the current thread. If you need to
send the context to another thread, use
Self::make_not_current
instead.Source§fn is_current(&self) -> bool
fn is_current(&self) -> bool
Returns
true
if this context is the current one in this thread.Source§fn make_current<T: SurfaceTypeTrait>(
&self,
surface: &Self::Surface<T>,
) -> Result<()>
fn make_current<T: SurfaceTypeTrait>( &self, surface: &Self::Surface<T>, ) -> Result<()>
Make
Self::Surface
current on the calling thread. Read moreSource§fn make_current_draw_read<T: SurfaceTypeTrait>(
&self,
surface_draw: &Self::Surface<T>,
surface_read: &Self::Surface<T>,
) -> Result<()>
fn make_current_draw_read<T: SurfaceTypeTrait>( &self, surface_draw: &Self::Surface<T>, surface_read: &Self::Surface<T>, ) -> Result<()>
The same as
Self::make_current
but provides a way to set read and
draw surfaces explicitly. Read moreAuto Trait Implementations§
impl Freeze for PossiblyCurrentContext
impl RefUnwindSafe for PossiblyCurrentContext
impl !Send for PossiblyCurrentContext
impl !Sync for PossiblyCurrentContext
impl Unpin for PossiblyCurrentContext
impl UnwindSafe for PossiblyCurrentContext
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