Struct amethyst_renderer::TextureBuilder
[−]
[src]
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
[src]
Creates a new TextureBuilder
from the given RGBA color value.
impl<D, T> TextureBuilder<D, T> where
D: AsRef<[T]>,
T: Pod + Copy,
[src]
D: AsRef<[T]>,
T: Pod + Copy,
fn new(data: D) -> Self
[src]
Creates a new TextureBuilder
with the given raw texture data.
fn with_sampler(self, sampler: SamplerInfo) -> Self
[src]
Sets the SamplerInfo
for the texture
fn mip_levels(self, val: u8) -> Self
[src]
Sets the number of mipmap levels to generate.
FIXME: Only encoders can generate mipmap levels.
fn with_size(self, w: u16, h: u16) -> Self
[src]
Sets the texture width and height in pixels.
fn dynamic(self, mutable: bool) -> Self
[src]
Sets whether the texture is mutable or not.
fn with_format(self, format: SurfaceType) -> Self
[src]
Sets the texture format
fn with_channel_type(self, channel_type: ChannelType) -> Self
[src]
Sets the texture channel type
fn build(self, fac: &mut Factory) -> Result<Texture>
[src]
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>
[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<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)
[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<D: PartialEq, T: PartialEq> PartialEq for TextureBuilder<D, T>
[src]
fn eq(&self, __arg_0: &TextureBuilder<D, T>) -> bool
[src]
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
[src]
This method tests for !=
.