* OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Keith Whitwell <keith@tungstengraphics.com>
+ * Keith Whitwell <keithw@vmware.com>
*/
GLuint idx = inlist[i]; \
GLfloat dp = CLIP_DOTPROD(idx, A, B, C, D ); \
\
- if (!IS_NEGATIVE(dpPrev)) { \
+ if (dpPrev >= 0.0f) { \
outlist[outcount++] = idxPrev; \
} \
\
if (DIFFERENT_SIGNS(dp, dpPrev)) { \
- if (IS_NEGATIVE(dp)) { \
+ if (dp < 0.0f) { \
/* Going out of bounds. Avoid division by zero as we \
* know dp != dpPrev from DIFFERENT_SIGNS, above. \
*/ \
if (mask & PLANE_BIT) { \
const GLfloat dp0 = CLIP_DOTPROD( v0, A, B, C, D ); \
const GLfloat dp1 = CLIP_DOTPROD( v1, A, B, C, D ); \
- const GLboolean neg_dp0 = IS_NEGATIVE(dp0); \
- const GLboolean neg_dp1 = IS_NEGATIVE(dp1); \
+ const GLboolean neg_dp0 = dp0 < 0.0f; \
+ const GLboolean neg_dp1 = dp1 < 0.0f; \
\
/* For regular clipping, we know from the clipmask that one \
* (or both) of these must be negative (otherwise we wouldn't \
* be here). \
* For userclip, there is only a single bit for all active \
* planes, so we can end up here when there is nothing to do, \
- * hence the second IS_NEGATIVE() test: \
+ * hence the second < 0.0f test: \
*/ \
if (neg_dp0 && neg_dp1) \
return; /* both vertices outside clip plane: discard */ \
newvert++;
}
else {
- ASSERT(t0 == 0.0);
+ assert(t0 == 0.0);
}
/* Note: we need to use vertex v0_orig when computing the new
newvert++;
}
else {
- ASSERT(t1 == 0.0);
+ assert(t1 == 0.0);
}
tnl->Driver.Render.ClippedLine( ctx, v0, v1 );
if (ctx->Light.ShadeModel == GL_FLAT) {
if (pv != inlist[0]) {
- ASSERT( inlist[0] >= VB->Count );
+ assert( inlist[0] >= VB->Count );
tnl->Driver.Render.CopyPV( ctx, inlist[0], pv );
}
}
if (ctx->Light.ShadeModel == GL_FLAT) {
if (pv != inlist[0]) {
- ASSERT( inlist[0] >= VB->Count );
+ assert( inlist[0] >= VB->Count );
tnl->Driver.Render.CopyPV( ctx, inlist[0], pv );
}
}