[vtkusers] Re: Mesa/VTK problem on RedHat 7.2 (also with Mesa 4.0) [MORE INFO]
Dave Reed
dreed at capital.edu
Sat Nov 17 20:40:44 EST 2001
> From: Brian Paul <brian_e_paul at yahoo.com>
>
> Dave Reed wrote:
> >
> > > From: Brian Paul <brian_e_paul at yahoo.com>
> > > >
> > > > I also tried a small GLUT program and Mesa4.0 appears to have bugs
> > > > that Mesa 3.4 does not. See the images:
> > > >
> > > > http://capital2.capital.edu/faculty/dreed/mesa3.4.jpg
> > > > http://capital2.capital.edu/faculty/dreed/mesa4.0.jpg
> > > >
> > > > Note that the cone is missing polygons near the top in the 4.0
> > > > example.
> > > >
> > > > I can provide code for any of these if anyone wants it.
> > >
> > > If you send me the code for small GLUT program I'll take a look.
> > > Do you have the MESA_DEBUG env var set?
> >
> > Forgot to set MESA_DEBUG before. Here's the error message:
> >
> > Mesa warning: glEnable(GL_DEPTH_TEST) but no depth buffer
> >
> > That's obviously the problem and I fixed it by doing:
> >
> > glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
> >
> > (forgot the GLUT_DEPTH before).
> >
> > However, the error message doesn't show up with the VTK problem.
>
> The problem in VTK may be different. Do you know how the
> polygonal surfaces are being drawn? Vertex arrays? Display
> lists? Immediate mode? GL_TRIANGLES, GL_TRIANGLE_STRIP, etc?
I'm pretty certain it's triangle strips.
The following section of vtk causes the problem.
// extract the skin
vtkContourFilter *skinExtractor = vtkContourFilter::New();
skinExtractor->SetInput(v16->GetOutput());
skinExtractor->SetValue(0, 500);
vtkStripper *stripper = vtkStripper::New();
stripper->SetInput(skinExtractor->GetOutput());
vtkPolyDataMapper *skinMapper = vtkPolyDataMapper::New();
skinMapper->SetInput(stripper->GetOutput());
skinMapper->ScalarVisibilityOff();
vtkActor *skin = vtkActor::New();
skin->SetMapper(skinMapper);
but if I skip the stripper (which should convert to triangle strips),
vtkContourFilter *skinExtractor = vtkContourFilter::New();
skinExtractor->SetInput(v16->GetOutput());
skinExtractor->SetValue(0, 500);
vtkPolyDataMapper *skinMapper = vtkPolyDataMapper::New();
skinMapper->SetInput(skinExtractor->GetOutput());
skinMapper->ScalarVisibilityOff();
vtkActor *skin = vtkActor::New();
skin->SetMapper(skinMapper);
The image displays correctly. So it's most likely a problem with
Mesa's triangle strip rendering. I don't think it's VTK's triangle
stripper since NVidia's GL displays it correctly.
Dave
More information about the vtkusers
mailing list