pub struct BoundTexture<'a, B, D, P>{ /* private fields */ }Expand description
A bound Texture.
§Parametricity
Bis the backend type. It must implementPipelineTexture.Dis the dimension. It must implementDimensionable.Pis the pixel type. It must implementPixel.
§Notes
Once a Texture is bound, it can be used and passed around to shaders. In order to do so,
you will need to pass a TextureBinding to your ProgramInterface. That value is unique
to each BoundTexture and should always be asked — you shouldn’t cache them, for instance.
Getting a TextureBinding is a cheap operation and is performed via the
BoundTexture::binding method.
Implementations§
Source§impl<'a, B, D, P> BoundTexture<'a, B, D, P>
impl<'a, B, D, P> BoundTexture<'a, B, D, P>
Sourcepub fn binding(&self) -> TextureBinding<D, P::SamplerType>
pub fn binding(&self) -> TextureBinding<D, P::SamplerType>
Obtain a TextureBinding object that can be used to refer to this bound texture in shader
stages.
§Notes
You shouldn’t try to do store / cache or do anything special with that value. Consider it an opaque object.
Auto Trait Implementations§
impl<'a, B, D, P> Freeze for BoundTexture<'a, B, D, P>
impl<'a, B, D, P> RefUnwindSafe for BoundTexture<'a, B, D, P>
impl<'a, B, D, P> Send for BoundTexture<'a, B, D, P>
impl<'a, B, D, P> Sync for BoundTexture<'a, B, D, P>
impl<'a, B, D, P> Unpin for BoundTexture<'a, B, D, P>
impl<'a, B, D, P> UnwindSafe for BoundTexture<'a, B, D, P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more