Compilation related issues, especially on mac m1 devices

I am trying to compiling this project on mac m1 pro device , and there are some problems I had encountered.
1
If I want build vtkExternalOpenglRenderWindow, I need to change CMakeCache.txt file to make some option about “External” enable , if I use cmake-gui to enable that option , when I touch “configure” and “generate” button , the entry I had added such like “vtkRenderingExternal” or “VTK_Rendering_External” will miss ,and it do not write into CMakeCache.txt . So the problem is , how do I know how to enable some option and where I can find the result . I can not find the result in vtk-project - build - readme.md.
2
VTK_MODULE_USE_EXTERNAL_,how do i know the models name ? Is it In cmakelist.txt ?

3
I had a problem with opengl ,
Here is the output blew :

2022-07-04 09:26:57.212 (   0.761s) [           C7434]vtkOpenGLRenderWindow.c:488    ERR| vtkGenericOpenGLRenderWindow (0x7f88f074e680): 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.
2022-07-04 09:26:57.236 (   0.785s) [           C7434]vtkOpenGLRenderWindow.c:488    ERR| vtkGenericOpenGLRenderWindow (0x7f88f074e680): 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.

I notice that the library under thirdparty - glew is compiled , but I think this problem is caused in compile part , I don’t know how to control the build option so this problem I have no idea .
So , I hope some one can answer that question and very very thanks !

These options have nothing to do with vtkExternalOpenGLRenderWindow. You want the VTK_MODULE_ENABLE_VTK_RenderingExternal option (because the class lives in the VTK::RenderingExternal module).

Thanks for your reply .
The option VTK_MODULE_ENABLE_VTK_RenderingExternal I had added in cmake-gui , but after generate , In CMakeCache.txt have only this option ,but no value. So I have to write “ON” to this option ,and after this , the vtkexternalRenderwindow.h can be found .

If you just did cmake -DVTK_MODULE_ENABLE_VTK_RenderingExternal ., that makes sense. It should have been in the cache already though.

Yes , this works , and will build vtk external , but this also has opengl related problem .

This is the output when running a program with vtk :slight_smile:

2022-07-11 16:30:34.484 ( 0.431s) [ 548B09]vtkOpenGLRenderWindow.c:488 ERR| vtkExternalOpenGLRenderWindow (0x13a36fa50): 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.

I need to set external opengl to true and set opengl path after install opengl by brew and then it will have a opengl runtime environment.