diff options
author | Keith Whitwell <[email protected]> | 2004-05-10 18:16:03 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2004-05-10 18:16:03 +0000 |
commit | 352d4dbfb24c65f327759c00c7db7d30a9482e35 (patch) | |
tree | cabc4ec120d77e991ec7fcb3e21baa3b26b0c282 /src/mesa/tnl/t_vb_render.c | |
parent | 39fe9a7fe38081d6f40c4bf388a132c583330912 (diff) |
Add EXT_vertex_cull support to mesa
Diffstat (limited to 'src/mesa/tnl/t_vb_render.c')
-rw-r--r-- | src/mesa/tnl/t_vb_render.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c index 1c501689683..f8e41f5d9be 100644 --- a/src/mesa/tnl/t_vb_render.c +++ b/src/mesa/tnl/t_vb_render.c @@ -77,6 +77,9 @@ #define EDGEFLAG_SET(idx, val) VB->EdgeFlag[idx] = val +#define CLIPMASK (CLIP_ALL_BITS|CLIP_CULL_BIT) + + /* Vertices, with the possibility of clipping. */ #define RENDER_POINTS( start, count ) \ @@ -88,7 +91,7 @@ do { \ GLubyte ormask = c1|c2; \ if (!ormask) \ LineFunc( ctx, v1, v2 ); \ - else if (!(c1 & c2 & 0x3f)) \ + else if (!(c1 & c2 & CLIPMASK)) \ clip_line_4( ctx, v1, v2, ormask ); \ } while (0) @@ -98,7 +101,7 @@ do { \ GLubyte ormask = c1|c2|c3; \ if (!ormask) \ TriangleFunc( ctx, v1, v2, v3 ); \ - else if (!(c1 & c2 & c3 & 0x3f)) \ + else if (!(c1 & c2 & c3 & CLIPMASK)) \ clip_tri_4( ctx, v1, v2, v3, ormask ); \ } while (0) @@ -109,7 +112,7 @@ do { \ GLubyte ormask = c1|c2|c3|c4; \ if (!ormask) \ QuadFunc( ctx, v1, v2, v3, v4 ); \ - else if (!(c1 & c2 & c3 & c4 & 0x3f)) \ + else if (!(c1 & c2 & c3 & c4 & CLIPMASK)) \ clip_quad_4( ctx, v1, v2, v3, v4, ormask ); \ } while (0) @@ -170,7 +173,7 @@ static void clip_elt_triangles( GLcontext *ctx, if (ormask) { if (start < j) render_tris( ctx, start, j, 0 ); - if (!(c1&c2&c3&0x3f)) + if (!(c1&c2&c3&CLIPMASK)) clip_tri_4( ctx, elt[j], elt[j+1], elt[j+2], ormask ); start = j+3; } |