JerboaBurrow / jGL

A Cross-platform graphics library with OpenGL or Vulkan backends
MIT License
0 stars 0 forks source link

Sprite-, Shape- renderers should use a common data store template. #89

Closed Jerboa-app closed 3 days ago

Jerboa-app commented 2 weeks ago

Template encapsulates logic of inserting, removing, identifying T's with priority ordering.

Can't use map as the iteration on the cpu side is simply too slow compared to a pre-cached vector (contig.) and building the vec on the fly is also sub-optimal. (60fps, <100k shapes with a map, >500k with pre-cached vec).

Jerboa-app commented 2 weeks ago

https://en.cppreference.com/w/cpp/container/priority_queue

map of id to ptr