msaa
This commit is contained in:
19
src/main.rs
19
src/main.rs
@@ -1,7 +1,7 @@
|
||||
use cgmath::{Matrix4, vec3, Vector3, Vector4};
|
||||
use winit::event::Event;
|
||||
|
||||
use crate::config::LogConfig;
|
||||
use crate::config::{LogConfig, RenderConfig};
|
||||
use crate::gameobject::{GameObject, GameObjectHandle, Updatable};
|
||||
use crate::input::InputState;
|
||||
use crate::player::Player;
|
||||
@@ -171,15 +171,18 @@ 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_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(),
|
||||
line_vertices,
|
||||
log_config.vulkan_validation_layers,
|
||||
RenderConfig::from_file("config/graphics.toml")
|
||||
);
|
||||
|
||||
game.game_start(&mut renderer);
|
||||
|
||||
Reference in New Issue
Block a user