refactor 2
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -2,7 +2,7 @@ use winit::{Event};
|
||||
use cgmath::{Matrix4, Rad, Vector3, Deg, Quaternion, Rotation3, One, Rotation, SquareMatrix};
|
||||
|
||||
mod vulkan;
|
||||
use crate::vulkan::{GameData, Game, LinePoint, GameObject, VulkanRenderer};
|
||||
use crate::vulkan::{GameData, Game, LinePoint, GameObject, VulkanRenderer, RenderLoopResult};
|
||||
|
||||
mod input;
|
||||
use crate::input::{InputState};
|
||||
@@ -100,5 +100,13 @@ fn main() {
|
||||
log_config.vulkan_validation_layers,
|
||||
);
|
||||
renderer.upload_mesh(mesh::load_mesh("models/cube.dae", true).into_iter().nth(0).unwrap());
|
||||
renderer.render_loop(&mut game);
|
||||
|
||||
let mut continue_rendering = true;
|
||||
|
||||
while continue_rendering {
|
||||
match renderer.render_loop(&mut game) {
|
||||
RenderLoopResult::Ok => {},
|
||||
RenderLoopResult::Quit => continue_rendering = false,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user