pub struct GpuRenderPipeline {
pub shader_module: GpuShaderModule,
pub vertex_layout: GpuVertexBufferLayout,
pub instance_layout: Option<GpuVertexBufferLayout>,
pub primitive_topology: GpuPrimitiveTopology,
pub depth_stencil: Option<GpuDepthStencilState>,
}Expand description
Hardware-accelerated GPU render pipeline configuration.
Fields§
§shader_module: GpuShaderModule§vertex_layout: GpuVertexBufferLayout§instance_layout: Option<GpuVertexBufferLayout>§primitive_topology: GpuPrimitiveTopology§depth_stencil: Option<GpuDepthStencilState>Implementations§
Source§impl GpuRenderPipeline
impl GpuRenderPipeline
Sourcepub fn new_instanced_quad_pipeline(
viewport_width: f32,
viewport_height: f32,
) -> Result<Self, String>
pub fn new_instanced_quad_pipeline( viewport_width: f32, viewport_height: f32, ) -> Result<Self, String>
Constructs an authentic instanced UI quad render pipeline binding WGSL_ANALYTICAL_QUAD_SHADER.
Sourcepub fn new_stencil_clip_pipeline(
viewport_width: f32,
viewport_height: f32,
) -> Result<Self, String>
pub fn new_stencil_clip_pipeline( viewport_width: f32, viewport_height: f32, ) -> Result<Self, String>
Constructs a hardware stencil clip pipeline binding WGSL_STENCIL_CLIP_SHADER.
Sourcepub fn draw_instanced(
&self,
encoder: &mut GpuCommandEncoder,
vertex_count: usize,
instance_count: usize,
)
pub fn draw_instanced( &self, encoder: &mut GpuCommandEncoder, vertex_count: usize, instance_count: usize, )
Records an instanced draw command onto a command encoder.
Trait Implementations§
Source§impl Clone for GpuRenderPipeline
impl Clone for GpuRenderPipeline
Auto Trait Implementations§
impl Forget for GpuRenderPipeline
impl Freeze for GpuRenderPipeline
impl Move for GpuRenderPipeline
impl RefUnwindSafe for GpuRenderPipeline
impl Send for GpuRenderPipeline
impl Sync for GpuRenderPipeline
impl Unpin for GpuRenderPipeline
impl UnsafeUnpin for GpuRenderPipeline
impl UnwindSafe for GpuRenderPipeline
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