mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Correct OpenGL boolean flags.
This commit is contained in:
parent
d3bf7368c4
commit
5b44620c0e
5 changed files with 17 additions and 18 deletions
|
@ -96,7 +96,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);
|
||||
|
@ -113,7 +113,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
|
||||
|
|
|
@ -369,7 +369,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++)
|
||||
{
|
||||
|
@ -413,7 +413,7 @@ R_DrawEntitiesOnList(void)
|
|||
}
|
||||
}
|
||||
|
||||
glDepthMask(1); /* back to writing */
|
||||
glDepthMask(GL_TRUE); /* back to writing */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -510,7 +510,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);
|
||||
|
@ -814,7 +814,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;
|
||||
}
|
||||
|
||||
|
@ -875,7 +875,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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -232,7 +232,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. */
|
||||
|
@ -397,7 +397,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
|
||||
|
|
|
@ -1124,7 +1124,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++)
|
||||
{
|
||||
|
@ -1170,7 +1170,7 @@ GL3_DrawEntitiesOnList(void)
|
|||
|
||||
GL3_DrawAliasShadows();
|
||||
|
||||
glDepthMask(1); /* back to writing */
|
||||
glDepthMask(GL_TRUE); /* back to writing */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1790,7 +1790,7 @@ GL3_Clear(void)
|
|||
GLbitfield stencilFlags = 0;
|
||||
#if 0 // TODO: stereo stuff
|
||||
if (gl3state.stereo_mode >= STEREO_MODE_ROW_INTERLEAVED && gl_state.stereo_mode <= STEREO_MODE_PIXEL_INTERLEAVED) {
|
||||
glClearStencil(0);
|
||||
glClearStencil(GL_FALSE);
|
||||
stencilFlags |= GL_STENCIL_BUFFER_BIT;
|
||||
}
|
||||
#endif // 0
|
||||
|
@ -1826,7 +1826,7 @@ GL3_Clear(void)
|
|||
/* stencilbuffer shadows */
|
||||
if (gl_shadows->value && gl3config.stencil)
|
||||
{
|
||||
glClearStencil(1);
|
||||
glClearStencil(GL_TRUE);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1095,7 +1095,7 @@ GL4_DrawEntitiesOnList(void)
|
|||
/* draw transparent entities
|
||||
we could sort these if it ever
|
||||
becomes a problem... */
|
||||
glDepthMask(0);
|
||||
glDepthMask(GL_FALSE);
|
||||
|
||||
for (i = 0; i < gl4_newrefdef.num_entities; i++)
|
||||
{
|
||||
|
@ -1141,8 +1141,7 @@ GL4_DrawEntitiesOnList(void)
|
|||
|
||||
GL4_DrawAliasShadows();
|
||||
|
||||
glDepthMask(1); /* back to writing */
|
||||
|
||||
glDepthMask(GL_TRUE); /* back to writing */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1757,7 +1756,7 @@ GL4_Clear(void)
|
|||
GLbitfield stencilFlags = 0;
|
||||
#if 0 // TODO: stereo stuff
|
||||
if (gl4state.stereo_mode >= STEREO_MODE_ROW_INTERLEAVED && gl_state.stereo_mode <= STEREO_MODE_PIXEL_INTERLEAVED) {
|
||||
glClearStencil(0);
|
||||
glClearStencil(GL_FALSE);
|
||||
stencilFlags |= GL_STENCIL_BUFFER_BIT;
|
||||
}
|
||||
#endif // 0
|
||||
|
@ -1793,7 +1792,7 @@ GL4_Clear(void)
|
|||
/* stencilbuffer shadows */
|
||||
if (gl_shadows->value && gl4config.stencil)
|
||||
{
|
||||
glClearStencil(1);
|
||||
glClearStencil(GL_TRUE);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue