diff --git a/src/core/camera.rs b/src/core/camera.rs index 716167c..1be8ea5 100644 --- a/src/core/camera.rs +++ b/src/core/camera.rs @@ -4,7 +4,6 @@ use winit::event::{ElementState, KeyboardInput, VirtualKeyCode, WindowEvent}; use crate::render::Context; -// TODO: Implement Default rather than using new() #[repr(C)] #[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] pub struct CameraUniform { @@ -14,6 +13,12 @@ pub struct CameraUniform { _pad: f32, } +impl Default for CameraUniform { + fn default() -> Self { + Self::new() + } +} + impl CameraUniform { pub fn new() -> Self { Self {