1
0
forked from mirrors/0ad

Removes unused Atlas functionality to set clear color added in 2f53eea71a and removed in 0d6882dad2.

This was SVN commit r26156.
This commit is contained in:
vladislavbelov
2022-01-03 09:39:54 +00:00
parent e9070a2630
commit 273d336364
5 changed files with 11 additions and 34 deletions
+6 -10
View File
@@ -412,7 +412,12 @@ CRenderer::CRenderer()
CColor skycolor;
CFG_GET_VAL("skycolor", skystring);
if (skycolor.ParseString(skystring, 255.f))
SetClearColor(skycolor.AsSColor4ub());
{
m_ClearColor[0] = skycolor.r;
m_ClearColor[1] = skycolor.g;
m_ClearColor[2] = skycolor.b;
m_ClearColor[3] = skycolor.a;
}
m_LightEnv = nullptr;
@@ -646,15 +651,6 @@ void CRenderer::SetSimulation(CSimulation2* simulation)
m->terrainRenderer.SetSimulation(simulation);
}
// SetClearColor: set color used to clear screen in BeginFrame()
void CRenderer::SetClearColor(SColor4ub color)
{
m_ClearColor[0] = float(color.R) / 255.0f;
m_ClearColor[1] = float(color.G) / 255.0f;
m_ClearColor[2] = float(color.B) / 255.0f;
m_ClearColor[3] = float(color.A) / 255.0f;
}
void CRenderer::RenderShadowMap(const CShaderDefines& context)
{
PROFILE3_GPU("shadow map");
+1 -4
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -145,9 +145,6 @@ public:
*/
void SetSimulation(CSimulation2* simulation);
// set color used to clear screen in BeginFrame()
void SetClearColor(SColor4ub color);
// trigger a reload of shaders (when parameters they depend on have changed)
void MakeShadersDirty();
@@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -97,8 +97,6 @@ public:
bool AxesMarkerEnabled;
int PropPointsMode; // 0 disabled, 1 for point markers, 2 for point markers + axes
SColor4ub Background;
CTerrain Terrain;
CColladaManager ColladaManager;
@@ -267,7 +265,6 @@ ActorViewer::ActorViewer()
m.SelectionBoxEnabled = false;
m.AxesMarkerEnabled = false;
m.PropPointsMode = 0;
m.Background = SColor4ub(0, 0, 0, 255);
// Create a tiny empty piece of terrain, just so we can put shadows
// on it without having to think too hard
@@ -463,12 +460,6 @@ void ActorViewer::SetEnabled(bool enabled)
}
}
void ActorViewer::SetBackgroundColor(const SColor4ub& color)
{
m.Background = color;
m.Terrain.SetBaseColor(color);
}
void ActorViewer::SetWalkEnabled(bool enabled) { m.WalkEnabled = enabled; }
void ActorViewer::SetGroundEnabled(bool enabled) { m.GroundEnabled = enabled; }
void ActorViewer::SetWaterEnabled(bool enabled)
@@ -509,8 +500,6 @@ void ActorViewer::Render()
{
m.Terrain.MakeDirty(RENDERDATA_UPDATE_COLOR);
g_Renderer.SetClearColor(m.Background);
// Set simulation context for rendering purposes
g_Renderer.SetSimulation(&m.Simulation2);
@@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -38,7 +38,6 @@ public:
void SetActor(const CStrW& id, const CStr8& animation, player_id_t playerID);
void SetEnabled(bool enabled);
void UnloadObjects();
void SetBackgroundColor(const SColor4ub& color);
void SetWalkEnabled(bool enabled);
void SetGroundEnabled(bool enabled);
void SetWaterEnabled(bool enabled);
+2 -6
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -163,12 +163,8 @@ void AtlasViewActor::SetParam(const std::wstring& name, int value)
m_ActorViewer->SetPropPointsMode(value);
}
void AtlasViewActor::SetParam(const std::wstring& name, const AtlasMessage::Color& value)
void AtlasViewActor::SetParam(const std::wstring& UNUSED(name), const AtlasMessage::Color& UNUSED(value))
{
if (name == L"background")
{
m_ActorViewer->SetBackgroundColor(SColor4ub(value.r, value.g, value.b, 255));
}
}