Skip to content

Commit

Permalink
fix linux build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Jan 20, 2024
1 parent 7cadf53 commit 0e5adb1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use vec2::Vec2;
use winit::{
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoop, EventLoopBuilder, EventLoopProxy},
platform::windows::WindowBuilderExtWindows,
window::{Window, WindowBuilder},
};
mod image_io;
Expand Down Expand Up @@ -70,20 +69,15 @@ impl WindowHandler {

let size = window.inner_size();

/*#[cfg(windows)]
#[cfg(windows)]
let instance_descriptor = wgpu::InstanceDescriptor {
backends: wgpu::Backends::GL,
..Default::default()
};*/
};

//#[cfg(not(windows))]
#[cfg(not(windows))]
let instance_descriptor = wgpu::InstanceDescriptor::default();

let instance_descriptor = wgpu::InstanceDescriptor {
backends: wgpu::Backends::DX12,
..Default::default()
};

let instance = wgpu::Instance::new(instance_descriptor);
let surface = unsafe { instance.create_surface(&window).unwrap() };
let adapter = instance
Expand Down

0 comments on commit 0e5adb1

Please sign in to comment.