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