pub struct TextureBlitterBuilder<'a> {
device: &'a Device,
format: TextureFormat,
sample_type: FilterMode,
blend_state: Option<BlendState>,
}
Available on crate feature
wgsl
only.Expand description
A builder for the TextureBlitter
utility.
If you want the default TextureBlitter
use TextureBlitter::new
instead.
Fields§
§device: &'a Device
§format: TextureFormat
§sample_type: FilterMode
§blend_state: Option<BlendState>
Implementations§
source§impl<'a> TextureBlitterBuilder<'a>
impl<'a> TextureBlitterBuilder<'a>
sourcepub fn new(device: &'a Device, format: TextureFormat) -> Self
pub fn new(device: &'a Device, format: TextureFormat) -> Self
Returns a new TextureBlitterBuilder
§Arguments
device
- ADevice
format
- TheTextureFormat
of the texture that will be copied to. This has to have theRENDER_TARGET
usage.
sourcepub fn sample_type(self, sample_type: FilterMode) -> Self
pub fn sample_type(self, sample_type: FilterMode) -> Self
Sets the Sampler
Filtering Mode
sourcepub fn blend_state(self, blend_state: BlendState) -> Self
pub fn blend_state(self, blend_state: BlendState) -> Self
Sets the BlendState
that is used.
sourcepub fn build(self) -> TextureBlitter
pub fn build(self) -> TextureBlitter
Returns a new TextureBlitter
with given settings.
Auto Trait Implementations§
impl<'a> Freeze for TextureBlitterBuilder<'a>
impl<'a> !RefUnwindSafe for TextureBlitterBuilder<'a>
impl<'a> Send for TextureBlitterBuilder<'a>
impl<'a> Sync for TextureBlitterBuilder<'a>
impl<'a> Unpin for TextureBlitterBuilder<'a>
impl<'a> !UnwindSafe for TextureBlitterBuilder<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more