fixed bugs in fxSetupDepthTest()
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 5 Jun 2000 23:53:06 +0000 (23:53 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 5 Jun 2000 23:53:06 +0000 (23:53 +0000)
src/mesa/drivers/glide/fxsetup.c

index 5e82443d78d23a430b75346f0e0dbc0886c4b0a9..f1a56650bdef4a24feeb3f205c870340c0e374e3 100644 (file)
@@ -1384,12 +1384,14 @@ static void fxSetupDepthTest(GLcontext *ctx)
   fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
   tfxUnitsState *us=&fxMesa->unitsState;
 
-  if(us->depthTestEnabled)
+  if (us->depthTestEnabled) {
      FX_grDepthBufferFunction(us->depthTestFunc);
-  else
+     FX_grDepthMask(us->depthMask);
+  }
+  else {
      FX_grDepthBufferFunction(GR_CMP_ALWAYS);
-
-  FX_grDepthMask(us->depthMask);
+     FX_grDepthMask(FXFALSE);
+  }
 }
 
 /************************************************************************/