[vtkusers] vtk getting wrong OpenGL version number from mesa and macports
Langer, Stephen A. (Fed)
stephen.langer at nist.gov
Tue Jan 30 17:08:18 EST 2018
On 1/30/18, 3:55 PM, "Ken Martin" <ken.martin at kitware.com<mailto:ken.martin at kitware.com>> wrote:
On Tue, Jan 30, 2018 at 3:17 PM, Langer, Stephen A. (Fed) <stephen.langer at nist.gov<mailto:stephen.langer at nist.gov>> wrote:
From within vtkXOpenGLRenderWindow::WindowInitialize():
(1) vtkXOpenGLRenderWindow::CreateAWindow(), in the block under the comment "try for 32 context", is successfully creating an OpenGL 4.5 context (independent of the value of MESA_GL_VERSION_OVERRIDE).
That is good.
(2) Then vtkOpenGLRenderWindow::OpenGLInitContext() calls glewInit() and finds that GLEW_VERSION_3_1 and GLEW_VERSION_3_2 aren't set, which they should be if the GL version is 4.5, right? I don't really understand the difference between GL_VERSION and GLEW_VERSION_x_y.
Yes, with 4.5 you also have 3.1 and 3.2. The glew that comes with VTK is modified to fix an issue in the original glew that caused glew to think it did not have 3.1/3.2 when on OSX. Maybe somehow a system glew is still being picked up.
It's definitely using the VTK glew when I turn VTK_USE_SYSTEM_GLEW off. I uninstalled the macports glew to be sure.
I modified glewContextInit() in VTK's glew.c to print the GL version, and it's printing 2.1. The full version string is "s=2.1 ATI-1.51.8".
I haven't figured out where *that* comes from -- it's returned by glGetString(GL_VERSION) but the mesa source is very hard to navigate.
-- Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180130/e08babb2/attachment.html>
More information about the vtkusers
mailing list