[vtkusers] vtk getting wrong OpenGL version number from mesa and macports

Langer, Stephen A. (Fed) stephen.langer at nist.gov
Mon Jan 29 15:08:01 EST 2018


Hi --

I'm revisiting earler efforts to get vtk working with X11 on macOS.  I'd been building vtk with Cocoa because with X11 vtk was complaining that it couldn't find OpenGL version 3.2 or later.  I'm using macports to install OpenGL (mesa), and supposedly it's providing version 4.5 of OpenGL.  

I've tried building vtk both with and without VTK_USE_SYSTEM_GLEW, since vtk gets the version number from glew.  I tried tracing though the process of getting the version number, starting with vtkOpenGLRenderWindow::OpenGLInitContext(), but found the glew code to be amazingly opaque.   All I know for sure is that in vtk's OpenGLInitContext, GLEW_VERSION_3_2 and GLEW_VERSION_3_1 are empty, but the glew source code *does* set them, in glewContextInit() in glew.c.  I don't know what it sets them *to*, though.

I'm using the latest vtk from git master, but the problem occurred with released versions too.

I don't know if this is a vtk problem or a macports problem or a mesa problem, but I didn't get a helpful answer from the macports list.  Any advice would be much appreciated. 
 
Thanks.

 -- Steve





More information about the vtkusers mailing list