Problem with polydatas sharing vtkPoints in vtk8
Hi, I sent this to the users mailing list a few days ago but I'm opening this because I'm fairly sure this is a bug and not expected behavior.
I'm trying to update from vtk 7.0 and I'm having an issue with a particular setup of polydatas. In my case I have a single vtkPoints that is shared by multiple vtkPolydatas, where each polydata renders a different set of cells. I can't get the rendering to show more than one polydata at a time in vtk 8.0 and up, but it works as expected in vtk 7.1. In all cases I am using the new OpenGL2 backend.
I created a minimal example that reproduces the issue for me: https://gist.github.com/tigarmo/c90ff07a1b63bbcf396fa4aaf1e824a9 . It tries to show 2 quads, where each quad is a cell in a different polydata, but both polydatas share the same vtkPoints. This shows 2 quads as expected (by me) in vtk 7.1 but only 1 quad in vtk 8.0.1, 8.1.0 and 8.1.1. A surprising detail is that which quad is shown varies depending on the run. Sometimes it's the left one, sometimes the right one.
Does anyone have any suggestions? Is this a bug? Could it be related to improvements in VBO caching that I saw in 8.0's changelog?
Edit: I've confirmed that this issue is also present in vtk 8.2.0