mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 16:41:09 +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 "po_man.h"
|
||||||
#include "swrenderer/scene/r_scene.h"
|
#include "swrenderer/scene/r_scene.h"
|
||||||
#include "swrenderer/scene/r_viewport.h"
|
#include "swrenderer/scene/r_viewport.h"
|
||||||
|
#include "swrenderer/scene/r_light.h"
|
||||||
|
|
||||||
EXTERN_CVAR(Int, screenblocks)
|
EXTERN_CVAR(Int, screenblocks)
|
||||||
void InitGLRMapinfoData();
|
void InitGLRMapinfoData();
|
||||||
|
@ -81,7 +82,9 @@ void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
|
||||||
P_FindParticleSubsectors();
|
P_FindParticleSubsectors();
|
||||||
PO_LinkToSubsectors();
|
PO_LinkToSubsectors();
|
||||||
R_SetupFrame(actor);
|
R_SetupFrame(actor);
|
||||||
|
swrenderer::R_SetupColormap(actor);
|
||||||
|
swrenderer::R_SetupFreelook();
|
||||||
|
|
||||||
ActorRenderFlags savedflags = camera->renderflags;
|
ActorRenderFlags savedflags = camera->renderflags;
|
||||||
// Never draw the player unless in chasecam mode
|
// Never draw the player unless in chasecam mode
|
||||||
if (!r_showviewer)
|
if (!r_showviewer)
|
||||||
|
|
|
@ -57,8 +57,6 @@ struct FRenderer
|
||||||
virtual void ClearBuffer(int color) = 0;
|
virtual void ClearBuffer(int color) = 0;
|
||||||
virtual void Init() = 0;
|
virtual void Init() = 0;
|
||||||
virtual void SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight, float trueratio) {}
|
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 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 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) {}
|
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++;
|
validcount++;
|
||||||
|
|
||||||
if (RenderTarget == screen && r_clearbuffer != 0)
|
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);
|
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)
|
void FSoftwareRenderer::RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, int fov)
|
||||||
{
|
{
|
||||||
BYTE *Pixels = r_swtruecolor ? (BYTE*)tex->GetPixelsBgra() : (BYTE*)tex->GetPixels();
|
BYTE *Pixels = r_swtruecolor ? (BYTE*)tex->GetPixelsBgra() : (BYTE*)tex->GetPixels();
|
||||||
|
|
|
@ -35,8 +35,6 @@ struct FSoftwareRenderer : public FRenderer
|
||||||
void ClearBuffer(int color) override;
|
void ClearBuffer(int color) override;
|
||||||
void Init() override;
|
void Init() override;
|
||||||
void SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight, float trueratio) 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;
|
void RenderTextureView (FCanvasTexture *tex, AActor *viewpoint, int fov) override;
|
||||||
sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) override;
|
sector_t *FakeFlat(sector_t *sec, sector_t *tempsec, int *floorlightlevel, int *ceilinglightlevel) override;
|
||||||
|
|
||||||
|
|
|
@ -109,8 +109,12 @@ namespace swrenderer
|
||||||
return CurrentVisibility;
|
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;
|
realfixedcolormap = NULL;
|
||||||
fixedcolormap = NULL;
|
fixedcolormap = NULL;
|
||||||
fixedlightlev = -1;
|
fixedlightlev = -1;
|
||||||
|
|
|
@ -66,5 +66,5 @@ namespace swrenderer
|
||||||
void R_SetVisibility(double visibility);
|
void R_SetVisibility(double visibility);
|
||||||
double R_GetVisibility();
|
double R_GetVisibility();
|
||||||
|
|
||||||
void R_SetupColormap(player_t *);
|
void R_SetupColormap(AActor *actor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,10 @@ namespace swrenderer
|
||||||
|
|
||||||
R_SetupBuffer();
|
R_SetupBuffer();
|
||||||
R_SetupFrame(actor);
|
R_SetupFrame(actor);
|
||||||
|
R_SetupColormap(actor);
|
||||||
|
R_SetupFreelook();
|
||||||
|
|
||||||
|
RenderPortal::Instance()->CopyStackedViewParameters();
|
||||||
|
|
||||||
// Clear buffers.
|
// Clear buffers.
|
||||||
R_ClearClipSegs(0, viewwidth);
|
R_ClearClipSegs(0, viewwidth);
|
||||||
|
|
Loading…
Reference in a new issue