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:
@@ -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 +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);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user