mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- fixed: Rendering to a camera textures clobbered the main render target for the software renderer.
This commit is contained in:
parent
13567f2505
commit
cef6ddca6e
1 changed files with 2 additions and 1 deletions
|
@ -337,6 +337,7 @@ namespace swrenderer
|
||||||
auto viewport = MainThread()->Viewport.get();
|
auto viewport = MainThread()->Viewport.get();
|
||||||
|
|
||||||
const bool savedviewactive = viewactive;
|
const bool savedviewactive = viewactive;
|
||||||
|
auto savedtarget = viewport->RenderTarget;
|
||||||
|
|
||||||
viewwidth = width;
|
viewwidth = width;
|
||||||
viewport->RenderTarget = canvas;
|
viewport->RenderTarget = canvas;
|
||||||
|
@ -353,7 +354,7 @@ namespace swrenderer
|
||||||
DrawerThreads::WaitForWorkers();
|
DrawerThreads::WaitForWorkers();
|
||||||
DrawerWaitCycles.Unclock();
|
DrawerWaitCycles.Unclock();
|
||||||
|
|
||||||
viewport->RenderTarget = nullptr;
|
viewport->RenderTarget = savedtarget;
|
||||||
viewport->RenderingToCanvas = false;
|
viewport->RenderingToCanvas = false;
|
||||||
|
|
||||||
R_ExecuteSetViewSize(MainThread()->Viewport->viewpoint, MainThread()->Viewport->viewwindow);
|
R_ExecuteSetViewSize(MainThread()->Viewport->viewpoint, MainThread()->Viewport->viewwindow);
|
||||||
|
|
Loading…
Reference in a new issue