2 ms·
A mesh may have a lot of triangles, but it's still a single object you can memory map. UIs are typically a bunch of heap allocations and pointer jumping all cre
by astrange 4y ago
A mesh may have a lot of triangles, but it's still a single object you can memory map. UIs are typically a bunch of heap allocations and pointer jumping all created at runtime. That can be surprisingly inefficient.
- 8n4vidtmkvmk 4y agothen make it efficient. overallocate a block of memory and use it for all your tiny ui elements. its exactly what games do.
- astrange 4y agoArena allocators only work when everything has the same lifetime. There are game-like UI libraries (https://github.com/ocornut/imgui https://github.com/ocornut/imgui) but to use them you have to write your program like you're a gamedev and Conway's Law usually fights that.