cuinjune / Ofelia

A real-time cross-platform creative coding tool for multimedia development
GNU General Public License v3.0
359 stars 21 forks source link

One window for each patch? #97

Open Jonathhhan opened 1 month ago

Jonathhhan commented 1 month ago

I wonder, if it is possible to have one window for each patch. Currently they are merged into one window (one window for one Pure Data instance).

cuinjune commented 1 month ago

If OF can create multiple windows, then it's probably possible, although I'm not sure how performant that would be. You would also need to track the drawings for each patch so that Ofelia objects on a patch only draw to the corresponding window. I'm not sure how this can be done, and I'm also not sure whether there's a good use case for this feature.

Jonathhhan commented 1 month ago

I see. The use case would be, that I can open several different patches and they do not distract each other. Also, if I close one of those patches now, the window for both gets closed. Of course performance would be an issue, but if it is not much more than openening several OF apps, it could be worth it.

Jonathhhan commented 1 month ago

With the ImGui windows it does actually work, if I give them an individual name with $0 (but still all windows are closed, if I close one patch).

Edit: That is partly solved (for the ImGui windows) by making the Ofelia window local. Partly, because if I close the first window the second gets also closed, but if I close the second the first stays open. Here the patch, if you want to take a look: https://github.com/Jonathhhan/ofxOfeliaExtended/blob/main/ofeliaExtendedLib/examples/ofxOfeliaExtendedExamples/ofxStableDiffusionExample/data/ofxStableDiffusion.lua