Nelarius / imnodes

A small, dependency-free node editor for dear imgui
MIT License
2.06k stars 252 forks source link

Issue with dlls take 2 #88

Closed mathisloge closed 3 years ago

mathisloge commented 3 years ago

Following #74

It would also be good to have a SetImnodesContext and GetImnodesContext function that sets the variable g. If you have multiple dlls that depend on imnodes, each dll needs the global context of imnodes, which is currently not possible.

Internally, this would be a major change, as g would need to be replaced with a pointer. g would then be allocated by Initialize. With these changes, we can now share the context across multiple dlls.

I can confirm that this works. If you want, I can provide a PR.