Trait glitter::context::buffer_context::ArrayBufferContext
[−]
[src]
pub trait ArrayBufferContext: AContext { type Binder: BorrowMut<ArrayBufferBinder>; type Rest: AContext; fn split_array_buffer(self) -> (Self::Binder, Self::Rest); fn bind_array_buffer<'a>(
self,
buffer: &'a mut Buffer
) -> (ArrayBufferBinding<'a>, Self::Rest)
where
Self: Sized, { ... } }
An OpenGL context that has a free GL_ARRAY_BUFFER
binding.
Associated Types
type Binder: BorrowMut<ArrayBufferBinder>
The type of binder this context contains.
type Rest: AContext
The OpenGL context that will be returned after binding the array buffer.
Required Methods
fn split_array_buffer(self) -> (Self::Binder, Self::Rest)
Split this context into a binder and the remaining context.
Provided Methods
fn bind_array_buffer<'a>(
self,
buffer: &'a mut Buffer
) -> (ArrayBufferBinding<'a>, Self::Rest) where
Self: Sized,
self,
buffer: &'a mut Buffer
) -> (ArrayBufferBinding<'a>, Self::Rest) where
Self: Sized,
Bind a buffer to this context's array buffer, returning a new context and a binding.
See also
glBindBuffer
OpenGL docs
Implementors
impl<BA, BE, F, P, R, T> ArrayBufferContext for ContextOf<BufferBinderOf<BA, BE>, F, P, R, T> where
BA: BorrowMut<ArrayBufferBinder>, type Binder = BA; type Rest = ContextOf<BufferBinderOf<(), BE>, F, P, R, T>;impl<'a, BA, BE, F, P, R, T> ArrayBufferContext for &'a mut ContextOf<BufferBinderOf<BA, BE>, F, P, R, T> where
BA: BorrowMut<ArrayBufferBinder>, type Binder = &'a mut ArrayBufferBinder; type Rest = ContextOf<BufferBinderOf<(), &'a mut BE>, &'a mut F, &'a mut P, &'a mut R, &'a mut T>;impl<'a, BA, BE, F, P, R, T> ArrayBufferContext for &'a mut ContextOf<&'a mut BufferBinderOf<BA, BE>, F, P, R, T> where
BA: BorrowMut<ArrayBufferBinder>,
F: ToMut<'a>,
P: ToMut<'a>,
R: ToMut<'a>,
T: ToMut<'a>, type Binder = &'a mut ArrayBufferBinder; type Rest = ContextOf<BufferBinderOf<(), &'a mut BE>, F::Mut, P::Mut, R::Mut, T::Mut>;