giu icon indicating copy to clipboard operation
giu copied to clipboard

mainthread: support windows

Open gucio321 opened this issue 1 year ago • 3 comments

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.

  • ref: https://github.com/AllenDang/giu/issues/735
  • also: https://github.com/golang/go/issues/64755

gucio321 avatar Feb 18 '24 19:02 gucio321

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

gucio321 avatar Feb 18 '24 20:02 gucio321

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.

AllenDang avatar Feb 19 '24 02:02 AllenDang

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

gucio321 avatar Feb 19 '24 16:02 gucio321