Clear stencil with depth buffer

This commit is contained in:
jpaana 2003-08-20 20:24:22 +00:00
parent a570f0e972
commit f6b6214605
2 changed files with 6 additions and 6 deletions

View file

@ -223,7 +223,7 @@ void R_Glare ()
// GL_Bind(glare_object);
// glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 128, 128);
glClear (GL_DEPTH_BUFFER_BIT);
glClear (GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);
r_refdef.vrect.x = ox;
r_refdef.vrect.y = oy;
@ -309,4 +309,4 @@ glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glDisable (GL_BLEND);
glEnable (GL_ALPHA_TEST);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
}

View file

@ -2104,7 +2104,7 @@ void R_RenderScene (void)
//}
if (!sh_noscissor.value) {
glClear(GL_STENCIL_BUFFER_BIT);
// glClear(GL_STENCIL_BUFFER_BIT); // already cleared
R_ClearRectList();
}
@ -2488,7 +2488,7 @@ void R_Mirror (mirrorplane_t *mir)
GL_Bind(mir->texture_object);
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
glClear (GL_DEPTH_BUFFER_BIT);
glClear (GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
if (mir_detail.value < 2) {
@ -2701,9 +2701,9 @@ void R_Clear (void)
{
if (gl_clear.value || gl_wireframe.value)
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
else
glClear (GL_DEPTH_BUFFER_BIT);
glClear (GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
gldepthmin = 0;
gldepthmax = 1;
glDepthFunc (GL_LEQUAL);