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
TextAtlasis quite expensive now since it will recompile shaders and recreate pipelines.This PR splits the pipeline cache into its own
Pipelinetype that can be cheaply cloned and reused by differentTextAtlasinstances.