编译pcl1.9.1中出现error: ‘class vtkDataSetMapper’ has no member named ‘ImmediateModeRenderingOff‘问题的解决方法

我在对pcl1.9.1 + vtk8.2.0 + cuda10.0进行源码编译的过程中出现如下的两个错误:

pcl_1.9.1/apps/modeler/src/surface_actor_item.cpp:87:11: error: ‘class vtkDataSetMapper’ has no member named ‘ImmediateModeRenderingOff’
   mapper->ImmediateModeRenderingOff ();

pcl_1.9.1/apps/modeler/src/points_actor_item.cpp:90:11: error: ‘class vtkDataSetMapper’ has no member named ‘ImmediateModeRenderingOff’
   mapper->ImmediateModeRenderingOff();

经过一番搜索之后,发现是因为vtk8.10之后的版本中将vtkMapper的ImmediateModeRenderingOff()方法移除了,所以为了让pcl1.9.1代码编译通过,只需要将错误提示中对应的那一行代码注释掉即可,或者更换为更低版本的vtk也行。我是通过注释掉上述出错的两行代码,因为ImmediateModeRenderingOff()方法不是必须的操作,最后通过了编译。
编译pcl1.9.1中出现error: ‘class vtkDataSetMapper’ has no member named ‘ImmediateModeRenderingOff‘问题的解决方法_第1张图片

你可能感兴趣的:(PCL)