Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add brushes as resources to the scene manager #431

Open
CryZe opened this issue Jun 10, 2021 · 2 comments
Open

Add brushes as resources to the scene manager #431

CryZe opened this issue Jun 10, 2021 · 2 comments
Labels
enhancement An improvement for livesplit-core. performance Affects the performance of the code. priority: high This is a high priority issue. rendering The issue or pull request is affecting the rendering.

Comments

@CryZe
Copy link
Collaborator

CryZe commented Jun 10, 2021

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.

@CryZe CryZe added enhancement An improvement for livesplit-core. rendering The issue or pull request is affecting the rendering. priority: high This is a high priority issue. performance Affects the performance of the code. labels Jun 10, 2021
@Hurricane996
Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement for livesplit-core. performance Affects the performance of the code. priority: high This is a high priority issue. rendering The issue or pull request is affecting the rendering.
Projects
None yet
Development

No branches or pull requests

2 participants