Temporarily use push constants to set view/projection matrices
This commit is contained in:
@@ -32,7 +32,7 @@ use vs::ty::PushConstants;
|
||||
|
||||
use crate::mesh::CPUMesh;
|
||||
|
||||
const VALIDATION_LAYERS: &[&str] = &[
|
||||
const VALIDATION_LAYERS: &[&str] = &[
|
||||
"VK_LAYER_LUNARG_standard_validation"
|
||||
];
|
||||
|
||||
@@ -111,6 +111,8 @@ impl VulkanRenderer {
|
||||
let mut data = GameData {
|
||||
push_constants: PushConstants {
|
||||
model: Matrix4::identity().into(),
|
||||
view: Matrix4::identity().into(),
|
||||
projection: Matrix4::identity().into(),
|
||||
},
|
||||
line_push_constants: LinePushConstants {
|
||||
model: Matrix4::identity().into(),
|
||||
@@ -469,6 +471,7 @@ pub fn start_event_loop(mut renderer: VulkanRenderer, mut game: Box<dyn Game>, e
|
||||
let ubo = game.update(&mut renderer);
|
||||
|
||||
event_loop.run(move |event, _, control_flow| {
|
||||
game.on_window_event(&event);
|
||||
match event {
|
||||
Event::WindowEvent { event: WindowEvent::CloseRequested, .. } => {
|
||||
*control_flow = ControlFlow::Exit;
|
||||
|
||||
Reference in New Issue
Block a user