Skip to content

Commit

Permalink
Do not load shader from cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Gui-Yom committed May 12, 2021
1 parent a7bc96d commit 2b43f66
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,16 @@ use winit::dpi::LogicalSize;
use winit::event_loop::EventLoop;
use winit::window::WindowBuilder;

use nuance::{Command, Nuance};
use std::path::PathBuf;
use std::str::FromStr;
use nuance::Nuance;

fn main() -> Result<()> {
let mut power_preference = PowerPreference::LowPower;
let mut shader = None;
for arg in std::env::args() {
match arg.as_str() {
"-H" => {
power_preference = PowerPreference::HighPerformance;
}
_ => {
shader = Some(arg);
}
_ => {}
}
}

Expand Down Expand Up @@ -53,12 +48,6 @@ fn main() -> Result<()> {
.with_visible(true);
let window = builder.build(&event_loop)?;

if let Some(shader) = shader {
event_loop
.create_proxy()
.send_event(Command::Load(PathBuf::from(shader)))?;
}

// Going async !
let app = futures_executor::block_on(Nuance::init(window, power_preference))?;
futures_executor::block_on(app.run(event_loop))?;
Expand Down

0 comments on commit 2b43f66

Please sign in to comment.