Trait glitter::context::program_context::ProgramContext
[−]
[src]
pub trait ProgramContext: AContext { type Binder: BorrowMut<ProgramBinder>; type Rest: AContext; fn split_program(self) -> (Self::Binder, Self::Rest); fn use_program<'a>(
self,
program: &'a mut Program
) -> (ProgramBinding<'a>, Self::Rest)
where
Self: Sized, { ... } }
An OpenGL context that has a free program binding.
Associated Types
type Binder: BorrowMut<ProgramBinder>
The type of binder this context contains.
type Rest: AContext
The OpenGL context that will be returned after binding a program.
Required Methods
fn split_program(self) -> (Self::Binder, Self::Rest)
Split the context into a binder and the remaining context.
Provided Methods
fn use_program<'a>(
self,
program: &'a mut Program
) -> (ProgramBinding<'a>, Self::Rest) where
Self: Sized,
self,
program: &'a mut Program
) -> (ProgramBinding<'a>, Self::Rest) where
Self: Sized,
Bind a program to this context's program, returning a new context and a binding.
Implementors
impl<B, F, P, R, T> ProgramContext for ContextOf<B, F, P, R, T> where
P: BorrowMut<ProgramBinder>, type Binder = P; type Rest = ContextOf<B, F, (), R, T>;impl<'a, B, F, P, R, T> ProgramContext for &'a mut ContextOf<B, F, P, R, T> where
&'a mut P: BorrowMut<ProgramBinder>, type Binder = &'a mut P; type Rest = ContextOf<&'a mut B, &'a mut F, (), &'a mut R, &'a mut T>;