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

Ben Boeckel ben.boeckel at kitware.com
Mon Jan 29 15:28:01 EST 2018


On Mon, Jan 29, 2018 at 20:08:01 +0000, Langer, Stephen A. (Fed) wrote:
> 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.

Was a profile requested? If no profile is requested, Mesa gives back a
Compat context which it doesn't support beyond 2.1 (its 3.x contexts
don't support some Compat functionality). VTK should be requesting a
Core profile which will get the right context.

You can force Mesa to give a Compat profile of a higher version by
setting the MESA_GL_OVERRIDE environment variable to 3.2 or the like.

--Ben


More information about the vtkusers mailing list