Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Configuration.h
Go to the documentation of this file.
1/*
2Copyright (c) 2018 DIVIDE-Studio
3Copyright (c) 2009 Ionut Cava
4
5This file is part of DIVIDE Framework.
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software
9and associated documentation files (the "Software"), to deal in the Software
10without restriction,
11including without limitation the rights to use, copy, modify, merge, publish,
12distribute, sublicense,
13and/or sell copies of the Software, and to permit persons to whom the
14Software is furnished to do so,
15subject to the following conditions:
16
17The above copyright notice and this permission notice shall be included in
18all copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21IMPLIED,
22INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23PARTICULAR PURPOSE AND NONINFRINGEMENT.
24IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25DAMAGES OR OTHER LIABILITY,
26WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27IN CONNECTION WITH THE SOFTWARE
28OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30*/
31
32#pragma once
33#ifndef DVD_CORE_CONFIGURATION_H_
34#define DVD_CORE_CONFIGURATION_H_
35
37
38namespace Divide
39{
40
42 struct Debug
43 {
44 struct Renderer
45 {
49 bool useExtensions = true;
50 } renderer = {};
51 struct Cache
52 {
53 bool enabled = true;
54 bool geometry = true;
55 bool vegetation = true;
56 bool shaders = true;
57 bool textureDDS = true;
58 } cache = {};
60 {
61 bool primitives = true;
62 bool meshes = true;
63 bool terrain = true;
64 bool vegetation = true;
65 bool water = true;
66 bool sky = true;
67 bool particles = true;
68 bool decals = true;
69 bool treeInstances = true;
70 bool grassInstances = true;
72 } debug = {};
73
74 string language = "enGB";
75 string serverAddress = "127.0.0.1";
76 string startupProject = "Default";
77 struct Runtime
78 {
79 string title = "DIVIDE Framework";
84 bool windowResizable = false;
85 bool maximizeOnStart = true;
86 bool enableVSync = true;
87 bool adaptiveSync = false;
88 bool usePipelineCache = true;
91 vec2<U16> windowSize = { 1280, 720 };
92 vec2<U16> resolution = { 1024, 768 };
96 } runtime = {};
97
98 struct GUI
99 {
100 struct CEGUI
101 {
102 bool enabled = true;
103 } cegui = {};
104 string consoleLayoutFile = "console.layout";
106
108 {
112 bool enableBlurring = false;
113 bool enabled = true;
114 };
115
116 struct Terrain
117 {
121 bool wireframe = false;
122 bool showNormals = false;
123 bool showLoDs = false;
124 bool showTessLevels = false;
125 bool showBlendMap = false;
127
129 {
130 F32 Radius = 0.5f;
131 F32 Bias = 0.05f;
132 F32 Power = 2.0f;
134 bool Blur = true;
140 };
141
143 {
149 bool enableFog = true;
152 vec3<F32> fogColour = { 0.2f, 0.2f, 0.2f };
153 vec4<U16> lodThresholds = { 25u, 45u, 85u, 165u };
154 struct PostFX
155 {
156 struct PostAA
157 {
158 string type = "FXAA";
161 struct ToneMap
162 {
163 bool adaptive = true;
167 F32 tau = 1.1f;
168 string mappingFunction = "UNCHARTED_2";
170 struct DOF
171 {
172 bool enabled = false;
176 string fStop = "f/1.4";
178 F32 ndofdist = 2.0f;
180 F32 fdofdist = 3.0f;
181 F32 vignout = 1.3f;
182 F32 vignin = 0.0f;
183 bool autoFocus = true;
184 bool vignetting = false;
185 bool debugFocus = false;
186 bool manualdof = false;
188 struct SSR
189 {
190 bool enabled = true;
193 F32 stride = 8.f;
199 U16 maxSteps = 256u;
203 {
204 bool enablePerObject = true;
207 struct Bloom
208 {
209 bool enabled = true;
212 struct SSAO
213 {
214 bool enable = false;
215 bool UseHalfResolution = true;
219 } postFX = {};
221 {
222 bool enabled = true;
224 {
231 } rendering = {};
233 {
234 string textures = "textures/";
235 string shaders = "shaders/";
237
238 PROPERTY_RW(bool, changed, false);
239
240 void save();
241
242protected:
243 bool fromXML(const ResourcePath& xmlFilePath, const char* fileName) override;
244 bool toXML(const ResourcePath& xmlFilePath, const char* fileName) const override;
245};
246}; //namespace Divide
247
248#endif//DVD_CORE_CONFIGURATION_H_
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
int32_t I32
uint8_t U8
int16_t I16
uint16_t U16
uint32_t U32
struct Divide::Configuration::Debug::RenderFilter renderFilter
struct Divide::Configuration::Debug::Cache cache
struct Divide::Configuration::Debug::Renderer renderer
struct Divide::Configuration::GUI::CEGUI cegui
bool enabled
F32 luminanceBias
F32 fdofstart
bool autoFocus
bool vignetting
F32 vignin
F32 fdofdist
F32 focalLength
F32 focalDepth
F32 ndofstart
bool enabled
F32 ndofdist
vec2< F32 > focalPoint
bool debugFocus
F32 vignout
string fStop
bool manualdof
F32 velocityScale
bool enablePerObject
U8 qualityLevel
string type
SSAOSettings FullRes
bool enable
SSAOSettings HalfRes
bool UseHalfResolution
F32 maxDistance
bool enabled
F32 jitterAmount
F32 stride
F32 screenEdgeFadeStart
F32 zThickness
F32 eyeFadeEnd
F32 strideZCutoff
U16 maxSteps
U8 binarySearchIterations
F32 eyeFadeStart
string mappingFunction
F32 tau
bool adaptive
F32 manualExposureFactor
F32 maxLogLuminance
F32 minLogLuminance
struct Divide::Configuration::Rendering::PostFX::SSAO ssao
struct Divide::Configuration::Rendering::PostFX::DOF dof
struct Divide::Configuration::Rendering::PostFX::MotionBlur motionBlur
struct Divide::Configuration::Rendering::PostFX::ToneMap toneMap
struct Divide::Configuration::Rendering::PostFX::PostAA postAA
struct Divide::Configuration::Rendering::PostFX::Bloom bloom
struct Divide::Configuration::Rendering::PostFX::SSR ssr
Divide::Configuration::Rendering::ShadowMapping::CSMSettings csm
struct Divide::Configuration::Rendering::PostFX postFX
struct Divide::Configuration::Rendering::ShadowMapping shadowMapping
struct Divide::Configuration::Rendering rendering
struct Divide::Configuration::DefaultAssetLocation defaultAssetLocation
bool toXML(const ResourcePath &xmlFilePath, const char *fileName) const override
struct Divide::Configuration::Terrain terrain
bool fromXML(const ResourcePath &xmlFilePath, const char *fileName) override
struct Divide::Configuration::Runtime runtime
struct Divide::Configuration::Debug debug
PROPERTY_RW(bool, changed, false)
struct Divide::Configuration::GUI gui