I’ve just started to use GLFW, with only a little X11/XCB and OpenGL experience. First of all, I want to say I’ve looked through some of the code on github, and I think it’s beautifully made.
My question is about events in relation to context/window. The way I use X now, I have a single event loop in its own thread for [all] input/window events. I can create/modify windows separately at will, and it will dispatch based on the appropriate window from there very nicely.
I want to do the same thing when switching to GLFW/OpenGL. (And eventually Vulkan.)
The GLFW docs say you have to create a window first to even start the event loop. Also
glfwPollEvents do not accept/supply a window, like in X, and the event callbacks must be set per window.
So, do I need a new thread for every glfw window? I am trying to figure out how things are normally done, and the reasons for it, not to criticize. Thank you!