summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2001-11-13 23:55:32 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2001-11-13 23:55:32 +0000
commit1aad7ae66a257ffa4b4966772b32387887d563f2 (patch)
treee6a0e780b8e3a7742c785301ba81234a9edba5c5
parent3df4a3c3e209e769a10887a8bd5299712d85d169 (diff)
downloadmesa-1aad7ae66a257ffa4b4966772b32387887d563f2.tar.gz
Check pixel buffer count for general_flat_rgba_line.
-rw-r--r--src/mesa/main/lines.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c
index 7d3794cf6cc..2461a56bd1a 100644
--- a/src/mesa/main/lines.c
+++ b/src/mesa/main/lines.c
@@ -1,4 +1,4 @@
-/* $Id: lines.c,v 1.12.2.2 2001/05/21 17:46:35 brianp Exp $ */
+/* $Id: lines.c,v 1.12.2.3 2001/11/13 23:55:32 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -558,6 +558,7 @@ static void general_flat_rgba_line( GLcontext *ctx,
GLuint vert0, GLuint vert1, GLuint pvert )
{
const GLubyte *color = ctx->VB->ColorPtr->data[pvert];
+ GLuint count;
PB_SET_COLOR( ctx->PB, color[0], color[1], color[2], color[3] );
if (ctx->Line.StippleFlag) {
@@ -566,7 +567,10 @@ static void general_flat_rgba_line( GLcontext *ctx,
#define INTERP_Z 1
#define WIDE 1
#define STIPPLE 1
-#define PLOT(X,Y) PB_WRITE_PIXEL(ctx->PB, X, Y, Z);
+#define PLOT(X,Y) \
+ PB_WRITE_PIXEL(ctx->PB, X, Y, Z); \
+ count = ctx->PB->count; \
+ CHECK_FULL(count);
#include "linetemp.h"
}
else {
@@ -586,7 +590,10 @@ static void general_flat_rgba_line( GLcontext *ctx,
#define INTERP_XY 1
#define INTERP_Z 1
#define WIDE 1
-#define PLOT(X,Y) PB_WRITE_PIXEL(ctx->PB, X, Y, Z);
+#define PLOT(X,Y) \
+ PB_WRITE_PIXEL(ctx->PB, X, Y, Z); \
+ count = ctx->PB->count; \
+ CHECK_FULL(count);
#include "linetemp.h"
}
}