pub struct GradientPipeline {
pub pipeline: RenderPipeline,
pub bind_group_layout: BindGroupLayout,
}Expand description
The compiled gradient pipeline: gradient quads rendered via a per-draw uniform buffer carrying gradient type, stops, and geometry.
Fields§
§pipeline: RenderPipelineThe render pipeline (vertex + fragment stages, alpha blending).
bind_group_layout: BindGroupLayoutLayout of bind group 0: viewport uniform (binding 0) and gradient uniform buffer (binding 1).
Implementations§
Source§impl GradientPipeline
impl GradientPipeline
Sourcepub fn new(device: &Device, sample_count: u32) -> Self
pub fn new(device: &Device, sample_count: u32) -> Self
Build the gradient pipeline for a colour target in TARGET_FORMAT.
sample_count sets the MSAA multisample count (1 = no MSAA, 4 or 8 =
MSAA). Passing 1 reproduces the exact original code path.
Auto Trait Implementations§
impl !RefUnwindSafe for GradientPipeline
impl !UnwindSafe for GradientPipeline
impl Freeze for GradientPipeline
impl Send for GradientPipeline
impl Sync for GradientPipeline
impl Unpin for GradientPipeline
impl UnsafeUnpin for GradientPipeline
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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