Skip to content
  • Max Smolens's avatar
    Fix QVTKOpenGLWidget rendering with disabled interactor · 1b9800b8
    Max Smolens authored
    In QVTKOpenGLWidget, paintGL() assumes that renderVTK() always renders
    something into the framebuffer. However, rendering doesn't occur when
    the vtkRenderWindowInteractor EnableRender flag is disabled. In this
    case, QVTKOpenGLWidget can display the contents of an uninitialized
    framebuffer.
    
    This commit clears the VTK rendering framebuffer upon creation. This
    ensures that paintGL() doesn't blit an uninitialized framebuffer when
    rendering doesn't occur in renderVTK().
    
    One example when the vtkRenderWindowInteractor EnableRender flag would
    be disabled is when an application enforces a specified framerate by
    rendering only when a timer fires, not in response to interaction
    events.
    1b9800b8