-
-
-/* Flat, color index line */
-static void flat_ci_line( GLcontext *ctx,
- const SWvertex *vert0,
- const SWvertex *vert1 )
-{
- struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
-
- PB_SET_INDEX( PB, vert0->index );
-
-#define INTERP_XY 1
-#define PLOT(X,Y) PB_WRITE_PIXEL(PB, X, Y, 0, 0);
-
-#include "s_linetemp.h"
-
- _mesa_flush_pb(ctx);
-}
-
-
-
-/* Flat, color index line with Z interpolation/testing */
-static void flat_ci_z_line( GLcontext *ctx,
- const SWvertex *vert0,
- const SWvertex *vert1 )
-{
- struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
- PB_SET_INDEX( PB, vert0->index );
-
-#define INTERP_XY 1
-#define INTERP_Z 1
-#define INTERP_FOG 1
-#define PLOT(X,Y) PB_WRITE_PIXEL(PB, X, Y, Z, fog0);
-
-#include "s_linetemp.h"
-
- _mesa_flush_pb(ctx);
-}
-
-
-
-/* Flat-shaded, RGBA line */
-static void flat_rgba_line( GLcontext *ctx,
- const SWvertex *vert0,
- const SWvertex *vert1 )
-{
- const GLchan *color = vert1->color;
- struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
- PB_SET_COLOR( PB, color[0], color[1], color[2], color[3] );
-
-#define INTERP_XY 1
-#define PLOT(X,Y) PB_WRITE_PIXEL(PB, X, Y, 0, 0);
-
-#include "s_linetemp.h"
-
- _mesa_flush_pb(ctx);
-}
-
-
-
-/* Flat-shaded, RGBA line with Z interpolation/testing */
-static void flat_rgba_z_line( GLcontext *ctx,
- const SWvertex *vert0,
- const SWvertex *vert1 )
-{
- const GLchan *color = vert1->color;
- struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
- PB_SET_COLOR( PB, color[0], color[1], color[2], color[3] );
-
-#define INTERP_XY 1
-#define INTERP_Z 1
-#define INTERP_FOG 1
-#define PLOT(X,Y) PB_WRITE_PIXEL(PB, X, Y, Z, fog0);
-
-#include "s_linetemp.h"
-
- _mesa_flush_pb(ctx);
-}
-
-
-
-/* Smooth shaded, color index line */
-static void smooth_ci_line( GLcontext *ctx,
- const SWvertex *vert0,
- const SWvertex *vert1 )
-{
- struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
- GLint count = PB->count;
- GLint *pbx = PB->x;
- GLint *pby = PB->y;
- GLuint *pbi = PB->index;
-
- PB->mono = GL_FALSE;
-
-#define INTERP_XY 1
-#define INTERP_INDEX 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- pbi[count] = I; \
- count++;
-
-#include "s_linetemp.h"
-
- PB->count = count;
- _mesa_flush_pb(ctx);
-}
-
-
-
-/* Smooth shaded, color index line with Z interpolation/testing */
-static void smooth_ci_z_line( GLcontext *ctx,
- const SWvertex *vert0,
- const SWvertex *vert1 )
-{
- struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
- GLint count = PB->count;
- GLint *pbx = PB->x;
- GLint *pby = PB->y;
- GLdepth *pbz = PB->z;
- GLuint *pbi = PB->index;
-
- PB->mono = GL_FALSE;
-
-#define INTERP_XY 1
-#define INTERP_Z 1
-#define INTERP_FOG 1
-#define INTERP_INDEX 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- pbz[count] = Z; \
- pbi[count] = I; \
- count++;
-
-#include "s_linetemp.h"
-
- PB->count = count;
- _mesa_flush_pb(ctx);
-}
-
-
-
-/* Smooth-shaded, RGBA line */
-static void smooth_rgba_line( GLcontext *ctx,
- const SWvertex *vert0,
- const SWvertex *vert1 )
-{
- struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
- GLint count = PB->count;
- GLint *pbx = PB->x;
- GLint *pby = PB->y;
- GLchan (*pbrgba)[4] = PB->rgba;
-
- PB->mono = GL_FALSE;
-
-#define INTERP_XY 1
-#define INTERP_RGB 1
-#define INTERP_ALPHA 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- pbrgba[count][RCOMP] = FixedToInt(r0); \
- pbrgba[count][GCOMP] = FixedToInt(g0); \
- pbrgba[count][BCOMP] = FixedToInt(b0); \
- pbrgba[count][ACOMP] = FixedToInt(a0); \
- count++;
-
-#include "s_linetemp.h"
-
- PB->count = count;
- _mesa_flush_pb(ctx);
-}
-
-
-
-/* Smooth-shaded, RGBA line with Z interpolation/testing */
-static void smooth_rgba_z_line( GLcontext *ctx,
- const SWvertex *vert0,
- const SWvertex *vert1 )