summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-07-19 18:34:00 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-07-19 18:34:00 +0000
commitd283df605eb7bdc4c519fff2701de350b94c6f4f (patch)
tree25b9ef5c6c8a75320211385fbfe398f1412c9e1d /src
parent912ed380fe48a42b25fd279e2e948aca1e5a4c23 (diff)
restore driver depth test enable/disable state in PopAttrib()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/attrib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 41bd884be9..be0a644ce1 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1,4 +1,4 @@
-/* $Id: attrib.c,v 1.24 2000/07/05 22:26:43 brianp Exp $ */
+/* $Id: attrib.c,v 1.25 2000/07/19 18:34:00 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -475,11 +475,14 @@ _mesa_PopAttrib(void)
break;
case GL_DEPTH_BUFFER_BIT:
{
+ GLboolean oldDepthTest = ctx->Depth.Test;
GLenum oldDepthFunc = ctx->Depth.Func;
GLboolean oldDepthMask = ctx->Depth.Mask;
GLfloat oldDepthClear = ctx->Depth.Clear;
MEMCPY( &ctx->Depth, attr->data,
sizeof(struct gl_depthbuffer_attrib) );
+ if (ctx->Depth.Test != oldDepthTest && ctx->Driver.Enable)
+ (*ctx->Driver.Enable)( ctx, GL_DEPTH_TEST, ctx->Depth.Test);
if (ctx->Depth.Func != oldDepthFunc && ctx->Driver.DepthFunc)
(*ctx->Driver.DepthFunc)( ctx, ctx->Depth.Func );
if (ctx->Depth.Mask != oldDepthMask && ctx->Driver.DepthMask)