Struct naga::back::glsl::TextureMapping [−][src]
pub struct TextureMapping { pub texture: Handle<GlobalVariable>, pub sampler: Option<Handle<GlobalVariable>>, }
Expand description
Structure that connects a texture to a sampler or not
glsl pre vulkan has no concept of separate textures and samplers instead everything is a
gsamplerN
where g
is the scalar type and N
is the dimension, but naga uses separate textures
and samplers in the IR so the backend produces a HashMap
with the texture name
as a key and a TextureMapping
as a value this way the user knows where to bind.
Storage
images produce gimageN
and don’t have an associated sampler
so the sampler
field will be None
Fields
texture: Handle<GlobalVariable>
Expand description
Handle to the image global variable
sampler: Option<Handle<GlobalVariable>>
Expand description
Handle to the associated sampler global variable if it exists
Trait Implementations
impl Clone for TextureMapping
[src]
impl Clone for TextureMapping
[src]fn clone(&self) -> TextureMapping
[src]
fn clone(&self) -> TextureMapping
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for TextureMapping
impl Send for TextureMapping
impl Sync for TextureMapping
impl Unpin for TextureMapping
impl UnwindSafe for TextureMapping
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more