made painter actually how I wanted it (draw now takes in an owned painter)
This commit is contained in:
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user