[−][src]Struct rendy_texture::TextureBuilder
Generics-free texture builder.
Struct for staging data in preparation of building a Texture
Implementations
impl<'a> TextureBuilder<'a>
[src]
pub fn new() -> Self
[src]
New empty TextureBuilder
pub fn set_premultiplied_alpha(&mut self, premultiplied: bool) -> &mut Self
[src]
Set whether the image has premultiplied alpha
pub fn with_premultiplied_alpha(self, premultiplied: bool) -> Self
[src]
Set whether the image has premultiplied alpha
pub fn with_data<P: AsPixel>(self, data: impl Into<Cow<'a, [P]>>) -> Self
[src]
Set pixel data.
pub fn set_data<P: AsPixel>(
&mut self,
data: impl Into<Cow<'a, [P]>>
) -> &mut Self
[src]
&mut self,
data: impl Into<Cow<'a, [P]>>
) -> &mut Self
Set pixel data.
pub fn with_raw_data(
self,
data: impl Into<Cow<'a, [u8]>>,
format: Format
) -> Self
[src]
self,
data: impl Into<Cow<'a, [u8]>>,
format: Format
) -> Self
Set pixel data with manual format definition.
pub fn set_raw_data(
&mut self,
data: impl Into<Cow<'a, [u8]>>,
format: Format
) -> &mut Self
[src]
&mut self,
data: impl Into<Cow<'a, [u8]>>,
format: Format
) -> &mut Self
Set pixel data with manual format definition.
pub fn with_data_width(self, data_width: u32) -> Self
[src]
Set pixel data width.
pub fn set_data_width(&mut self, data_width: u32) -> &mut Self
[src]
Set pixel data width.
pub fn with_data_height(self, data_height: u32) -> Self
[src]
Set pixel data height.
pub fn set_data_height(&mut self, data_height: u32) -> &mut Self
[src]
Set pixel data height.
pub fn with_mip_levels(self, mip_levels: MipLevels) -> Self
[src]
Set number of generated or raw mip levels
pub fn set_mip_levels(&mut self, mip_levels: MipLevels) -> &mut Self
[src]
Set number of generated or raw mip levels
pub fn with_kind(self, kind: Kind) -> Self
[src]
Set image extent.
pub fn set_kind(&mut self, kind: Kind) -> &mut Self
[src]
Set image kind.
pub fn with_view_kind(self, view_kind: ViewKind) -> Self
[src]
With image view kind.
pub fn set_view_kind(&mut self, view_kind: ViewKind) -> &mut Self
[src]
Set image view kind.
pub fn with_sampler_info(self, sampler_info: SamplerDesc) -> Self
[src]
With image sampler info.
pub fn set_sampler_info(&mut self, sampler_info: SamplerDesc) -> &mut Self
[src]
Set image sampler info.
pub fn with_swizzle(self, swizzle: Swizzle) -> Self
[src]
With swizzle.
pub fn set_swizzle(&mut self, swizzle: Swizzle) -> &mut Self
[src]
Set swizzle.
pub fn build<B>(
&self,
next_state: ImageState,
factory: &'a mut Factory<B>
) -> Result<Texture<B>, BuildError> where
B: Backend,
[src]
&self,
next_state: ImageState,
factory: &'a mut Factory<B>
) -> Result<Texture<B>, BuildError> where
B: Backend,
Build texture.
Parameters
next_state
: The next state that this texture will be used in. It will get transitioned to this state after uploading.factory
: Factory to use to build the texture
Trait Implementations
impl<'a> Clone for TextureBuilder<'a>
[src]
fn clone(&self) -> TextureBuilder<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for TextureBuilder<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for TextureBuilder<'a>
impl<'a> Send for TextureBuilder<'a>
impl<'a> Sync for TextureBuilder<'a>
impl<'a> Unpin for TextureBuilder<'a>
impl<'a> UnwindSafe for TextureBuilder<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,