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§

source

type Surface: GlSurface<T>

The surface supported by the context.

source

type PossiblyCurrentContext: PossiblyCurrentGlContext

The possibly current context produced when making not current context current.

Required Methods§

source

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.

source

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§