TextureBinding

Struct TextureBinding 

Source
pub struct TextureBinding<D, S> { /* private fields */ }
Expand description

Opaque texture binding.

This type represents a bound Texture via BoundTexture. It can be used along with a Uniform to customize a shader’s behavior.

§Parametricity

  • D is the dimension of the original texture. It must implement Dimensionable in most useful methods.
  • S is the sampler type. It must implement SamplerType in most useful methods.

§Notes

You shouldn’t try to do store / cache or do anything special with that value. Consider it an opaque object.

Implementations§

Source§

impl<D, S> TextureBinding<D, S>

Source

pub fn binding(self) -> u32

Access the underlying binding value.

§Notes

That value shouldn’t be read nor store, as it’s only meaningful for backend implementations.

Trait Implementations§

Source§

impl<D, S> Debug for TextureBinding<D, S>
where D: Debug, S: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'a, D, S> Uniformable<'a, TextureBinding<D, S>> for GL33
where D: 'a + Dimensionable, S: 'a + SamplerType,

Source§

const SIZE: usize = 0usize

Return the size of the uniform. Read more
Source§

type Target = TextureBinding<D, S>

Source§

unsafe fn ty() -> UniformType

Reify the type of the uniform as a UniformType.
Source§

unsafe fn update( _: &mut Program, uniform: &'a Uniform<TextureBinding<D, S>>, value: <GL33 as Uniformable<'a, TextureBinding<D, S>>>::Target, )

Update the associated value of the Uniform in the given shader program.

Auto Trait Implementations§

§

impl<D, S> Freeze for TextureBinding<D, S>

§

impl<D, S> RefUnwindSafe for TextureBinding<D, S>

§

impl<D, S> !Send for TextureBinding<D, S>

§

impl<D, S> !Sync for TextureBinding<D, S>

§

impl<D, S> Unpin for TextureBinding<D, S>

§

impl<D, S> UnwindSafe for TextureBinding<D, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.