From 4105daf0b12369a62321ce2718984bdd24d135b2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 19 Jul 2000 18:34:03 +0000 Subject: restore driver depth test enable/disable state in PopAttrib() --- src/mesa/main/attrib.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index b4322d5ab9..6ff6e463fe 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1,10 +1,10 @@ -/* $Id: attrib.c,v 1.10.2.4 2000/03/10 22:11:15 brianp Exp $ */ +/* $Id: attrib.c,v 1.10.2.5 2000/07/19 18:34:03 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.1 + * Version: 3.2.1 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -473,11 +473,14 @@ void gl_PopAttrib( GLcontext* ctx ) 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) -- cgit v1.2.3