Rename the various function types in t_context.h to include a tnl_ prefix.
[mesa.git] / src / mesa / tnl / t_vb_cliptmp.h
index 33d605f96d50c2875a3e4faf161e051b0c4613da..1e3a6b02ee226789c87f86a1348002852a4ab371 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id: t_vb_cliptmp.h,v 1.15 2002/03/29 17:27:59 brianp 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>
  */
 
 
@@ -44,7 +43,7 @@ do {                                                                  \
         GLfloat dp = CLIP_DOTPROD(idx, A, B, C, D );                   \
                                                                        \
          clipmask[idxPrev] |= PLANE;                                   \
-        if (!NEGATIVE(dpPrev)) {                                       \
+        if (!IS_NEGATIVE(dpPrev)) {                                    \
            outlist[outcount++] = idxPrev;                              \
            clipmask[idxPrev] &= ~PLANE;                                \
         }                                                              \
@@ -53,7 +52,7 @@ do {                                                                  \
             GLuint newvert = VB->LastClipped++;                                \
             VB->ClipMask[newvert] = 0;                                 \
             outlist[outcount++] = newvert;                             \
-           if (NEGATIVE(dp)) {                                         \
+           if (IS_NEGATIVE(dp)) {                                      \
               /* Going out of bounds.  Avoid division by zero as we    \
                * know dp != dpPrev from DIFFERENT_SIGNS, above.        \
                */                                                      \
@@ -95,7 +94,7 @@ do {                                                                  \
       if (DIFFERENT_SIGNS(dpI, dpJ)) {                                 \
          GLuint newvert = VB->LastClipped++;                           \
          VB->ClipMask[newvert] = 0;                                    \
-        if (NEGATIVE(dpJ)) {                                           \
+        if (IS_NEGATIVE(dpJ)) {                                        \
            GLfloat t = dpI / (dpI - dpJ);                              \
             VB->ClipMask[jj] |= PLANE;                                 \
             INTERP_4F( t, coord[newvert], coord[ii], coord[jj] );      \
@@ -109,7 +108,7 @@ do {                                                                        \
             ii = newvert;                                              \
         }                                                              \
       }                                                                        \
-      else if (NEGATIVE(dpI))                                          \
+      else if (IS_NEGATIVE(dpI))                                       \
         return;                                                        \
   }                                                                    \
 } while (0)
@@ -123,11 +122,11 @@ TAG(clip_line)( GLcontext *ctx, GLuint i, GLuint j, GLubyte mask )
 {
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    struct vertex_buffer *VB = &tnl->vb;
-   interp_func interp = tnl->Driver.Render.Interp;
+   tnl_interp_func interp = tnl->Driver.Render.Interp;
    GLfloat (*coord)[4] = VB->ClipPtr->data;
    GLuint ii = i, jj = j, p;
 
-   VB->LastClipped = VB->FirstClipped;
+   VB->LastClipped = VB->Count;
 
    if (mask & 0x3f) {
       LINE_CLIP( CLIP_RIGHT_BIT,  -1,  0,  0, 1 );
@@ -164,7 +163,7 @@ TAG(clip_tri)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask )
 {
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    struct vertex_buffer *VB = &tnl->vb;
-   interp_func interp = tnl->Driver.Render.Interp;
+   tnl_interp_func interp = tnl->Driver.Render.Interp;
    GLfloat (*coord)[4] = VB->ClipPtr->data;
    GLuint pv = v2;
    GLuint vlist[2][MAX_CLIPPED_VERTICES];
@@ -175,7 +174,7 @@ TAG(clip_tri)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask )
 
    ASSIGN_3V(inlist, v2, v0, v1 ); /* pv rotated to slot zero */
 
-   VB->LastClipped = VB->FirstClipped;
+   VB->LastClipped = VB->Count;
 
    if (mask & 0x3f) {
       POLY_CLIP( CLIP_RIGHT_BIT,  -1,  0,  0, 1 );
@@ -200,7 +199,7 @@ TAG(clip_tri)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask )
 
    if (ctx->_TriangleCaps & DD_FLATSHADE) {
       if (pv != inlist[0]) {
-        ASSERT( inlist[0] >= VB->FirstClipped );
+        ASSERT( inlist[0] >= VB->Count );
         tnl->Driver.Render.CopyPV( ctx, inlist[0], pv );
       }
    }
@@ -217,7 +216,7 @@ TAG(clip_quad)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3,
 {
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    struct vertex_buffer *VB = &tnl->vb;
-   interp_func interp = tnl->Driver.Render.Interp;
+   tnl_interp_func interp = tnl->Driver.Render.Interp;
    GLfloat (*coord)[4] = VB->ClipPtr->data;
    GLuint pv = v3;
    GLuint vlist[2][MAX_CLIPPED_VERTICES];
@@ -228,7 +227,7 @@ TAG(clip_quad)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3,
 
    ASSIGN_4V(inlist, v3, v0, v1, v2 ); /* pv rotated to slot zero */
 
-   VB->LastClipped = VB->FirstClipped;
+   VB->LastClipped = VB->Count;
 
    if (mask & 0x3f) {
       POLY_CLIP( CLIP_RIGHT_BIT,  -1,  0,  0, 1 );
@@ -253,7 +252,7 @@ TAG(clip_quad)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3,
 
    if (ctx->_TriangleCaps & DD_FLATSHADE) {
       if (pv != inlist[0]) {
-        ASSERT( inlist[0] >= VB->FirstClipped );
+        ASSERT( inlist[0] >= VB->Count );
         tnl->Driver.Render.CopyPV( ctx, inlist[0], pv );
       }
    }