Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0d357d6
Add the tests to validate feature.
PedroAbreuMaia Mar 19, 2026
fbd89b1
Add the color option to ui backdrop and the way to change it via cons…
PedroAbreuMaia Mar 19, 2026
483aeef
Add the backdrop color, and functions to change it to the FD3 modules.
PedroAbreuMaia Mar 19, 2026
15c92bb
Add the baseline images to validate the previously added tests.
PedroAbreuMaia Mar 19, 2026
168ffeb
Merge branch 'master' into Add-backdrop.color-libf3d-and-F3D-option
PedroAbreuMaia Mar 22, 2026
dc81154
Make the corrections requested to PR
PedroAbreuMaia Mar 26, 2026
494c251
Merge branch 'Add-backdrop.color-libf3d-and-F3D-option' of https://gi…
PedroAbreuMaia Mar 26, 2026
2b4bd48
Add the tests to validate feature.
PedroAbreuMaia Mar 19, 2026
26a1a27
Add the color option to ui backdrop and the way to change it via cons…
PedroAbreuMaia Mar 19, 2026
1242dc8
Add the backdrop color, and functions to change it to the FD3 modules.
PedroAbreuMaia Mar 19, 2026
e3a0f2b
Add the baseline images to validate the previously added tests.
PedroAbreuMaia Mar 19, 2026
2cf34be
Make the corrections requested to PR
PedroAbreuMaia Mar 26, 2026
9384106
Fix HDRI cache and log forwarder on Android (#2955)
Meakk Mar 19, 2026
3cc2907
CMake: Fix static VTK build with pdal plugin (#2959)
mwestphal Mar 20, 2026
258b066
Normal rendering mode (#2958)
Meakk Mar 20, 2026
c5a5893
[Fix] Do not set axes grid center position #2824 (#2947)
cuongdv-20 Mar 21, 2026
3186745
Merge branch 'Add-backdrop.color-libf3d-and-F3D-option' of https://gi…
PedroAbreuMaia Mar 26, 2026
e24b5a1
Add the tests to validate feature.
PedroAbreuMaia Mar 19, 2026
fd3aafa
Add the color option to ui backdrop and the way to change it via cons…
PedroAbreuMaia Mar 19, 2026
2262808
Add the backdrop color, and functions to change it to the FD3 modules.
PedroAbreuMaia Mar 19, 2026
822ef11
Add the baseline images to validate the previously added tests.
PedroAbreuMaia Mar 19, 2026
3da6c7f
Make the corrections requested to PR
PedroAbreuMaia Mar 26, 2026
48bd5dc
Fix HDRI cache and log forwarder on Android (#2955)
Meakk Mar 19, 2026
9d0e292
CMake: Fix static VTK build with pdal plugin (#2959)
mwestphal Mar 20, 2026
5ad2cec
Normal rendering mode (#2958)
Meakk Mar 20, 2026
fb43738
[Fix] Do not set axes grid center position #2824 (#2947)
cuongdv-20 Mar 21, 2026
e0eb851
Add the tests to validate feature.
PedroAbreuMaia Mar 19, 2026
e3a9ac2
Add the color option to ui backdrop and the way to change it via cons…
PedroAbreuMaia Mar 19, 2026
00fe7ef
Add the backdrop color, and functions to change it to the FD3 modules.
PedroAbreuMaia Mar 19, 2026
d52e2b7
Add the baseline images to validate the previously added tests.
PedroAbreuMaia Mar 19, 2026
b11feee
Make the corrections requested to PR
PedroAbreuMaia Mar 26, 2026
0f2df71
Normal rendering mode (#2958)
Meakk Mar 20, 2026
540971d
Fix the conflicts
PedroAbreuMaia Mar 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ _wasm_build

# testing related
.cache
/.vs
1 change: 1 addition & 0 deletions application/F3DOptionsTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ static inline const std::map<std::string_view, std::string_view> LibOptionsNames
{ "font-scale", "ui.scale" },
{ "font-color", "ui.font_color" },
{ "backdrop-opacity", "ui.backdrop.opacity" },
{ "backdrop-color", "ui.backdrop.color" },
{ "normal-glyphs", "model.normal_glyphs.enable" },
{ "point-sprites-size", "model.point_sprites.size" },
{ "point-sprites-absolute-size", "model.point_sprites.absolute_size" },
Expand Down
4 changes: 4 additions & 0 deletions library/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@
"opacity": {
"type": "double",
"default_value": "0.9"
},
"color": {
"type": "color",
"default_color": "0, 0, 0"
}
},
"axis": {
Expand Down
5 changes: 5 additions & 0 deletions library/src/window_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,11 @@ void window_impl::UpdateDynamicOptions()
renderer->ShowDropZone(opt.ui.drop_zone.enable);
renderer->ShowDropZoneLogo(opt.ui.drop_zone.show_logo);
renderer->SetBackdropOpacity(opt.ui.backdrop.opacity);
if (opt.ui.backdrop.color.has_value())
{
f3d::color_t color = opt.ui.backdrop.color.value();
renderer->SetBackdropColor({ color[0], color[1], color[2] });
}

if (this->Internals->Interactor)
{
Expand Down
6 changes: 6 additions & 0 deletions resources/cli-options.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@
"valueHelper": "<value>",
"conditional": "F3D_MODULE_UI"
},
{
"longName": "backdrop-color",
"helpText": "UI backdrop color",
"valueHelper": "<color>",
"conditional": "F3D_MODULE_UI"
},
{
"longName": "command-script",
"helpText": "Path to a script file containing commands to execute",
Expand Down
3 changes: 3 additions & 0 deletions testing/baselines/TestBackdropColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 18 additions & 6 deletions vtkext/private/module/vtkF3DImguiActor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,9 @@ void vtkF3DImguiActor::RenderSceneHierarchy(vtkOpenGLRenderWindow* renWin)
ImGui::SetNextWindowSize(ImVec2(defaultWidth, winHeight), ImGuiCond_FirstUseEver);
ImGui::SetNextWindowSizeConstraints(
ImVec2(10.f, winHeight), ImVec2(std::numeric_limits<float>::max(), winHeight));
ImGui::SetNextWindowBgAlpha(this->BackdropOpacity);
ImGuiStyle& style = ImGui::GetStyle();
style.Colors[ImGuiCol_WindowBg] = ImVec4(
this->BackdropColor[0], this->BackdropColor[1], this->BackdropColor[2], this->BackdropOpacity);

ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse |
ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_HorizontalScrollbar;
Expand Down Expand Up @@ -831,7 +833,9 @@ void vtkF3DImguiActor::RenderFileName()
}

::SetupNextWindow(ImVec2(viewport->GetWorkCenter().x - 0.5f * totalWidth, margin), winSize);
ImGui::SetNextWindowBgAlpha(this->BackdropOpacity);
ImGuiStyle& style = ImGui::GetStyle();
style.Colors[ImGuiCol_WindowBg] = ImVec4(this->BackdropColor[0], this->BackdropColor[1],
this->BackdropColor[2], this->BackdropOpacity);

ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoMove;
Expand All @@ -856,7 +860,9 @@ void vtkF3DImguiActor::RenderMetaData()
::SetupNextWindow(ImVec2(viewport->WorkSize.x - winSize.x - margin,
viewport->GetWorkCenter().y - 0.5f * winSize.y),
winSize);
ImGui::SetNextWindowBgAlpha(this->BackdropOpacity);
ImGuiStyle& style = ImGui::GetStyle();
style.Colors[ImGuiCol_WindowBg] = ImVec4(
this->BackdropColor[0], this->BackdropColor[1], this->BackdropColor[2], this->BackdropOpacity);

ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoMove;
Expand Down Expand Up @@ -891,7 +897,9 @@ void vtkF3DImguiActor::RenderHDRIFileName()

::SetupNextWindow(
ImVec2(viewport->GetWorkCenter().x - 0.5f * totalWidth + winOffsetX, margin), winSize);
ImGui::SetNextWindowBgAlpha(this->BackdropOpacity);
ImGuiStyle& style = ImGui::GetStyle();
style.Colors[ImGuiCol_WindowBg] = ImVec4(this->BackdropColor[0], this->BackdropColor[1],
this->BackdropColor[2], this->BackdropOpacity);

ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoMove;
Expand Down Expand Up @@ -990,7 +998,9 @@ void vtkF3DImguiActor::RenderCheatSheet()
::SetupNextWindow(ImVec2(margin, winTop),
ImVec2(
this->Pimpl->CheatSheetWidth, std::min(viewport->WorkSize.y - (2 * margin), textHeight)));
ImGui::SetNextWindowBgAlpha(this->BackdropOpacity);
ImGuiStyle& style = ImGui::GetStyle();
style.Colors[ImGuiCol_WindowBg] = ImVec4(
this->BackdropColor[0], this->BackdropColor[1], this->BackdropColor[2], this->BackdropOpacity);

ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings |
Expand Down Expand Up @@ -1141,7 +1151,9 @@ void vtkF3DImguiActor::RenderFpsCounter()
viewport->WorkSize.x - winSize.x - margin, viewport->WorkSize.y - winSize.y - margin);

::SetupNextWindow(position, winSize);
ImGui::SetNextWindowBgAlpha(this->BackdropOpacity);
ImGuiStyle& style = ImGui::GetStyle();
style.Colors[ImGuiCol_WindowBg] = ImVec4(
this->BackdropColor[0], this->BackdropColor[1], this->BackdropColor[2], this->BackdropOpacity);

ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoMove;
Expand Down
6 changes: 6 additions & 0 deletions vtkext/private/module/vtkF3DRenderer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3698,3 +3698,9 @@ void vtkF3DRenderer::SetConsoleBadgeEnabled(bool enabled)
{
this->UIActor->SetConsoleBadgeEnabled(enabled);
}

//----------------------------------------------------------------------------
void vtkF3DRenderer::SetBackdropColor(const std::array<double, 3>& color)
{
this->UIActor->SetBackdropColor(color);
}
5 changes: 5 additions & 0 deletions vtkext/private/module/vtkF3DRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ class vtkF3DRenderer : public vtkOpenGLRenderer
*/
void SetBackdropOpacity(const double backdropOpacity);

/**
* Set the backdrop color
*/
void SetBackdropColor(const std::array<double, 3>& color);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add doxygen doc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to add the doxygen annotations?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please :)


///@{
/**
* Set usages and configurations of different render passes
Expand Down
10 changes: 10 additions & 0 deletions vtkext/private/module/vtkF3DUIActor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,13 @@ int vtkF3DUIActor::RenderOverlay(vtkViewport* vp)

return 1;
}

//----------------------------------------------------------------------------
void vtkF3DUIActor::SetBackdropColor(const std::array<double, 3>& color)
{
if (this->BackdropColor != color)
{
this->BackdropColor = color;
this->Initialized = false;
}
}
7 changes: 7 additions & 0 deletions vtkext/private/module/vtkF3DUIActor.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ class vtkF3DUIActor : public vtkProp
*/
void SetBackdropOpacity(const double backdropOpacity);

/**
* Set the backdrop color
*/
void SetBackdropColor(const std::array<double, 3>& color);

/**
* Set the delta time (time between UI frames) in seconds
*/
Expand Down Expand Up @@ -309,6 +314,8 @@ class vtkF3DUIActor : public vtkProp

double BackdropOpacity = 0.9;

std::array<double, 3> BackdropColor = { 0.0, 0.0, 0.0 };

private:
vtkF3DUIActor(const vtkF3DUIActor&) = delete;
void operator=(const vtkF3DUIActor&) = delete;
Expand Down
Loading