summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-10-21 00:02:47 +0000
committerBrian Paul <[email protected]>2000-10-21 00:02:47 +0000
commitd0d7d62120d7448924655c4683bab6bd5667256e (patch)
tree061ce6882fe759058c8d45fe28e21347f616a85d
parentd475730357ff1595470fbe9856b2c88ad0a771ca (diff)
polygon offset changes; added Visual->MRD field
-rw-r--r--src/mesa/main/context.c4
-rw-r--r--src/mesa/main/polygon.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 3f4bcec2fb5..c57f37c5791 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.93 2000/10/20 19:54:49 brianp Exp $ */
+/* $Id: context.c,v 1.94 2000/10/21 00:02:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -295,6 +295,7 @@ _mesa_initialize_visual( GLvisual *vis,
vis->DepthMax = 0xffffffff;
vis->DepthMaxF = (GLfloat) vis->DepthMax;
}
+ vis->MRD = 1; /* XXX temporary value */
return GL_TRUE;
}
@@ -1157,6 +1158,7 @@ init_attrib_groups( GLcontext *ctx )
ctx->Polygon.StippleFlag = GL_FALSE;
ctx->Polygon.OffsetFactor = 0.0F;
ctx->Polygon.OffsetUnits = 0.0F;
+ ctx->Polygon.OffsetMRD = 0.0F;
ctx->Polygon.OffsetPoint = GL_FALSE;
ctx->Polygon.OffsetLine = GL_FALSE;
ctx->Polygon.OffsetFill = GL_FALSE;
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index 5ca3ffbc945..c96d3355b32 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -1,4 +1,4 @@
-/* $Id: polygon.c,v 1.12 2000/09/26 20:53:53 brianp Exp $ */
+/* $Id: polygon.c,v 1.13 2000/10/21 00:02:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -178,6 +178,7 @@ _mesa_PolygonOffset( GLfloat factor, GLfloat units )
ctx->Polygon.OffsetFactor = factor;
ctx->Polygon.OffsetUnits = units;
+ ctx->Polygon.OffsetMRD = units * ctx->Visual.MRD;
}