mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-01 05:30:58 +00:00
Correct OpenGL boolean flags.
This commit is contained in:
parent
6869d7dddd
commit
d2b0ebd522
4 changed files with 11 additions and 11 deletions
|
@ -98,7 +98,7 @@ R_RenderDlights(void)
|
|||
/* because the count hasn't advanced yet for this frame */
|
||||
r_dlightframecount = r_framecount + 1;
|
||||
|
||||
glDepthMask(0);
|
||||
glDepthMask(GL_FALSE);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glShadeModel(GL_SMOOTH);
|
||||
glEnable(GL_BLEND);
|
||||
|
@ -115,7 +115,7 @@ R_RenderDlights(void)
|
|||
glDisable(GL_BLEND);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glDepthMask(1);
|
||||
glDepthMask(GL_TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -365,7 +365,7 @@ R_DrawEntitiesOnList(void)
|
|||
/* draw transparent entities
|
||||
we could sort these if it ever
|
||||
becomes a problem... */
|
||||
glDepthMask(0);
|
||||
glDepthMask(GL_FALSE);
|
||||
|
||||
for (i = 0; i < r_newrefdef.num_entities; i++)
|
||||
{
|
||||
|
@ -408,7 +408,7 @@ R_DrawEntitiesOnList(void)
|
|||
}
|
||||
}
|
||||
|
||||
glDepthMask(1); /* back to writing */
|
||||
glDepthMask(GL_TRUE); /* back to writing */
|
||||
R_EnableMultitexture(false);
|
||||
}
|
||||
|
||||
|
@ -505,7 +505,7 @@ R_DrawParticles2(int num_particles, const particle_t particles[],
|
|||
|
||||
glDisable(GL_BLEND);
|
||||
glColor4f(1, 1, 1, 1);
|
||||
glDepthMask(1); /* back to normal Z buffering */
|
||||
glDepthMask(GL_TRUE); /* back to normal Z buffering */
|
||||
R_TexEnv(GL_REPLACE);
|
||||
|
||||
YQ2_VLAFREE(vtx);
|
||||
|
@ -809,7 +809,7 @@ R_Clear(void)
|
|||
// Check whether the stencil buffer needs clearing, and do so if need be.
|
||||
GLbitfield stencilFlags = 0;
|
||||
if (gl_state.stereo_mode >= STEREO_MODE_ROW_INTERLEAVED && gl_state.stereo_mode <= STEREO_MODE_PIXEL_INTERLEAVED) {
|
||||
glClearStencil(0);
|
||||
glClearStencil(GL_FALSE);
|
||||
stencilFlags |= GL_STENCIL_BUFFER_BIT;
|
||||
}
|
||||
|
||||
|
@ -870,7 +870,7 @@ R_Clear(void)
|
|||
/* stencilbuffer shadows */
|
||||
if (gl_shadows->value && gl_state.stencil && gl1_stencilshadow->value)
|
||||
{
|
||||
glClearStencil(1);
|
||||
glClearStencil(GL_TRUE);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ R_BlendLightmaps(const model_t *currentmodel)
|
|||
}
|
||||
|
||||
/* don't bother writing Z */
|
||||
glDepthMask(0);
|
||||
glDepthMask(GL_FALSE);
|
||||
|
||||
/* set the appropriate blending mode unless
|
||||
we're only looking at the lightmaps. */
|
||||
|
@ -406,7 +406,7 @@ R_BlendLightmaps(const model_t *currentmodel)
|
|||
/* restore state */
|
||||
glDisable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glDepthMask(1);
|
||||
glDepthMask(GL_TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1131,7 +1131,7 @@ GL3_DrawEntitiesOnList(void)
|
|||
/* draw transparent entities
|
||||
we could sort these if it ever
|
||||
becomes a problem... */
|
||||
glDepthMask(0);
|
||||
glDepthMask(GL_FALSE);
|
||||
|
||||
for (i = 0; i < gl3_newrefdef.num_entities; i++)
|
||||
{
|
||||
|
@ -1176,7 +1176,7 @@ GL3_DrawEntitiesOnList(void)
|
|||
|
||||
GL3_DrawAliasShadows();
|
||||
|
||||
glDepthMask(1); /* back to writing */
|
||||
glDepthMask(GL_TRUE); /* back to writing */
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue