diff options
Diffstat (limited to 'xc/extras/Mesa/src/tnl/t_vb_cliptmp.h')
-rw-r--r-- | xc/extras/Mesa/src/tnl/t_vb_cliptmp.h | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/xc/extras/Mesa/src/tnl/t_vb_cliptmp.h b/xc/extras/Mesa/src/tnl/t_vb_cliptmp.h index 351ee782f..2484560d2 100644 --- a/xc/extras/Mesa/src/tnl/t_vb_cliptmp.h +++ b/xc/extras/Mesa/src/tnl/t_vb_cliptmp.h @@ -1,4 +1,3 @@ -/* $Id: t_vb_cliptmp.h,v 1.1.1.1 2002/10/22 13:06:21 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -24,7 +23,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell <keithw@valinux.com> + * Keith Whitwell <keith@tungstengraphics.com> */ @@ -140,11 +139,11 @@ TAG(clip_line)( GLcontext *ctx, GLuint i, GLuint j, GLubyte mask ) if (mask & CLIP_USER_BIT) { for (p=0;p<MAX_CLIP_PLANES;p++) { - if (ctx->Transform.ClipEnabled[p]) { - GLfloat a = ctx->Transform._ClipUserPlane[p][0]; - GLfloat b = ctx->Transform._ClipUserPlane[p][1]; - GLfloat c = ctx->Transform._ClipUserPlane[p][2]; - GLfloat d = ctx->Transform._ClipUserPlane[p][3]; + if (ctx->Transform.ClipPlanesEnabled & (1 << p)) { + const GLfloat a = ctx->Transform._ClipUserPlane[p][0]; + const GLfloat b = ctx->Transform._ClipUserPlane[p][1]; + const GLfloat c = ctx->Transform._ClipUserPlane[p][2]; + const GLfloat d = ctx->Transform._ClipUserPlane[p][3]; LINE_CLIP( CLIP_USER_BIT, a, b, c, d ); } } @@ -188,13 +187,13 @@ TAG(clip_tri)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask ) if (mask & CLIP_USER_BIT) { for (p=0;p<MAX_CLIP_PLANES;p++) { - if (ctx->Transform.ClipEnabled[p]) { - GLfloat a = ctx->Transform._ClipUserPlane[p][0]; - GLfloat b = ctx->Transform._ClipUserPlane[p][1]; - GLfloat c = ctx->Transform._ClipUserPlane[p][2]; - GLfloat d = ctx->Transform._ClipUserPlane[p][3]; - POLY_CLIP( CLIP_USER_BIT, a, b, c, d ); - } + if (ctx->Transform.ClipPlanesEnabled & (1 << p)) { + const GLfloat a = ctx->Transform._ClipUserPlane[p][0]; + const GLfloat b = ctx->Transform._ClipUserPlane[p][1]; + const GLfloat c = ctx->Transform._ClipUserPlane[p][2]; + const GLfloat d = ctx->Transform._ClipUserPlane[p][3]; + POLY_CLIP( CLIP_USER_BIT, a, b, c, d ); + } } } @@ -241,11 +240,11 @@ TAG(clip_quad)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, if (mask & CLIP_USER_BIT) { for (p=0;p<MAX_CLIP_PLANES;p++) { - if (ctx->Transform.ClipEnabled[p]) { - GLfloat a = ctx->Transform._ClipUserPlane[p][0]; - GLfloat b = ctx->Transform._ClipUserPlane[p][1]; - GLfloat c = ctx->Transform._ClipUserPlane[p][2]; - GLfloat d = ctx->Transform._ClipUserPlane[p][3]; + if (ctx->Transform.ClipPlanesEnabled & (1 << p)) { + const GLfloat a = ctx->Transform._ClipUserPlane[p][0]; + const GLfloat b = ctx->Transform._ClipUserPlane[p][1]; + const GLfloat c = ctx->Transform._ClipUserPlane[p][2]; + const GLfloat d = ctx->Transform._ClipUserPlane[p][3]; POLY_CLIP( CLIP_USER_BIT, a, b, c, d ); } } |