gfx_text icon indicating copy to clipboard operation
gfx_text copied to clipboard

Avoid allocation per draw

Open kvark opened this issue 9 years ago • 1 comments

gfx-rs itself doesn't use any allocations on a call-by-call basis, and it would be great if gfx_text didn't impose this overhead either. The allocations come from the constructed meshes and batches, even if implicit. What can be done:

  • have an OwnedBatch created once on init
  • update its Slice with updating the vertex/index buffers that the batch uses
  • send it to a stream as usual

kvark avatar May 15 '15 14:05 kvark

:+1: would be nice to have.

Kagami avatar May 15 '15 14:05 Kagami