Struct amethyst_renderer::Texture
[−]
[src]
pub struct Texture { /* fields omitted */ }
Handle to a GPU texture resource.
Methods
impl Texture
[src]
fn from_data<T: Pod + Copy, D: AsRef<[T]>>(data: D) -> TextureBuilder<D, T>
[src]
Builds a new texture with the given raw texture data.
fn from_color_val<C: Into<[f32; 4]>>(rgba: C) -> TextureBuilder<[u8; 4], u8>
[src]
Builds a new texture with the given raw texture data.
fn sampler(&self) -> &Sampler<Resources>
[src]
Returns the sampler for the texture.
fn view(&self) -> &RawShaderResourceView<Resources>
[src]
Returns the texture's raw shader resource view.
Trait Implementations
impl Clone for Texture
[src]
fn clone(&self) -> Texture
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Texture
[src]
impl Eq for Texture
[src]
impl Hash for Texture
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for Texture
[src]
fn eq(&self, __arg_0: &Texture) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Texture) -> bool
[src]
This method tests for !=
.
impl Asset for Texture
[src]
type Data = TextureData
The Data
type the asset can be created from.
type HandleStorage = DenseVecStorage<TextureHandle>
The ECS storage type to be used. You'll want to use VecStorage
in most cases.