Skip to content

Separate GLFW window creation and loop in a GUI-only thread #29

Description

@Hasan-Jawaheri

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions