vtkOpenGLPolyDataMapper2D (OpenGL2, VTK 6.3) update problem with TransformCoordinate
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Assuming we have:
vtkNew<vtkPolyDataMapper2D> m;
vtkNew<vtkCoordinate> coord;
coord->SetCoordinateSystemToWorld();
m->SetTransformCoordinate(coord.GetPointer());
Then use m with a 2D actor to display a polydata. The first render is fine. Now, rotate the view. The polydata rendered by m should rotate along, but it does not.
A simple solution is to call UpdateVBO more often. Of course, it is wasteful, but the old opengl backend did no better, so I think it would be acceptable. For instance, adding
|| (this->TransformCoordinate && this->VBOUpdateTime < viewport->GetMTime())
to the condition governing whether UpdateVBO is called seems to solve the problem in my case.
A better solution would be to not manually transform points and reflect the TransformCoordinate into the opengl matrix, but of course it is more work.