mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-27 04:42:33 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ using namespace nlohmann;
|
||||
#define SETTING_NETWORK_PLUGIN_REMIND_LATER "network_plugin_remind_later"
|
||||
#define SETTING_USE_ENCRYPTED_TOKEN_FILE "use_encrypted_token_file"
|
||||
#define SETTING_CLOUD_PROVIDERS "cloud_providers"
|
||||
#define SETTING_OPENGL_AA_SAMPLES "opengl_antialiasing_samples"
|
||||
#define SETTING_OPENGL_FXAA_ENABLED "opengl_fxaa_enabled"
|
||||
#define SETTING_OPENGL_FPS_CAP "opengl_fps_cap"
|
||||
#define SETTING_OPENGL_SHOW_FPS_OVERLAY "opengl_show_fps_overlay"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define BAMBU_NETWORK_AGENT_VERSION_LEGACY "01.10.01.09"
|
||||
|
||||
Reference in New Issue
Block a user