vulkano reeeeeeeeeeee

This commit is contained in:
2021-10-24 18:57:46 +02:00
parent 23e19bf9d0
commit 2834623ba7
12 changed files with 193 additions and 192 deletions

View File

@@ -4,7 +4,7 @@ use vulkan::gameobject::GameObject;
use crate::config::{LogConfig, RenderConfig};
use crate::game::TestGame;
use crate::vulkan::{LinePoint, VulkanRenderer};
use crate::vulkan::VulkanRenderer;
mod vulkan;
mod input;
@@ -18,17 +18,7 @@ fn main() {
let mut game = TestGame::new("config/input.toml", log_config);
let line_count = 30;
let line_vertices = (-line_count..=line_count)
.flat_map(|it| vec![
LinePoint { position: [it as f32, 0., -line_count as f32] },
LinePoint { position: [it as f32, 0., line_count as f32] },
LinePoint { position: [-line_count as f32, 0., it as f32] },
LinePoint { position: [line_count as f32, 0., it as f32] },
]).collect();
let (mut renderer, event_loop) = VulkanRenderer::init(
line_vertices,
log_config.vulkan_validation_layers,
RenderConfig::from_file("config/graphics.toml")
);