Skip to content

Refactor application to use Qt6, enhance GUI features, and support x64 Linux in batch runs#91

Merged
SaltyJoss merged 110 commits into
Devfrom
gui_backend_refactor_and_development
Jun 17, 2026
Merged

Refactor application to use Qt6, enhance GUI features, and support x64 Linux in batch runs#91
SaltyJoss merged 110 commits into
Devfrom
gui_backend_refactor_and_development

Conversation

@SaltyJoss

Copy link
Copy Markdown
Owner

This pull request introduces significant improvements to the CMake build system and project structure for better maintainability, platform support, and modularity. Key changes include modernizing and restructuring the CMake configuration, refining preset and workflow usage, and cleaning up the source organization and dependencies.

CMake and Build System Modernization:

  • Updated the minimum required CMake version to 3.17 in all relevant CMakeLists.txt files and removed outdated policy handling for MSVC debug information. Output directories are now consistently set using a new OUTPUT_BASE variable. [1] [2]

  • Refined and modularized the core library's source structure by splitting source file lists into logical groups (DEP_CORE_SRC, SINGLE_BODY_SYS_SRC, etc.) and updating target_sources accordingly. Improved platform-specific compiler options and visibility settings. [1] [2]

  • Enhanced dependency management: removed direct fetching of several dependencies (GLFW, GLM, Assimp, ImGui, ImPlot) from the root CMakeLists.txt, and improved HDF5 linking logic for better compatibility across platforms and package configurations. [1] [2] [3]

CMake Presets and Workflow Improvements:

  • Overhauled CMakePresets.json to version 8, introducing new base and GUI presets, platform-specific configurations for Windows and Linux, and new build/test presets for streamlined CI and local development.

  • Updated the GitHub Actions workflow (.github/workflows/build.yml) to use the new CMake presets for configure, build, and test steps, ensuring consistency and leveraging the improved preset system.

Project Structure and Conditional Build Logic:

  • Refactored DSFE_App/CMakeLists.txt to use an option() for enabling/disabling the GUI module (DSFE_ENABLE_GUI), and conditionally add the DSFE_GUI subdirectory based on this flag.

Header and Source Cleanup:

  • Cleaned up includes and removed unnecessary or redundant header inclusions (e.g., <MathLibAPI.h>, pragma warnings) across multiple header files in DSFE_Core, improving clarity and reducing build warnings. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Platform and Export Improvements:

  • Improved platform detection and symbol export logic for shared libraries, adding GCC/Clang visibility attributes and platform-specific defines. [1] [2] [3]

Most Important Changes:

CMake and Build System Modernization

  • Updated minimum CMake version to 3.17, removed legacy policies, and restructured output directories for consistency. [1] [2]
  • Modularized core source file organization and improved platform/compiler options and visibility settings in DSFE_Core. [1] [2]

Dependency and Preset Management

  • Removed direct fetching of several dependencies (GLFW, GLM, Assimp, ImGui, ImPlot) and improved HDF5 linking for better platform compatibility. [1] [2] [3]
  • Overhauled CMakePresets.json to version 8, introducing new base, GUI, and platform-specific presets for configure/build/test.
  • Updated GitHub Actions workflow to leverage new CMake presets for configuration, build, and test steps.

Project Structure and Conditional Logic

  • Added DSFE_ENABLE_GUI option and conditional inclusion of the GUI module in the main application CMake file.

Header and Export Improvements

SaltyJoss added 30 commits June 2, 2026 15:37
 * This will be hardcoded UNTIL I have it working as expected, then I will convert it to a cmake preset file!
 * This eventually will be the workspaces internal default for a "new" project, however for now its going to be used to ensure the project can effectively replicate the imgui version
…unused due to differng logic I am still exploring)
NOTES (partially generated):
 * Refactored main window and rendering to use Qt (QApplication, QMainWindow, QOpenGLWidget) instead of GLFW.
 * Updated `Application`, `DSFE_MainWindow`, `ProjectPage`, and `ViewportWidget` to support Qt-based management and input.
 * Introduced eKeyCode for unified key handling.
 * Adapted `SimulationManager` and rendering pipeline for Qt, including new `present.frag.glsl` shader.
 * Removed GLFW-specific code and update CMakeLists.txt accordingly.
 * Added KeyCode.h for cross-platform input.

TODO:
 * Test loading of dynamic systems
 * Start to really remove GLFW from code
 * Cleanup existing code
 * Replicate process for ControlPanel, DSL editor, and DebugPanel(CLI)
 * Remove hardcoded plugin path and cmake path, replace with permanent solution
 * Introduced setFltArray2 for float array uniforms in shaders and update usage for cascade splits.
 * Removed unused GLFW includes and redundant headers.
 * Adjusted QApplication initialization order.
 * Changed shadow pass FBO binding to _presentationFBO.
 * Introduced ScopeGLContext for RAII-based OpenGL context management using user-provided hooks (this was like 6 hours of debugging btw, knowing it was context but not knowing how to fix it)
 * Added context hook support to SimManager and set hooks from ViewportWidget.
 * Added ScopeGLContext for current use in robot loading to ensure correct context.
 * Added GL_CHECKPOINT macro for error checking and perform minor code clean-ups when debugging (REMOVE FOR RELEASE).
… logic in `simPropertiesPanel` and `buildIntegratorCombos`
… `jointInfoPanel` and `displayJointInfo`

 * Not really sure why I did this before getting the scripts working.
 * Going to add the dt fraction next, then focus on just getting script functioning back!
* With help from AI for this, only for the actual Qt6 syntax (still learning).
…xing)

 * The running is malformed somewhere (need to fix now)
 * I believe Qt6 means I can add syntax highlighting!!
 * Need to coordinate colours
…ecks rather than previous placement in `renderViewport`

 * Also removed old `render()` method as it is no decrepid
@SaltyJoss SaltyJoss self-assigned this Jun 17, 2026
@SaltyJoss SaltyJoss added documentation Improvements or additions to documentation feature New feature or request fixes fixing existing issues refactor labels Jun 17, 2026
@SaltyJoss SaltyJoss merged commit da5c4e7 into Dev Jun 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feature New feature or request fixes fixing existing issues refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant