CreateAWindow calls itself in vtkCocoaRenderWindow if not rendered.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
If a vtkCocoaRenderWindow is used in a user created NSWindow and NSView, it is overwritten by its own window.
See SimpleCocoaVTK as an example: http://www.rogue-research.com/VTK/simpleCocoaVTK.html
The way SimpleCocoaVTK is done right now calls vtkRenderWindowInteractor::Initialize() before it is rendered the first time.
At that point, CreateAWindow in vtkCocoaRenderWindow is called. It doesn't matter if the window is created of not. However, OpenGLInit() is called, which calls ReadOpenGLExtensions. That seems to required that the renderWindow been rendered once at that point (which is not the case). If not, it calls render. However, render looks if OnScreenInitialized has been set to 1. It has not since we are still in CreateAWindow (it is set at the next line). Since it has not, it calls CreateAWindow again (which overwrites the one we are using)!