Add functions to CameraLight

This commit is contained in:
Magnus Norddahl 2017-02-03 09:00:46 +01:00
commit 892350ac2e
25 changed files with 83 additions and 77 deletions

View file

@ -98,9 +98,9 @@ namespace swrenderer
RenderActorView(player->mo);
// Apply special colormap if the target cannot do it
if (CameraLight::Instance()->realfixedcolormap && viewport->RenderTarget->IsBgra() && !(r_shadercolormaps && screen->Accel2D))
if (CameraLight::Instance()->ShaderColormap() && viewport->RenderTarget->IsBgra() && !(r_shadercolormaps && screen->Accel2D))
{
DrawerCommandQueue::QueueCommand<ApplySpecialColormapRGBACommand>(CameraLight::Instance()->realfixedcolormap, screen);
DrawerCommandQueue::QueueCommand<ApplySpecialColormapRGBACommand>(CameraLight::Instance()->ShaderColormap(), screen);
}
R_EndDrawerCommands();
@ -185,7 +185,7 @@ namespace swrenderer
// copy to the screen does not use a special colormap shader.
if (!r_shadercolormaps && !RenderViewport::Instance()->RenderTarget->IsBgra())
{
CameraLight::Instance()->realfixedcolormap = NULL;
CameraLight::Instance()->ClearShaderColormap();
}
}