Remove usage of r_viewpoint and r_viewwindow globals from software renderer and poly renderer

This commit is contained in:
Magnus Norddahl 2017-03-12 18:54:39 +01:00
commit 5fdbbc4f9e
67 changed files with 883 additions and 845 deletions

View file

@ -107,7 +107,7 @@ void RenderPolyDecal::Render(const TriMatrix &worldToClip, const Vec4f &clipPlan
return;
bool foggy = false;
int actualextralight = foggy ? 0 : r_viewpoint.extralight << 4;
int actualextralight = foggy ? 0 : PolyRenderer::Instance()->Thread.Viewport->viewpoint.extralight << 4;
std::pair<float, float> offsets[4] =
{
@ -151,7 +151,7 @@ void RenderPolyDecal::Render(const TriMatrix &worldToClip, const Vec4f &clipPlan
}
args.uniforms.subsectorDepth = subsectorDepth;
if (swrenderer::RenderViewport::Instance()->RenderTarget->IsBgra())
if (PolyRenderer::Instance()->Thread.Viewport->RenderTarget->IsBgra())
{
args.uniforms.color = 0xff000000 | decal->AlphaColor;
}