Skip to content

Commit

Permalink
refactor: update target os settings for cross-platform compatibility
Browse files Browse the repository at this point in the history
- change the target os check from `macos` to `linux`
- add a block for `windows` target os and include all `wgpu` backends
  • Loading branch information
falcucci committed Sep 21, 2024
1 parent 674c220 commit 0d57e51
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/offscreen_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ impl OffscreenRenderer {
wgpu::Backends::METAL
}

#[cfg(not(target_os = "macos"))]
#[cfg(target_os = "linux")]
{
wgpu::Backends::VULKAN
}

#[cfg(target_os = "windows")]
{
wgpu::Backends::all()
}
}

pub async fn draw(&mut self, scene: &Scene) -> ImageBuffer<Rgba<u8>, Vec<u8>> {
Expand Down

0 comments on commit 0d57e51

Please sign in to comment.