From 3e08fb757847f2d5f7e3b69463ba75d283461b75 Mon Sep 17 00:00:00 2001 From: Sergey Alexandrov Date: Wed, 16 May 2018 09:38:04 -0400 Subject: [PATCH] Change VTK version check in addTextureMesh Fixes an issue introduced by #2291. --- visualization/src/pcl_visualizer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/visualization/src/pcl_visualizer.cpp b/visualization/src/pcl_visualizer.cpp index 02f9857a9f0..7dfbbe3900e 100644 --- a/visualization/src/pcl_visualizer.cpp +++ b/visualization/src/pcl_visualizer.cpp @@ -3520,10 +3520,10 @@ pcl::visualization::PCLVisualizer::addTextureMesh (const pcl::TextureMesh &mesh, std::size_t tex_id = 0; while (tex_id < last_tex_id) { -#if VTK_MAJOR_VERSION > 5 - const char *tu = mesh.tex_materials[tex_id].tex_name.c_str (); -#else +#if VTK_MAJOR_VERSION < 8 int tu = vtkProperty::VTK_TEXTURE_UNIT_0 + tex_id; +#else + const char *tu = mesh.tex_materials[tex_id].tex_name.c_str (); #endif vtkSmartPointer texture = vtkSmartPointer::New ();