Trait glitter::context::texture_units::TextureUnitBinding2d
[−]
[src]
pub trait TextureUnitBinding2d: ATextureUnitBinding { type Binder: BorrowMut<Texture2dBinder>; type Rest: ATextureUnitBinding; fn split_texture_2d(self) -> (Self::Binder, Self::Rest); fn bind_texture_2d<'a>(
self,
tex: &'a mut Texture2d
) -> (Texture2dBinding<'a>, Self::Rest)
where
Self: Sized, { ... } }
A texture unit binding that has a free GL_TEXTURE_2D
binding.
Associated Types
type Binder: BorrowMut<Texture2dBinder>
The type of binder this texture unit contains.
type Rest: ATextureUnitBinding
The texture unit that will be returned after binding the texture.
Required Methods
fn split_texture_2d(self) -> (Self::Binder, Self::Rest)
Split the texture unit into a binder and the remaining texture unit.
Provided Methods
fn bind_texture_2d<'a>(
self,
tex: &'a mut Texture2d
) -> (Texture2dBinding<'a>, Self::Rest) where
Self: Sized,
self,
tex: &'a mut Texture2d
) -> (Texture2dBinding<'a>, Self::Rest) where
Self: Sized,
Bind a 2D texture to this texture unit, returning a binding and the remaining texture unit.
Implementors
impl<T2, TC> TextureUnitBinding2d for TextureUnitBindingOf<T2, TC> where
T2: BorrowMut<Texture2dBinder>, type Binder = T2; type Rest = TextureUnitBindingOf<(), TC>;impl<'a, T2, TC> TextureUnitBinding2d for &'a mut TextureUnitBindingOf<T2, TC> where
T2: BorrowMut<Texture2dBinder>, type Binder = &'a mut Texture2dBinder; type Rest = TextureUnitBindingOf<(), &'a mut TC>;