Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/renderer/RenderingOptions.cpp
/* Copyright (C) 2020 Wildfire Games. | /* Copyright (C) 2021 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | CRenderingOptions::CRenderingOptions() : m_ConfigHooks(new ConfigHooks()) | ||||
m_NoVBO = false; | m_NoVBO = false; | ||||
m_RenderPath = RenderPath::DEFAULT; | m_RenderPath = RenderPath::DEFAULT; | ||||
m_Shadows = false; | m_Shadows = false; | ||||
m_WaterEffects = false; | m_WaterEffects = false; | ||||
m_WaterFancyEffects = false; | m_WaterFancyEffects = false; | ||||
m_WaterRealDepth = false; | m_WaterRealDepth = false; | ||||
m_WaterRefraction = false; | m_WaterRefraction = false; | ||||
m_WaterReflection = false; | m_WaterReflection = false; | ||||
m_WaterShadows = false; | |||||
m_ShadowAlphaFix = true; | m_ShadowAlphaFix = true; | ||||
m_ARBProgramShadow = true; | m_ARBProgramShadow = true; | ||||
m_ShadowPCF = false; | m_ShadowPCF = false; | ||||
m_Particles = false; | m_Particles = false; | ||||
m_Silhouettes = false; | m_Silhouettes = false; | ||||
m_PreferGLSL = false; | m_PreferGLSL = false; | ||||
m_Fog = false; | m_Fog = false; | ||||
m_ForceAlphaTest = false; | m_ForceAlphaTest = false; | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | void CRenderingOptions::ReadConfigAndSetupHooks() | ||||
m_ConfigHooks->Setup("smoothlos", m_SmoothLOS); | m_ConfigHooks->Setup("smoothlos", m_SmoothLOS); | ||||
m_ConfigHooks->Setup("watereffects", m_WaterEffects); | m_ConfigHooks->Setup("watereffects", m_WaterEffects); | ||||
m_ConfigHooks->Setup("waterfancyeffects", m_WaterFancyEffects); | m_ConfigHooks->Setup("waterfancyeffects", m_WaterFancyEffects); | ||||
m_ConfigHooks->Setup("waterrealdepth", m_WaterRealDepth); | m_ConfigHooks->Setup("waterrealdepth", m_WaterRealDepth); | ||||
m_ConfigHooks->Setup("waterrefraction", m_WaterRefraction); | m_ConfigHooks->Setup("waterrefraction", m_WaterRefraction); | ||||
m_ConfigHooks->Setup("waterreflection", m_WaterReflection); | m_ConfigHooks->Setup("waterreflection", m_WaterReflection); | ||||
m_ConfigHooks->Setup("watershadows", m_WaterShadows); | |||||
m_ConfigHooks->Setup("particles", m_Particles); | m_ConfigHooks->Setup("particles", m_Particles); | ||||
m_ConfigHooks->Setup("fog", [this]() { | m_ConfigHooks->Setup("fog", [this]() { | ||||
bool enabled; | bool enabled; | ||||
CFG_GET_VAL("fog", enabled); | CFG_GET_VAL("fog", enabled); | ||||
SetFog(enabled); | SetFog(enabled); | ||||
}); | }); | ||||
m_ConfigHooks->Setup("silhouettes", m_Silhouettes); | m_ConfigHooks->Setup("silhouettes", m_Silhouettes); | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator