[vtkusers] [Re] vtk 4.2 (carbon) on MacOS X Tiger doesn't work

Charlie Thornton thornton at thunderheadeng.com
Mon Jun 27 15:46:53 EDT 2005


As I understand it, the problem with trying a Carbon & Java compile (as
compared to Cocoa & Java) is the way in which the rendering real estate is
exchanged between the two sides.

The JNI function "Java_vtk_vtkPanel_RenderCreate" defined in vtkJavaAwt.h,
tries to update the current vtkRenderWindow's windowId variable with the
java drawing surface window reference.

temp0 = <this render window>
...
temp0->SetWindowId((void*)dsi_mac->cocoaViewRef)

This thing stored in cocoaViewRef turns out to be of type NSViewAWT -- this
appears to be defined in places we are not invited to look.  However, it
does extend NSView (which I think is Cocoa-specific).

I don't know much at all about Carbon or Cocoa, but my understanding is that
Cocoa is a higher-level programming toolkit than Carbon and uses some of its
functionality.  However, Carbon does not work on top of Cocoa.  This is why
I think that only the Cocoa version will work with the current Apple JVM.

- Charlie Thornton
Thunderhead Engineering



> -----Original Message-----
> From: vtkusers-bounces+thornton=thunderheadeng.com at vtk.org
> [mailto:vtkusers-bounces+thornton=thunderheadeng.com at vtk.org] On Behalf Of
> Sean McBride
> Sent: Monday, June 27, 2005 10:45 AM
> To: Nono BEZMan; vtkusers at vtk.org
> Subject: Re: [vtkusers] [Re] vtk 4.2 (carbon) on MacOS X Tiger doesn't
> work
> 
> On 2005-06-23 15:54, Nono BEZMan said:
> 
> >I have tried to compile cvs VTK with Tiger (and Java
> >wrapping) for months now to no avail.
> >
> >Your comments brought hope, but unfortunately I am
> >stuck again with one of the old bugs coming from using
> >gcc 4.0 (your message suggested that it should have
> >compiled fine with gcc 4.0, so I remove the hack from
> >CMakeDefaultMakeRuleVariables.cmake):
> >
> >/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc.a(_divdi3.o)
> >private external definition of ___divdi3 in section
> >(__TEXT,__text)
> >/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc_s.dylib(_divdi3.o)
> >definition of ___divdi3
> >
> >
> >I will try to change the
> >CMakeDefaultMakeRuleVariables.cmake again (and add the
> >
> >AND NOT APPLE hack) to where I go, but I do think I
> >will be stuck with a bunch of compile error again.
> >
> >Sean, if you happen to have some libs for Mac (of the
> >cvs version), using Carbon (and hopefully Java), I'll
> >take them as I am quite desperate to see anything work
> >on Mac any day soon.
> >
> >Otherwise, how do you precisely go about compiling it
> >under Tiger: do you midify the vtkJavaAwt.h, the
> >CMakeDefaultMakeRuleVariables.cmake, etc..????
> 
> With the code currently in CVS (ok, mine is a couple of weeks old) I
> didn't have to do anything special to make it build.  I didn't change
> any code or change any .cmake files or anything.  It seems the big
> difference between what we are doing is that I'm not doing any Java.  I
> guess there must be some problems with the vtk java stuff on the Mac,
> but I'm afraid I don't know Java, so can't help much. :(
> 
> If you want, I could build you the code I have with the Carbon support
> on, but without java.  mail me off list.
> 
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
> 
> 
> _______________________________________________
> 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