initial (bad) voxel renderer

This commit is contained in:
2024-06-04 12:11:28 -04:00
commit 7ae6a01949
31 changed files with 4268 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
use nalgebra::Matrix4x3;
// this has cost me more than a couple of hours trying to figure out alignment :skull:
// putting transform at the beginning so I don't have to deal with its alignment
// I should probably look into encase (crate)
#[repr(C, align(16))]
#[derive(Clone, Copy, PartialEq, bytemuck::Zeroable)]
pub struct GridInfo {
pub transform: Matrix4x3<f32>,
pub width: u32,
pub height: u32,
}
unsafe impl bytemuck::Pod for GridInfo {}
impl Default for GridInfo {
fn default() -> Self {
Self {
transform: Matrix4x3::identity(),
width: 0,
height: 0,
}
}
}