update wgpu to 0.13
This commit is contained in:
parent
e6e3eff876
commit
c148557cab
15 changed files with 140 additions and 144 deletions
|
|
@ -23,7 +23,7 @@ impl Scene {
|
|||
) -> wgpu::RenderPass<'a> {
|
||||
encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
|
||||
label: None,
|
||||
color_attachments: &[wgpu::RenderPassColorAttachment {
|
||||
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
|
||||
view: target,
|
||||
resolve_target: None,
|
||||
ops: wgpu::Operations {
|
||||
|
|
@ -39,7 +39,7 @@ impl Scene {
|
|||
}),
|
||||
store: true,
|
||||
},
|
||||
}],
|
||||
})],
|
||||
depth_stencil_attachment: None,
|
||||
})
|
||||
}
|
||||
|
|
@ -55,8 +55,8 @@ fn build_pipeline(
|
|||
texture_format: wgpu::TextureFormat,
|
||||
) -> wgpu::RenderPipeline {
|
||||
let (vs_module, fs_module) = (
|
||||
device.create_shader_module(&wgpu::include_wgsl!("shader/vert.wgsl")),
|
||||
device.create_shader_module(&wgpu::include_wgsl!("shader/frag.wgsl")),
|
||||
device.create_shader_module(wgpu::include_wgsl!("shader/vert.wgsl")),
|
||||
device.create_shader_module(wgpu::include_wgsl!("shader/frag.wgsl")),
|
||||
);
|
||||
|
||||
let pipeline_layout =
|
||||
|
|
@ -78,14 +78,14 @@ fn build_pipeline(
|
|||
fragment: Some(wgpu::FragmentState {
|
||||
module: &fs_module,
|
||||
entry_point: "main",
|
||||
targets: &[wgpu::ColorTargetState {
|
||||
targets: &[Some(wgpu::ColorTargetState {
|
||||
format: texture_format,
|
||||
blend: Some(wgpu::BlendState {
|
||||
color: wgpu::BlendComponent::REPLACE,
|
||||
alpha: wgpu::BlendComponent::REPLACE,
|
||||
}),
|
||||
write_mask: wgpu::ColorWrites::ALL,
|
||||
}],
|
||||
})],
|
||||
}),
|
||||
primitive: wgpu::PrimitiveState {
|
||||
topology: wgpu::PrimitiveTopology::TriangleList,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue