flyover / imgui-js

JavaScript bindings for Dear ImGui using Emscripten and TypeScript
https://flyover.github.io/imgui-js/example/
MIT License
962 stars 103 forks source link

Share texture atlases across contexts #19

Closed bavis-m closed 3 years ago

bavis-m commented 5 years ago

Hook up the function arguments to ImGuiContext that allow us to share texture atlases, and make the textureById cache global, so we share those font textures across contexts.

TODO: do we want separate shared/context-dependent texture lookups? This change forces us to share all textures (is there a downside to that?)

bavis-m commented 5 years ago

Note: I didn't do a build of the package with this commit, so none of the .js output is updated

flyover commented 3 years ago

Thank you for the pull request. See 096b7b1ee8f00fb3f9e61339dc8e0a9168c1ddc4.