The mach64 driver with Mesa 3.x was using code like this (borrowed from
utah-glx) to cull primitives:
xx[0] = (GLint)(v0->v.x * 4);
yy[0] = (GLint)(v0->v.y * 4);
xx[1] = (GLint)(v1->v.x * 4);
yy[1] = (GLint)(v1->v.y * 4);
xx[2] = (GLint)(v3->v.x * 4);
yy[2] = (GLint)(v3->v.y * 4);
/* calculate one over area */
ooa = 0.25 * 0.25 * ((xx[0] - xx[2]) * (yy[1] - yy[2]) -
(yy[0] - yy[2]) * (xx[1] - xx[2]));
if ( ooa * ctx->backface_sign < 0 )
/* cull primitive */
return;
}
'ctx' here is the Mesa GL context. Is there an analog to 'backface_sign'
in Mesa 4.x?
--
Leif Delgass
http://www.retinalburn.net
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel