-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Support sharing Pipeline
state between TextAtlas
#95
Conversation
Thank you! What's the reason you'd like to use separate text atlases vs. reusing one atlas? The existing API was designed around reusing few atlases as possible, so I thought the pipeline recreation cost would be alright in that case. Is there a nice way we could do this without exposing |
The issue with reusing a single atlas is that you have to By having a local atlas for these sections of text, you can simply skip In
Sure! We could have a once cell singleton |
Thanks for the explanation, that makes sense to me. Maybe we could start with the singleton and split it out into a separate |
Hmm... A |
This reverts commit 4112732.
Alright that's too bad. Maybe we could go back to the original approach but name it |
Thank you! |
Creating a new
TextAtlas
is quite expensive now since it will recompile shaders and recreate pipelines.This PR splits the pipeline cache into its own
Pipeline
type that can be cheaply cloned and reused by differentTextAtlas
instances.