refactor 2

This commit is contained in:
2019-07-30 15:17:52 +02:00
parent 5a67eb1042
commit 0f837ce65e
2 changed files with 142 additions and 125 deletions

View File

@@ -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,
}
}
}