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 b3fe733bf2
commit 873d0ed26e
12 changed files with 393 additions and 7 deletions

View File

@@ -230,6 +230,29 @@ void AppConfig::set_defaults()
if (get("camera_orbit_mult").empty())
set("camera_orbit_mult", "1.0");
if (get(SETTING_OPENGL_AA_SAMPLES).empty())
set(SETTING_OPENGL_AA_SAMPLES, "4");
if (get(SETTING_OPENGL_FXAA_ENABLED).empty())
set_bool(SETTING_OPENGL_FXAA_ENABLED, false);
if (get(SETTING_OPENGL_FPS_CAP).empty())
set(SETTING_OPENGL_FPS_CAP, "0");
else {
int fps_cap = 0;
try {
fps_cap = std::stoi(get(SETTING_OPENGL_FPS_CAP));
}
catch (...) {
fps_cap = 0;
}
fps_cap = std::max(0, std::min(fps_cap, 240));
set(SETTING_OPENGL_FPS_CAP, std::to_string(fps_cap));
}
if (get(SETTING_OPENGL_SHOW_FPS_OVERLAY).empty())
set_bool(SETTING_OPENGL_SHOW_FPS_OVERLAY, false);
if (get("export_sources_full_pathnames").empty())
set_bool("export_sources_full_pathnames", false);