Struct glitter::context::texture_units::TextureUnitsOf
[−]
[src]
pub struct TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>(pub T0, pub T1, pub T2, pub T3, pub T4, pub T5, pub T6, pub T7);
This type holds all of the OpenGL texture units. Each type parameter
is the current type of a texture unit. See the ContextOf
docs for more details.
Methods
impl<T0, T1, T2, T3, T4, T5, T6, T7> TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, T7>
[src]
pub unsafe fn current() -> TextureUnits
[src]
Get the current texture units.
Safety
The same rules apply to this method as the
ContextOf::current_context()
method.
pub fn swap_0<N0>(
self,
new_unit: N0
) -> (T0, TextureUnitsOf<N0, T1, T2, T3, T4, T5, T6, T7>)
[src]
self,
new_unit: N0
) -> (T0, TextureUnitsOf<N0, T1, T2, T3, T4, T5, T6, T7>)
Replace the 0th texture unit context with a new value, returning the old value and a new set of texture units
pub fn swap_1<N1>(
self,
new_unit: N1
) -> (T1, TextureUnitsOf<T0, N1, T2, T3, T4, T5, T6, T7>)
[src]
self,
new_unit: N1
) -> (T1, TextureUnitsOf<T0, N1, T2, T3, T4, T5, T6, T7>)
Replace the 1st texture unit context with a new value, returning the old value and a new set of texture units
pub fn swap_2<N2>(
self,
new_unit: N2
) -> (T2, TextureUnitsOf<T0, T1, N2, T3, T4, T5, T6, T7>)
[src]
self,
new_unit: N2
) -> (T2, TextureUnitsOf<T0, T1, N2, T3, T4, T5, T6, T7>)
Replace the 2nd texture unit context with a new value, returning the old value and a new set of texture units
pub fn swap_3<N3>(
self,
new_unit: N3
) -> (T3, TextureUnitsOf<T0, T1, T2, N3, T4, T5, T6, T7>)
[src]
self,
new_unit: N3
) -> (T3, TextureUnitsOf<T0, T1, T2, N3, T4, T5, T6, T7>)
Replace the 3rd texture unit context with a new value, returning the old value and a new set of texture units
pub fn swap_4<N4>(
self,
new_unit: N4
) -> (T4, TextureUnitsOf<T0, T1, T2, T3, N4, T5, T6, T7>)
[src]
self,
new_unit: N4
) -> (T4, TextureUnitsOf<T0, T1, T2, T3, N4, T5, T6, T7>)
Replace the 4th texture unit context with a new value, returning the old value and a new set of texture units
pub fn swap_5<N5>(
self,
new_unit: N5
) -> (T5, TextureUnitsOf<T0, T1, T2, T3, T4, N5, T6, T7>)
[src]
self,
new_unit: N5
) -> (T5, TextureUnitsOf<T0, T1, T2, T3, T4, N5, T6, T7>)
Replace the 5th texture unit context with a new value, returning the old value and a new set of texture units
pub fn swap_6<N6>(
self,
new_unit: N6
) -> (T6, TextureUnitsOf<T0, T1, T2, T3, T4, T5, N6, T7>)
[src]
self,
new_unit: N6
) -> (T6, TextureUnitsOf<T0, T1, T2, T3, T4, T5, N6, T7>)
Replace the 6th texture unit context with a new value, returning the old value and a new set of texture units
pub fn swap_7<N7>(
self,
new_unit: N7
) -> (T7, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, N7>)
[src]
self,
new_unit: N7
) -> (T7, TextureUnitsOf<T0, T1, T2, T3, T4, T5, T6, N7>)
Replace the 7th texture unit context with a new value, returning the old value and a new set of texture units
pub unsafe fn active_nth(&self, idx: u32) -> TextureUnitBinding
[src]
Make the idx
th texture unit the active one, returning a new binding.
Safety
For convenience, this function takes self
by shared reference, not
mutable reference. Thus, this function can be to create multiple
live bindings. Special care must be taken to ensure that two bindings
do not conflict; since there can only ever be one active texture unit
in OpenGL, using this function may result in unexpected or undefined
behavior, and it should only be used as a fallback when glitter's
safe texture unit interface is not sufficient.