pub fn create(self, cx: &Context) -> wgpu::RenderPipeline {
        cx.device
            .create_render_pipeline(&wgpu::RenderPipelineDescriptor {
                label: None,
                layout: self.layout,
                vertex: wgpu::VertexState {
                    module: self.vertex,
                    entry_point: self.vertex_entry,
                    buffers: &[wgpu::VertexBufferLayout {
                        array_stride: self.vertex_layout.stride,
                        step_mode: self.vertex_layout.step_mode,
                        attributes: &self
                            .vertex_layout
                            .attributes
                            .iter()
                            .enumerate()
                            .map(|(i, &attr)| wgpu::VertexAttribute {
                                shader_location: i as _,
                                ..attr.into()
                            })
                            .collect::<Vec<_>>(),
                    }],
                },
                primitive: wgpu::PrimitiveState {
                    topology: wgpu::PrimitiveTopology::TriangleList,
                    strip_index_format: None,
                    front_face: wgpu::FrontFace::Ccw,
                    cull_mode: None,
                    unclipped_depth: false,
                    polygon_mode: wgpu::PolygonMode::Fill,
                    conservative: false,
                },
                depth_stencil: self.depth_stencil,
                multisample: wgpu::MultisampleState {
                    count: self.samples,
                    mask: !0,
                    alpha_to_coverage_enabled: false,
                },
                fragment: Some(wgpu::FragmentState {
                    module: self.fragment,
                    entry_point: self.fragment_entry,
                    targets: &[wgpu::ColorTargetState {
                        format: self.format,
                        blend: self.blend,
                        write_mask: wgpu::ColorWrites::all(),
                    }],
                }),
                multiview: None,
            })
    }
/// Creates a new [wgpu::RenderPipeline] from the stored pipeline configuration.
Creates a new [wgpu::RenderPipeline] from the stored pipeline configuration.
Creates a new [ wgpu :: RenderPipeline ] from the stored pipeline configuration .
pub fn create(self, cx: &Context) -> wgpu::RenderPipeline {
        cx.device
            .create_render_pipeline(&wgpu::RenderPipelineDescriptor {
                label: None,
                layout: self.layout,
                vertex: wgpu::VertexState {
                    module: self.vertex,
                    entry_point: self.vertex_entry,
                    buffers: &[wgpu::VertexBufferLayout {
                        array_stride: self.vertex_layout.stride,
                        step_mode: self.vertex_layout.step_mode,
                        attributes: &self
                            .vertex_layout
                            .attributes
                            .iter()
                            .enumerate()
                            .map(|(i, &attr)| wgpu::VertexAttribute {
                                shader_location: i as _,
                                ..attr.into()
                            })
                            .collect::<Vec<_>>(),
                    }],
                },
                primitive: wgpu::PrimitiveState {
                    topology: wgpu::PrimitiveTopology::TriangleList,
                    strip_index_format: None,
                    front_face: wgpu::FrontFace::Ccw,
                    cull_mode: None,
                    unclipped_depth: false,
                    polygon_mode: wgpu::PolygonMode::Fill,
                    conservative: false,
                },
                depth_stencil: self.depth_stencil,
                multisample: wgpu::MultisampleState {
                    count: self.samples,
                    mask: !0,
                    alpha_to_coverage_enabled: false,
                },
                fragment: Some(wgpu::FragmentState {
                    module: self.fragment,
                    entry_point: self.fragment_entry,
                    targets: &[wgpu::ColorTargetState {
                        format: self.format,
                        blend: self.blend,
                        write_mask: wgpu::ColorWrites::all(),
                    }],
                }),
                multiview: None,
            })
    }
pub fn create ( self , cx : & Context ) -> wgpu :: RenderPipeline { cx . device . create_render_pipeline ( & wgpu :: RenderPipelineDescriptor { label : None , layout : self . layout , vertex : wgpu :: VertexState { module : self . vertex , entry_point : self . vertex_entry , buffers : & [ wgpu :: VertexBufferLayout { array_stride : self . vertex_layout . stride , step_mode : self . vertex_layout . step_mode , attributes : & self . vertex_layout . attributes . iter ( ) . enumerate ( ) . map ( | ( i , & attr ) | wgpu :: VertexAttribute { shader_location : i as _ , .. attr . into ( ) } ) . collect :: < Vec < _ > > ( ) , } ] , } , primitive : wgpu :: PrimitiveState { topology : wgpu :: PrimitiveTopology :: TriangleList , strip_index_format : None , front_face : wgpu :: FrontFace :: Ccw , cull_mode : None , unclipped_depth : false , polygon_mode : wgpu :: PolygonMode :: Fill , conservative : false , } , depth_stencil : self . depth_stencil , multisample : wgpu :: MultisampleState { count : self . samples , mask : ! 0 , alpha_to_coverage_enabled : false , } , fragment : Some ( wgpu :: FragmentState { module : self . fragment , entry_point : self . fragment_entry , targets : & [ wgpu :: ColorTargetState { format : self . format , blend : self . blend , write_mask : wgpu :: ColorWrites :: all ( ) , } ] , } ) , multiview : None , } ) }
Creates a new [wgpu::RenderPipeline] from the stored pipeline configuration.
Creates a new [ wgpu :: RenderPipeline ] from the stored pipeline configuration .
self
cx
&Context
self
cx
&Context