linux shader building, complete side renaming, esc to quit

This commit is contained in:
steffen 2024-12-22 11:13:05 +01:00
parent c733c0519f
commit 57e862832a
5 changed files with 160 additions and 122 deletions

View file

@ -10,6 +10,7 @@ use log::*;
use winit::dpi::{LogicalSize, LogicalPosition};
use winit::event::{Event, WindowEvent};
use winit::event_loop::EventLoop;
use winit::keyboard::NamedKey;
use winit::window::{Window, WindowBuilder};
use vulkanalia::loader::{LibloadingLoader, LIBRARY};
@ -131,6 +132,11 @@ fn main() -> Result<()> {
if event.logical_key == "d" {
app.cur_pos += app.view_direction.cross(vertex::Vec3::new(0.0, 0.0, 1.0)) * 0.1;
}
if event.logical_key == NamedKey::Escape {
elwt.exit();
unsafe { app.device.device_wait_idle().unwrap(); }
unsafe { app.destroy(); }
}
},
_ => {}
}