[vtkusers] Re: CocoaWindow.h/mm incomplete
Mike Jackson
maillist at bluequartz.net
Fri Nov 25 14:35:13 EST 2005
On Nov 25, 2005, at 12:36 PM, Sean McBride wrote:
> 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.
OK. I got the IB stuff hooked up, but now when trying to reuse my
code from the VTK4 days I am getting some compile errors. Now the
errors are pretty self explanatory. What I am not quite getting is
just how the "real" mac world is creating a VTK App.
Are you subclassing vtkCocoaGLView to add in things like setting the
Interactor Style?
In my last app I had the following in the file VTKView.h (With the
accompanying .m file also that had the implementation)
@interface VTKView : vtkCocoaGLView {
vtkCocoaWindow *_cocoaWindow;
vtkCocoaRenderWindow *_cocoaRenderWindow;
vtkRenderer *_renderer;
vtkCocoaRenderWindowInteractor *_interactor;
}
-(id)initWithFrame:(NSRect)frame;
-(void)dealloc;
// Access to VTK instances
-(vtkRenderer *)renderer;
-(vtkRenderWindow *)renderWindow;
-(vtkRenderWindowInteractor *)renderWindowInteractor;
-(void)removeAllActors;
@end
Which I felt was necessary to allow me to actually set some data into
the renderer? Is this still needed for a "real" app, or am I just
missing something altogether?
---
Mike Jackson
mike _at_ bluequartz dot net
More information about the vtkusers
mailing list