From cef6ddca6ef9860fc4947098247bd41d65ca6cef Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 14 Apr 2018 08:09:40 +0200 Subject: [PATCH] - fixed: Rendering to a camera textures clobbered the main render target for the software renderer. --- src/swrenderer/scene/r_scene.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/swrenderer/scene/r_scene.cpp b/src/swrenderer/scene/r_scene.cpp index 1f406d424c..7350090dac 100644 --- a/src/swrenderer/scene/r_scene.cpp +++ b/src/swrenderer/scene/r_scene.cpp @@ -337,6 +337,7 @@ namespace swrenderer auto viewport = MainThread()->Viewport.get(); const bool savedviewactive = viewactive; + auto savedtarget = viewport->RenderTarget; viewwidth = width; viewport->RenderTarget = canvas; @@ -353,7 +354,7 @@ namespace swrenderer DrawerThreads::WaitForWorkers(); DrawerWaitCycles.Unclock(); - viewport->RenderTarget = nullptr; + viewport->RenderTarget = savedtarget; viewport->RenderingToCanvas = false; R_ExecuteSetViewSize(MainThread()->Viewport->viewpoint, MainThread()->Viewport->viewwindow);