- move more of the light calculation code to the drawerargs

This commit is contained in:
Magnus Norddahl 2018-12-18 00:37:50 +01:00
commit efb8e39aa9
26 changed files with 202 additions and 279 deletions

View file

@ -227,15 +227,7 @@ namespace swrenderer
backpos = int(fmod(backdpos, sky2cyl * 65536.0));
}
CameraLight *cameraLight = CameraLight::Instance();
if (cameraLight->FixedColormap())
{
drawerargs.SetLight(cameraLight->FixedColormap(), 0, 0);
}
else
{
drawerargs.SetLight(&NormalLight, 0, 0);
}
drawerargs.SetStyle();
Thread->PrepareTexture(frontskytex, DefaultRenderStyle());
Thread->PrepareTexture(backskytex, DefaultRenderStyle());