mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 01:06:19 +00:00
Pull weather updates out of scene render
This commit is contained in:
parent
bfae91eb88
commit
86870d66fb
1 changed files with 70 additions and 59 deletions
|
@ -550,9 +550,8 @@ void renderScene(bool forceFullDetail, bool bloom)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************************************************************
|
// ***************************************************************************************************************************
|
||||||
// Render all scenes
|
|
||||||
void renderScene()
|
void updateWeather()
|
||||||
{
|
|
||||||
{
|
{
|
||||||
H_AUTO_USE ( RZ_Client_Main_Loop_Sky_And_Weather )
|
H_AUTO_USE ( RZ_Client_Main_Loop_Sky_And_Weather )
|
||||||
|
|
||||||
|
@ -581,13 +580,11 @@ void renderScene()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
ContinentMngr.getFogState(MainFog, LightCycleManager.getLightLevel(), LightCycleManager.getLightDesc().DuskRatio, LightCycleManager.getState(), View.viewPos(), MainFogState);
|
ContinentMngr.getFogState(MainFog, LightCycleManager.getLightLevel(), LightCycleManager.getLightDesc().DuskRatio, LightCycleManager.getState(), View.viewPos(), MainFogState);
|
||||||
|
|
||||||
if (Driver->getPolygonMode() == UDriver::Filled)
|
// TODO: ZBuffer clear was originally before this, but should not be necessary normally.
|
||||||
{
|
// The anim function renders new clouds. Ensure this does not break.
|
||||||
Driver->clearZBuffer();
|
// These are old-style nel clouds.
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef RENDER_CLOUDS
|
#ifdef RENDER_CLOUDS
|
||||||
if (CloudScape != NULL && Filter3D[FilterCloud])
|
if (CloudScape != NULL && Filter3D[FilterCloud])
|
||||||
|
@ -608,6 +605,17 @@ void renderScene()
|
||||||
Driver->setPolygonMode(oldMode);
|
Driver->setPolygonMode(oldMode);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************************************************************
|
||||||
|
// Render all scenes
|
||||||
|
void renderScene()
|
||||||
|
{
|
||||||
|
if (Driver->getPolygonMode() == UDriver::Filled)
|
||||||
|
{
|
||||||
|
Driver->clearZBuffer();
|
||||||
|
}
|
||||||
|
|
||||||
// Sky is used to clear the frame buffer now, but if in line or point polygon mode, we should draw it
|
// Sky is used to clear the frame buffer now, but if in line or point polygon mode, we should draw it
|
||||||
if (Driver->getPolygonMode() != UDriver::Filled)
|
if (Driver->getPolygonMode() != UDriver::Filled)
|
||||||
{
|
{
|
||||||
|
@ -616,7 +624,7 @@ void renderScene()
|
||||||
Driver->clearBuffers (CRGBA(127, 127, 127));
|
Driver->clearBuffers (CRGBA(127, 127, 127));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Update Filter Flags
|
// Update Filter Flags
|
||||||
Scene->enableElementRender(UScene::FilterAllMeshNoVP, Filter3D[FilterMeshNoVP]);
|
Scene->enableElementRender(UScene::FilterAllMeshNoVP, Filter3D[FilterMeshNoVP]);
|
||||||
Scene->enableElementRender(UScene::FilterAllMeshVP, Filter3D[FilterMeshVP]);
|
Scene->enableElementRender(UScene::FilterAllMeshVP, Filter3D[FilterMeshVP]);
|
||||||
|
@ -1542,6 +1550,9 @@ bool mainLoop()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// TODO: Verify that moving this out of renderScene does not negatively impact oversize screenshots.
|
||||||
|
updateWeather();
|
||||||
|
|
||||||
if (ClientCfg.Bloom)
|
if (ClientCfg.Bloom)
|
||||||
{
|
{
|
||||||
// set bloom parameters before applying bloom effect
|
// set bloom parameters before applying bloom effect
|
||||||
|
|
Loading…
Reference in a new issue