[vtkusers] VTK 6 porting

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Apr 8 14:20:16 EDT 2013


On Mon, Apr 8, 2013 at 2:10 PM, Sean McBride <sean at rogue-research.com> wrote:
> On Mon, 18 Mar 2013 13:22:55 +0000, David Cole said:
>
>>They are set in the VTK build... but they also need to be set in your
>>client code that includes the headers and links to the VTK build. Your
>>code needs to be compiled with the same settings that VTK was compiled
>>with so the conditional compilations have the same conditions.
>>
>>If you use CMake to drive your build, you get it for free.
>>
>>If you don’t, you have to do extra work to make things work right now.
>>
>>An unfortunate, but true, fact about how modular VTK works now.
>
> Weird.  But just to follow up on-list, adding:
>
> #define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)
> #define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL)
>
> magically makes things work.  I've updated VTK's SimpleCocoaVTK Xcode project to use this, so that it actually works again:
>
> <http://review.source.kitware.com/#/t/2557/>
>
That isn't magical, it is just constructing a header that does what
CMake automatically takes care of. You did remind me I haven't
followed up and written documentation yet, but this is all any
application should need to do in order to trigger initialization of
the basic rendering modules (there are some other modules that use
this mechanism too, such as SQL).

Marcus



More information about the vtkusers mailing list