summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>1999-09-16 11:54:56 +0000
committerKeith Whitwell <[email protected]>1999-09-16 11:54:56 +0000
commite3f37862d25b20d952bb5740f1abfd6b6569cdaf (patch)
treefa3b08c1c936271a20759f0cdee618a7dd83caf9 /src/mesa/main
parent0099981b1cb1eb1ee7b059aeb3970206bd7c4fde (diff)
Do pop for GL_VIEWPORT_BIT via. the api
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/attrib.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 78f4d05b2c9..527cd2d8bb7 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1,4 +1,4 @@
-/* $Id: attrib.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
+/* $Id: attrib.c,v 1.2 1999/09/16 11:54:56 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -700,6 +700,10 @@ void gl_PopAttrib( GLcontext* ctx )
(*ctx->Driver.ClearStencil)( ctx, ctx->Stencil.Clear );
if (ctx->Driver.Enable)
(*ctx->Driver.Enable)( ctx, GL_STENCIL_TEST, ctx->Stencil.Enabled );
+/* ctx->TriangleCaps &= ~DD_STENCIL; */
+/* if (ctx->Stencil.Enabled) */
+/* ctx->TriangleCaps |= DD_STENCIL; */
+
break;
case GL_TRANSFORM_BIT:
MEMCPY( &ctx->Transform, attr->data,
@@ -738,18 +742,15 @@ void gl_PopAttrib( GLcontext* ctx )
}
}
break;
- case GL_VIEWPORT_BIT:
- MEMCPY( &ctx->Viewport, attr->data,
- sizeof(struct gl_viewport_attrib) );
- if (ctx->Driver.Viewport) {
- (*ctx->Driver.Viewport)( ctx, ctx->Viewport.X, ctx->Viewport.Y,
- ctx->Viewport.Width, ctx->Viewport.Height );
- }
- if (ctx->Driver.DepthRange) {
- (*ctx->Driver.DepthRange)( ctx, ctx->Viewport.Near,
- ctx->Viewport.Far );
- }
- break;
+ case GL_VIEWPORT_BIT:
+ {
+ struct gl_viewport_attrib *v =
+ (struct gl_viewport_attrib *)attr->data;
+
+ gl_Viewport( ctx, v->X, v->Y, v->Width, v->Height );
+ gl_DepthRange( ctx, v->Near, v->Far );
+ break;
+ }
default:
gl_problem( ctx, "Bad attrib flag in PopAttrib");
break;