4#include "io/Serializable.h"
6#include "RenderSettings.generated.h"
8namespace ne RNAMESPACE() {
12 enum class RendererType :
unsigned int { DIRECTX = 0, VULKAN = 1 };
15 enum class AntialiasingQuality :
unsigned int {
23 enum class ShadowQuality :
unsigned int {
30 enum class TextureFilteringQuality :
unsigned int {
37 enum class TextureQuality :
unsigned int {
58 static std::filesystem::path getPathToConfigurationFile();
65 void setFpsLimit(
unsigned int iNewFpsLimit);
72 void setShadowQuality(ShadowQuality quality);
82 void setAntialiasingQuality(AntialiasingQuality quality);
89 void setTextureFilteringQuality(TextureFilteringQuality quality);
98 void setTextureQuality(TextureQuality quality);
108 void setRenderResolution(std::pair<unsigned int, unsigned int> resolution);
115 void setVsyncEnabled(
bool bEnableVsync);
124 void setRefreshRate(std::pair<unsigned int, unsigned int> refreshRate);
135 void setGpuToUse(
const std::string& sGpuName);
146 void setPreferredRenderer(RendererType preferredRenderer);
153 unsigned int getFpsLimit()
const;
161 AntialiasingQuality getAntialiasingQuality()
const;
168 ShadowQuality getShadowQuality()
const;
179 std::variant<AntialiasingQuality, Error> getMaxSupportedAntialiasingQuality()
const;
186 TextureFilteringQuality getTextureFilteringQuality()
const;
193 TextureQuality getTextureQuality()
const;
200 std::pair<unsigned int, unsigned int> getRenderResolution()
const;
207 bool isVsyncEnabled()
const;
214 std::pair<unsigned int, unsigned int> getRefreshRate()
const;
225 std::string getGpuToUse()
const;
235 virtual void onAfterDeserialized()
override;
245 static std::string getConfigurationFileName(
bool bIncludeFileExtension);
254 void setRenderer(
Renderer* pRenderer);
262 [[nodiscard]] std::optional<Error> clampSettingsToMaxSupported();
271 [[nodiscard]] std::optional<Error> saveConfigurationToDisk();
281 void notifyRendererAboutChangedSettings(
bool bShadowMapSizeChanged =
false);
285 unsigned
int iRenderResolutionWidth = 0;
289 unsigned int iRenderResolutionHeight = 0;
293 unsigned int iRefreshRateNumerator = 0;
297 unsigned int iRefreshRateDenominator = 0;
305 unsigned int iFpsLimit = 0;
309 std::
string sGpuToUse;
317 unsigned int iRendererType = 0;
321 unsigned int iShadowMapSize = static_cast<
unsigned int>(ShadowQuality::HIGH);
325 unsigned int iAntialiasingSampleCount = static_cast<
unsigned int>(AntialiasingQuality::HIGH);
329 unsigned int iTextureFilteringQuality = static_cast<
unsigned int>(TextureFilteringQuality::HIGH);
333 unsigned int iTextureQuality = static_cast<
unsigned int>(TextureQuality::VERY_HIGH);
337 bool bIsVsyncEnabled = false;
352 bool bAllowSavingConfigurationToDisk = false;
355 static inline const
char* sRenderSettingsConfigurationFileName = "render";
357 ne_RenderSettings_GENERATED
361File_RenderSettings_GENERATED
Definition: GuidProperty.h:30
Definition: RenderSettings.h:45
Definition: Renderer.h:43
Definition: Serializable.h:113
Definition: SerializeProperty.h:42