- do not render player sprites to canvases in the software renderer.

This applies to both savegame images and camera textures.
This commit is contained in:
Christoph Oelckers 2019-03-09 12:10:50 +01:00
parent d2475b68d0
commit 1a29d39355
2 changed files with 6 additions and 5 deletions

View file

@ -129,7 +129,7 @@ namespace swrenderer
DrawerThreads::ResetDebugDrawPos();
}
RenderActorView(player->mo);
RenderActorView(player->mo, true, false);
auto copyqueue = std::make_shared<DrawerCommandQueue>(MainThread()->FrameMemory.get());
copyqueue->Push<MemcpyCommand>(videobuffer, target->GetPixels(), target->GetWidth(), target->GetHeight(), target->GetPitch(), target->IsBgra() ? 4 : 1);
@ -140,7 +140,7 @@ namespace swrenderer
DrawerWaitCycles.Unclock();
}
void RenderScene::RenderActorView(AActor *actor, bool dontmaplines)
void RenderScene::RenderActorView(AActor *actor, bool renderPlayerSprites, bool dontmaplines)
{
WallCycles.Reset();
PlaneCycles.Reset();
@ -180,6 +180,7 @@ namespace swrenderer
if (r_modelscene)
MainThread()->Viewport->SetupPolyViewport(MainThread());
if (renderPlayerSprites)
RenderPSprites();
MainThread()->Viewport->viewpoint.camera->renderflags = savedflags;
@ -384,7 +385,7 @@ namespace swrenderer
PolyTriangleDrawer::ResizeBuffers(viewport->RenderTarget);
// Render:
RenderActorView(actor, dontmaplines);
RenderActorView(actor, false, dontmaplines);
DrawerWaitCycles.Clock();
DrawerThreads::WaitForWorkers();
DrawerWaitCycles.Unclock();

View file

@ -56,7 +56,7 @@ namespace swrenderer
RenderThread *MainThread() { return Threads.front().get(); }
private:
void RenderActorView(AActor *actor, bool dontmaplines = false);
void RenderActorView(AActor *actor,bool renderplayersprite, bool dontmaplines);
void RenderThreadSlices();
void RenderThreadSlice(RenderThread *thread);
void RenderPSprites();