Fail to use vtk on mac 10.15

I’m trying to use vtk on my macbook(13inch, catalina 10.15.4). But when I try to use QVTKOpenGLNativeWidget, it complained that
“2020-05-02 14:22:05.581 ( 0.410s) [ 62F0D5]vtkOpenGLRenderWindow.c:582 ERR| vtkGenericOpenGLRenderWindow (0x7fb14a49f0f0): 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.
2020-05-02 14:22:05.582 ( 0.411s) [ 62F0D5]vtkOpenGLFramebufferObj:356 ERR| vtkOpenGLFramebufferObject (0x7fb14a49f870): failed at glGenFramebuffers 1 OpenGL errors detected
0 : (1280) Invalid enum”
it seems to tell me that the opengl version is not compatible? But I’m sure that the opengl version is higher than that required. So how to fix it?

The advice in QVTKOpenGLNativeWidget.h helped me to solve this problem.

hi! i have the same error can you say how u fix it?