Skip to content

OSX VTK6 PCLVisualizer::wasStopped() behavior  #1390

Closed
@SergioRAgostinho

Description

@SergioRAgostinho

Hi all,

PCLVisualizer::wasStopped() is described in the documentation as "Returns true when the user tried to close the window.". From various comments around the web, the intended behaviour seems to be for the method to return true when the user presses the 'x' corner button of the window.

I'm working with OS X 10.10 and vtk6.2 and this is not working for me. When I close the window, PCLVisualizer::wasStopped() still returns false and my console then get's polluted with the following message

ERROR: In /tmp/vtk20150617-7180-8mym6w/VTK-6.2.0/Rendering/OpenGL/vtkOpenGLPolyDataMapper2D.cxx, line 442
vtkOpenGLPolyDataMapper2D (0x7fe94bd15170): failed after RenderOverlay 1 OpenGL errors detected
  0 : (1286) Invalid framebuffer operation

After some digging I found this mention in VTK's documentation for vtkRenderWindow::IsDrawable() acknowledging the issue with Cocoa.
I managed to correct this behavior by getting the smart pointer to the vtkRenderWindow and adding the additional check to vtkRenderWindow::IsDrawable().

Would it not be best to add this additional check into PCLVisualizer::wasStopped()?

My tests were limited to console apps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions