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§

source

type Surface: GlSurface<T>

The surface supported by the context.

Required Methods§

source

fn make_current(&self, surface: &Self::Surface) -> Result<()>

Make Self::Surface current on the calling thread.

source

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§