[vtkusers] Re: CocoaWindow.h/mm incomplete
Sean McBride
sean at rogue-research.com
Fri Nov 25 12:36:27 EST 2005
On 2005-11-25 12:24, Mike Jackson said:
>Well, I was following the article out at MacDevCenter about combining
>Cocoa with VTK and in that article there are some additional classes
>created to make Cocoa work better with VTK. That article is a quite
>old and so obviously I need to figure out the correct way to combine
>VTK with Cocoa.
As you surmised, that article is obsolete with regards to vtk 5. The
problems it discusses are exactly why vtk 5 was changed the way it was.
> Basically what I want to go is have a "View" embedded in a window
>with other controls present in the same window. I don't want the
>whole window to just be the OpenGL view.
This is exactly how I need to use vtk also, and vtk 5 is much much
better suited to this.
> I am going to assume, with out actually trying first, to just
>drag an NSOpenGL view into my Window in Interface Builder and set the
>Custom class to vtkOpenGLView? Then hook up everything else as normal?
Close. vtkCocoaGLView, as of vtk 5, is no longer an NSOpenGL view
subclass, but rather an NSView subclass. So you would drag a CustomView
and set its custom class to vtkCocoaGLView. Actually, you'll probably
want your own subclass of vtkCocoaGLView. And that's it! None of that
stuff in the MacDevCenter is needed anymore.
Let us know how it goes.
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtkusers
mailing list