[vtkusers] Re: Mesa / VTK problems

Brian Paul brian_e_paul at yahoo.com
Mon Nov 26 12:00:42 EST 2001


Looks like we've got a fix for the "missing" triangle problem seen
the in VTK medical1 demo when using Mesa.

The "missing" triangles weren't actually missing, they were being
rendered with their backface color (black) instead of the frontface
color.  This was only happening for particular sequences of triangle
strips (depending on their length and if there were an odd or even
number of vertices).

I isolated the problem in a test program and Keith Whitwell
implemented the fix.  It's checked into the Mesa CVS tree now.

Below is the patch if anyone wants to apply it to their source
tree instead of waiting for the 4.0.1 release.

-Brian


===================================================================
RCS file: /cvsroot/mesa3d/Mesa/src/tnl/t_imm_fixup.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -c -r1.26 -r1.27
*** mesa3d/Mesa/src/tnl/t_imm_fixup.c   2001/08/03 00:16:36     1.26
--- mesa3d/Mesa/src/tnl/t_imm_fixup.c   2001/11/26 12:56:07     1.27
***************
*** 735,741 ****
        tnl->ExecCopySource = IM;
        tnl->ExecCopyCount = 0;
        tnl->ExecCopyTexSize = IM->CopyTexSize;
!       tnl->ExecParity = IM->PrimitiveLength[IM->LastPrimitive] & 1;
  
        if (pincr != 1 && (IM->Count - last - pintro))
         ovf = (IM->Count - last - pintro) % pincr;
--- 735,746 ----
        tnl->ExecCopySource = IM;
        tnl->ExecCopyCount = 0;
        tnl->ExecCopyTexSize = IM->CopyTexSize;
! 
!       if (IM->LastPrimitive != IM->CopyStart)
!        tnl->ExecParity = 0;
!        
!       tnl->ExecParity ^= IM->PrimitiveLength[IM->LastPrimitive] & 1;
! 
  
        if (pincr != 1 && (IM->Count - last - pintro))
         ovf = (IM->Count - last - pintro) % pincr;

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the vtkusers mailing list