VTK has Problem with OpenGL and Rendering on raspberry pi 4

I have successfully installed the opengl on reaspberry pi and runned demos of opengl and does not have any problem
but when I run the vtk example (ReadOBJ) it gives me a lot of error that I cannot figure out what that is…
this is some of error that I see:

2023-11-08 08:44:54.062 (  25.958s) [    FFFF9B4D8020]   vtkShaderProgram.cxx:428    ERR| vtkShaderProgram (0xaaab27314000): 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.00 ES, and 3.00 ES

2023-11-08 08:44:54.062 (  25.958s) [    FFFF9B4D8020]vtkOpenGLPolyDataMapper:2631   ERR| vtkOpenGLPolyDataMapper (0xaaab272a0980): Could not set shader program
2023-11-08 08:44:54.076 (  25.971s) [    FFFF9B4D8020]   vtkShaderProgram.cxx:427    ERR| vtkShaderProgram (0xaaab27314000): 1: #version 150

2023-11-08 08:44:35.138 (   7.033s) [    FFFF9B4D8020]vtkOpenGLRenderWindow.c:710    ERR| vtkXOpenGLRenderWindow (0xaaab272c51e0): Unable to find a valid OpenGL 3.2 or later implementation. Please update your video card driver to the latest version. If you are using Mesa please make sure you have version 11.2 or later and make sure your driver in Mesa supports OpenGL 3.2 such as llvmpipe or openswr. If you are on windows and using Microsoft remote desktop note that it only supports OpenGL 3.2 with nvidia quadro cards. You can use other remoting software such as nomachine to avoid this issue.
2023-11-08 08:44:35.138 (   7.034s) [    FFFF9B4D8020]     vtkOpenGLState.cxx:1787  WARN| Hardware does not support the number of textures defined.
2023-11-08 08:44:35.138 (   7.034s) [    FFFF9B4D8020]     vtkOpenGLState.cxx:1787  WARN| Hardware does not support the number of textures defined.
2023-11-08 08:44:35.149 (   7.044s) [    FFFF9B4D8020]     vtkOpenGLState.cxx:1787  WARN| Hardware does not support the number of textures defined.
2023-11-08 08:44:35.149 (   7.045s) [    FFFF9B4D8020]     vtkOpenGLState.cxx:1787  WARN| Hardware does not support the number of textures defined.
2023-11-08 08:44:35.149 (   7.045s) [    FFFF9B4D8020]     vtkOpenGLState.cxx:1787  WARN| Hardware does not support the number of textures defined.
2023-11-08 08:44:35.153 (   7.048s) [    FFFF9B4D8020]     vtkOpenGLState.cxx:1787  WARN| Hardware does not support the number of textures defined.
2023-11-08 08:44:35.153 (   7.048s) [    FFFF9B4D8020]     vtkOpenGLState.cxx:1787  WARN| Hardware does not support the number of textures defined.
2023-11-08 08:44:35.156 (   7.051s) [    FFFF9B4D8020]     vtkOpenGLState.cxx:1787  WARN| Hardware does not support the number of textures defined.
2023-11-08 08:44:35.230 (   7.126s) [    FFFF9B4D8020]   vtkShaderProgram.cxx:427    ERR| vtkShaderProgram (0xaaab27314000): 1: #version 150

what can I do with this ?

From the tech specs, Raspberry Pi 4 is an embedded system, which supports OpenGL ES 3.1 and Vulkan 1.0. VTK has support for OpenGL ES. Can you please try to re-configure and build VTK with VTK_OPENGL_USE_GLES=ON

1 Like

when I trying to configure with VTK_OPENGL_USE_GLES=ON during build, it gives me an error:

/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:27:3: note:   candidate expects 0 arguments, 2 provided
make[2]: *** [Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/build.make:368: Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/vtkCompositeSurfaceLICMapperDelegator.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8350: Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
[ 58%] Building CXX object Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/vtkCompositeSurfaceLICMapperDelegator.cxx.o
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx: In constructor ‘vtkCompositeSurfaceLICMapperDelegator::vtkCompositeSurfaceLICMapperDelegator()’:
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:22:53: error: cannot convert ‘vtkBatchedSurfaceLICMapper*’ to ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’ in assignment
   22 |   this->GLDelegate = vtkBatchedSurfaceLICMapper::New();
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                     |
      |                                                     vtkBatchedSurfaceLICMapper*
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx: In member function ‘virtual void vtkCompositeSurfaceLICMapperDelegator::ShallowCopy(vtkCompositePolyDataMapper*)’:
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:39:19: error: invalid use of incomplete type ‘class vtkOpenGLLowMemoryBatchedPolyDataMapper’
   39 |   this->GLDelegate->SetInputArrayToProcess(0, cpdm->GetInputArrayInformation(0));
      |                   ^~
In file included from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:27:7: note: forward declaration of ‘class vtkOpenGLLowMemoryBatchedPolyDataMapper’
   27 | class vtkOpenGLLowMemoryBatchedPolyDataMapper;
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h: In instantiation of ‘vtkSmartPointer<T>& vtkSmartPointer<T>::operator=(const vtkSmartPointer<U>&) [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’:
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:58:   required from here
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:143:41: error: no matching function for call to ‘vtkSmartPointer<vtkPolyDataMapper>::operator=(vtkOpenGLLowMemoryBatchedPolyDataMapper*)’
  143 |     this->vtkSmartPointerBase::operator=(r.GetPointer());
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:14,
                 from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:59:24: note: candidate: ‘vtkSmartPointerBase& vtkSmartPointerBase::operator=(vtkObjectBase*)’
   59 |   vtkSmartPointerBase& operator=(vtkObjectBase* r);
      |                        ^~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:59:49: note:   no known conversion for argument 1 from ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’ to ‘vtkObjectBase*’
   59 |   vtkSmartPointerBase& operator=(vtkObjectBase* r);
      |                                  ~~~~~~~~~~~~~~~^
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:60:24: note: candidate: ‘vtkSmartPointerBase& vtkSmartPointerBase::operator=(const vtkSmartPointerBase&)’
   60 |   vtkSmartPointerBase& operator=(const vtkSmartPointerBase& r);
      |                        ^~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:60:61: note:   no known conversion for argument 1 from ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’ to ‘const vtkSmartPointerBase&’
   60 |   vtkSmartPointerBase& operator=(const vtkSmartPointerBase& r);
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
In file included from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h: In instantiation of ‘static void vtkSmartPointer<T>::CheckTypes() [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:141:35:   required from ‘vtkSmartPointer<T>& vtkSmartPointer<T>::operator=(const vtkSmartPointer<U>&) [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:58:   required from here
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:37:47: error: static assertion failed: Cannot store an object with undefined type in vtkSmartPointer. Missing include?
   37 |     static_assert(vtk::detail::IsComplete<U>::value,
      |                                               ^~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:37:47: note: ‘vtk::detail::IsComplete<vtkOpenGLLowMemoryBatchedPolyDataMapper>::value’ evaluates to false
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/fstream:38,
                 from /home/javad/Downloads/vtk/Common/Core/vtkIOStream.h:17,
                 from /home/javad/Downloads/vtk/Common/Core/vtkSystemIncludes.h:27,
                 from /home/javad/Downloads/vtk/Common/Core/vtkIndent.h:16,
                 from /home/javad/Downloads/vtk/Common/Core/vtkObjectBase.h:41,
                 from /home/javad/Downloads/vtk/Common/Core/vtkObject.h:33,
                 from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/usr/include/c++/11/type_traits: In instantiation of ‘struct std::is_base_of<vtkPolyDataMapper, vtkOpenGLLowMemoryBatchedPolyDataMapper>’:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:40:42:   required from ‘static void vtkSmartPointer<T>::CheckTypes() [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:141:35:   required from ‘vtkSmartPointer<T>& vtkSmartPointer<T>::operator=(const vtkSmartPointer<U>&) [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:58:   required from here
/usr/include/c++/11/type_traits:1422:38: error: invalid use of incomplete type ‘class vtkOpenGLLowMemoryBatchedPolyDataMapper’
 1422 |     : public integral_constant<bool, __is_base_of(_Base, _Derived)>
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:27:7: note: forward declaration of ‘class vtkOpenGLLowMemoryBatchedPolyDataMapper’
   27 | class vtkOpenGLLowMemoryBatchedPolyDataMapper;
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h: In instantiation of ‘static void vtkSmartPointer<T>::CheckTypes() [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:141:35:   required from ‘vtkSmartPointer<T>& vtkSmartPointer<T>::operator=(const vtkSmartPointer<U>&) [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:58:   required from here
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:40:42: error: ‘value’ is not a member of ‘std::is_base_of<vtkPolyDataMapper, vtkOpenGLLowMemoryBatchedPolyDataMapper>’
   40 |     static_assert(std::is_base_of<T, U>::value,
      |                                          ^~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h: In instantiation of ‘T* vtkSmartPointer<T>::GetPointer() const [with T = vtkOpenGLLowMemoryBatchedPolyDataMapper]’:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:143:54:   required from ‘vtkSmartPointer<T>& vtkSmartPointer<T>::operator=(const vtkSmartPointer<U>&) [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:58:   required from here
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:178:43: error: invalid ‘static_cast’ from type ‘vtkObjectBase* const’ to type ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’
  178 |   T* GetPointer() const noexcept { return static_cast<T*>(this->Object); }
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:27:7: note: class type ‘vtkOpenGLLowMemoryBatchedPolyDataMapper’ is incomplete
   27 | class vtkOpenGLLowMemoryBatchedPolyDataMapper;
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h: In instantiation of ‘vtkSmartPointer<T>::vtkSmartPointer(T*, const vtkSmartPointerBase::NoReference&) [with T = vtkOpenGLLowMemoryBatchedPolyDataMapper]’:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:255:49:   required from ‘static vtkSmartPointer<T> vtkSmartPointer<T>::Take(T*) [with T = vtkOpenGLLowMemoryBatchedPolyDataMapper]’
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:363:34:   required from ‘vtkSmartPointer<T> vtk::TakeSmartPointer(T*) [with T = vtkOpenGLLowMemoryBatchedPolyDataMapper]’
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:41:   required from here
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:282:31: error: no matching function for call to ‘vtkSmartPointerBase::vtkSmartPointerBase(vtkOpenGLLowMemoryBatchedPolyDataMapper*&, const vtkSmartPointerBase::NoReference&)’
  282 |     : vtkSmartPointerBase(r, n)
      |                               ^
In file included from /home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:14,
                 from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:85:3: note: candidate: ‘vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*, const vtkSmartPointerBase::NoReference&)’
   85 |   vtkSmartPointerBase(vtkObjectBase* r, const NoReference&);
      |   ^~~~~~~~~~~~~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:85:38: note:   no known conversion for argument 1 from ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’ to ‘vtkObjectBase*’
   85 |   vtkSmartPointerBase(vtkObjectBase* r, const NoReference&);
      |                       ~~~~~~~~~~~~~~~^
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:43:3: note: candidate: ‘vtkSmartPointerBase::vtkSmartPointerBase(vtkSmartPointerBase&&)’
   43 |   vtkSmartPointerBase(vtkSmartPointerBase&& r) noexcept
      |   ^~~~~~~~~~~~~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:43:3: note:   candidate expects 1 argument, 2 provided
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:38:3: note: candidate: ‘vtkSmartPointerBase::vtkSmartPointerBase(const vtkSmartPointerBase&)’
   38 |   vtkSmartPointerBase(const vtkSmartPointerBase& r);
      |   ^~~~~~~~~~~~~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:38:3: note:   candidate expects 1 argument, 2 provided
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:32:3: note: candidate: ‘vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*)’
   32 |   vtkSmartPointerBase(vtkObjectBase* r);
      |   ^~~~~~~~~~~~~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:32:3: note:   candidate expects 1 argument, 2 provided
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:27:3: note: candidate: ‘vtkSmartPointerBase::vtkSmartPointerBase()’
   27 |   vtkSmartPointerBase() noexcept;
      |   ^~~~~~~~~~~~~~~~~~~

@jaswantp hi
thank you for your response
when I using this flag to build the vtk, it gives me an error during building
this is my error:

[ 93%] Building CXX object Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/vtkCompositeSurfaceLICMapperDelegator.cxx.o
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx: In constructor ‘vtkCompositeSurfaceLICMapperDelegator::vtkCompositeSurfaceLICMapperDelegator()’:
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:22:53: error: cannot convert ‘vtkBatchedSurfaceLICMapper*’ to ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’ in assignment
   22 |   this->GLDelegate = vtkBatchedSurfaceLICMapper::New();
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                     |
      |                                                     vtkBatchedSurfaceLICMapper*
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx: In member function ‘virtual void vtkCompositeSurfaceLICMapperDelegator::ShallowCopy(vtkCompositePolyDataMapper*)’:
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:39:19: error: invalid use of incomplete type ‘class vtkOpenGLLowMemoryBatchedPolyDataMapper’
   39 |   this->GLDelegate->SetInputArrayToProcess(0, cpdm->GetInputArrayInformation(0));
      |                   ^~
In file included from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:27:7: note: forward declaration of ‘class vtkOpenGLLowMemoryBatchedPolyDataMapper’
   27 | class vtkOpenGLLowMemoryBatchedPolyDataMapper;
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h: In instantiation of ‘vtkSmartPointer<T>& vtkSmartPointer<T>::operator=(const vtkSmartPointer<U>&) [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’:
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:58:   required from here
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:143:41: error: no matching function for call to ‘vtkSmartPointer<vtkPolyDataMapper>::operator=(vtkOpenGLLowMemoryBatchedPolyDataMapper*)’
  143 |     this->vtkSmartPointerBase::operator=(r.GetPointer());
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:14,
                 from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:59:24: note: candidate: ‘vtkSmartPointerBase& vtkSmartPointerBase::operator=(vtkObjectBase*)’
   59 |   vtkSmartPointerBase& operator=(vtkObjectBase* r);
      |                        ^~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:59:49: note:   no known conversion for argument 1 from ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’ to ‘vtkObjectBase*’
   59 |   vtkSmartPointerBase& operator=(vtkObjectBase* r);
      |                                  ~~~~~~~~~~~~~~~^
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:60:24: note: candidate: ‘vtkSmartPointerBase& vtkSmartPointerBase::operator=(const vtkSmartPointerBase&)’
   60 |   vtkSmartPointerBase& operator=(const vtkSmartPointerBase& r);
      |                        ^~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:60:61: note:   no known conversion for argument 1 from ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’ to ‘const vtkSmartPointerBase&’
   60 |   vtkSmartPointerBase& operator=(const vtkSmartPointerBase& r);
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
In file included from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h: In instantiation of ‘static void vtkSmartPointer<T>::CheckTypes() [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:141:35:   required from ‘vtkSmartPointer<T>& vtkSmartPointer<T>::operator=(const vtkSmartPointer<U>&) [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:58:   required from here
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:37:47: error: static assertion failed: Cannot store an object with undefined type in vtkSmartPointer. Missing include?
   37 |     static_assert(vtk::detail::IsComplete<U>::value,
      |                                               ^~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:37:47: note: ‘vtk::detail::IsComplete<vtkOpenGLLowMemoryBatchedPolyDataMapper>::value’ evaluates to false
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/fstream:38,
                 from /home/javad/Downloads/vtk/Common/Core/vtkIOStream.h:17,
                 from /home/javad/Downloads/vtk/Common/Core/vtkSystemIncludes.h:27,
                 from /home/javad/Downloads/vtk/Common/Core/vtkIndent.h:16,
                 from /home/javad/Downloads/vtk/Common/Core/vtkObjectBase.h:41,
                 from /home/javad/Downloads/vtk/Common/Core/vtkObject.h:33,
                 from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/usr/include/c++/11/type_traits: In instantiation of ‘struct std::is_base_of<vtkPolyDataMapper, vtkOpenGLLowMemoryBatchedPolyDataMapper>’:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:40:42:   required from ‘static void vtkSmartPointer<T>::CheckTypes() [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:141:35:   required from ‘vtkSmartPointer<T>& vtkSmartPointer<T>::operator=(const vtkSmartPointer<U>&) [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:58:   required from here
/usr/include/c++/11/type_traits:1422:38: error: invalid use of incomplete type ‘class vtkOpenGLLowMemoryBatchedPolyDataMapper’
 1422 |     : public integral_constant<bool, __is_base_of(_Base, _Derived)>
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:27:7: note: forward declaration of ‘class vtkOpenGLLowMemoryBatchedPolyDataMapper’
   27 | class vtkOpenGLLowMemoryBatchedPolyDataMapper;
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h: In instantiation of ‘static void vtkSmartPointer<T>::CheckTypes() [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:141:35:   required from ‘vtkSmartPointer<T>& vtkSmartPointer<T>::operator=(const vtkSmartPointer<U>&) [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:58:   required from here
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:40:42: error: ‘value’ is not a member of ‘std::is_base_of<vtkPolyDataMapper, vtkOpenGLLowMemoryBatchedPolyDataMapper>’
   40 |     static_assert(std::is_base_of<T, U>::value,
      |                                          ^~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h: In instantiation of ‘T* vtkSmartPointer<T>::GetPointer() const [with T = vtkOpenGLLowMemoryBatchedPolyDataMapper]’:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:143:54:   required from ‘vtkSmartPointer<T>& vtkSmartPointer<T>::operator=(const vtkSmartPointer<U>&) [with U = vtkOpenGLLowMemoryBatchedPolyDataMapper; T = vtkPolyDataMapper]’
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:58:   required from here
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:178:43: error: invalid ‘static_cast’ from type ‘vtkObjectBase* const’ to type ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’
  178 |   T* GetPointer() const noexcept { return static_cast<T*>(this->Object); }
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:27:7: note: class type ‘vtkOpenGLLowMemoryBatchedPolyDataMapper’ is incomplete
   27 | class vtkOpenGLLowMemoryBatchedPolyDataMapper;
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h: In instantiation of ‘vtkSmartPointer<T>::vtkSmartPointer(T*, const vtkSmartPointerBase::NoReference&) [with T = vtkOpenGLLowMemoryBatchedPolyDataMapper]’:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:255:49:   required from ‘static vtkSmartPointer<T> vtkSmartPointer<T>::Take(T*) [with T = vtkOpenGLLowMemoryBatchedPolyDataMapper]’
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:363:34:   required from ‘vtkSmartPointer<T> vtk::TakeSmartPointer(T*) [with T = vtkOpenGLLowMemoryBatchedPolyDataMapper]’
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:23:41:   required from here
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:282:31: error: no matching function for call to ‘vtkSmartPointerBase::vtkSmartPointerBase(vtkOpenGLLowMemoryBatchedPolyDataMapper*&, const vtkSmartPointerBase::NoReference&)’
  282 |     : vtkSmartPointerBase(r, n)
      |                               ^
In file included from /home/javad/Downloads/vtk/Common/Core/vtkSmartPointer.h:14,
                 from /home/javad/Downloads/vtk/Rendering/Core/vtkCompositePolyDataMapperDelegator.h:21,
                 from /home/javad/Downloads/vtk/Rendering/OpenGL2/vtkOpenGLCompositePolyDataMapperDelegator.h:17,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.h:13,
                 from /home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:4:
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:85:3: note: candidate: ‘vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*, const vtkSmartPointerBase::NoReference&)’
   85 |   vtkSmartPointerBase(vtkObjectBase* r, const NoReference&);
      |   ^~~~~~~~~~~~~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:85:38: note:   no known conversion for argument 1 from ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’ to ‘vtkObjectBase*’
   85 |   vtkSmartPointerBase(vtkObjectBase* r, const NoReference&);
      |                       ~~~~~~~~~~~~~~~^
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:43:3: note: candidate: ‘vtkSmartPointerBase::vtkSmartPointerBase(vtkSmartPointerBase&&)’
   43 |   vtkSmartPointerBase(vtkSmartPointerBase&& r) noexcept
      |   ^~~~~~~~~~~~~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:43:3: note:   candidate expects 1 argument, 2 provided
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:38:3: note: candidate: ‘vtkSmartPointerBase::vtkSmartPointerBase(const vtkSmartPointerBase&)’
   38 |   vtkSmartPointerBase(const vtkSmartPointerBase& r);
      |   ^~~~~~~~~~~~~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:38:3: note:   candidate expects 1 argument, 2 provided
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:32:3: note: candidate: ‘vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*)’
   32 |   vtkSmartPointerBase(vtkObjectBase* r);
      |   ^~~~~~~~~~~~~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:32:3: note:   candidate expects 1 argument, 2 provided
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:27:3: note: candidate: ‘vtkSmartPointerBase::vtkSmartPointerBase()’
   27 |   vtkSmartPointerBase() noexcept;
      |   ^~~~~~~~~~~~~~~~~~~
/home/javad/Downloads/vtk/Common/Core/vtkSmartPointerBase.h:27:3: note:   candidate expects 0 arguments, 2 provided
make[2]: *** [Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/build.make:368: Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/vtkCompositeSurfaceLICMapperDelegator.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8314: Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I don’t know what to do.

Hi :wave:
Thank You for your response.
I try your solution but when I going to build the vtk with make -j4 command, on 97% have an exception and error…

make[2]: *** [Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/build.make:368: Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/vtkCompositeSurfaceLICMapperDelegator.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8314: Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 93%] Building CXX object Rendering/LICOpenGL2/CMakeFiles/RenderingLICOpenGL2.dir/vtkCompositeSurfaceLICMapperDelegator.cxx.o
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx: In constructor ‘vtkCompositeSurfaceLICMapperDelegator::vtkCompositeSurfaceLICMapperDelegator()’:
/home/javad/Downloads/vtk/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapperDelegator.cxx:22:53: error: cannot convert ‘vtkBatchedSurfaceLICMapper*’ to ‘vtkOpenGLLowMemoryBatchedPolyDataMapper*’ in assignment
   22 |   this->GLDelegate = vtkBatchedSurfaceLICMapper::New();
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                     |
      |                                                     vtkBatchedSurfaceLICMapper*

Please add the following flag to your cmake configure command

-DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2:STRING=DONT_WANT

1 Like

Thank You so much :wave: :grinning: for your help
I finally run the ReadOBJ sample with this configuration:
cmake -DVTK_OPENGL_USE_GLES=ON -DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2:STRING=DONT_WANT ..

@jaswantp
I have another problem unfortunately :frowning_face: :roll_eyes:
when I try to cmake a example it gives me this error:


now what can I do for this ?
it’s just a smiple readobj example
I try to sudo make install and it completely install successful.
my command to cmake the exmaple is:

I’m not sure why that example wants RenderingGLPSOpenGL2. Can you remove that dependency from the CMakeLists.txt and retry?

1 Like

Also, the following flag is only for building VTK itself. Don’t use it for building your own projects, it has no effect.

-DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2:STRING=DONT_WANT

Yes Thank you again for your help
I remove the RenderingGLPSOpenGL2 from dependencies and make successfully :smiling_face_with_three_hearts:

1 Like