mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +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;
|
||||
|
||||
validcount++;
|
||||
inskybox = true;
|
||||
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag & 1), !!(PlaneMirrorFlag & 1));
|
||||
GLRenderer->SetViewArea();
|
||||
|
@ -755,9 +754,6 @@ void GLSectorStackPortal::DrawContents()
|
|||
ViewPos += origin->mDisplacement;
|
||||
GLRenderer->mViewActor = NULL;
|
||||
|
||||
|
||||
validcount++;
|
||||
|
||||
// avoid recursions!
|
||||
if (origin->plane != -1) instack[origin->plane]++;
|
||||
|
||||
|
@ -803,8 +799,6 @@ void GLPlaneMirrorPortal::DrawContents()
|
|||
PlaneMirrorMode = origin->fC() < 0 ? -1 : 1;
|
||||
r_showviewer = true;
|
||||
|
||||
validcount++;
|
||||
|
||||
PlaneMirrorFlag++;
|
||||
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
||||
ClearClipper();
|
||||
|
@ -916,8 +910,6 @@ void GLMirrorPortal::DrawContents()
|
|||
GLRenderer->mViewActor = NULL;
|
||||
r_showviewer = true;
|
||||
|
||||
validcount++;
|
||||
|
||||
MirrorFlag++;
|
||||
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
||||
|
||||
|
@ -1028,7 +1020,6 @@ void GLLineToLinePortal::DrawContents()
|
|||
}
|
||||
|
||||
GLRenderer->mViewActor = NULL;
|
||||
validcount++;
|
||||
GLRenderer->SetupView(ViewPos.X, ViewPos.Y, ViewPos.Z, ViewAngle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
||||
|
||||
ClearClipper();
|
||||
|
|
|
@ -306,6 +306,7 @@ void FGLRenderer::CreateScene()
|
|||
gl_spriteindex=0;
|
||||
Bsp.Clock();
|
||||
R_SetView();
|
||||
validcount++; // used for processing sidedefs only once by the renderer.
|
||||
gl_RenderBSPNode (nodes + numnodes - 1);
|
||||
Bsp.Unclock();
|
||||
|
||||
|
|
Loading…
Reference in a new issue