From 1a29d39355acb6e19583deb0fdef5db694ffd622 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 9 Mar 2019 12:10:50 +0100 Subject: [PATCH] - do not render player sprites to canvases in the software renderer. This applies to both savegame images and camera textures. --- src/rendering/swrenderer/scene/r_scene.cpp | 9 +++++---- src/rendering/swrenderer/scene/r_scene.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/rendering/swrenderer/scene/r_scene.cpp b/src/rendering/swrenderer/scene/r_scene.cpp index 57550231dc..5621561125 100644 --- a/src/rendering/swrenderer/scene/r_scene.cpp +++ b/src/rendering/swrenderer/scene/r_scene.cpp @@ -129,7 +129,7 @@ namespace swrenderer DrawerThreads::ResetDebugDrawPos(); } - RenderActorView(player->mo); + RenderActorView(player->mo, true, false); auto copyqueue = std::make_shared(MainThread()->FrameMemory.get()); copyqueue->Push(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,7 +180,8 @@ namespace swrenderer if (r_modelscene) MainThread()->Viewport->SetupPolyViewport(MainThread()); - RenderPSprites(); + 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(); diff --git a/src/rendering/swrenderer/scene/r_scene.h b/src/rendering/swrenderer/scene/r_scene.h index 1df9c292b5..cba2580563 100644 --- a/src/rendering/swrenderer/scene/r_scene.h +++ b/src/rendering/swrenderer/scene/r_scene.h @@ -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();