diff options
author | Brian Paul <[email protected]> | 2000-12-08 00:18:39 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-12-08 00:18:39 +0000 |
commit | fb7899bfec447e5840c2c1ea96619084093be424 (patch) | |
tree | 51e6bc8cc768713daa04d6419603497ca1bb4da0 /src/mesa/swrast_setup | |
parent | c1b97d91c7e38290be85eb1ff56e6c108e1e47ca (diff) |
Compute attenuated point size in a new pipeline stage.
Store computed point size in the SWvertex struct.
Diffstat (limited to 'src/mesa/swrast_setup')
-rw-r--r-- | src/mesa/swrast_setup/ss_vb.c | 18 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_vbtmp.h | 8 |
2 files changed, 16 insertions, 10 deletions
diff --git a/src/mesa/swrast_setup/ss_vb.c b/src/mesa/swrast_setup/ss_vb.c index ff1916174b7..25f2299f473 100644 --- a/src/mesa/swrast_setup/ss_vb.c +++ b/src/mesa/swrast_setup/ss_vb.c @@ -53,7 +53,7 @@ typedef void (*SetupFunc)( struct vertex_buffer *VB, #define MULTITEX 0x8 #define SPEC 0x10 #define FOG 0x20 -#define EYE 0x40 +#define POINT 0x40 #define MAX_SETUPFUNC 0x80 static SetupFunc setup_func[MAX_SETUPFUNC]; @@ -87,12 +87,12 @@ static SetupFunc setup_func[MAX_SETUPFUNC]; #define TAG(x) x##_multitex_color_spec_fog #include "ss_vbtmp.h" -#define IND (TEX0|COLOR|EYE) -#define TAG(x) x##_tex0_color_eye +#define IND (TEX0|COLOR|POINT) +#define TAG(x) x##_tex0_color_point #include "ss_vbtmp.h" -#define IND (MULTITEX|COLOR|SPEC|INDEX|EYE|FOG) -#define TAG(x) x##_multitex_color_spec_index_eye_fog +#define IND (MULTITEX|COLOR|SPEC|INDEX|POINT|FOG) +#define TAG(x) x##_multitex_color_spec_index_point_fog #include "ss_vbtmp.h" #define IND (COLOR|INDEX|TEX0) @@ -108,7 +108,7 @@ _swsetup_vb_init( GLcontext *ctx ) (void) ctx; for (i = 0 ; i < Elements(setup_func) ; i++) - setup_func[i] = rs_multitex_color_spec_index_eye_fog; + setup_func[i] = rs_multitex_color_spec_index_point_fog; /* Some specialized cases: */ @@ -143,8 +143,8 @@ _swsetup_vb_init( GLcontext *ctx ) setup_func[MULTITEX|SPEC|FOG] = rs_multitex_color_spec_fog; setup_func[MULTITEX|COLOR|SPEC|FOG] = rs_multitex_color_spec_fog; - setup_func[TEX0|EYE] = rs_tex0_color_eye; - setup_func[TEX0|COLOR|EYE] = rs_tex0_color_eye; + setup_func[TEX0|POINT] = rs_tex0_color_point; + setup_func[TEX0|COLOR|POINT] = rs_tex0_color_point; setup_func[COLOR|INDEX|TEX0] = rs_selection_feedback; } @@ -174,7 +174,7 @@ _swsetup_choose_rastersetup_func(GLcontext *ctx) } if (ctx->Point._Attenuated) - funcindex |= EYE; + funcindex |= POINT; if (ctx->Fog.Enabled) funcindex |= FOG; diff --git a/src/mesa/swrast_setup/ss_vbtmp.h b/src/mesa/swrast_setup/ss_vbtmp.h index 1303883f4f4..7ed4d514416 100644 --- a/src/mesa/swrast_setup/ss_vbtmp.h +++ b/src/mesa/swrast_setup/ss_vbtmp.h @@ -38,6 +38,7 @@ static void TAG(rs)(struct vertex_buffer *VB, GLuint start, GLuint end) GLubyte (*spec)[4]; GLuint *index; GLfloat *fog; + GLfloat *pointSize; GLuint sz[MAX_TEXTURE_UNITS]; GLuint szeye; int i; @@ -79,6 +80,7 @@ static void TAG(rs)(struct vertex_buffer *VB, GLuint start, GLuint end) color = VB->Color[0]->data; spec = VB->SecondaryColor[0]->data; index = VB->Index[0]->data; + pointSize = VB->PointSize.data; v = &(SWSETUP_VB(VB)->verts[start]); @@ -86,9 +88,10 @@ static void TAG(rs)(struct vertex_buffer *VB, GLuint start, GLuint end) if (VB->ClipMask[i] == 0) { COPY_4FV( v->win, win[i] ); +#if 0 if (IND & EYE) COPY_4FV( v->eye, eye[i] ); - +#endif if (IND & TEX0) COPY_CLEAN_4V( v->texcoord[0], sz[0], tc[0][i] ); @@ -110,6 +113,9 @@ static void TAG(rs)(struct vertex_buffer *VB, GLuint start, GLuint end) if (IND & INDEX) v->index = index[i]; + + if (IND & POINT) + v->pointSize = pointSize[i]; } } } |