summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_aalinetemp.h4
-rw-r--r--src/mesa/swrast/s_aatriangle.c38
-rw-r--r--src/mesa/swrast/s_aatritemp.h4
-rw-r--r--src/mesa/swrast/s_context.c23
-rw-r--r--src/mesa/swrast/s_context.h27
-rw-r--r--src/mesa/swrast/s_feedback.c25
-rw-r--r--src/mesa/swrast/s_feedback.h24
-rw-r--r--src/mesa/swrast/s_lines.c66
-rw-r--r--src/mesa/swrast/s_lines.h27
-rw-r--r--src/mesa/swrast/s_linetemp.h4
-rw-r--r--src/mesa/swrast/s_points.c26
-rw-r--r--src/mesa/swrast/s_points.h27
-rw-r--r--src/mesa/swrast/s_triangle.c134
-rw-r--r--src/mesa/swrast/s_triangle.h8
-rw-r--r--src/mesa/swrast/s_tritemp.h8
-rw-r--r--src/mesa/swrast/swrast.h12
16 files changed, 269 insertions, 188 deletions
diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h
index ee414aae59..71da5f0c5c 100644
--- a/src/mesa/swrast/s_aalinetemp.h
+++ b/src/mesa/swrast/s_aalinetemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_aalinetemp.h,v 1.1 2000/11/05 23:15:16 brianp Exp $ */
+/* $Id: s_aalinetemp.h,v 1.2 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -148,7 +148,7 @@ NAME(plot)(GLcontext *ctx, const struct LineInfo *line,
* Line setup
*/
static void
-NAME(line)(GLcontext *ctx, SWvertex *v0, SWvertex *v1)
+NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct pixel_buffer *pb = SWRAST_CONTEXT(ctx)->PB;
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index a261f5dc82..43cf9013d3 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -1,4 +1,4 @@
-/* $Id: s_aatriangle.c,v 1.3 2000/11/13 20:02:57 keithw Exp $ */
+/* $Id: s_aatriangle.c,v 1.4 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -299,9 +299,9 @@ compute_coveragei(const GLfloat v0[3], const GLfloat v1[3],
static void
rgba_aa_tri(GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2)
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2)
{
#define DO_Z
#define DO_RGBA
@@ -311,9 +311,9 @@ rgba_aa_tri(GLcontext *ctx,
static void
index_aa_tri(GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2)
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2)
{
#define DO_Z
#define DO_INDEX
@@ -342,9 +342,9 @@ compute_lambda(const GLfloat sPlane[4], const GLfloat tPlane[4],
static void
tex_aa_tri(GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2)
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2)
{
#define DO_Z
#define DO_RGBA
@@ -355,9 +355,9 @@ tex_aa_tri(GLcontext *ctx,
static void
spec_tex_aa_tri(GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2)
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2)
{
#define DO_Z
#define DO_RGBA
@@ -369,9 +369,9 @@ spec_tex_aa_tri(GLcontext *ctx,
static void
multitex_aa_tri(GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2)
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2)
{
#define DO_Z
#define DO_RGBA
@@ -381,9 +381,9 @@ multitex_aa_tri(GLcontext *ctx,
static void
spec_multitex_aa_tri(GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2)
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2)
{
#define DO_Z
#define DO_RGBA
diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h
index ccece6cab8..247c7ac85a 100644
--- a/src/mesa/swrast/s_aatritemp.h
+++ b/src/mesa/swrast/s_aatritemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_aatritemp.h,v 1.3 2000/11/13 20:02:57 keithw Exp $ */
+/* $Id: s_aatritemp.h,v 1.4 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -47,7 +47,7 @@
const GLfloat *p0 = v0->win;
const GLfloat *p1 = v1->win;
const GLfloat *p2 = v2->win;
- SWvertex *vMin, *vMid, *vMax;
+ const SWvertex *vMin, *vMid, *vMax;
GLint iyMin, iyMax;
GLfloat yMin, yMax;
GLboolean ltor;
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index f1dfef3cc4..85f9ef0891 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -1,4 +1,4 @@
-/* $Id: s_context.c,v 1.4 2000/11/13 20:02:57 keithw Exp $ */
+/* $Id: s_context.c,v 1.5 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -190,7 +190,8 @@ _swrast_update_hint( GLcontext *ctx )
*/
static void
_swrast_validate_quad( GLcontext *ctx,
- SWvertex *v0, SWvertex *v1, SWvertex *v2, SWvertex *v3 )
+ const SWvertex *v0, const SWvertex *v1,
+ const SWvertex *v2, const SWvertex *v3 )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -202,7 +203,9 @@ _swrast_validate_quad( GLcontext *ctx,
static void
_swrast_validate_triangle( GLcontext *ctx,
- SWvertex *v0, SWvertex *v1, SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -213,7 +216,7 @@ _swrast_validate_triangle( GLcontext *ctx,
}
static void
-_swrast_validate_line( GLcontext *ctx, SWvertex *v0, SWvertex *v1 )
+_swrast_validate_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -224,7 +227,7 @@ _swrast_validate_line( GLcontext *ctx, SWvertex *v0, SWvertex *v1 )
}
static void
-_swrast_validate_point( GLcontext *ctx, SWvertex *v0 )
+_swrast_validate_point( GLcontext *ctx, const SWvertex *v0 )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -344,25 +347,27 @@ _swrast_validate_derived( GLcontext *ctx )
*/
void
_swrast_Quad( GLcontext *ctx,
- SWvertex *v0, SWvertex *v1, SWvertex *v2, SWvertex *v3 )
+ const SWvertex *v0, const SWvertex *v1,
+ const SWvertex *v2, const SWvertex *v3 )
{
SWRAST_CONTEXT(ctx)->Quad( ctx, v0, v1, v2, v3 );
}
void
-_swrast_Triangle( GLcontext *ctx, SWvertex *v0, SWvertex *v1, SWvertex *v2 )
+_swrast_Triangle( GLcontext *ctx, const SWvertex *v0,
+ const SWvertex *v1, const SWvertex *v2 )
{
SWRAST_CONTEXT(ctx)->Triangle( ctx, v0, v1, v2 );
}
void
-_swrast_Line( GLcontext *ctx, SWvertex *v0, SWvertex *v1 )
+_swrast_Line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 )
{
SWRAST_CONTEXT(ctx)->Line( ctx, v0, v1 );
}
void
-_swrast_Point( GLcontext *ctx, SWvertex *v0 )
+_swrast_Point( GLcontext *ctx, const SWvertex *v0 )
{
SWRAST_CONTEXT(ctx)->Point( ctx, v0 );
}
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 10e162b705..7def2e9c5c 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -55,10 +55,19 @@ typedef void (*blend_func)( GLcontext *ctx, GLuint n, const GLubyte mask[],
GLchan src[][4], CONST GLchan dst[][4] );
#endif
-typedef void (*swrast_tri_func)( GLcontext *ctx,
- SWvertex *, SWvertex *, SWvertex *);
-typedef void (*swrast_line_func)( GLcontext *ctx, SWvertex *, SWvertex *);
-typedef void (*swrast_point_func)( GLcontext *ctx, SWvertex *);
+typedef void (*swrast_point_func)( GLcontext *ctx, const SWvertex *);
+
+typedef void (*swrast_line_func)( GLcontext *ctx,
+ const SWvertex *, const SWvertex *);
+
+typedef void (*swrast_tri_func)( GLcontext *ctx, const SWvertex *,
+ const SWvertex *, const SWvertex *);
+
+typedef void (*swrast_quad_func)( GLcontext *ctx,
+ const SWvertex *, const SWvertex *,
+ const SWvertex *, const SWvertex *);
+
+
/*
* Bitmasks to indicate which rasterization options are enabled (RasterMask)
@@ -138,11 +147,11 @@ typedef struct
/* Function pointers for dispatch behind public entrypoints.
*/
void (*InvalidateState)( GLcontext *ctx, GLuint new_state );
- void (*Point)( GLcontext *ctx, SWvertex *v );
- void (*Line)( GLcontext *ctx, SWvertex *v0, SWvertex *v1 );
- void (*Triangle)( GLcontext *ctx, SWvertex *v0, SWvertex *v1, SWvertex *v2 );
- void (*Quad)( GLcontext *ctx, SWvertex *v0, SWvertex *v1, SWvertex *v2,
- SWvertex *v3);
+
+ swrast_point_func Point;
+ swrast_line_func Line;
+ swrast_tri_func Triangle;
+ swrast_quad_func Quad;
/* Internal hooks, kept uptodate by the same mechanism as above.
*/
diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c
index e14c6a8e21..a635569153 100644
--- a/src/mesa/swrast/s_feedback.c
+++ b/src/mesa/swrast/s_feedback.c
@@ -1,4 +1,4 @@
-/* $Id: s_feedback.c,v 1.2 2000/11/13 20:02:57 keithw Exp $ */
+/* $Id: s_feedback.c,v 1.3 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -46,7 +46,8 @@
-static void feedback_vertex( GLcontext *ctx, SWvertex *v, SWvertex *pv )
+static void feedback_vertex( GLcontext *ctx,
+ const SWvertex *v, const SWvertex *pv )
{
GLfloat win[4];
GLfloat color[4];
@@ -85,8 +86,10 @@ static void feedback_vertex( GLcontext *ctx, SWvertex *v, SWvertex *pv )
/*
* Put triangle in feedback buffer.
*/
-void gl_feedback_triangle( GLcontext *ctx, SWvertex *v0, SWvertex *v1,
- SWvertex *v2)
+void gl_feedback_triangle( GLcontext *ctx,
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2)
{
if (gl_cull_triangle( ctx, v0, v1, v2 )) {
FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN );
@@ -105,7 +108,7 @@ void gl_feedback_triangle( GLcontext *ctx, SWvertex *v0, SWvertex *v1,
}
-void gl_feedback_line( GLcontext *ctx, SWvertex *v0, SWvertex *v1 )
+void gl_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 )
{
GLenum token = GL_LINE_TOKEN;
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -127,15 +130,17 @@ void gl_feedback_line( GLcontext *ctx, SWvertex *v0, SWvertex *v1 )
}
-void gl_feedback_point( GLcontext *ctx, SWvertex *v )
+void gl_feedback_point( GLcontext *ctx, const SWvertex *v )
{
FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POINT_TOKEN );
feedback_vertex( ctx, v, v );
}
-void gl_select_triangle( GLcontext *ctx, SWvertex *v0, SWvertex *v1,
- SWvertex *v2)
+void gl_select_triangle( GLcontext *ctx,
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2)
{
if (gl_cull_triangle( ctx, v0, v1, v2 )) {
const GLfloat zs = 1.0F / ctx->Visual.DepthMaxF;
@@ -147,7 +152,7 @@ void gl_select_triangle( GLcontext *ctx, SWvertex *v0, SWvertex *v1,
}
-void gl_select_line( GLcontext *ctx, SWvertex *v0, SWvertex *v1 )
+void gl_select_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 )
{
const GLfloat zs = 1.0F / ctx->Visual.DepthMaxF;
gl_update_hitflag( ctx, v0->win[2] * zs );
@@ -155,7 +160,7 @@ void gl_select_line( GLcontext *ctx, SWvertex *v0, SWvertex *v1 )
}
-void gl_select_point( GLcontext *ctx, SWvertex *v )
+void gl_select_point( GLcontext *ctx, const SWvertex *v )
{
const GLfloat zs = 1.0F / ctx->Visual.DepthMaxF;
gl_update_hitflag( ctx, v->win[2] * zs );
diff --git a/src/mesa/swrast/s_feedback.h b/src/mesa/swrast/s_feedback.h
index f32dcc86f9..4cd700b908 100644
--- a/src/mesa/swrast/s_feedback.h
+++ b/src/mesa/swrast/s_feedback.h
@@ -1,4 +1,4 @@
-/* $Id: s_feedback.h,v 1.1 2000/11/05 18:24:40 keithw Exp $ */
+/* $Id: s_feedback.h,v 1.2 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -33,15 +33,21 @@
#include "swrast.h"
-extern void gl_feedback_point( GLcontext *ctx, SWvertex *v );
-extern void gl_feedback_line( GLcontext *ctx, SWvertex *v1, SWvertex *v2 );
-extern void gl_feedback_triangle( GLcontext *ctx, SWvertex *v0, SWvertex *v1,
- SWvertex *v2 );
+extern void gl_feedback_point( GLcontext *ctx, const SWvertex *v );
-extern void gl_select_point( GLcontext *ctx, SWvertex *v );
-extern void gl_select_line( GLcontext *ctx, SWvertex *v1, SWvertex *v2 );
-extern void gl_select_triangle( GLcontext *ctx, SWvertex *v0, SWvertex *v1,
- SWvertex *v2 );
+extern void gl_feedback_line( GLcontext *ctx,
+ const SWvertex *v1, const SWvertex *v2 );
+
+extern void gl_feedback_triangle( GLcontext *ctx, const SWvertex *v0,
+ const SWvertex *v1, const SWvertex *v2 );
+
+extern void gl_select_point( GLcontext *ctx, const SWvertex *v );
+
+extern void gl_select_line( GLcontext *ctx,
+ const SWvertex *v1, const SWvertex *v2 );
+
+extern void gl_select_triangle( GLcontext *ctx, const SWvertex *v0,
+ const SWvertex *v1, const SWvertex *v2 );
#endif
diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c
index a16fe9ecf8..e4cc074b6d 100644
--- a/src/mesa/swrast/s_lines.c
+++ b/src/mesa/swrast/s_lines.c
@@ -1,4 +1,4 @@
-/* $Id: s_lines.c,v 1.6 2000/11/16 21:05:41 keithw Exp $ */
+/* $Id: s_lines.c,v 1.7 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -54,8 +54,8 @@
/* Flat, color index line */
static void flat_ci_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
@@ -73,8 +73,8 @@ static void flat_ci_line( GLcontext *ctx,
/* Flat, color index line with Z interpolation/testing */
static void flat_ci_z_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
PB_SET_INDEX( PB, vert0->index );
@@ -92,8 +92,8 @@ static void flat_ci_z_line( GLcontext *ctx,
/* Flat-shaded, RGBA line */
static void flat_rgba_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
const GLchan *color = vert0->color;
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
@@ -111,8 +111,8 @@ static void flat_rgba_line( GLcontext *ctx,
/* Flat-shaded, RGBA line with Z interpolation/testing */
static void flat_rgba_z_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
const GLchan *color = vert0->color;
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
@@ -131,8 +131,8 @@ static void flat_rgba_z_line( GLcontext *ctx,
/* Smooth shaded, color index line */
static void smooth_ci_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count = PB->count;
@@ -161,8 +161,8 @@ static void smooth_ci_line( GLcontext *ctx,
/* Smooth shaded, color index line with Z interpolation/testing */
static void smooth_ci_z_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count = PB->count;
@@ -194,8 +194,8 @@ static void smooth_ci_z_line( GLcontext *ctx,
/* Smooth-shaded, RGBA line */
static void smooth_rgba_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count = PB->count;
@@ -228,8 +228,8 @@ static void smooth_rgba_line( GLcontext *ctx,
/* Smooth-shaded, RGBA line with Z interpolation/testing */
static void smooth_rgba_z_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count = PB->count;
@@ -276,8 +276,8 @@ static void smooth_rgba_z_line( GLcontext *ctx,
/* Smooth shaded, color index, any width, maybe stippled */
static void general_smooth_ci_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count = PB->count;
@@ -356,8 +356,8 @@ static void general_smooth_ci_line( GLcontext *ctx,
/* Flat shaded, color index, any width, maybe stippled */
static void general_flat_ci_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count;
@@ -428,8 +428,8 @@ static void general_flat_ci_line( GLcontext *ctx,
static void general_smooth_rgba_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count = PB->count;
@@ -530,8 +530,8 @@ static void general_smooth_rgba_line( GLcontext *ctx,
static void general_flat_rgba_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
const GLchan *color = vert0->color;
@@ -574,8 +574,8 @@ static void general_flat_rgba_line( GLcontext *ctx,
/* Flat-shaded, textured, any width, maybe stippled */
static void flat_textured_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count;
@@ -640,8 +640,8 @@ static void flat_textured_line( GLcontext *ctx,
/* Smooth-shaded, textured, any width, maybe stippled */
static void smooth_textured_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count = PB->count;
@@ -719,8 +719,8 @@ static void smooth_textured_line( GLcontext *ctx,
* color interpolation.
*/
static void smooth_multitextured_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count = PB->count;
@@ -816,8 +816,8 @@ static void smooth_multitextured_line( GLcontext *ctx,
* color interpolation.
*/
static void flat_multitextured_line( GLcontext *ctx,
- SWvertex *vert0,
- SWvertex *vert1 )
+ const SWvertex *vert0,
+ const SWvertex *vert1 )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint count = PB->count;
diff --git a/src/mesa/swrast/s_lines.h b/src/mesa/swrast/s_lines.h
index efbb59d2d6..63edb3452a 100644
--- a/src/mesa/swrast/s_lines.h
+++ b/src/mesa/swrast/s_lines.h
@@ -1,3 +1,30 @@
+/* $Id: s_lines.h,v 1.2 2000/11/19 23:10:26 brianp Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
#ifndef S_LINES_H
#define S_LINES_H
diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h
index 1605f880a1..2035c96dda 100644
--- a/src/mesa/swrast/s_linetemp.h
+++ b/src/mesa/swrast/s_linetemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_linetemp.h,v 1.2 2000/11/05 18:24:40 keithw Exp $ */
+/* $Id: s_linetemp.h,v 1.3 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -73,7 +73,7 @@
*/
-/*void line( GLcontext *ctx, SWvertex *vert0, SWvertex *vert1 )*/
+/*void line( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )*/
{
GLint x0 = (GLint) vert0->win[0];
GLint x1 = (GLint) vert1->win[0];
diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index e6f193f555..7a7d66daca 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -1,8 +1,8 @@
-/* $Id: s_points.c,v 1.6 2000/11/16 21:05:41 keithw Exp $ */
+/* $Id: s_points.c,v 1.7 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.4
+ * Version: 3.5
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
*
@@ -59,7 +59,7 @@
* CI points with size == 1.0
*/
static void
-size1_ci_point( GLcontext *ctx, SWvertex *vert )
+size1_ci_point( GLcontext *ctx, const SWvertex *vert )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint *pbx = PB->x, *pby = PB->y;
@@ -84,7 +84,7 @@ size1_ci_point( GLcontext *ctx, SWvertex *vert )
* RGBA points with size == 1.0
*/
static void
-size1_rgba_point( GLcontext *ctx, SWvertex *vert )
+size1_rgba_point( GLcontext *ctx, const SWvertex *vert )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
@@ -107,7 +107,7 @@ size1_rgba_point( GLcontext *ctx, SWvertex *vert )
* General CI points.
*/
static void
-general_ci_point( GLcontext *ctx, SWvertex *vert )
+general_ci_point( GLcontext *ctx, const SWvertex *vert )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
const GLint isize = (GLint) (ctx->Point._Size + 0.5F);
@@ -152,7 +152,7 @@ general_ci_point( GLcontext *ctx, SWvertex *vert )
* General RGBA points.
*/
static void
-general_rgba_point( GLcontext *ctx, SWvertex *vert )
+general_rgba_point( GLcontext *ctx, const SWvertex *vert )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint isize = (GLint) (ctx->Point._Size + 0.5F);
@@ -203,7 +203,7 @@ general_rgba_point( GLcontext *ctx, SWvertex *vert )
* Textured RGBA points.
*/
static void
-textured_rgba_point( GLcontext *ctx, SWvertex *vert )
+textured_rgba_point( GLcontext *ctx, const SWvertex *vert )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
@@ -270,7 +270,7 @@ textured_rgba_point( GLcontext *ctx, SWvertex *vert )
* Multitextured RGBA points.
*/
static void
-multitextured_rgba_point( GLcontext *ctx, SWvertex *vert )
+multitextured_rgba_point( GLcontext *ctx, const SWvertex *vert )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
@@ -359,7 +359,7 @@ multitextured_rgba_point( GLcontext *ctx, SWvertex *vert )
* Antialiased points with or without texture mapping.
*/
static void
-antialiased_rgba_point( GLcontext *ctx, SWvertex *vert )
+antialiased_rgba_point( GLcontext *ctx, const SWvertex *vert )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct pixel_buffer *PB = swrast->PB;
@@ -501,7 +501,7 @@ static GLfloat attenuation_distance(const GLcontext *ctx, const GLfloat *pos)
* Distance Attenuated General CI points.
*/
static void
-dist_atten_general_ci_point( GLcontext *ctx, SWvertex *vert )
+dist_atten_general_ci_point( GLcontext *ctx, const SWvertex *vert )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
const GLfloat psize = ctx->Point._Size;
@@ -553,7 +553,7 @@ dist_atten_general_ci_point( GLcontext *ctx, SWvertex *vert )
* Distance Attenuated General RGBA points.
*/
static void
-dist_atten_general_rgba_point( GLcontext *ctx, SWvertex *vert )
+dist_atten_general_rgba_point( GLcontext *ctx, const SWvertex *vert )
{
struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
const GLfloat psize = ctx->Point._Size;
@@ -612,7 +612,7 @@ dist_atten_general_rgba_point( GLcontext *ctx, SWvertex *vert )
* Distance Attenuated Textured RGBA points.
*/
static void
-dist_atten_textured_rgba_point( GLcontext *ctx, SWvertex *vert )
+dist_atten_textured_rgba_point( GLcontext *ctx, const SWvertex *vert )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct pixel_buffer *PB = swrast->PB;
@@ -705,7 +705,7 @@ dist_atten_textured_rgba_point( GLcontext *ctx, SWvertex *vert )
* Distance Attenuated Antialiased points with or without texture mapping.
*/
static void
-dist_atten_antialiased_rgba_point( GLcontext *ctx, SWvertex *vert )
+dist_atten_antialiased_rgba_point( GLcontext *ctx, const SWvertex *vert )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct pixel_buffer *PB = swrast->PB;
diff --git a/src/mesa/swrast/s_points.h b/src/mesa/swrast/s_points.h
index 1c1af1a89f..9c24b1a3b9 100644
--- a/src/mesa/swrast/s_points.h
+++ b/src/mesa/swrast/s_points.h
@@ -1,3 +1,30 @@
+/* $Id: s_points.h,v 1.2 2000/11/19 23:10:26 brianp Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
#ifndef S_POINTS_H
#define S_POINTS_H
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index b71da4f648..167a7baf40 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -1,4 +1,4 @@
-/* $Id: s_triangle.c,v 1.4 2000/11/14 17:40:16 brianp Exp $ */
+/* $Id: s_triangle.c,v 1.5 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -48,9 +48,9 @@
#include "s_triangle.h"
GLboolean gl_cull_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
GLfloat ex = v1->win[0] - v0->win[0];
GLfloat ey = v1->win[1] - v0->win[1];
@@ -69,9 +69,9 @@ GLboolean gl_cull_triangle( GLcontext *ctx,
* Render a flat-shaded color index triangle.
*/
static void flat_ci_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
#define INTERP_Z 1
#define SETUP_CODE
@@ -103,9 +103,9 @@ static void flat_ci_triangle( GLcontext *ctx,
* Render a smooth-shaded color index triangle.
*/
static void smooth_ci_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
#define INTERP_Z 1
#define INTERP_INDEX 1
@@ -140,9 +140,9 @@ static void smooth_ci_triangle( GLcontext *ctx,
* Render a flat-shaded RGBA triangle.
*/
static void flat_rgba_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
#define INTERP_Z 1
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
@@ -180,9 +180,9 @@ static void flat_rgba_triangle( GLcontext *ctx,
* Render a smooth-shaded RGBA triangle.
*/
static void smooth_rgba_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
#define INTERP_Z 1
@@ -233,15 +233,15 @@ static void smooth_rgba_triangle( GLcontext *ctx,
* No fog.
*/
static void simple_textured_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
#define INTERP_INT_TEX 1
#define S_SCALE twidth
#define T_SCALE theight
#define SETUP_CODE \
- struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentD[2]; \
+ struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \
GLint b = obj->BaseLevel; \
GLfloat twidth = (GLfloat) obj->Image[b]->Width; \
GLfloat theight = (GLfloat) obj->Image[b]->Height; \
@@ -292,9 +292,9 @@ static void simple_textured_triangle( GLcontext *ctx,
* No fog.
*/
static void simple_z_textured_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
#define INTERP_Z 1
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
@@ -302,7 +302,7 @@ static void simple_z_textured_triangle( GLcontext *ctx,
#define S_SCALE twidth
#define T_SCALE theight
#define SETUP_CODE \
- struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentD[2]; \
+ struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \
GLint b = obj->BaseLevel; \
GLfloat twidth = (GLfloat) obj->Image[b]->Width; \
GLfloat theight = (GLfloat) obj->Image[b]->Height; \
@@ -361,9 +361,9 @@ static void simple_z_textured_triangle( GLcontext *ctx,
* Render an RGB/RGBA textured triangle without perspective correction.
*/
static void affine_textured_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
#define INTERP_Z 1
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
@@ -374,7 +374,7 @@ static void affine_textured_triangle( GLcontext *ctx,
#define T_SCALE theight
#define SETUP_CODE \
struct gl_texture_unit *unit = ctx->Texture.Unit+0; \
- struct gl_texture_object *obj = unit->CurrentD[2]; \
+ struct gl_texture_object *obj = unit->Current2D; \
GLint b = obj->BaseLevel; \
GLfloat twidth = (GLfloat) obj->Image[b]->Width; \
GLfloat theight = (GLfloat) obj->Image[b]->Height; \
@@ -683,9 +683,9 @@ static void affine_textured_triangle( GLcontext *ctx,
* Send all questions and bug reports to him.
*/
static void near_persp_textured_triangle(GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
/* The BIAS value is used to shift negative values into positive values.
* Without this, negative texture values don't GL_REPEAT correctly at just
@@ -702,7 +702,7 @@ static void near_persp_textured_triangle(GLcontext *ctx,
#define INTERP_TEX 1
#define SETUP_CODE \
struct gl_texture_unit *unit = ctx->Texture.Unit+0; \
- struct gl_texture_object *obj = unit->CurrentD[2]; \
+ struct gl_texture_object *obj = unit->Current2D; \
const GLint b = obj->BaseLevel; \
const GLfloat twidth = (GLfloat) obj->Image[b]->Width; \
const GLfloat theight = (GLfloat) obj->Image[b]->Height; \
@@ -1423,9 +1423,9 @@ static void near_persp_textured_triangle(GLcontext *ctx,
* Send all questions and bug reports to him.
*/
static void lin_persp_textured_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
#define INTERP_Z 1
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
@@ -1434,7 +1434,7 @@ static void lin_persp_textured_triangle( GLcontext *ctx,
#define INTERP_TEX 1
#define SETUP_CODE \
struct gl_texture_unit *unit = ctx->Texture.Unit+0; \
- struct gl_texture_object *obj = unit->CurrentD[2]; \
+ struct gl_texture_object *obj = unit->Current2D; \
const GLint b = obj->BaseLevel; \
const GLfloat twidth = (GLfloat) obj->Image[b]->Width; \
const GLfloat theight = (GLfloat) obj->Image[b]->Height; \
@@ -1602,9 +1602,9 @@ static void lin_persp_textured_triangle( GLcontext *ctx,
* R is already used for red.
*/
static void general_textured_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
#define INTERP_Z 1
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
@@ -1692,9 +1692,9 @@ static void general_textured_triangle( GLcontext *ctx,
* R is already used for red.
*/
static void general_textured_spec_triangle1( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2,
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2,
GLdepth zspan[MAX_WIDTH],
GLfixed fogspan[MAX_WIDTH],
GLchan rgba[MAX_WIDTH][4],
@@ -1817,9 +1817,9 @@ compute_lambda( GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
* mipmaps, lambda is also used to select the texture level of detail.
*/
static void lambda_textured_triangle1( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2,
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2,
GLfloat s[MAX_WIDTH],
GLfloat t[MAX_WIDTH],
GLfloat u[MAX_WIDTH] )
@@ -1921,9 +1921,9 @@ static void lambda_textured_triangle1( GLcontext *ctx,
* mipmaps, lambda is also used to select the texture level of detail.
*/
static void lambda_textured_spec_triangle1( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2,
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2,
GLfloat s[MAX_WIDTH],
GLfloat t[MAX_WIDTH],
GLfloat u[MAX_WIDTH] )
@@ -2038,9 +2038,9 @@ static void lambda_textured_spec_triangle1( GLcontext *ctx,
*/
static void
lambda_multitextured_triangle1( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2,
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2,
GLfloat s[MAX_TEXTURE_UNITS][MAX_WIDTH],
GLfloat t[MAX_TEXTURE_UNITS][MAX_WIDTH],
GLfloat u[MAX_TEXTURE_UNITS][MAX_WIDTH])
@@ -2167,9 +2167,9 @@ lambda_multitextured_triangle1( GLcontext *ctx,
*/
static void general_textured_spec_triangle(GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
GLdepth zspan[MAX_WIDTH];
GLfixed fogspan[MAX_WIDTH];
@@ -2178,18 +2178,18 @@ static void general_textured_spec_triangle(GLcontext *ctx,
}
static void lambda_textured_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
GLfloat s[MAX_WIDTH], t[MAX_WIDTH], u[MAX_WIDTH];
lambda_textured_triangle1(ctx,v0,v1,v2,s,t,u);
}
static void lambda_textured_spec_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
GLfloat s[MAX_WIDTH];
GLfloat t[MAX_WIDTH];
@@ -2199,9 +2199,9 @@ static void lambda_textured_spec_triangle( GLcontext *ctx,
static void lambda_multitextured_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
GLfloat s[MAX_TEXTURE_UNITS][MAX_WIDTH];
@@ -2217,9 +2217,9 @@ static void lambda_multitextured_triangle( GLcontext *ctx,
static void occlusion_zless_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2 )
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2 )
{
if (ctx->OcclusionResult) {
return;
@@ -2299,7 +2299,7 @@ _swrast_choose_triangle( GLcontext *ctx )
if (ctx->Texture._ReallyEnabled) {
/* Ugh, we do a _lot_ of tests to pick the best textured tri func */
GLint format, filter;
- const struct gl_texture_object *current2Dtex = ctx->Texture.Unit[0].CurrentD[2];
+ const struct gl_texture_object *current2Dtex = ctx->Texture.Unit[0].Current2D;
const struct gl_texture_image *image;
/* First see if we can used an optimized 2-D texture function */
if (ctx->Texture._ReallyEnabled==TEXTURE0_2D
diff --git a/src/mesa/swrast/s_triangle.h b/src/mesa/swrast/s_triangle.h
index eaff79532c..d08fc9177f 100644
--- a/src/mesa/swrast/s_triangle.h
+++ b/src/mesa/swrast/s_triangle.h
@@ -1,4 +1,4 @@
-/* $Id: s_triangle.h,v 1.2 2000/11/05 18:24:41 keithw Exp $ */
+/* $Id: s_triangle.h,v 1.3 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -37,9 +37,9 @@
GLboolean gl_cull_triangle( GLcontext *ctx,
- SWvertex *v0,
- SWvertex *v1,
- SWvertex *v2);
+ const SWvertex *v0,
+ const SWvertex *v1,
+ const SWvertex *v2);
void
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index 8fdbec9d18..be1fab9b49 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_tritemp.h,v 1.3 2000/11/13 20:02:57 keithw Exp $ */
+/* $Id: s_tritemp.h,v 1.4 2000/11/19 23:10:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -76,7 +76,7 @@
/*void triangle( GLcontext *ctx, SWvertex *v0, SWvertex *v1, SWvertex *v2 )*/
{
typedef struct {
- SWvertex *v0, *v1; /* Y(v0) < Y(v1) */
+ const SWvertex *v0, *v1; /* Y(v0) < Y(v1) */
GLfloat dx; /* X(v1) - X(v0) */
GLfloat dy; /* Y(v1) - Y(v0) */
GLfixed fdxdy; /* dx/dy in fixed-point */
@@ -95,7 +95,7 @@
#endif
EdgeT eMaj, eTop, eBot;
GLfloat oneOverArea;
- SWvertex *vMin, *vMid, *vMax; /* Y(vMin)<=Y(vMid)<=Y(vMax) */
+ const SWvertex *vMin, *vMid, *vMax; /* Y(vMin)<=Y(vMid)<=Y(vMax) */
float bf = SWRAST_CONTEXT(ctx)->_backface_sign;
/* find the order of the 3 vertices along the Y axis */
@@ -650,7 +650,7 @@
}
if (setupLeft && eLeft->lines > 0) {
- SWvertex *vLower;
+ const SWvertex *vLower;
GLfixed fsx = eLeft->fsx;
fx = FixedCeil(fsx);
fError = fx - fsx - FIXED_ONE;
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h
index 82a0add00e..654199ef24 100644
--- a/src/mesa/swrast/swrast.h
+++ b/src/mesa/swrast/swrast.h
@@ -129,17 +129,19 @@ _swrast_get_stipple_counter_ref( GLcontext *ctx );
* current state.
*/
extern void
-_swrast_Point( GLcontext *ctx, SWvertex *v );
+_swrast_Point( GLcontext *ctx, const SWvertex *v );
extern void
-_swrast_Line( GLcontext *ctx, SWvertex *v0, SWvertex *v1 );
+_swrast_Line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 );
extern void
-_swrast_Triangle( GLcontext *ctx, SWvertex *v0, SWvertex *v1, SWvertex *v2 );
+_swrast_Triangle( GLcontext *ctx, const SWvertex *v0,
+ const SWvertex *v1, const SWvertex *v2 );
extern void
-_swrast_Quad( GLcontext *ctx, SWvertex *v0, SWvertex *v1, SWvertex *v2,
- SWvertex *v3);
+_swrast_Quad( GLcontext *ctx,
+ const SWvertex *v0, const SWvertex *v1,
+ const SWvertex *v2, const SWvertex *v3);
extern void
_swrast_flush( GLcontext *ctx );