Skip to content
Snippets Groups Projects
Commit 4a0b3b0a authored by Sean McBride's avatar Sean McBride
Browse files

Fixed CAOpenGLLayer example being rendered as solid red

The SimpleCocoaVTK example project has two kinds of NSViews, one being based on CAOpenGLLayer. That one has been broken in master for some time now, rendering as solid red. Fixed by invoking InitializeFromCurrentContext(). Bypassed vtkCocoaRenderWindow's implementation though because it mutates the NSView and NSWindow ivars, which is undesirable in this case. Instead, invoke super's implementation.
parent 36350987
No related branches found
No related tags found
No related merge requests found
......@@ -24,9 +24,10 @@
// Tell VTK to render.
assert([customView renderWindowInteractor] -> GetInitialized());
vtkRenderWindow* renderWindow = [customView renderWindow];
vtkCocoaRenderWindow* renderWindow = [customView renderWindow];
if (renderWindow && renderWindow->GetMapped())
{
renderWindow->Superclass::InitializeFromCurrentContext();
renderWindow->Render();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment