[vtk-developers] ReadOpenGLExtensions() should not call Render()

David Gobbi david.gobbi at gmail.com
Tue Sep 7 09:30:13 EDT 2010


Hi All,

I have a little complaint about this code in
vtkOpenGLExtensionManager::ReadOpenGLExtensions()

    this->RenderWindow->MakeCurrent();
    if (!this->RenderWindow->IsCurrent())
      {
      // Really should create a method in the render window to create
      // the graphics context instead of forcing a full render.
      this->RenderWindow->Render();
      }

Calling Render() inside ReadOpenGLExtensions() is a bad thing.  It can
cause the first render to occur as a side effect, and it might result
in the window being rendered before it has been properly sized and
positioned.  From what I've seen, this Render always gets called on
Windows but never on X.  This render was also the cause of bug 11208
(http://www.vtk.org/Bug/view.php?id=11208) which took me the better
part of a day to track down.

  David



More information about the vtk-developers mailing list