GLFW won't allow creation of windows in any threads other than the main thread. Further, it only wants on glfwPoll to happen. So Wasabi should have the main (first) thread run only window-related tasks, and run the rest of the rendering (and whatever else) starting in a new separate thread.
Functional requirements:
- Make wasabi start (main thread) by forking a new thread and running
WInitialize over there.
- Make the main thread allow GUI plugins to operate.
- GLFW GUI plugin should have a queue of window creation requests, where GLFW window creation actually happens. GLFW window creation functions will simply submit to the thread and wait for completion.
- GLFW GUI plugin should poll events in the GUI thread, between window creations.
GLFW won't allow creation of windows in any threads other than the main thread. Further, it only wants on glfwPoll to happen. So Wasabi should have the main (first) thread run only window-related tasks, and run the rest of the rendering (and whatever else) starting in a new separate thread.
Functional requirements:
WInitializeover there.