
.. _program_listing_file_Src_GraphicsEngineVulkan_gui_QualityPreset.ixx:

Program Listing for File QualityPreset.ixx
==========================================

|exhale_lsh| :ref:`Return to documentation for file <file_Src_GraphicsEngineVulkan_gui_QualityPreset.ixx>` (``Src/GraphicsEngineVulkan/gui/QualityPreset.ixx``)

.. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS

.. code-block:: cpp

   module;
   
   #include <cstddef>
   #include <optional>
   #include <string>
   #include <vector>
   
   export module kataglyphis.vulkan.quality_preset;
   
   import kataglyphis.vulkan.gui_renderer_shared_vars;
   import kataglyphis.vulkan.gui_scene_shared_vars;
   
   // OxidANT's quality presets through the bridge, whose generated header only this module's .cpp includes.
   export namespace Kataglyphis {
   
   // Low, Medium, High and Ultra, the Renderer tab's order; High is the editor's defaults.
   [[nodiscard]] std::vector<std::string> qualityPresetLabels();
   
   // The preset the settings are at, its index in qualityPresetLabels(); none is Custom. Auto's moving scale is not compared.
   [[nodiscard]] std::optional<std::size_t> matchingQualityPreset(
     const VulkanRendererInternals::FrontendShared::GUIRendererSharedVars &renderer,
     const GUISceneSharedVars &scene);
   
   // Sets the knobs preset `index` owns, as Rust's apply_preset: Auto's target and every other setting stay the user's.
   // False, changing nothing, for an index no preset has.
   bool applyQualityPreset(std::size_t index,
     VulkanRendererInternals::FrontendShared::GUIRendererSharedVars &renderer,
     GUISceneSharedVars &scene);
   
   }// namespace Kataglyphis
