Remove large resources from the application. #16

Merged
shaunrd0 merged 45 commits from cleanup into master 2025-03-22 20:56:04 +00:00
Owner

This removes several 3D models that were stored using the Qt Resource system. By removing these models builds are much faster and the executable size was reduced from ~250MB to ~25MB.

All of these models were used for the example scene shown in the README screenshots. That scene can still be built by setting the QTK_GUI_SCENE=ON cmake option. When this option is set, we will clone a repository that contains the models and then they're loaded from disk when the scene starts. This wasn't tested or intended for packaging into a release, it's meant to be used only for development. In the future since we have QtkIOSystem it's possible we'll add some basic objects for toying with shaders that aren't so large on disk.

The release artifacts on GHA CI will now provide an empty scene with no objects or examples. The only exception is the default skybox seen in the README, which still exists in the empty scene - without it, we have a quite ugly opengl canvas. Eventually we can add support to customize the skybox, but without that piece I don't see any point in ripping out the default skybox.

This also refactors a lot of the code to organize it into the separate qtk components. Eventually libqtk can be removed from this project entirely and we can use FetchContent in cmake to obtain libqtk.

Enables single-click to show an object's details in the desktop application. Double-clicking an object will snap the camera to it's position in the scene.

Qtk and all it's components can now be built with Qt 6.4.2 provided by Ubuntu 24.04 apt package qt-base-dev. The README instructions have been updated to show this option, though it's still possible to bring your own Qt binaries if you'd like a newer version.

This PR is polluted with a lot of reformatting from clang-format changes. In the future keep the PRs smaller and avoid changing clang-format rules on a branch where I'm making other changes. It really makes things hard to look back on.

This removes several 3D models that were stored using the Qt Resource system. By removing these models builds are much faster and the executable size was reduced from ~250MB to ~25MB. All of these models were used for the example scene shown in the README screenshots. That scene can still be built by setting the `QTK_GUI_SCENE=ON` cmake option. When this option is set, we will clone a repository that contains the models and then they're loaded from disk when the scene starts. This wasn't tested or intended for packaging into a release, it's meant to be used only for development. In the future since we have `QtkIOSystem` it's possible we'll add some basic objects for toying with shaders that aren't so large on disk. The release artifacts on GHA CI will now provide an empty scene with no objects or examples. The only exception is the default skybox seen in the README, which still exists in the empty scene - without it, we have a quite ugly opengl canvas. Eventually we can add support to customize the skybox, but without that piece I don't see any point in ripping out the default skybox. This also refactors _a lot_ of the code to organize it into the separate qtk components. Eventually libqtk can be removed from this project entirely and we can use `FetchContent` in cmake to obtain libqtk. Enables single-click to show an object's details in the desktop application. Double-clicking an object will snap the camera to it's position in the scene. Qtk and all it's components can now be built with Qt 6.4.2 provided by Ubuntu 24.04 apt package `qt-base-dev`. The README instructions have been updated to show this option, though it's still possible to bring your own Qt binaries if you'd like a newer version. This PR is polluted with a lot of reformatting from clang-format changes. In the future keep the PRs smaller and avoid changing clang-format rules on a branch where I'm making other changes. It really makes things hard to look back on.
shaunrd0 added 40 commits 2025-03-22 12:47:57 +00:00
+ Disable static accessed though instance.
+ Do not mark destructors with override.
+ Fix spartan path.
+ Fix triangle draw mode.
Clang format.
Some checks failed
All Builds / Qtk (-DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG, -j $(nproc), ubuntu-latest) (push) Failing after 23s
All Builds / Qtk-Library (-DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG, -j $(nproc), ubuntu-latest) (push) Failing after 22s
All Builds / Qtk-Plugins (-DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG, -j $(nproc), ubuntu-latest) (push) Failing after 20s
All Builds / Qtk-Assimp-Targets (-DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/, ubuntu-latest) (push) Failing after 18s
Linting / Tidy (push) Failing after 24s
Linting / Format (app) (push) Failing after 23s
Linting / Format (src) (push) Failing after 23s
All Builds / Qtk (-DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG, -j $(nproc), macos-latest) (push) Has been cancelled
All Builds / Qtk (-DCMAKE_PREFIX_PATH=D:/a/qtk/qtk/Qt/$QT_VERSION/mingw81_64/ $CONFIG, , windows-latest) (push) Has been cancelled
All Builds / Qtk-Library (-DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG, -j $(nproc), macos-latest) (push) Has been cancelled
All Builds / Qtk-Library (-DCMAKE_PREFIX_PATH=D:/a/qtk/qtk/Qt/$QT_VERSION/mingw81_64/ $CONFIG, , windows-latest) (push) Has been cancelled
All Builds / Qtk-Plugins (-DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG, -j $(nproc), macos-latest) (push) Has been cancelled
All Builds / Qtk-Plugins (-DCMAKE_PREFIX_PATH=D:/a/qtk/qtk/Qt/$QT_VERSION/mingw81_64/ $CONFIG, , windows-latest) (push) Has been cancelled
All Builds / Qtk-Assimp-Targets (-DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/, macos-latest) (push) Has been cancelled
7fac6bafb4
:')
+ Remove Qtk::Skybox dependency on Qt resources.
+ Use run-clang-tidy in format script.
+ Fix missing return in QtkWidgetManager.
+ Fix CI tag ref.
+ Add output when starting GUI to explain controls.
+ Use QOpenGLShader to get compiled shader code in TreeView.
+ Remove last remaining Qt resources dependency in libqtk.
+ shaders.h in libqtk to define default GLSL shader programs.
shaunrd0 added 3 commits 2025-03-22 19:11:17 +00:00
shaunrd0 added 1 commit 2025-03-22 20:09:41 +00:00
shaunrd0 added 1 commit 2025-03-22 20:53:37 +00:00
shaunrd0 merged commit ee9d0247a8 into master 2025-03-22 20:56:04 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shaunrd0/qtk#16
No description provided.