Skip to content

Commit

Permalink
Switched to wgpu backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrueger committed Oct 23, 2023
1 parent 688a0e8 commit 4bc799d
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ fn main() {

let options = eframe::NativeOptions {
multisampling: 0,
renderer: eframe::Renderer::Wgpu,

Check failure on line 29 in src/main.rs

View workflow job for this annotation

GitHub Actions / clippy

no variant or associated item named `Wgpu` found for enum `eframe::Renderer` in the current scope

error[E0599]: no variant or associated item named `Wgpu` found for enum `eframe::Renderer` in the current scope --> src/main.rs:29:37 | 29 | renderer: eframe::Renderer::Wgpu, | ^^^^ variant or associated item not found in `Renderer`
hardware_acceleration: eframe::HardwareAcceleration::Preferred,
icon_data: Some(eframe::IconData::try_from_png_bytes(&include_bytes!("../build/linux/256x256.png")[..]).unwrap()),
..Default::default()
};
Expand All @@ -42,10 +44,16 @@ fn main() {
// Log to stdout (if you run with `RUST_LOG=debug`).
tracing_subscriber::fmt::init();

let native_options = eframe::NativeOptions::default();
let options = eframe::NativeOptions {
multisampling: 0,
renderer: eframe::Renderer::Wgpu,
hardware_acceleration: eframe::HardwareAcceleration::Preferred,
icon_data: Some(eframe::IconData::try_from_png_bytes(&include_bytes!("../build/linux/256x256.png")[..]).unwrap()),
..Default::default()
};
eframe::run_native(
format!("{} {}", APP_NAME, VERSION).as_str(),
native_options,
options,
Box::new(|cc| Box::new(game_cheetah::GameCheetahEngine::new(cc))),
);
}
Expand All @@ -55,10 +63,16 @@ fn main() {
// Log to stdout (if you run with `RUST_LOG=debug`).
tracing_subscriber::fmt::init();

let native_options = eframe::NativeOptions::default();
let options = eframe::NativeOptions {
multisampling: 0,
renderer: eframe::Renderer::Wgpu,
hardware_acceleration: eframe::HardwareAcceleration::Preferred,
icon_data: Some(eframe::IconData::try_from_png_bytes(&include_bytes!("../build/linux/256x256.png")[..]).unwrap()),
..Default::default()
};
eframe::run_native(
format!("{} {}", APP_NAME, VERSION).as_str(),
native_options,
options,
Box::new(|cc| Box::new(game_cheetah::GameCheetahEngine::new(cc))),
)
.unwrap();
Expand Down

0 comments on commit 4bc799d

Please sign in to comment.