Multiple Contexts
See original GitHub issueIs there a way for you to included the following native call methods like GetCurrentContext and SetCurrentContext?
// Context creation and access
// Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between imgui contexts.
// None of those functions is reliant on the current context.
IMGUI_API ImGuiContext* CreateContext(ImFontAtlas* shared_font_atlas = NULL);
IMGUI_API void DestroyContext(ImGuiContext* ctx = NULL); // NULL = destroy current context
IMGUI_API ImGuiContext* **GetCurrentContext**();
IMGUI_API void **SetCurrentContext**(ImGuiContext* ctx);
https://github.com/ocornut/imgui/blob/master/imgui.h
I need to have the ability to support multiple contexts because I’m using multiple secondary buffers in Vulkan.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Applying Learning in Multiple Contexts | Edutopia
When students manipulate new learning—by representing a math concept in a poem, for example—they create strong memories of it.
Read more >React multiple contexts - Stack Overflow
Now I use this.context.someFunction(); . This works. How can I do this if I need functions from two different parent components?
Read more >Context - React
Context provides a way to pass data through the component tree without having to pass ... If you need to read more than...
Read more >React Context & Hooks Tutorial #7 - Creating Multiple Contexts
Hey gang, in this tutorial I'll show you how to create multiple different contexts for different, un-releated data.
Read more >Usage of Multiple Contexts - React Deep Dive - Educative.io
It is entirely possible to use multiple Context Providers within the same component hierarchy. Nesting them is not a problem. Even Providers of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@perrymacmurray There is no solution, so you can implement it without any restrictions. At the moment I am more liberal about touching internal API, then before. I don’t think that anything else than context structs need to be done. I even think, that you can try to go with only basic code, which holds object pointer. No need to force yourself with implementing all struct fields etc. Only stuff you need to make things work. Just keep it clean, with general code style in mind.
Hi @SpaiR, sorry to revive a dead issue, but for my own code I was interested in switching between multiple contexts. Is there an existing way to do something like this, or is it still unimplemented?
If a solution doesn’t already exist, I’d love to give implementing context switching and maybe the internal API a shot, but I don’t completely understand what other than the contexts needs to be implemented. Do you have any advice?