[vtk-developers] vtkGenericOpenGLRenderWindow crashes TestSetGet

Brad King brad.king at kitware.com
Fri May 11 11:08:39 EDT 2012


Hi Folks,

TestSetGet currently crashes:

   http://open.cdash.org/testDetails.php?test=145727028&build=2266971

when running against a Mesa GL library.  It appears to call
glGetString(GL_RENDERER) without a GL context.

At some point during the modularization transition the Tcl wrappers
started seeing vtkOpenGLRenderWindow::GetTextureUnitManager even
though it is in a BTX/ETX block (David G?).  That exposes this
existing problem.

Essentially the test runs

   package require vtk
   vtkGenericOpenGLRenderWindow x
   x GetTextureUnitManager

but one can simplify it to

   package require vtk
   vtkGenericOpenGLRenderWindow x
   [x GetHardwareSupport] GetNumberOfTextureUnits

or even just

   vtkGenericOpenGLRenderWindow x
   [x GetExtensionManager] ExtensionSupported "GL_VERSION_2_0"

The method vtkOpenGLExtensionManager::ExtensionSupported has:

   const char *gl_renderer=
     reinterpret_cast<const char *>(glGetString(GL_RENDERER));

but it is not safe to call glGetString without a context.

-Brad



More information about the vtk-developers mailing list