Skip to content

Conversation

@publixsubfan
Copy link
Contributor

@publixsubfan publixsubfan commented Feb 5, 2021

Summary

Refactoring of GLVis to make it more amenable to opening multiple solutions within a single process. This avoid the need to fork in client-server mode, which may cause some issues with the native window framework on Mac OS X.

Related to #141.

Completed

  • Consolidates global state in aux_vis.cpp into GLVisWindow type, which handles creation of associated VisualizationScene and GLVisCommand objects
  • Move StreamReader functions into the object itself
  • Modularizes palette code into PaletteState object
  • Replaces pthreads in GLVisCommand with C++ standard library threads
  • Consolidate some shared code between threads.cpp, glvis.cpp, aux_js.cpp
    • See StreamState::NewMeshAndSolution, StreamState::CreateVisualizationScene

To be completed

  • Make VisualizationScene key event handlers rely on specific instance of GLVisWindow/VisualizationScene instead of a global pointer
  • Modify SdlWindow to support multiple windows with single event loop
  • Handle GLVisFont as a singleton, to avoid multiple initializations of Freetype
  • Replace fork() in client-server mode with opening a new GLVisWindow on a new thread

@tzanio tzanio added this to the glvis-4.1 milestone Jun 3, 2021
@publixsubfan
Copy link
Contributor Author

Closing in favor of #170 and #174.

@publixsubfan publixsubfan deleted the multithread-refactor-dev branch July 22, 2021 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants