made painter actually how I wanted it (draw now takes in an owned painter)

This commit is contained in:
2025-08-23 15:20:25 -04:00
parent 6fbdf9fbc8
commit 2ffb09bef0
10 changed files with 60 additions and 50 deletions

View File

@@ -61,6 +61,12 @@ macro_rules! primitives {
}
}
impl PrimitiveData {
pub fn clear(&mut self) {
$(self.$name.clear();)*
}
}
$(
unsafe impl bytemuck::Pod for $ty {}
unsafe impl bytemuck::Zeroable for $ty {}
@@ -87,6 +93,12 @@ impl Primitives {
});
vec.push(data);
}
pub(crate) fn clear(&mut self) {
self.updated = true;
self.instances.clear();
self.data.clear();
}
}
primitives!(