PLAT-11506#9
Conversation
Added a script that takes the ttf font file and converts it into a binary header file. It also generates defines so we can actually use it in c++ code effectively. Added a build script to run the fontawesome generation when the script/font changes
And added a strike through button (for this is not active)
Introduced cameraFocus state to AppState for targeting specific bounding spheres. Updated camera trigger handling to use focusSphere. Enhanced the Camera menu to allow focusing on the whole model or individual meshes.
…the whole open source move
Remove global polygon mode state and UI; polygon mode is now determined per-mesh based on mesh topology. Refactor MeshRenderable and GraphicsEffect to support this, replacing SetShaderName/SetConfig with a new Reset method. Update UI to remove polygon mode selection and improve disabled state handling for missing mesh/model data.
Update Camera::GetProjection() to use a minimum far plane of 1.0f and set the near plane relative to the far plane, improving projection matrix stability and depth range handling. PLAT-11626
Split monolithic UIRenderer into focused modules: uiGeneralWindow, uiMenubar, uiAnimationPlayback, uiCustomWidgets, and uiConsts. Moved UI logic into these components for better separation of concerns and maintainability. Introduced MenuState for UI visibility and unified file loading via cmfLoadRequest. Modernized code with improved state management, input handling, and C++ idioms. SceneRenderer no longer manages cmfContent callbacks
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v20.1.2
Click here for the full clang-format patch
diff --git a/src/viewer/rendering/camera.cpp b/src/viewer/rendering/camera.cpp
index 7ca7d8a..160e37a 100644
--- a/src/viewer/rendering/camera.cpp
+++ b/src/viewer/rendering/camera.cpp
@@ -119 +119 @@ Matrix Camera::GetProjection() const
- const float nearPlane = std::max( farPlane / 100.0f , centerDepth - boundingDepth );
+ const float nearPlane = std::max( farPlane / 100.0f, centerDepth - boundingDepth );
Have any feedback or feature suggestions? Share it here.
There was a problem hiding this comment.
Pull request overview
This PR enhances the viewer UI by integrating Font Awesome icons (including build-time header generation), refactors shader cache generation for more robust parsing (including multi-usage vertex inputs), and improves effect/pipeline reconfiguration and camera focusing behavior.
Changes:
- Integrate Font Awesome via a submodule + CMake-driven Python header generation, and update the UI to use icon-based controls.
- Refactor shader cache generation to parse vertex declarations and support
#pragma multi_usageinputs. - Add effect reset/recreate behavior and adjust rendering/camera state flows (pipeline reset, camera focus targeting, mesh rendering mode cleanup).
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/viewer/scripts/shaderCacheCreator.py | Refactor shader cache generation; adds multi-usage vertex input parsing and cleaner code structure. |
| src/viewer/scripts/fontAwesomeCreator.py | New generator for Font Awesome TTF binary header + icon lookup header. |
| src/viewer/rendering/vulkan/graphicseffect.h | Adds Reset() API for reinitializing an effect with shader name + config. |
| src/viewer/rendering/vulkan/graphicseffect.cpp | Implements pipeline recreation on config changes and effect resets. |
| src/viewer/rendering/uiRenderer.h | Switches playback UI API to return icons (FaIcon) and includes generated Font Awesome lookup. |
| src/viewer/rendering/uiRenderer.cpp | Adds Font Awesome font merge, icon button helpers, and UI updates (camera focus menu, playback icons, etc.). |
| src/viewer/rendering/uiRenderer_template_impl.h | Adds disabled-state UI feedback when the model lacks requested axis data. |
| src/viewer/rendering/renderable/mesh.h | Simplifies SetRenderingMode signature (removes polygon mode param). |
| src/viewer/rendering/renderable/mesh.cpp | Uses GraphicsEffect::Reset, removes polygon-mode callback wiring, and derives polygon/topology from mesh topology. |
| src/viewer/rendering/models/primitiveEffects.cpp | Migrates effect setup to Reset() for some effects; keeps existing shader name flows for axis variants. |
| src/viewer/rendering/camera.h | Updates camera trigger handler signature to accept a focus sphere. |
| src/viewer/rendering/camera.cpp | Uses cameraFocus to focus on sub-objects and adjusts projection near/far calculation. |
| src/viewer/CMakeLists.txt | Adds Font Awesome header generation target + include dir; clarifies shader generation steps. |
| src/viewer/appState.h | Removes polygon mode state; adds cameraFocus state. |
| src/viewer/appState.cpp | Ensures cameraFocus callbacks are invoked. |
| .gitmodules | Adds the Font Awesome submodule entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fixed formatting in Camera::GetProjection(). - Adjusted ImGui item width scoping in UIAnimationPlayback::Render(). - Improved font memory management in UIRenderer::Initialize(). - Changed icon size handling in fontAwesomeCreator.py to use floats.
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v20.1.2
Click here for the full clang-format patch
diff --git a/src/viewer/appState.cpp b/src/viewer/appState.cpp
index ab502bc..f6ad7c2 100644
--- a/src/viewer/appState.cpp
+++ b/src/viewer/appState.cpp
@@ -34 +33,0 @@ void AppState::ResetModelState()
-
diff --git a/src/viewer/application.cpp b/src/viewer/application.cpp
index 460acec..8db37e9 100644
--- a/src/viewer/application.cpp
+++ b/src/viewer/application.cpp
@@ -209 +209 @@ void Application::Run()
-
+
diff --git a/src/viewer/main.cpp b/src/viewer/main.cpp
index 6c66d95..c48c467 100644
--- a/src/viewer/main.cpp
+++ b/src/viewer/main.cpp
@@ -25 +25 @@ int main( int argc, char** argv )
- {
+ {
diff --git a/src/viewer/rendering/ui/uiRenderer.cpp b/src/viewer/rendering/ui/uiRenderer.cpp
index 3ee5b36..a478586 100644
--- a/src/viewer/rendering/ui/uiRenderer.cpp
+++ b/src/viewer/rendering/ui/uiRenderer.cpp
@@ -58 +58 @@ void UIRenderer::Initialize( GLFWwindow* window, AppState& state )
- io.Fonts->AddFontFromMemoryTTF( (void*)fa_solid_900_ttf_data, static_cast<int>(fa_solid_900_ttf_size), UiConsts::FONT_AWESOME_SIZE, &config, iconRanges );
+ io.Fonts->AddFontFromMemoryTTF( (void*)fa_solid_900_ttf_data, static_cast<int>( fa_solid_900_ttf_size ), UiConsts::FONT_AWESOME_SIZE, &config, iconRanges );
Have any feedback or feature suggestions? Share it here.
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v20.1.2
Click here for the full clang-format patch
diff --git a/src/viewer/appState.cpp b/src/viewer/appState.cpp
index ab502bc..f6ad7c2 100644
--- a/src/viewer/appState.cpp
+++ b/src/viewer/appState.cpp
@@ -34 +33,0 @@ void AppState::ResetModelState()
-
diff --git a/src/viewer/application.cpp b/src/viewer/application.cpp
index 460acec..8db37e9 100644
--- a/src/viewer/application.cpp
+++ b/src/viewer/application.cpp
@@ -209 +209 @@ void Application::Run()
-
+
diff --git a/src/viewer/main.cpp b/src/viewer/main.cpp
index 6c66d95..c48c467 100644
--- a/src/viewer/main.cpp
+++ b/src/viewer/main.cpp
@@ -25 +25 @@ int main( int argc, char** argv )
- {
+ {
diff --git a/src/viewer/rendering/ui/uiRenderer.cpp b/src/viewer/rendering/ui/uiRenderer.cpp
index 3ee5b36..a478586 100644
--- a/src/viewer/rendering/ui/uiRenderer.cpp
+++ b/src/viewer/rendering/ui/uiRenderer.cpp
@@ -58 +58 @@ void UIRenderer::Initialize( GLFWwindow* window, AppState& state )
- io.Fonts->AddFontFromMemoryTTF( (void*)fa_solid_900_ttf_data, static_cast<int>(fa_solid_900_ttf_size), UiConsts::FONT_AWESOME_SIZE, &config, iconRanges );
+ io.Fonts->AddFontFromMemoryTTF( (void*)fa_solid_900_ttf_data, static_cast<int>( fa_solid_900_ttf_size ), UiConsts::FONT_AWESOME_SIZE, &config, iconRanges );
Have any feedback or feature suggestions? Share it here.
…bonengine/mesh into PLAT-11506-misc-improvements
PR Classification
UI enhancement and build system integration for Font Awesome icons, plus code cleanup and shader script improvements.
PR Summary
This PR integrates Font Awesome into the UI, updates the build system to generate icon headers, and refactors shader cache generation and effect configuration.