From 511e4b92332db86c05e8f6d7ea215b23fc19d0fe Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Mon, 25 Mar 2024 15:40:27 +0000 Subject: [PATCH] Move Brickmap definition to brickmap_cache --- src/voxel/brickworld/brickmap.rs | 8 -------- src/voxel/brickworld/brickmap_cache.rs | 8 +++++++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/voxel/brickworld/brickmap.rs b/src/voxel/brickworld/brickmap.rs index 54cef2f..25e02ca 100644 --- a/src/voxel/brickworld/brickmap.rs +++ b/src/voxel/brickworld/brickmap.rs @@ -10,14 +10,6 @@ use super::{ shading_table::ShadingTableAllocator, }; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] -pub struct Brickmap { - pub bitmask: [u32; 16], - pub shading_table_offset: u32, - pub lod_color: u32, -} - #[repr(C)] #[derive(Debug, Default, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] struct WorldState { diff --git a/src/voxel/brickworld/brickmap_cache.rs b/src/voxel/brickworld/brickmap_cache.rs index 168b8c3..b446bf8 100644 --- a/src/voxel/brickworld/brickmap_cache.rs +++ b/src/voxel/brickworld/brickmap_cache.rs @@ -1,6 +1,12 @@ use crate::gfx::{BulkBufferBuilder, Context}; -use super::brickmap::Brickmap; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] +pub struct Brickmap { + pub bitmask: [u32; 16], + pub shading_table_offset: u32, + pub lod_color: u32, +} #[derive(Debug, Default, Copy, Clone)] pub struct BrickmapCacheEntry {