pub struct Texture<R> where
R: Resources, {
pub surface: Texture<R, R8_G8_B8_A8>,
pub sampler: Sampler<R>,
pub view: ShaderResourceView<R, [f32; 4]>,
}
Pixel storage for texture.
impl<R> Texture<R> where R: Resources, | |
Creates a texture from path.
Creates a texture from image.
Creates texture from memory alpha.
Updates the texture with an image.
Formats the value using the given formatter. Read more
Performs copy-assignment from source
. Read more
The error when updating texture.
fn update<O, S>( &mut self, encoder: &mut Encoder<R, C>, format: Format, memory: &[u8], offset: O, size: S ) -> Result<(), <Texture<R> as UpdateTexture<Encoder<R, C>>>::Error> where O: Into<[u32; 2]>, S: Into<[u32; 2]>, | |
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
type Error = CombinedError
The error when creating texture.
Create texture from memory.
impl<R> Send for Texture<R> where <R as Resources>::Buffer: Send + Sync, <R as Resources>::Mapping: Send, <R as Resources>::Sampler: Send + Sync, <R as Resources>::ShaderResourceView: Send + Sync, <R as Resources>::Texture: Send + Sync, | |
impl<R> Sync for Texture<R> where <R as Resources>::Buffer: Send + Sync, <R as Resources>::Mapping: Send, <R as Resources>::Sampler: Send + Sync, <R as Resources>::ShaderResourceView: Send + Sync, <R as Resources>::Texture: Send + Sync, | |
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
impl<T> SetParameter for T | |
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where T: Parameter<Self>, | |
Sets value
as a parameter of self
.