A reusable memory buffer for batched rendering, designed for maximum throughput. Access via the 'renderer' submodule.
A reusable memory buffer for batched rendering, designed for maximum throughput.
preallocate(n_sprites: int) → Nonepreallocate(n_sprites: int) → NonePreallocate internal buffers for a specific number of sprites. This prevents runtime allocations when drawing large batches.
Args
n_sprites : The number of sprites to preallocate capacity for.free() → Nonefree() → NoneFree the allocated internal memory.