mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-12 23:54:33 +00:00
- Inside the renderer, use only the time value being passed to RenderView.
The voxel rotation code of the software renderer and R_SetupFrame still called I_FPSTime directly.
This commit is contained in:
parent
f54475b1f1
commit
e94109f1c3
9 changed files with 12 additions and 9 deletions
|
@ -785,7 +785,7 @@ sector_t * GLSceneDrawer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, f
|
||||||
GLRenderer->mSceneClearColor[0] = 0.0f;
|
GLRenderer->mSceneClearColor[0] = 0.0f;
|
||||||
GLRenderer->mSceneClearColor[1] = 0.0f;
|
GLRenderer->mSceneClearColor[1] = 0.0f;
|
||||||
GLRenderer->mSceneClearColor[2] = 0.0f;
|
GLRenderer->mSceneClearColor[2] = 0.0f;
|
||||||
R_SetupFrame (r_viewpoint, r_viewwindow, camera);
|
R_SetupFrame (r_viewpoint, r_viewwindow, camera, gl_frameMS);
|
||||||
SetViewArea();
|
SetViewArea();
|
||||||
|
|
||||||
GLRenderer->mGlobVis = R_GetGlobVis(r_viewwindow, r_visibility);
|
GLRenderer->mGlobVis = R_GetGlobVis(r_viewwindow, r_visibility);
|
||||||
|
|
|
@ -115,7 +115,7 @@ void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
|
||||||
|
|
||||||
DontMapLines = dontmaplines;
|
DontMapLines = dontmaplines;
|
||||||
|
|
||||||
R_SetupFrame(Viewpoint, Viewwindow, actor);
|
R_SetupFrame(Viewpoint, Viewwindow, actor, swrenderer::renderTime);
|
||||||
P_FindParticleSubsectors();
|
P_FindParticleSubsectors();
|
||||||
PO_LinkToSubsectors();
|
PO_LinkToSubsectors();
|
||||||
|
|
||||||
|
|
|
@ -751,7 +751,7 @@ static double QuakePower(double factor, double intensity, double offset)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void R_SetupFrame (FRenderViewpoint &viewpoint, FViewWindow &viewwindow, AActor *actor)
|
void R_SetupFrame (FRenderViewpoint &viewpoint, FViewWindow &viewwindow, AActor *actor, unsigned int renderTime)
|
||||||
{
|
{
|
||||||
if (actor == NULL)
|
if (actor == NULL)
|
||||||
{
|
{
|
||||||
|
@ -982,7 +982,7 @@ void R_SetupFrame (FRenderViewpoint &viewpoint, FViewWindow &viewwindow, AActor
|
||||||
|
|
||||||
if (hom == 3)
|
if (hom == 3)
|
||||||
{
|
{
|
||||||
hom = ((I_FPSTime() / 128) & 1) + 1;
|
hom = ((renderTime / 128) & 1) + 1;
|
||||||
}
|
}
|
||||||
if (hom == 1)
|
if (hom == 1)
|
||||||
{
|
{
|
||||||
|
@ -994,7 +994,7 @@ void R_SetupFrame (FRenderViewpoint &viewpoint, FViewWindow &viewwindow, AActor
|
||||||
}
|
}
|
||||||
else if (hom == 4)
|
else if (hom == 4)
|
||||||
{
|
{
|
||||||
color = (I_FPSTime() / 32) & 255;
|
color = (renderTime / 32) & 255;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -111,7 +111,7 @@ void R_ClearInterpolationPath();
|
||||||
void R_AddInterpolationPoint(const DVector3a &vec);
|
void R_AddInterpolationPoint(const DVector3a &vec);
|
||||||
void R_SetViewSize (int blocks);
|
void R_SetViewSize (int blocks);
|
||||||
void R_SetFOV (FRenderViewpoint &viewpoint, DAngle fov);
|
void R_SetFOV (FRenderViewpoint &viewpoint, DAngle fov);
|
||||||
void R_SetupFrame (FRenderViewpoint &viewpoint, FViewWindow &viewwindow, AActor * camera);
|
void R_SetupFrame (FRenderViewpoint &viewpoint, FViewWindow &viewwindow, AActor * camera, unsigned int renderTime);
|
||||||
void R_SetViewAngle (FRenderViewpoint &viewpoint, const FViewWindow &viewwindow);
|
void R_SetViewAngle (FRenderViewpoint &viewpoint, const FViewWindow &viewwindow);
|
||||||
|
|
||||||
// Called by startup code.
|
// Called by startup code.
|
||||||
|
|
|
@ -64,6 +64,7 @@ namespace swrenderer
|
||||||
int fuzzoffset[FUZZTABLE + 1];
|
int fuzzoffset[FUZZTABLE + 1];
|
||||||
int fuzzpos;
|
int fuzzpos;
|
||||||
int fuzzviewheight;
|
int fuzzviewheight;
|
||||||
|
unsigned int renderTime;
|
||||||
|
|
||||||
int fuzz_random_x_offset[FUZZ_RANDOM_X_SIZE] =
|
int fuzz_random_x_offset[FUZZ_RANDOM_X_SIZE] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,6 +35,7 @@ namespace swrenderer
|
||||||
extern FDynamicColormap ShadeFakeColormap[16];
|
extern FDynamicColormap ShadeFakeColormap[16];
|
||||||
extern uint8_t identitymap[256];
|
extern uint8_t identitymap[256];
|
||||||
extern FDynamicColormap identitycolormap;
|
extern FDynamicColormap identitycolormap;
|
||||||
|
extern unsigned int renderTime;
|
||||||
|
|
||||||
// Constant arrays used for psprite clipping and initializing clipping.
|
// Constant arrays used for psprite clipping and initializing clipping.
|
||||||
extern short zeroarray[MAXWIDTH];
|
extern short zeroarray[MAXWIDTH];
|
||||||
|
|
|
@ -170,8 +170,9 @@ void FSoftwareRenderer::Precache(uint8_t *texhitlist, TMap<PClassActor*, bool> &
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSoftwareRenderer::RenderView(player_t *player, unsigned int /*nowtime*/)
|
void FSoftwareRenderer::RenderView(player_t *player, unsigned int nowtime)
|
||||||
{
|
{
|
||||||
|
renderTime = nowtime;
|
||||||
if (r_polyrenderer)
|
if (r_polyrenderer)
|
||||||
{
|
{
|
||||||
PolyRenderer::Instance()->Viewpoint = r_viewpoint;
|
PolyRenderer::Instance()->Viewpoint = r_viewpoint;
|
||||||
|
|
|
@ -136,7 +136,7 @@ namespace swrenderer
|
||||||
MaskedCycles.Reset();
|
MaskedCycles.Reset();
|
||||||
DrawerWaitCycles.Reset();
|
DrawerWaitCycles.Reset();
|
||||||
|
|
||||||
R_SetupFrame(MainThread()->Viewport->viewpoint, MainThread()->Viewport->viewwindow, actor);
|
R_SetupFrame(MainThread()->Viewport->viewpoint, MainThread()->Viewport->viewwindow, actor, renderTime);
|
||||||
|
|
||||||
if (APART(R_OldBlend)) NormalLight.Maps = realcolormaps.Maps;
|
if (APART(R_OldBlend)) NormalLight.Maps = realcolormaps.Maps;
|
||||||
else NormalLight.Maps = realcolormaps.Maps + NUMCOLORMAPS * 256 * R_OldBlend;
|
else NormalLight.Maps = realcolormaps.Maps + NUMCOLORMAPS * 256 * R_OldBlend;
|
||||||
|
|
|
@ -135,7 +135,7 @@ namespace swrenderer
|
||||||
int voxelspin = (thing->flags & MF_DROPPED) ? voxel->DroppedSpin : voxel->PlacedSpin;
|
int voxelspin = (thing->flags & MF_DROPPED) ? voxel->DroppedSpin : voxel->PlacedSpin;
|
||||||
if (voxelspin != 0)
|
if (voxelspin != 0)
|
||||||
{
|
{
|
||||||
DAngle ang = double(I_FPSTime()) * voxelspin / 1000;
|
DAngle ang = double(renderTime) * voxelspin / 1000;
|
||||||
vis->Angle -= ang;
|
vis->Angle -= ang;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue