mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +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,10 +550,9 @@ void renderScene(bool forceFullDetail, bool bloom)
|
|||
}
|
||||
|
||||
// ***************************************************************************************************************************
|
||||
// Render all scenes
|
||||
void renderScene()
|
||||
|
||||
void updateWeather()
|
||||
{
|
||||
{
|
||||
H_AUTO_USE ( RZ_Client_Main_Loop_Sky_And_Weather )
|
||||
|
||||
//HeightGrid.update(Scene->getCam().getPos());
|
||||
|
@ -581,13 +580,11 @@ void renderScene()
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
ContinentMngr.getFogState(MainFog, LightCycleManager.getLightLevel(), LightCycleManager.getLightDesc().DuskRatio, LightCycleManager.getState(), View.viewPos(), MainFogState);
|
||||
|
||||
if (Driver->getPolygonMode() == UDriver::Filled)
|
||||
{
|
||||
Driver->clearZBuffer();
|
||||
}
|
||||
// TODO: ZBuffer clear was originally before this, but should not be necessary normally.
|
||||
// The anim function renders new clouds. Ensure this does not break.
|
||||
// These are old-style nel clouds.
|
||||
|
||||
#ifdef RENDER_CLOUDS
|
||||
if (CloudScape != NULL && Filter3D[FilterCloud])
|
||||
|
@ -608,6 +605,17 @@ void renderScene()
|
|||
Driver->setPolygonMode(oldMode);
|
||||
}
|
||||
#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
|
||||
if (Driver->getPolygonMode() != UDriver::Filled)
|
||||
{
|
||||
|
@ -616,7 +624,7 @@ void renderScene()
|
|||
Driver->clearBuffers (CRGBA(127, 127, 127));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update Filter Flags
|
||||
Scene->enableElementRender(UScene::FilterAllMeshNoVP, Filter3D[FilterMeshNoVP]);
|
||||
Scene->enableElementRender(UScene::FilterAllMeshVP, Filter3D[FilterMeshVP]);
|
||||
|
@ -1542,6 +1550,9 @@ bool mainLoop()
|
|||
}
|
||||
#endif
|
||||
|
||||
// TODO: Verify that moving this out of renderScene does not negatively impact oversize screenshots.
|
||||
updateWeather();
|
||||
|
||||
if (ClientCfg.Bloom)
|
||||
{
|
||||
// set bloom parameters before applying bloom effect
|
||||
|
|
Loading…
Reference in a new issue