diff options
author | Daniel Borca <dborca@users.sourceforge.net> | 2004-12-20 08:24:10 +0000 |
---|---|---|
committer | Daniel Borca <dborca@users.sourceforge.net> | 2004-12-20 08:24:10 +0000 |
commit | b51600716e0f9563dee2fe6990ade91a96d62801 (patch) | |
tree | b31469050f0b1d5410470a4f4e26ec62dfc12620 /src | |
parent | 6bb1be010e4fdfafe68230b743ef12b6df846043 (diff) |
put back clipmask code; it proved to be a MinGW/gcc 3.3.x error in t_vb_cliptmp.h(47), where it would still send clipped vertices to the hw... oh, dear...
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/glide/fxvbtmp.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/drivers/glide/fxvbtmp.h b/src/mesa/drivers/glide/fxvbtmp.h index 04e6c4e972..f7970c78e2 100644 --- a/src/mesa/drivers/glide/fxvbtmp.h +++ b/src/mesa/drivers/glide/fxvbtmp.h @@ -52,7 +52,7 @@ static void TAG(emit)( GLcontext *ctx, GLuint fog_stride; GrVertex *v = (GrVertex *)dest; GLfloat u0scale,v0scale,u1scale,v1scale; - /*const GLubyte *mask = VB->ClipMask;*/ /* XXX dangerous? */ + const GLubyte *mask = VB->ClipMask; const GLfloat *const s = ctx->Viewport._WindowMap.m; int i; @@ -118,29 +118,29 @@ static void TAG(emit)( GLcontext *ctx, } if (IND & SETUP_XYZW) { - if (1/*mask[i] == 0*/) { + if (mask[i] == 0) { /* unclipped */ VIEWPORT_X(v->x, proj[0][0]); VIEWPORT_Y(v->y, proj[0][1]); VIEWPORT_Z(v->ooz, proj[0][2]); v->oow = proj[0][3]; - } else { - /* clipped */ - v->oow = 1.0; - } - if (IND & SETUP_SNAP) { + if (IND & SETUP_SNAP) { #if defined(USE_IEEE) - const float snapper = (3L << 18); - v->x += snapper; - v->x -= snapper; - v->y += snapper; - v->y -= snapper; + const float snapper = (3L << 18); + v->x += snapper; + v->x -= snapper; + v->y += snapper; + v->y -= snapper; #else - v->x = ((int) (v->x * 16.0f)) * (1.0f / 16.0f); - v->y = ((int) (v->y * 16.0f)) * (1.0f / 16.0f); + v->x = ((int) (v->x * 16.0f)) * (1.0f / 16.0f); + v->y = ((int) (v->y * 16.0f)) * (1.0f / 16.0f); #endif - } + } + } else { + /* clipped */ + v->oow = 1.0; + } proj = (GLfloat (*)[4])((GLubyte *)proj + proj_stride); } |