jvcleave / ofxImGui

Use ImGui in openFrameworks
300 stars 123 forks source link

it's possible to use more than one instance of ofxImGui (inside classes) in the same ofApp? #93

Closed moebiussurfing closed 1 year ago

moebiussurfing commented 5 years ago

I have an ofApp with some classes. One class have an ofxImGui working fine.

But when adding another class with another ofxImGu both panels are like locked, no mouse interaction.

The window settings are like shared by both instances or something...

Whats a good way to use more than one classes with ofxImGui's?

moebiussurfing commented 5 years ago

sorry, I see this pull request with this: https://github.com/jvcleave/ofxImGui/pull/53

moebiussurfing commented 5 years ago

solved using this branch: https://github.com/jvcleave/ofxImGui/pull/91

Daandelange commented 1 year ago

This should be fully supported now (in the develop branch), closing this ;)

For the record, two types of context sharing have been setup :

  1. Seamlessly share ofxImGui instances and setup() (for use by multiple plugins).
  2. Singleton : one ImGui context instance per ofAppBaseWindow until ImGui supports secondary host viewports. Context are isolated from each other.