pub struct BlendRenderer {
device: Arc<Device>,
queue: Arc<Queue>,
pipeline: RenderPipeline,
bind_group_layout: BindGroupLayout,
uniform_buffer: Buffer,
sampler: Sampler,
cached_bind_group: Option<CachedBindGroup>,
}Expand description
Blend renderer for double-presets.
Fields§
§device: Arc<Device>§queue: Arc<Queue>§pipeline: RenderPipeline§bind_group_layout: BindGroupLayout§uniform_buffer: Buffer§sampler: Sampler§cached_bind_group: Option<CachedBindGroup>Cached bind group key and bind group for texture pair
Implementations§
Source§impl BlendRenderer
impl BlendRenderer
Sourcepub fn new(
device: Arc<Device>,
queue: Arc<Queue>,
texture_format: TextureFormat,
) -> Result<Self>
pub fn new( device: Arc<Device>, queue: Arc<Queue>, texture_format: TextureFormat, ) -> Result<Self>
Create a new blend renderer.
Sourcefn is_cached(&self, key_a: usize, key_b: usize) -> bool
fn is_cached(&self, key_a: usize, key_b: usize) -> bool
Check if cached bind group matches texture pair
Sourcefn get_cached_bind_group(&self) -> Option<&BindGroup>
fn get_cached_bind_group(&self) -> Option<&BindGroup>
Get or create a cached bind group for the texture pair.
Sourcefn create_and_cache_bind_group(
&mut self,
texture_a: &TextureView,
texture_b: &TextureView,
)
fn create_and_cache_bind_group( &mut self, texture_a: &TextureView, texture_b: &TextureView, )
Create and cache a new bind group for the texture pair.
Auto Trait Implementations§
impl Freeze for BlendRenderer
impl !RefUnwindSafe for BlendRenderer
impl Send for BlendRenderer
impl Sync for BlendRenderer
impl Unpin for BlendRenderer
impl !UnwindSafe for BlendRenderer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more