summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-03-03 18:55:45 +0000
committerBrian Paul <[email protected]>2000-03-03 18:55:45 +0000
commit1b6592aae72e7974a16437c64f90152e83917450 (patch)
tree4f0b8a7f02c016c28f5e2f3822ba748176445554 /src
parent4f980f4ebb0fc9ec9032a31d54cc1fd745359e0b (diff)
added LineWidth device driver function
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/attrib.c7
-rw-r--r--src/mesa/main/dd.h3
-rw-r--r--src/mesa/main/lines.c4
3 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 35af04d5f3b..4ad733b3cdf 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1,4 +1,4 @@
-/* $Id: attrib.c,v 1.17 2000/02/27 20:38:15 keithw Exp $ */
+/* $Id: attrib.c,v 1.18 2000/03/03 18:55:45 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -639,6 +639,11 @@ _mesa_PopAttrib(void)
(*ctx->Driver.Enable)( ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag );
(*ctx->Driver.Enable)( ctx, GL_LINE_STIPPLE, ctx->Line.StippleFlag );
}
+ if (ctx->Driver.LineStipple)
+ (*ctx->Driver.LineStipple)(ctx, ctx->Line.StippleFactor,
+ ctx->Line.StipplePattern);
+ if (ctx->Driver.LineWidth)
+ (*ctx->Driver.LineWidth)(ctx, ctx->Line.Width);
break;
case GL_LIST_BIT:
MEMCPY( &ctx->List, attr->data, sizeof(struct gl_list_attrib) );
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index d2b985f3844..73665425123 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1,4 +1,4 @@
-/* $Id: dd.h,v 1.14 2000/03/03 17:54:56 brianp Exp $ */
+/* $Id: dd.h,v 1.15 2000/03/03 18:55:45 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -727,6 +727,7 @@ struct dd_function_table {
GLenum pname, const GLfloat *params, GLint nparams );
void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern );
+ void (*LineWidth)(GLcontext *ctx, GLfloat width);
void (*LogicOpcode)(GLcontext *ctx, GLenum opcode);
void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode);
void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask );
diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c
index 5d33946ce3f..ba877a85e19 100644
--- a/src/mesa/main/lines.c
+++ b/src/mesa/main/lines.c
@@ -1,4 +1,4 @@
-/* $Id: lines.c,v 1.8 2000/02/27 20:38:15 keithw Exp $ */
+/* $Id: lines.c,v 1.9 2000/03/03 18:55:45 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -58,6 +58,8 @@ _mesa_LineWidth( GLfloat width )
ctx->TriangleCaps &= ~DD_LINE_WIDTH;
if (width != 1.0) ctx->TriangleCaps |= DD_LINE_WIDTH;
ctx->NewState |= NEW_RASTER_OPS;
+ if (ctx->Driver.LineWidth)
+ (*ctx->Driver.LineWidth)(ctx, width);
}
}