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 std::optional<AntialiasingQuality> getAntialiasingQuality()
const;
168 ShadowQuality getShadowQuality()
const;
178 std::variant<std::optional<AntialiasingQuality>,
Error> getMaxSupportedAntialiasingQuality()
const;
185 TextureFilteringQuality getTextureFilteringQuality()
const;
192 TextureQuality getTextureQuality()
const;
199 std::pair<unsigned int, unsigned int> getRenderResolution()
const;
206 bool isVsyncEnabled()
const;
213 std::pair<unsigned int, unsigned int> getRefreshRate()
const;
224 std::string getGpuToUse()
const;
234 virtual void onAfterDeserialized()
override;
244 static std::string getConfigurationFileName(
bool bIncludeFileExtension);
253 void setRenderer(
Renderer* pRenderer);
262 [[nodiscard]] std::optional<Error> onRendererInitialized();
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