mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- fixed use of validcount for the GL renderer.
This needs to be incremented more locally to the place where it is used, so that it is guaranteed that each viewpoint that needs to be rendered increases it. As a result the uses in the portal code could be removed.
This commit is contained in:
parent
430f3419b0
commit
0a35027f67
2 changed files with 1 additions and 9 deletions
|
@ -661,7 +661,6 @@ void GLSkyboxPortal::DrawContents()
|
||||||
|
|
||||||
GLRenderer->mViewActor = origin;
|
GLRenderer->mViewActor = origin;
|
||||||
|
|
||||||
validcount++;
|
|
||||||
inskybox = true;
|
inskybox = true;
|
||||||
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag & 1), !!(PlaneMirrorFlag & 1));
|
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag & 1), !!(PlaneMirrorFlag & 1));
|
||||||
GLRenderer->SetViewArea();
|
GLRenderer->SetViewArea();
|
||||||
|
@ -755,9 +754,6 @@ void GLSectorStackPortal::DrawContents()
|
||||||
ViewPos += origin->mDisplacement;
|
ViewPos += origin->mDisplacement;
|
||||||
GLRenderer->mViewActor = NULL;
|
GLRenderer->mViewActor = NULL;
|
||||||
|
|
||||||
|
|
||||||
validcount++;
|
|
||||||
|
|
||||||
// avoid recursions!
|
// avoid recursions!
|
||||||
if (origin->plane != -1) instack[origin->plane]++;
|
if (origin->plane != -1) instack[origin->plane]++;
|
||||||
|
|
||||||
|
@ -803,8 +799,6 @@ void GLPlaneMirrorPortal::DrawContents()
|
||||||
PlaneMirrorMode = origin->fC() < 0 ? -1 : 1;
|
PlaneMirrorMode = origin->fC() < 0 ? -1 : 1;
|
||||||
r_showviewer = true;
|
r_showviewer = true;
|
||||||
|
|
||||||
validcount++;
|
|
||||||
|
|
||||||
PlaneMirrorFlag++;
|
PlaneMirrorFlag++;
|
||||||
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
||||||
ClearClipper();
|
ClearClipper();
|
||||||
|
@ -916,8 +910,6 @@ void GLMirrorPortal::DrawContents()
|
||||||
GLRenderer->mViewActor = NULL;
|
GLRenderer->mViewActor = NULL;
|
||||||
r_showviewer = true;
|
r_showviewer = true;
|
||||||
|
|
||||||
validcount++;
|
|
||||||
|
|
||||||
MirrorFlag++;
|
MirrorFlag++;
|
||||||
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
||||||
|
|
||||||
|
@ -1028,7 +1020,6 @@ void GLLineToLinePortal::DrawContents()
|
||||||
}
|
}
|
||||||
|
|
||||||
GLRenderer->mViewActor = NULL;
|
GLRenderer->mViewActor = NULL;
|
||||||
validcount++;
|
|
||||||
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
||||||
|
|
||||||
ClearClipper();
|
ClearClipper();
|
||||||
|
|
|
@ -306,6 +306,7 @@ void FGLRenderer::CreateScene()
|
||||||
gl_spriteindex=0;
|
gl_spriteindex=0;
|
||||||
Bsp.Clock();
|
Bsp.Clock();
|
||||||
R_SetView();
|
R_SetView();
|
||||||
|
validcount++; // used for processing sidedefs only once by the renderer.
|
||||||
gl_RenderBSPNode (nodes + numnodes - 1);
|
gl_RenderBSPNode (nodes + numnodes - 1);
|
||||||
Bsp.Unclock();
|
Bsp.Unclock();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue