Unable to find a valid OpenGL 3.2 or later implementation.

I am build VTK on Macos M1 ,and here is the CmakeCache.txt
CMakeCache.txt (162.1 KB)

Here is application running output :

vtkGenericOpenGLRenderWindow (0x7ff2aa10d4f0): 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 see libvtkglew-9.2.dylib is build .
Can anyone help me to solve this problem ?Thanks so much.

Fixed,thanks.

Fixed by add

QSurfaceFormat::setDefaultFormat(QVTKOpenGLWindow::defaultFormat());

in main.cpp