Graphics Preferences: Anti-aliasing + FPS (#13538)

* Expose Antialiasing velues

Expose Antialiasing multipliers.
Default to 4 as current implementation but enables the user to disable it to improve performante or increase sampling to improve quality.

* FXAA

* Improve descriptions

* Require restart when MSAA setting changes

Detect changes to the OpenGL MSAA (multisample anti-aliasing) preference when opening Preferences and prompt the user to restart the application to apply the change. Adds a constant key for the MSAA setting, stores the previous value, checks for changes (similar to the existing FXAA handling), and shows a warning dialog explaining the restart will close the current project without saving. If the user accepts, recreate_GUI is invoked to apply the MSAA change immediately.

* Revert "Require restart when MSAA setting changes"

This reverts commit dde134d346c3849598c91d025d2faed1b51c8a22.

* Menu and FPS options

* Fix FPS limiter and remove VSYNC

* Grouped FPS settings and mode up rigth fps counter

---------

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
Ian Bassi
2026-05-17 02:31:51 -03:00
committed by GitHub
parent bbf16e5e4d
commit 6dfbcc75c5
12 changed files with 393 additions and 7 deletions

View File

@@ -7553,6 +7553,13 @@ void GUI_App::open_exportpresetbundledialog(size_t open_on_tab, const std::strin
void GUI_App::open_preferences(size_t open_on_tab, const std::string& highlight_option)
{
static constexpr const char* opengl_fxaa_setting_key = "opengl_fxaa_enabled";
static constexpr const char* opengl_fps_cap_setting_key = "opengl_fps_cap";
static constexpr const char* opengl_show_fps_overlay_setting_key = "opengl_show_fps_overlay";
const std::string previous_opengl_fxaa = app_config->get(opengl_fxaa_setting_key);
const std::string previous_opengl_fps_cap = app_config->get(opengl_fps_cap_setting_key);
const std::string previous_opengl_show_fps_overlay = app_config->get(opengl_show_fps_overlay_setting_key);
bool need_recreate_gui = false;
std::string pending_language;
{
@@ -7591,6 +7598,14 @@ void GUI_App::open_preferences(size_t open_on_tab, const std::string& highlight_
}
}
const bool opengl_fxaa_changed = app_config->get(opengl_fxaa_setting_key) != previous_opengl_fxaa;
const bool opengl_fps_cap_changed = app_config->get(opengl_fps_cap_setting_key) != previous_opengl_fps_cap;
const bool opengl_show_fps_overlay_changed = app_config->get(opengl_show_fps_overlay_setting_key) != previous_opengl_show_fps_overlay;
if ((opengl_fxaa_changed || opengl_fps_cap_changed || opengl_show_fps_overlay_changed) && !need_recreate_gui && this->plater_ != nullptr) {
this->plater_->set_current_canvas_as_dirty();
this->plater_->get_current_canvas3D()->force_set_focus();
}
if (!pending_language.empty()) {
const std::string previous_language = app_config->get("language");
app_config->set("language", pending_language);