pub trait NotCurrentGlContextSurfaceAccessor<T: SurfaceTypeTrait>: Sealed {
type Surface: GlSurface<T>;
type PossiblyCurrentContext: PossiblyCurrentGlContext;
// Required methods
fn make_current(
self,
surface: &Self::Surface
) -> Result<Self::PossiblyCurrentContext>;
fn make_current_draw_read(
self,
surface_draw: &Self::Surface,
surface_read: &Self::Surface
) -> Result<Self::PossiblyCurrentContext>;
}
Expand description
A trait that splits the methods accessing crate::surface::Surface
on not
current context.
Required Associated Types§
sourcetype PossiblyCurrentContext: PossiblyCurrentGlContext
type PossiblyCurrentContext: PossiblyCurrentGlContext
The possibly current context produced when making not current context current.
Required Methods§
sourcefn make_current(
self,
surface: &Self::Surface
) -> Result<Self::PossiblyCurrentContext>
fn make_current( self, surface: &Self::Surface ) -> Result<Self::PossiblyCurrentContext>
Make Self::Surface
on the calling thread producing the
Self::PossiblyCurrentContext
indicating that the context could
be current on the theard.
Platform specific
macOS: - This will block if your main thread is blocked.
sourcefn make_current_draw_read(
self,
surface_draw: &Self::Surface,
surface_read: &Self::Surface
) -> Result<Self::PossiblyCurrentContext>
fn make_current_draw_read( self, surface_draw: &Self::Surface, surface_read: &Self::Surface ) -> Result<Self::PossiblyCurrentContext>
The same as Self::make_current
, but provides a way to set read and
draw surfaces.
Api-specific:
WGL/CGL: - not supported.
Implementors§
source§impl<T: SurfaceTypeTrait> NotCurrentGlContextSurfaceAccessor<T> for glutin::context::NotCurrentContext
impl<T: SurfaceTypeTrait> NotCurrentGlContextSurfaceAccessor<T> for glutin::context::NotCurrentContext
type PossiblyCurrentContext = PossiblyCurrentContext
type Surface = Surface<T>
source§impl<T: SurfaceTypeTrait> NotCurrentGlContextSurfaceAccessor<T> for glutin::api::egl::context::NotCurrentContext
Available on egl_backend
only.
impl<T: SurfaceTypeTrait> NotCurrentGlContextSurfaceAccessor<T> for glutin::api::egl::context::NotCurrentContext
Available on
egl_backend
only.