From 1aad7ae66a257ffa4b4966772b32387887d563f2 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Tue, 13 Nov 2001 23:55:32 +0000 Subject: Check pixel buffer count for general_flat_rgba_line. --- src/mesa/main/lines.c | 13 ++++++++++--- 1 file 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" } } -- cgit v1.2.1