summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2000-02-27 20:38:15 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2000-02-27 20:38:15 +0000
commite5ed37fa4ed1cf2323b50d96eafb1dc00c1d6d42 (patch)
treeccea6d290f1c90d3dc25f15c264393b6a98afeac /src/mesa/main
parent3994b77bab8c62a4c1a4dffdfba233ef46662b99 (diff)
add callbacks for stipple
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/attrib.c6
-rw-r--r--src/mesa/main/dd.h4
-rw-r--r--src/mesa/main/lines.c5
-rw-r--r--src/mesa/main/polygon.c5
4 files changed, 15 insertions, 5 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 57489b59f2..35af04d5f3 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1,4 +1,4 @@
-/* $Id: attrib.c,v 1.16 2000/02/25 03:55:39 keithw Exp $ */
+/* $Id: attrib.c,v 1.17 2000/02/27 20:38:15 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -104,7 +104,7 @@ _mesa_PushAttrib(GLbitfield mask)
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPushAttrib");
if (MESA_VERBOSE&VERBOSE_API)
- fprintf(stderr, "glPushAttrib %x\n", mask);
+ fprintf(stderr, "glPushAttrib %x\n", (int)mask);
if (ctx->AttribStackDepth>=MAX_ATTRIB_STACK_DEPTH) {
gl_error( ctx, GL_STACK_OVERFLOW, "glPushAttrib" );
@@ -675,6 +675,8 @@ _mesa_PopAttrib(void)
break;
case GL_POLYGON_STIPPLE_BIT:
MEMCPY( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) );
+ if (ctx->Driver.PolygonStipple)
+ ctx->Driver.PolygonStipple( ctx, attr->data );
break;
case GL_SCISSOR_BIT:
MEMCPY( &ctx->Scissor, attr->data,
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 423cdffc19..5459787fea 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1,4 +1,4 @@
-/* $Id: dd.h,v 1.11 2000/02/25 03:55:39 keithw Exp $ */
+/* $Id: dd.h,v 1.12 2000/02/27 20:38:15 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -705,8 +705,10 @@ struct dd_function_table {
void (*Lightfv)(GLcontext *ctx, GLenum light,
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 (*LogicOpcode)(GLcontext *ctx, GLenum opcode);
void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode);
+ void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask );
void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
void (*ShadeModel)(GLcontext *ctx, GLenum mode);
void (*ClearStencil)(GLcontext *ctx, GLint s);
diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c
index 52e9dca7d6..5d33946ce3 100644
--- a/src/mesa/main/lines.c
+++ b/src/mesa/main/lines.c
@@ -1,4 +1,4 @@
-/* $Id: lines.c,v 1.7 2000/02/25 03:55:40 keithw Exp $ */
+/* $Id: lines.c,v 1.8 2000/02/27 20:38:15 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -71,6 +71,9 @@ _mesa_LineStipple( GLint factor, GLushort pattern )
ctx->Line.StippleFactor = CLAMP( factor, 1, 256 );
ctx->Line.StipplePattern = pattern;
ctx->NewState |= NEW_RASTER_OPS;
+
+ if (ctx->Driver.LineStipple)
+ ctx->Driver.LineStipple( ctx, factor, pattern );
}
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index f93ab19566..94a747c402 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -1,4 +1,4 @@
-/* $Id: polygon.c,v 1.7 1999/11/11 01:22:27 brianp Exp $ */
+/* $Id: polygon.c,v 1.8 2000/02/27 20:38:15 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -150,6 +150,9 @@ _mesa_PolygonStipple( const GLubyte *mask )
if (ctx->Polygon.StippleFlag) {
ctx->NewState |= NEW_RASTER_OPS;
}
+
+ if (ctx->Driver.PolygonStipple)
+ ctx->Driver.PolygonStipple( ctx, mask );
}