16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 09:09:19 +02:00

renderer changes, time and environment window

This commit is contained in:
milek7
2019-03-09 14:18:10 +01:00
parent 748e7b1dda
commit 3693c1660e
30 changed files with 299 additions and 93 deletions

View File

@@ -90,24 +90,28 @@ basic_precipitation::init() {
create( 18 );
// TODO: select texture based on current overcast level
// TODO: when the overcast level dynamic change is in check the current level during render and pick the appropriate texture on the fly
std::string const densitysuffix { (
Global.Overcast < 1.35 ?
"_light" :
"_medium" ) };
if( Global.Weather == "rain:" ) {
m_moverateweathertypefactor = 2.f;
m_texture = GfxRenderer.Fetch_Texture( "fx/rain" + densitysuffix );
}
else if( Global.Weather == "snow:" ) {
m_moverateweathertypefactor = 1.25f;
m_texture = GfxRenderer.Fetch_Texture( "fx/snow" + densitysuffix );
}
return true;
}
void
basic_precipitation::update_weather() {
// TODO: select texture based on current overcast level
// TODO: when the overcast level dynamic change is in check the current level during render and pick the appropriate texture on the fly
std::string const densitysuffix { (
Global.Overcast < 1.35 ?
"_light" :
"_medium" ) };
if( Global.Weather == "rain:" ) {
m_moverateweathertypefactor = 2.f;
m_texture = GfxRenderer.Fetch_Texture( "fx/rain" + densitysuffix );
}
else if( Global.Weather == "snow:" ) {
m_moverateweathertypefactor = 1.25f;
m_texture = GfxRenderer.Fetch_Texture( "fx/snow" + densitysuffix );
}
}
void
basic_precipitation::update() {