🎉 Add shapes buffer to improve memory allocation

This commit is contained in:
Alejandro Alonso 2025-05-09 12:36:04 +02:00
parent 23bde76192
commit 03b4fe3558
9 changed files with 122 additions and 36 deletions

View file

@ -150,6 +150,13 @@ pub extern "C" fn set_view(zoom: f32, x: f32, y: f32) {
});
}
#[no_mangle]
pub extern "C" fn init_shapes_pool(capacity: usize) {
with_state!(state, {
state.init_shapes_pool(capacity);
});
}
#[no_mangle]
pub extern "C" fn use_shape(a: u32, b: u32, c: u32, d: u32) {
with_state!(state, {