[vtk-developers] vtkGenericOpenGLRenderWindow crashes TestSetGet

Clinton Stimpson clinton at elemtech.com
Fri May 11 14:37:14 EDT 2012


It also seems there is a missing call to MakeCurrent() and/or IsCurrent() in 
either vtkOpenGLRenderWindow or vtkTextureUnitManager.

GetTextureUnitManager() is a public function, so anyone could call it at any 
time.  If there are multiple windows it could give the wrong answer, or if the 
only window hasn't been initialized yet, it would fail.

Clint

On Friday, May 11, 2012 09:46:25 AM David Gobbi wrote:
> Hi Brad,
> 
> It seems that vtkTextureUnitManager isn't in
> vtkRenderingOpenGLHierarchy.txt, so the wrappers no longer
> automatically exclude methods that use it as a parameter.  I'll
> look into this, I think that something is missing either from the
> CMakeLists.txt or from one of the cmake wrapping macros.
> The new BTX/ETX behavior that was brought into VTK in 5.8
> is documented here:
> 
> http://www.vtk.org/Wiki/VTK/Remove_BTX_ETX
> 
> I need to add a "Wrapping" section to the wiki that links to the
> various wiki pages that are related to wrapping... there's a fair bit
> of documentation for the wrappers, but none of it is easy to find.
> 
>  - David
> 
> On Fri, May 11, 2012 at 9:08 AM, Brad King <brad.king at kitware.com> wrote:
> > 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
-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com



More information about the vtk-developers mailing list