When creating a new Image/Buffer we call allocate_memory with the size it needs. This is not a good solution, we should lower the number of memory allocations as possible and use some kind of memory allocation strategy. Fortunately there are crates which depend on gfx-hal and have memory allocators for our needs:
Gfx-memory: https://github.com/gfx-rs/gfx-memory, which is not maintained at the moment.
Rendy: https://github.com/omni-viral/rendy
When creating a new Image/Buffer we call
allocate_memory
with the size it needs. This is not a good solution, we should lower the number of memory allocations as possible and use some kind of memory allocation strategy. Fortunately there are crates which depend ongfx-hal
and have memory allocators for our needs: Gfx-memory: https://github.com/gfx-rs/gfx-memory, which is not maintained at the moment. Rendy: https://github.com/omni-viral/rendy