AllenDang / giu

Cross platform rapid GUI framework for golang based on Dear ImGui.
MIT License
2.11k stars 127 forks source link

mainthread: support windows #764

Open gucio321 opened 4 months ago

gucio321 commented 4 months ago

We use mainthread libraries to allow giu commands on any thread (when imgui requires to run on main)

We currently have implementations for macos and linux but for windows none works.

gucio321 commented 4 months ago

hmm, well, when I look at it @AllenDang why are we using this miainthread in fact? Am I right above?

AllenDang commented 4 months ago

As I remember, OpenGL requires to run GPU related operations in the main thread, so I use mainthread to archive that. And at that time, I'm using golang wrapper of glfw to write a backend manually, which works great on linux/Mac/windows, for now, we are using glfw backend directly from Imgui right? Maybe we don't need mainthread anymore? Like the backend example in cimgui shows.

gucio321 commented 4 months ago

so in fact we just need to call NewMasterWindow in the same thread as Run, right?