aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast_setup
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-10-04 17:37:45 +0000
committerBrian Paul <[email protected]>2002-10-04 17:37:45 +0000
commitf782b8189e718974a40d72ac4f6b8d213ca99e1e (patch)
tree0a7269316b1d75a69eabab205a93fc38036ce7b2 /src/mesa/swrast_setup
parentf8acbed50d96d35d2a354f1fe7e81594d79a3186 (diff)
multiple GL_POINTS can now be rendered together into one fragment span
Diffstat (limited to 'src/mesa/swrast_setup')
-rw-r--r--src/mesa/swrast_setup/ss_context.c14
-rw-r--r--src/mesa/swrast_setup/ss_context.h5
-rw-r--r--src/mesa/swrast_setup/ss_triangle.c7
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h5
4 files changed, 22 insertions, 9 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 58d85faa1f8..254c5af66c4 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -1,9 +1,10 @@
+/* $Id: ss_context.c,v 1.18 2002/10/04 17:37:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 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"),
@@ -97,8 +98,13 @@ static void
_swsetup_RenderPrimitive( GLcontext *ctx, GLenum mode )
{
SWSETUP_CONTEXT(ctx)->render_prim = mode;
+ _swrast_render_primitive( ctx, mode );
}
+/*
+ * We patch this function into tnl->Driver.Render.Start.
+ * It's called when we start rendering a vertex buffer.
+ */
static void
_swsetup_RenderStart( GLcontext *ctx )
{
@@ -118,6 +124,10 @@ _swsetup_RenderStart( GLcontext *ctx )
_swrast_render_start( ctx );
}
+/*
+ * We patch this function into tnl->Driver.Render.Finish.
+ * It's called when we finish rendering a vertex buffer.
+ */
static void
_swsetup_RenderFinish( GLcontext *ctx )
{
diff --git a/src/mesa/swrast_setup/ss_context.h b/src/mesa/swrast_setup/ss_context.h
index 3174c95de12..e7bb65807a1 100644
--- a/src/mesa/swrast_setup/ss_context.h
+++ b/src/mesa/swrast_setup/ss_context.h
@@ -1,9 +1,10 @@
+/* $Id: ss_context.h,v 1.11 2002/10/04 17:37:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 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"),
diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c
index fa1f3e74e90..c77bd72bee2 100644
--- a/src/mesa/swrast_setup/ss_triangle.c
+++ b/src/mesa/swrast_setup/ss_triangle.c
@@ -1,4 +1,4 @@
-/* $Id: ss_triangle.c,v 1.17 2002/10/02 23:24:04 brianp Exp $ */
+/* $Id: ss_triangle.c,v 1.18 2002/10/04 17:37:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -139,6 +139,7 @@ static void _swsetup_render_point_tri( GLcontext *ctx,
v0->index = i[0];
v1->index = i[1];
}
+ _swrast_flush(ctx);
}
#define SS_COLOR(a,b) COPY_CHAN4(a,b)
@@ -280,8 +281,6 @@ void _swsetup_choose_trifuncs( GLcontext *ctx )
(ctx->Stencil.Enabled && ctx->Stencil.TestTwoSide))
ind |= SS_UNFILLED_BIT;
- ctx->_Facing = 0;
-
if (ctx->Visual.rgbMode)
ind |= SS_RGBA_BIT;
@@ -289,4 +288,6 @@ void _swsetup_choose_trifuncs( GLcontext *ctx )
tnl->Driver.Render.Quad = quad_tab[ind];
tnl->Driver.Render.Line = swsetup_line;
tnl->Driver.Render.Points = swsetup_points;
+
+ ctx->_Facing = 0;
}
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index 2a1ff14cf9c..27baf5f7594 100644
--- a/src/mesa/swrast_setup/ss_tritmp.h
+++ b/src/mesa/swrast_setup/ss_tritmp.h
@@ -1,4 +1,4 @@
-/* $Id: ss_tritmp.h,v 1.16 2002/10/02 23:24:04 brianp Exp $ */
+/* $Id: ss_tritmp.h,v 1.17 2002/10/04 17:37:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -54,7 +54,8 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
if (IND & (SS_TWOSIDE_BIT | SS_UNFILLED_BIT))
{
facing = (cc < 0.0) ^ ctx->Polygon._FrontBit;
- ctx->_Facing = facing; /* for 2-sided stencil test */
+ if (ctx->Stencil.TestTwoSide)
+ ctx->_Facing = facing; /* for 2-sided stencil test */
if (IND & SS_UNFILLED_BIT)
mode = facing ? ctx->Polygon.BackMode : ctx->Polygon.FrontMode;