Skip to content

Commit

Permalink
update wgpu example
Browse files Browse the repository at this point in the history
  • Loading branch information
MoAlyousef committed Jul 26, 2024
1 parent ffd3f5c commit 0addfc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ resolver = "2"

[dependencies]
fltk = { version = "1", features = ["fltk-bundled", "rwh06"] }
wgpu = "0.19"
wgpu = "22.0"
pollster = "0.3"
6 changes: 5 additions & 1 deletion wgpu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ impl State<'_> {
&wgpu::DeviceDescriptor {
label: Some("device"),
required_features: wgpu::Features::empty(),
required_limits: wgpu::Limits::downlevel_defaults().using_resolution(adapter.limits()),
required_limits: wgpu::Limits::downlevel_webgl2_defaults(),
memory_hints: wgpu::MemoryHints::Performance
},
None,
)
Expand Down Expand Up @@ -60,16 +61,19 @@ impl State<'_> {
module: &shader,
entry_point: "vs_main",
buffers: &[],
compilation_options: wgpu::PipelineCompilationOptions::default(),
},
fragment: Some(wgpu::FragmentState {
module: &shader,
entry_point: "fs_main",
targets: &[Some(swapchain_format.into())],
compilation_options: wgpu::PipelineCompilationOptions::default(),
}),
primitive: wgpu::PrimitiveState::default(),
depth_stencil: None,
multisample: wgpu::MultisampleState::default(),
multiview: None,
cache: None,
});

Self {
Expand Down

0 comments on commit 0addfc0

Please sign in to comment.