fix ubo
This commit is contained in:
@@ -4,7 +4,7 @@ use winit::event::Event;
|
||||
use crate::config::LogConfig;
|
||||
use crate::input::InputState;
|
||||
use crate::vulkan::{Game, GameObject, GameObjectHandle, LinePoint, MeshHandle, VulkanRenderer};
|
||||
use crate::vulkan::vs::ty::UniformBufferObject;
|
||||
use crate::vulkan::vs::ty::ObjectUniformData;
|
||||
|
||||
mod vulkan;
|
||||
mod input;
|
||||
@@ -25,7 +25,7 @@ impl Game for TestGame {
|
||||
self.input.on_window_event(event);
|
||||
}
|
||||
|
||||
fn update(self: &mut Self, renderer: &mut VulkanRenderer) -> UniformBufferObject {
|
||||
fn update(self: &mut Self, renderer: &mut VulkanRenderer) -> ObjectUniformData {
|
||||
self.input.frame_start();
|
||||
let time = (renderer.game_data.start_time.elapsed().unwrap().as_micros() as f64 / 1000000.0) as f32;
|
||||
|
||||
@@ -68,12 +68,10 @@ impl Game for TestGame {
|
||||
|
||||
renderer.game_data.line_push_constants.view = view.into();
|
||||
renderer.game_data.line_push_constants.projection = proj.into();
|
||||
renderer.game_data.push_constants.view = view.into();
|
||||
renderer.game_data.push_constants.projection = proj.into();
|
||||
|
||||
self.input.frame_end();
|
||||
|
||||
UniformBufferObject {
|
||||
ObjectUniformData {
|
||||
view: view.into(),
|
||||
projection: proj.into(),
|
||||
time,
|
||||
|
||||
Reference in New Issue
Block a user