LiveSplit / livesplit-core

livesplit-core is a library that provides a lot of functionality for creating a speedrun timer.
https://livesplit.org/
Apache License 2.0
209 stars 58 forks source link

Add brushes as resources to the scene manager #431

Open CryZe opened 3 years ago

CryZe commented 3 years ago

As it turns out, creating brushes is actually quite expensive with a lot of rendering backends. So we definitely want to only create them once and then just attach them to the individual entities.

Hurricane996 commented 2 years ago

I think we should globally cache solid color shaders because there's likely to be a lot of them that are mostly identical. The other shaders all depend on width and height so tbey should probably belong to a local cache, but for the color shaders I see no harm in just having a lazy_static lru cache somewhere with a reasonable size.

Hurricane996 commented 2 years ago

although checking again it appears the solid color shaders are also by far the least computationally expensive, to the point where caching it is probably not even worth it.