-/* $Id: t_vb_cliptmp.h,v 1.15 2002/03/29 17:27:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Keith Whitwell <keithw@valinux.com>
+ * Keith Whitwell <keith@tungstengraphics.com>
*/
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; \
} \
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. \
*/ \
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] ); \
ii = newvert; \
} \
} \
- else if (NEGATIVE(dpI)) \
+ else if (IS_NEGATIVE(dpI)) \
return; \
} \
} while (0)
{
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 );
{
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];
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 );
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 );
}
}
{
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];
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 );
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 );
}
}