Changeset View
Changeset View
Standalone View
Standalone View
source/renderer/RenderingOptions.h
- This file was added.
/* Copyright (C) 2019 Wildfire Games. | |||||
* This file is part of 0 A.D. | |||||
* | |||||
* 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 | |||||
* the Free Software Foundation, either version 2 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* 0 A.D. is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU General Public License | |||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | |||||
*/ | |||||
/** | |||||
* Keeps track of the settings used for rendering. | |||||
*/ | |||||
#ifndef INCLUDED_RENDERINGOPTIONS | |||||
#define INCLUDED_RENDERINGOPTIONS | |||||
class CStr8; | |||||
enum RenderPath { | |||||
// If no rendering path is configured explicitly, the renderer | |||||
// will choose the path when Open() is called. | |||||
DEFAULT, | |||||
// Classic fixed function. | |||||
FIXED, | |||||
// Use new ARB/GLSL system | |||||
SHADER | |||||
}; | |||||
struct RenderPathEnum | |||||
{ | |||||
static RenderPath FromString(const CStr8& name); | |||||
static CStr8 ToString(RenderPath); | |||||
}; | |||||
// Specify what props to render | |||||
enum PropRenderPriority | |||||
{ | |||||
MUST = 0, | |||||
SHOULD, | |||||
EYECANDY | |||||
}; | |||||
struct PropRenderPriorityEnum | |||||
{ | |||||
static PropRenderPriority FromString(const CStr8& name); | |||||
}; | |||||
struct SRenderingOptions | |||||
{ | |||||
SRenderingOptions(); | |||||
void ReadConfig(); | |||||
bool m_NoVBO; | |||||
bool m_Shadows; | |||||
bool m_WaterEffects; | |||||
bool m_WaterFancyEffects; | |||||
bool m_WaterRealDepth; | |||||
bool m_WaterRefraction; | |||||
bool m_WaterReflection; | |||||
bool m_WaterShadows; | |||||
RenderPath m_RenderPath; | |||||
bool m_ShadowAlphaFix; | |||||
bool m_ARBProgramShadow; | |||||
bool m_ShadowPCF; | |||||
bool m_Particles; | |||||
bool m_PreferGLSL; | |||||
bool m_ForceAlphaTest; | |||||
bool m_GPUSkinning; | |||||
bool m_Fog; | |||||
bool m_Silhouettes; | |||||
bool m_SmoothLOS; | |||||
bool m_ShowSky; | |||||
bool m_PostProc; | |||||
bool m_DisplayFrustum; | |||||
bool m_RenderActors; | |||||
PropRenderPriority m_PropRenderPriority; | |||||
}; | |||||
extern SRenderingOptions g_MutableRenderingOptions; | |||||
extern const SRenderingOptions& g_RenderingOptions; | |||||
#endif // INCLUDED_RENDERINGOPTIONS |
Wildfire Games · Phabricator