CGraphics: Make skDefaultAmbientColor constexpr

Same behavior, no runtime initializer.
This commit is contained in:
Lioncash 2020-06-12 16:19:57 -04:00
parent e8a20933de
commit bf9233779a
2 changed files with 1 additions and 2 deletions

View File

@ -22,7 +22,6 @@ CGraphics::SLightBlock CGraphics::sLightBlock;
CGraphics::ELightingMode CGraphics::sLightMode;
uint32 CGraphics::sNumLights;
const CColor CGraphics::skDefaultAmbientColor = CColor(0.5f, 0.5f, 0.5f, 0.0f);
CColor CGraphics::sAreaAmbientColor = CColor::skTransparentBlack;
float CGraphics::sWorldLightMultiplier;
CLight CGraphics::sDefaultDirectionalLights[3] = {

View File

@ -87,7 +87,7 @@ public:
enum class ELightingMode { None, Basic, World };
static ELightingMode sLightMode;
static uint32 sNumLights;
static const CColor skDefaultAmbientColor;
static constexpr CColor skDefaultAmbientColor{0.5f, 0.5f, 0.5f, 0.0f};
static CColor sAreaAmbientColor;
static float sWorldLightMultiplier;
static CLight sDefaultDirectionalLights[3];