pub trait PossiblyCurrentContextGlSurfaceAccessor<T: SurfaceTypeTrait>: Sealed {
type Surface: GlSurface<T>;
// Required methods
fn make_current(&self, surface: &Self::Surface) -> Result<()>;
fn make_current_draw_read(
&self,
surface_draw: &Self::Surface,
surface_read: &Self::Surface
) -> Result<()>;
}
Expand description
A trait that splits the methods accessing crate::surface::Surface
.
Required Associated Types§
Required Methods§
sourcefn make_current(&self, surface: &Self::Surface) -> Result<()>
fn make_current(&self, surface: &Self::Surface) -> Result<()>
Make Self::Surface
current on the calling thread.
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<()>
fn make_current_draw_read( &self, surface_draw: &Self::Surface, surface_read: &Self::Surface ) -> Result<()>
The same as Self::make_current
but provides a way to set read and
draw surfaces explicitly.
Api-specific:
CGL/WGL: - not supported.
Implementors§
source§impl<T: SurfaceTypeTrait> PossiblyCurrentContextGlSurfaceAccessor<T> for glutin::context::PossiblyCurrentContext
impl<T: SurfaceTypeTrait> PossiblyCurrentContextGlSurfaceAccessor<T> for glutin::context::PossiblyCurrentContext
source§impl<T: SurfaceTypeTrait> PossiblyCurrentContextGlSurfaceAccessor<T> for glutin::api::egl::context::PossiblyCurrentContext
Available on egl_backend
only.
impl<T: SurfaceTypeTrait> PossiblyCurrentContextGlSurfaceAccessor<T> for glutin::api::egl::context::PossiblyCurrentContext
Available on
egl_backend
only.source§impl<T: SurfaceTypeTrait> PossiblyCurrentContextGlSurfaceAccessor<T> for glutin::api::glx::context::PossiblyCurrentContext
Available on glx_backend
only.
impl<T: SurfaceTypeTrait> PossiblyCurrentContextGlSurfaceAccessor<T> for glutin::api::glx::context::PossiblyCurrentContext
Available on
glx_backend
only.