mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- Remove code that seemingly doesn't do anything and really shouldn't be needed
This commit is contained in:
parent
7e544c66fe
commit
915f8862a7
7 changed files with 4 additions and 38 deletions
|
@ -58,6 +58,8 @@ void PolyRenderer::RenderView(player_t *player, DCanvas *target)
|
|||
{
|
||||
using namespace swrenderer;
|
||||
|
||||
R_ExecuteSetViewSize(Viewpoint, Viewwindow);
|
||||
|
||||
RenderTarget = target;
|
||||
RenderToCanvas = false;
|
||||
int width = SCREENWIDTH;
|
||||
|
@ -93,10 +95,6 @@ void PolyRenderer::RenderViewToCanvas(AActor *actor, DCanvas *canvas, int x, int
|
|||
|
||||
RenderTarget = nullptr;
|
||||
RenderToCanvas = false;
|
||||
R_ExecuteSetViewSize(Viewpoint, Viewwindow);
|
||||
float trueratio;
|
||||
ActiveRatio(width, height, &trueratio);
|
||||
//viewport->SetViewport(&Thread, width, height, viewport->viewwindow.WidescreenRatio);
|
||||
viewactive = savedviewactive;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,6 @@ struct FRenderer
|
|||
// set up the colormap for a newly loaded level.
|
||||
virtual void SetColormap() = 0;
|
||||
|
||||
virtual void OnModeSet() = 0;
|
||||
|
||||
virtual void SetClearColor(int color) = 0;
|
||||
|
||||
virtual void Init() = 0;
|
||||
|
|
|
@ -225,13 +225,6 @@ void FSoftwareRenderer::DrawRemainingPlayerSprites()
|
|||
}
|
||||
}
|
||||
|
||||
void FSoftwareRenderer::OnModeSet ()
|
||||
{
|
||||
// This does not work if the SW renderer is not in use.
|
||||
if (!V_IsHardwareRenderer())
|
||||
mScene.ScreenResized();
|
||||
}
|
||||
|
||||
void FSoftwareRenderer::SetClearColor(int color)
|
||||
{
|
||||
mScene.SetClearColor(color);
|
||||
|
|
|
@ -20,7 +20,6 @@ struct FSoftwareRenderer : public FRenderer
|
|||
// draws player sprites with hardware acceleration (only useful for software rendering)
|
||||
void DrawRemainingPlayerSprites() override;
|
||||
|
||||
void OnModeSet() override;
|
||||
void SetClearColor(int color) override;
|
||||
void RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, double fov) override;
|
||||
|
||||
|
|
|
@ -93,6 +93,8 @@ namespace swrenderer
|
|||
viewport->RenderTarget = target;
|
||||
viewport->RenderingToCanvas = false;
|
||||
|
||||
R_ExecuteSetViewSize(MainThread()->Viewport->viewpoint, MainThread()->Viewport->viewwindow);
|
||||
|
||||
int width = SCREENWIDTH;
|
||||
int height = SCREENHEIGHT;
|
||||
float trueratio;
|
||||
|
@ -361,29 +363,9 @@ namespace swrenderer
|
|||
|
||||
viewport->RenderTarget = nullptr;
|
||||
viewport->RenderingToCanvas = false;
|
||||
|
||||
R_ExecuteSetViewSize(MainThread()->Viewport->viewpoint, MainThread()->Viewport->viewwindow);
|
||||
float trueratio;
|
||||
ActiveRatio(width, height, &trueratio);
|
||||
viewport->SetViewport(MainThread(), width, height, trueratio);
|
||||
|
||||
viewactive = savedviewactive;
|
||||
}
|
||||
|
||||
|
||||
void RenderScene::ScreenResized()
|
||||
{
|
||||
auto viewport = MainThread()->Viewport.get();
|
||||
int width = SCREENWIDTH;
|
||||
int height = SCREENHEIGHT;
|
||||
viewport->RenderTarget = new DCanvas(width, height, V_IsTrueColor()); // Some code deeper down needs something valid here, so give it a dummy canvas.
|
||||
float trueratio;
|
||||
ActiveRatio(width, height, &trueratio);
|
||||
viewport->SetViewport(MainThread(), SCREENWIDTH, SCREENHEIGHT, trueratio);
|
||||
delete viewport->RenderTarget;
|
||||
viewport->RenderTarget = nullptr;
|
||||
}
|
||||
|
||||
void RenderScene::Deinit()
|
||||
{
|
||||
MainThread()->TranslucentPass->Deinit();
|
||||
|
|
|
@ -44,7 +44,6 @@ namespace swrenderer
|
|||
RenderScene();
|
||||
~RenderScene();
|
||||
|
||||
void ScreenResized();
|
||||
void Deinit();
|
||||
|
||||
void SetClearColor(int color);
|
||||
|
|
|
@ -1056,9 +1056,6 @@ void V_UpdateModeSize (int width, int height)
|
|||
DisplayHeight = height;
|
||||
|
||||
R_OldBlend = ~0;
|
||||
|
||||
// the software renderer also needs to be notified
|
||||
SWRenderer->OnModeSet();
|
||||
}
|
||||
|
||||
void V_OutputResized (int width, int height)
|
||||
|
|
Loading…
Reference in a new issue