Struct amethyst_renderer::TextureBuilder [−][src]
pub struct TextureBuilder<D, T> { /* fields omitted */ }
Builds new textures.
Methods
impl TextureBuilder<[u8; 4], u8>
[src]
impl TextureBuilder<[u8; 4], u8>
pub fn from_color_val<C: Into<[f32; 4]>>(rgba: C) -> Self
[src]
pub 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 + Copy,
[src]
impl<D, T> TextureBuilder<D, T> where
D: AsRef<[T]>,
T: Pod + Copy,
pub fn new(data: D) -> Self
[src]
pub fn new(data: D) -> Self
Creates a new TextureBuilder
with the given raw texture data.
pub fn with_sampler(self, sampler: SamplerInfo) -> Self
[src]
pub fn with_sampler(self, sampler: SamplerInfo) -> Self
Sets the SamplerInfo
for the texture
pub fn mip_levels(self, val: u8) -> Self
[src]
pub fn mip_levels(self, val: u8) -> Self
Sets the number of mipmap levels to generate.
FIXME: Only encoders can generate mipmap levels.
pub fn with_size(self, w: u16, h: u16) -> Self
[src]
pub fn with_size(self, w: u16, h: u16) -> Self
Sets the texture width and height in pixels.
pub fn dynamic(self, mutable: bool) -> Self
[src]
pub fn dynamic(self, mutable: bool) -> Self
Sets whether the texture is mutable or not.
pub fn with_format(self, format: SurfaceType) -> Self
[src]
pub fn with_format(self, format: SurfaceType) -> Self
Sets the texture format
pub fn with_channel_type(self, channel_type: ChannelType) -> Self
[src]
pub fn with_channel_type(self, channel_type: ChannelType) -> Self
Sets the texture channel type
pub fn build(self, fac: &mut Factory) -> Result<Texture>
[src]
pub 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]
impl<D: Clone, T: Clone> Clone for TextureBuilder<D, T>
fn clone(&self) -> 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[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<D: Debug, T: Debug> Debug for TextureBuilder<D, T>
[src]
impl<D: Debug, T: Debug> Debug for TextureBuilder<D, T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<D: Eq, T: Eq> Eq for TextureBuilder<D, T>
[src]
impl<D: Eq, T: Eq> Eq for TextureBuilder<D, T>
impl<D: Hash, T: Hash> Hash for TextureBuilder<D, T>
[src]
impl<D: Hash, T: Hash> Hash for TextureBuilder<D, T>
fn hash<__HDT: Hasher>(&self, state: &mut __HDT)
[src]
fn hash<__HDT: Hasher>(&self, state: &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[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
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]
impl<D: PartialEq, T: PartialEq> PartialEq for TextureBuilder<D, T>
fn eq(&self, other: &TextureBuilder<D, T>) -> bool
[src]
fn eq(&self, other: &TextureBuilder<D, T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &TextureBuilder<D, T>) -> bool
[src]
fn ne(&self, other: &TextureBuilder<D, T>) -> bool
This method tests for !=
.
Auto Trait Implementations
impl<D, T> Send for TextureBuilder<D, T> where
D: Send,
T: Send,
impl<D, T> Send for TextureBuilder<D, T> where
D: Send,
T: Send,
impl<D, T> Sync for TextureBuilder<D, T> where
D: Sync,
T: Sync,
impl<D, T> Sync for TextureBuilder<D, T> where
D: Sync,
T: Sync,