Implement Default for CameraUniform
This commit is contained in:
parent
8470507391
commit
604f11a40f
|
@ -4,7 +4,6 @@ use winit::event::{ElementState, KeyboardInput, VirtualKeyCode, WindowEvent};
|
||||||
|
|
||||||
use crate::render::Context;
|
use crate::render::Context;
|
||||||
|
|
||||||
// TODO: Implement Default rather than using new()
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)]
|
#[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)]
|
||||||
pub struct CameraUniform {
|
pub struct CameraUniform {
|
||||||
|
@ -14,6 +13,12 @@ pub struct CameraUniform {
|
||||||
_pad: f32,
|
_pad: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for CameraUniform {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl CameraUniform {
|
impl CameraUniform {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|
Loading…
Reference in New Issue