mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-29 07:22:05 +00:00
Remove SetupFrame and CopyStackedViewParameters from FRenderer interface
This commit is contained in:
parent
1b043bb46c
commit
3093aaadc9
8 changed files with 14 additions and 21 deletions
|
@ -32,6 +32,7 @@
|
|||
#include "po_man.h"
|
||||
#include "swrenderer/scene/r_scene.h"
|
||||
#include "swrenderer/scene/r_viewport.h"
|
||||
#include "swrenderer/scene/r_light.h"
|
||||
|
||||
EXTERN_CVAR(Int, screenblocks)
|
||||
void InitGLRMapinfoData();
|
||||
|
@ -81,7 +82,9 @@ void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
|
|||
P_FindParticleSubsectors();
|
||||
PO_LinkToSubsectors();
|
||||
R_SetupFrame(actor);
|
||||
|
||||
swrenderer::R_SetupColormap(actor);
|
||||
swrenderer::R_SetupFreelook();
|
||||
|
||||
ActorRenderFlags savedflags = camera->renderflags;
|
||||
// Never draw the player unless in chasecam mode
|
||||
if (!r_showviewer)
|
||||
|
|
|
@ -57,8 +57,6 @@ struct FRenderer
|
|||
virtual void ClearBuffer(int color) = 0;
|
||||
virtual void Init() = 0;
|
||||
virtual void SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight, float trueratio) {}
|
||||
virtual void SetupFrame(player_t *player) {}
|
||||
virtual void CopyStackedViewParameters() {}
|
||||
virtual void RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, int fov) = 0;
|
||||
virtual sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) = 0;
|
||||
virtual void SetFogParams(int _fogdensity, PalEntry _outsidefogcolor, int _outsidefogdensity, int _skyfog) {}
|
||||
|
|
|
@ -910,9 +910,6 @@ void R_SetupFrame (AActor *actor)
|
|||
}
|
||||
}
|
||||
|
||||
Renderer->CopyStackedViewParameters();
|
||||
Renderer->SetupFrame(player);
|
||||
|
||||
validcount++;
|
||||
|
||||
if (RenderTarget == screen && r_clearbuffer != 0)
|
||||
|
|
|
@ -302,17 +302,6 @@ void FSoftwareRenderer::SetWindow (int windowSize, int fullWidth, int fullHeight
|
|||
R_SWRSetWindow(windowSize, fullWidth, fullHeight, stHeight, trueratio);
|
||||
}
|
||||
|
||||
void FSoftwareRenderer::SetupFrame(player_t *player)
|
||||
{
|
||||
R_SetupColormap(player);
|
||||
R_SetupFreelook();
|
||||
}
|
||||
|
||||
void FSoftwareRenderer::CopyStackedViewParameters()
|
||||
{
|
||||
RenderPortal::Instance()->CopyStackedViewParameters();
|
||||
}
|
||||
|
||||
void FSoftwareRenderer::RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, int fov)
|
||||
{
|
||||
BYTE *Pixels = r_swtruecolor ? (BYTE*)tex->GetPixelsBgra() : (BYTE*)tex->GetPixels();
|
||||
|
|
|
@ -35,8 +35,6 @@ struct FSoftwareRenderer : public FRenderer
|
|||
void ClearBuffer(int color) override;
|
||||
void Init() override;
|
||||
void SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight, float trueratio) override;
|
||||
void SetupFrame(player_t *player) override;
|
||||
void CopyStackedViewParameters() override;
|
||||
void RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, int fov) override;
|
||||
sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) override;
|
||||
|
||||
|
|
|
@ -109,8 +109,12 @@ namespace swrenderer
|
|||
return CurrentVisibility;
|
||||
}
|
||||
|
||||
void R_SetupColormap(player_t *player)
|
||||
void R_SetupColormap(AActor *actor)
|
||||
{
|
||||
player_t *player = actor->player;
|
||||
if (camera && camera->player != 0)
|
||||
player = camera->player;
|
||||
|
||||
realfixedcolormap = NULL;
|
||||
fixedcolormap = NULL;
|
||||
fixedlightlev = -1;
|
||||
|
|
|
@ -66,5 +66,5 @@ namespace swrenderer
|
|||
void R_SetVisibility(double visibility);
|
||||
double R_GetVisibility();
|
||||
|
||||
void R_SetupColormap(player_t *);
|
||||
void R_SetupColormap(AActor *actor);
|
||||
}
|
||||
|
|
|
@ -71,6 +71,10 @@ namespace swrenderer
|
|||
|
||||
R_SetupBuffer();
|
||||
R_SetupFrame(actor);
|
||||
R_SetupColormap(actor);
|
||||
R_SetupFreelook();
|
||||
|
||||
RenderPortal::Instance()->CopyStackedViewParameters();
|
||||
|
||||
// Clear buffers.
|
||||
R_ClearClipSegs(0, viewwidth);
|
||||
|
|
Loading…
Reference in a new issue