pub struct TexturedPipeline {
pub pipeline: RenderPipeline,
pub globals_layout: BindGroupLayout,
pub texture_layout: BindGroupLayout,
}Expand description
The compiled textured pipeline for rendering image quads and nine-slice patches with optional tint.
Two bind group layouts:
globals_layout(group 0): the viewportGlobalsuniform (vertex stage).texture_layout(group 1): atexture_2d<f32>(binding 0, fragment) and asampler(binding 1, fragment).
Fields§
§pipeline: RenderPipelineThe render pipeline (vertex + fragment stages, alpha blending).
globals_layout: BindGroupLayoutLayout of bind group 0 (the viewport Globals uniform).
texture_layout: BindGroupLayoutLayout of bind group 1 (texture + sampler).
Implementations§
Source§impl TexturedPipeline
impl TexturedPipeline
Sourcepub fn new(device: &Device, sample_count: u32) -> Self
pub fn new(device: &Device, sample_count: u32) -> Self
Build the textured 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 TexturedPipeline
impl !UnwindSafe for TexturedPipeline
impl Freeze for TexturedPipeline
impl Send for TexturedPipeline
impl Sync for TexturedPipeline
impl Unpin for TexturedPipeline
impl UnsafeUnpin for TexturedPipeline
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