mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- get the timer used for animation only once at the very beginning of the frame and pass it on to the renderer to avoid any dependencies on the timer's implementation.
This commit is contained in:
parent
0289d9ad9f
commit
93e9c383fa
7 changed files with 11 additions and 11 deletions
|
@ -808,7 +808,7 @@ void D_Display ()
|
|||
// [ZZ] execute event hook that we just started the frame
|
||||
//E_RenderFrame();
|
||||
//
|
||||
Renderer->RenderView(&players[consoleplayer]);
|
||||
Renderer->RenderView(&players[consoleplayer], nowtime);
|
||||
|
||||
if ((hw2d = screen->Begin2D(viewactive)))
|
||||
{
|
||||
|
|
|
@ -171,7 +171,7 @@ public:
|
|||
unsigned char *GetTextureBuffer(FTexture *tex, int &w, int &h);
|
||||
void SetupLevel();
|
||||
|
||||
void RenderView(player_t* player);
|
||||
void RenderView(player_t* player, unsigned int nowtime);
|
||||
|
||||
void RenderScreenQuad();
|
||||
void PostProcessScene(int fixedcm);
|
||||
|
|
|
@ -878,7 +878,7 @@ sector_t * GLSceneDrawer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, f
|
|||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void FGLRenderer::RenderView (player_t* player)
|
||||
void FGLRenderer::RenderView (player_t* player, unsigned int nowtime)
|
||||
{
|
||||
checkBenchActive();
|
||||
|
||||
|
@ -891,7 +891,7 @@ void FGLRenderer::RenderView (player_t* player)
|
|||
// Get this before everything else
|
||||
if (cl_capfps || r_NoInterpolate) r_viewpoint.TicFrac = 1.;
|
||||
else r_viewpoint.TicFrac = I_GetTimeFrac (&r_viewpoint.FrameTime);
|
||||
gl_frameMS = I_MSTime();
|
||||
gl_frameMS = nowtime;
|
||||
|
||||
P_FindParticleSubsectors ();
|
||||
|
||||
|
@ -984,7 +984,7 @@ void GLSceneDrawer::WriteSavePic (player_t *player, FileWriter *file, int width,
|
|||
struct FGLInterface : public FRenderer
|
||||
{
|
||||
void Precache(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitlist) override;
|
||||
void RenderView(player_t *player) override;
|
||||
void RenderView(player_t *player, unsigned int nowtime) override;
|
||||
void WriteSavePic (player_t *player, FileWriter *file, int width, int height) override;
|
||||
void StartSerialize(FSerializer &arc) override;
|
||||
void EndSerialize(FSerializer &arc) override;
|
||||
|
@ -1075,9 +1075,9 @@ void FGLInterface::WriteSavePic (player_t *player, FileWriter *file, int width,
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void FGLInterface::RenderView(player_t *player)
|
||||
void FGLInterface::RenderView(player_t *player, unsigned int nowtime)
|
||||
{
|
||||
GLRenderer->RenderView(player);
|
||||
GLRenderer->RenderView(player, nowtime);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
void CheckViewArea(vertex_t *v1, vertex_t *v2, sector_t *frontsector, sector_t *backsector);
|
||||
|
||||
sector_t *RenderViewpoint(AActor * camera, GL_IRECT * bounds, float fov, float ratio, float fovratio, bool mainview, bool toscreen);
|
||||
void RenderView(player_t *player);
|
||||
void RenderView(player_t *player, unsigned int nowtime);
|
||||
void WriteSavePic(player_t *player, FileWriter *file, int width, int height);
|
||||
|
||||
void DrawPSprite(player_t * player, DPSprite *psp, float sx, float sy, bool hudModelStep, int OverrideShader, bool alphatexture);
|
||||
|
|
|
@ -29,7 +29,7 @@ struct FRenderer
|
|||
virtual void Precache(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitlist) = 0;
|
||||
|
||||
// render 3D view
|
||||
virtual void RenderView(player_t *player) = 0;
|
||||
virtual void RenderView(player_t *player, unsigned int nowtime) = 0;
|
||||
|
||||
// Remap voxel palette
|
||||
virtual void RemapVoxels() {}
|
||||
|
|
|
@ -170,7 +170,7 @@ void FSoftwareRenderer::Precache(uint8_t *texhitlist, TMap<PClassActor*, bool> &
|
|||
}
|
||||
}
|
||||
|
||||
void FSoftwareRenderer::RenderView(player_t *player)
|
||||
void FSoftwareRenderer::RenderView(player_t *player, unsigned int /*nowtime*/)
|
||||
{
|
||||
if (r_polyrenderer)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@ struct FSoftwareRenderer : public FRenderer
|
|||
void Precache(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitlist) override;
|
||||
|
||||
// render 3D view
|
||||
void RenderView(player_t *player) override;
|
||||
void RenderView(player_t *player, unsigned int nowtime) override;
|
||||
|
||||
// Remap voxel palette
|
||||
void RemapVoxels() override;
|
||||
|
|
Loading…
Reference in a new issue