@jaswantp No wonder!!
I did a simple test.
-
Set Ubuntu 22.04 to use wayland
-
downloaded the VTK 9.1.0 source code and built it with the
VTK_USE_X=OFF
andVTK_OPENGL_HAS_EGL=ON
options ( I believe theapt install vtk9
package is built withVTK_USE_X=ON
andVTK_OPENGL_HAS_EGL=OFF
options ) -
Built a modified version of the Cylinder Example, adding the following module initialization lines to the code:
VTK_MODULE_INIT(vtkInteractionStyle); VTK_MODULE_INIT(vtkRenderingContextOpenGL2); VTK_MODULE_INIT(vtkRenderingFreeType); VTK_MODULE_INIT(vtkRenderingOpenGL2);
The example was compiled using the following command:
g++ Cylinder.cxx -o Cylinder -I<path-to-my-vtk-header> -L<path-to-my-vtk-library> -Wl,-rpath-link <path-to-my-vtk-library> -Wl,-rpath <path-to-my-vtk-library> -lvtkCommonColor-9.1 -lvtkCommonCore-9.1 -lvtkFiltersSources-9.1 -lvtkInteractionStyle-9.1 -lvtkRenderingContextOpenGL2-9.1 -lvtkRenderingCore-9.1 -lvtkRenderingFreeType-9.1 -lvtkRenderingOpenGL2-9.1 -lvtkCommonExecutionModel-9.1
-
Finally, ran the
Cylinder
program, but it exited immediately without stopping atrenderWindowInteractor->Start()
and showing an interactive window.
The above is just the testing scenario. However, my actual environment is a Wayland-based system running on an AM62xx SoC ( which might not be recognized as Android ). What workarounds can I use to make this work?