[vtkusers] MAC OS VTK WXWidgets

Torsten Sadowski moehl at akaflieg.extern.tu-berlin.de
Thu Feb 16 11:21:46 EST 2006


Hi,

this might be a non-trivial problem because

http://wxvtk.sourceforge.net/ does exist.

I had this compiled and running on my Mac some month ago.

Torsten

On Thu, 16 Feb 2006, Jaonary Rabarisoa wrote:

> Hi all,
> I'm trying to port an application based on wxWidgets and VTK. This
> application was initially developped on a linux box (wxGTK) and now
> runs well on a windows box too. I'd like to port it on mac os but
> using wxMAC instead of wxGTK.
> The problem that I have is that I probably need to pass a pointer to
> an HIViewRef to the object vtkCarbonRenderWindow. This HIViewRef
> pointer is obtained from the current wxGLcanvas, but I can't figure
> out how to do this. Below, you can find the equivenlent code for
> wxGTK and wxMSW. Note that with wxMSW we use a wxPanel instead of
> wxGLcanvas, so the pointer "this" is a wxPanel* in this case.
>
> rwin is a pointer to a vtk[WIN32,XOpenGL,Carbon]RenderWindow :
>
> #ifdef __WXMSW__
> 		this->rwin->SetWindowId((HWND)this->GetHandle() );
> #elif __WXGTK__
> 		assert(GTK_WIDGET_MAPPED(m_wxwindow));
> #if (GTK_MAJOR_VERSION > 1)
> 		GdkWindow* bwin = (GdkWindow *)GTK_PIZZA(m_wxwindow)->bin_window;
> 		this->rwin->SetDisplayId(GDK_WINDOW_XDISPLAY(bwin));
> 		this->rwin->SetWindowId(GDK_WINDOW_XWINDOW(bwin));
> #else
> 		GdkWindowPrivate* bwin = (GdkWindowPrivate *)GTK_PIZZA(m_wxwindow)-
>  >bin_window;
> 		this->rwin->SetDisplayId( bwin->xdisplay );
> 		this->rwin->SetWindowId( bwin->xwindow );
> #endif
>
> If I use carbon with VTK, I need to pass an HIViewRef to the function
> SetWindowId. So how can I get this from my current wxGLcanvas ?
>
> Thank you for your help,
>
> Jaonary
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list