[vtkusers] 答复: Init in VTK 8.0

Shawn Waldon shawn.waldon at kitware.com
Tue Oct 31 13:16:06 EDT 2017


Hi Chiang,

Oops.  It is in Utilities/Maintenance/WhatModulesVTK.py

Shawn

On Tue, Oct 31, 2017 at 12:26 PM, Wang Q <wangq1979 at outlook.com> wrote:

> Hello Shawn,
>
> Your tips really help! But I cannot find the script under the dir as you
> mentioned. I wonder it has been moved to somewhere else in VTK 8.
>
> Best wishes,
>
> Chiang
>
> ------------------------------
> *发件人:* Shawn Waldon <shawn.waldon at kitware.com>
> *发送时间:* 2017年10月31日 15:51
> *收件人:* Wang Q
> *抄送:* vtkusers at vtk.org
> *主题:* Re: [vtkusers] Init in VTK 8.0
>
> Hi Chiang,
>
> VTK's default rendering implementation changed from VTK 6 to VTK 7, so the
> library names you need changed.  The OpenGL backend worked with OpenGL
> 1.1(or 1.2?), and the newer OpenGL2 backend uses OpenGL 3.2.  The default
> changed to OpenGL2 in VTK 7.0 and so you need to update the names of the
> libraries you are using from vtkRenderingOpenGL and
> vtkRenderingVolumeOpenGL to vtkRenderingOpenGL2 and
> vtkRenderingVolumeOpenGL2.  There is a script you can run in the VTK source
> tree (Utilities/Scripts/WhatModulesVTK.py) to figure out what modules you
> need to use.  I'd run that script and see what you get since I'm not sure
> if anything else you use has changed.
>
> HTH,
> Shawn
>
> On Tue, Oct 31, 2017 at 8:11 AM, Wang Q <wangq1979 at outlook.com> wrote:
>
> Hello there,
>
> I upgraded VTK from 6.3 to 8.0, and tried to execute some legacy code
> implemented on 6.3. However, after setting up the project include and lib
> dirs in VS2015, it threw some errors like:
>
> Severity Code Description Project File Line Suppression State
> Error LNK2001 unresolved external symbol "void __cdecl
> vtkRenderingOpenGL_AutoInit_Construct(void)"
> (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) test_vtk
> D:\develop\C++\projects\test_vtk\test_vtk\test_vtk\Vis3D3Pha
> se_WithPipe.obj 1
>
> My code starts like:
> #pragma
>
> #include <vtkAutoInit.h>
> VTK_MODULE_INIT(vtkInteractionStyle);
> VTK_MODULE_INIT(vtkRenderingOpenGL);
> VTK_MODULE_INIT(vtkRenderingVolumeOpenGL);
> VTK_MODULE_INIT(vtkRenderingFreeType);
>
> #include "vtkSmartPointer.h"
> #include "vtkImageData.h"
>
> It seems libs are not recognised, but I did update all relating parameters
> in VS project properties.
>
>
> In addition, I tried the example of vtkShadows, but unfortunately it said
> unresolved header file "vtkFrameBufferObject.h".
>
> Any tips would be appreciated!
>
> Cheers,
>
> Chiang
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171031/f9cab2ee/attachment.html>


More information about the vtkusers mailing list