Skip to content

vtkCocoaRenderWindow: check if Initialized before calling Initialize()

Caitlin Ross requested to merge caitlin.ross/vtk:fix-mac-cocoa-init into master

Since MR !9845 (merged), we've started running into OpenGL issues in a ParaView-based application when running on Mac. Some images wouldn't render and glBindFramebuffer was returning invalid operation. The FBO in question appeared to be valid (and in fact a prior call to glBindFramebuffer on that fbo was successful). I finally found out that vtkCocoaRenderWindow::Start had been called again which calls vtkCocoaRenderWindow::Initialize. Previously, vtkCocoaRenderWindow::Initialize was called by vtkOpenGLRenderWindow which only calls Initialize if it hasn't been already, so this MR adds the same check and this fixes the issues for us.


Merge request reports