Struct amethyst_renderer::TextureBuilder
[−]
pub struct TextureBuilder<D, T> { /* fields omitted */ }
Builds new textures.
Methods
impl TextureBuilder<[u8; 4], u8>
[src]
fn from_color_val<C: Into<[f32; 4]>>(rgba: C) -> Self
Creates a new TextureBuilder
from the given RGBA color value.
impl<D, T> TextureBuilder<D, T> where
D: AsRef<[T]>,
T: Pod,
[src]
D: AsRef<[T]>,
T: Pod,
fn new(data: D) -> Self
Creates a new TextureBuilder
with the given raw texture data.
fn mip_levels(self, val: u8) -> Self
Sets the number of mipmap levels to generate.
FIXME: Only encoders can generate mipmap levels.
fn with_size(self, w: u16, h: u16) -> Self
Sets the texture width and height in pixels.
fn dynamic(self, mutable: bool) -> Self
Sets whether the texture is mutable or not.
fn with_format(self, format: SurfaceType) -> Self
Sets the texture format
fn build(self, fac: &mut Factory) -> Result<Texture>
Builds and returns the new texture.
Trait Implementations
impl<D: Clone, T: Clone> Clone for TextureBuilder<D, T>
[src]
fn clone(&self) -> TextureBuilder<D, T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<D: Debug, T: Debug> Debug for TextureBuilder<D, T>
[src]
impl<D: Eq, T: Eq> Eq for TextureBuilder<D, T>
[src]
impl<D: Hash, T: Hash> Hash for TextureBuilder<D, T>
[src]
fn hash<__HDT: Hasher>(&self, __arg_0: &mut __HDT)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<D: PartialEq, T: PartialEq> PartialEq for TextureBuilder<D, T>
[src]
fn eq(&self, __arg_0: &TextureBuilder<D, T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TextureBuilder<D, T>) -> bool
This method tests for !=
.