[vtkusers] VTK 8.1.0 opengl 2 init.... how do I do this now?

Brian Davis bitminer at gmail.com
Thu Apr 5 19:54:53 EDT 2018


maybe:

//VTK_MODULE_INIT(vtkRenderingOpenGL);
VTK_MODULE_INIT(vtkRenderingOpenGL2);
VTK_MODULE_INIT(vtkInteractionStyle);
//VTK_MODULE_INIT(vtkRenderingVolumeOpenGL);
//VTK_MODULE_INIT(vtkGPUVolumeRayCastMapper);
//VTK_MODULE_INIT(vtkFixedPointVolumeRayCastMapper);


and

target_compile_definitions(
    vtk_volume_renderer
    PRIVATE
    volume_render_EXPORTS=yes
    vtkRenderingCore_AUTOINIT="1(vtkRenderingOpenGL)"
    vtkRenderingVolume_AUTOINIT=1(vtkRenderingVolumeOpenGL)
    vtkRenderingCore=vtkRenderingOpenGL
)

at least it compiles.with warning

...
2>C:/projects/4DDSA/brian/build/CMakeFiles/vtkRenderingCore_AUTOINIT_vtkInteractionStyle_vtkRenderingFreeType_vtkRenderingOpenGL2.h(1):
warning C4005: 'vtkRenderingCore_AUTOINIT' : macro redefinition
2>          command-line arguments :  see previous definition of
'vtkRenderingCore_AUTOINIT'
...
========== Build: 2 succeeded, 0 failed, 5 up-to-date, 0 skipped ==========




On Thu, Apr 5, 2018 at 6:38 PM, Brian Davis <bitminer at gmail.com> wrote:

> Part of solution may be to change:
>
> VTK_MODULE_INIT(vtkRenderingOpenGL);
>
> to
>
> VTK_MODULE_INIT(vtkRenderingOpenGL2);
>
>
>
> On Thu, Apr 5, 2018 at 6:30 PM, Brian Davis <bitminer at gmail.com> wrote:
>
>> I use to:
>>
>> #include <vtkAutoInit.h>
>> VTK_MODULE_INIT(vtkRenderingOpenGL);
>> VTK_MODULE_INIT(vtkInteractionStyle);
>> VTK_MODULE_INIT(vtkRenderingVolumeOpenGL);
>> //VTK_MODULE_INIT(vtkGPUVolumeRayCastMapper);
>> //VTK_MODULE_INIT(vtkFixedPointVolumeRayCastMapper);
>>
>>
>> and at times define
>>
>> vtkRenderingCore_AUTOINIT="1(vtkRenderingOpenGL)"
>> vtkRenderingVolume_AUTOINIT=1(vtkRenderingVolumeOpenGL)
>> vtkRenderingCore=vtkRenderingOpenGL
>>
>> However in 8.1.0 build I get
>>
>> (void)" (?vtkRenderingOpenGL_AutoInit_Construct@@YAXXZ) referenced in
>> function "public: __cdecl vtkRenderingOpenGL_ModuleInit:
>> :vtkRenderingOpenGL_ModuleInit(void)" (??0vtkRenderingOpenGL_ModuleInit@
>> @QEAA at XZ)
>>
>> which reminds me of every other time I try and build it when the version
>> changes.  What is special sauce recipe for 8.1.0 and building with post
>> opengl 2 (GLSL shader enabled version)
>>
>>
>> Anyone count the number of threads over the years that discuss the opengl
>> init in VTK... there is such a sea of posts I am not even going to bother
>> to fish out what may be the solution somewhere buried in the ether else I
>> have to get out my heavy duty digital backhoe and realy dig for it.  Sure
>> I'll find it in some blog post somewhere.
>>
>> Any one at Kitware want to rethink the opengl design (Build and init
>> process)?
>>
>>
>> my superbuild of vtk defines:
>>
>>         VTK_BUILD_DEFINITIONS
>>             -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
>>                -DINSTALL_PREFIX=${INSTALL_PREFIX}
>> #            -DModule_vtkRenderingVolumeOpenGL=ON
>> #            -DModule_vtkRenderingVolumeOpenGLNew=ON
>>             -DModule_vtkTestingCore:BOOL=ON
>>             -DModule_vtkTestingRendering=ON
>>             -DModule_vtkRenderingVolumeOpenGL2=ON
>>
>>             -DVTK_RENDERING_BACKEND=OpenGL2
>>             -DBUILD_EXAMPLES=${VTK_BUILD_EXAMPLES}
>>             -DBUILD_TESTING=${VTK_BUILD_TESTING}
>>
>>
>>
>> ExternalProject_Add(
>>  ${VTK_VERSION_NAME}
>> ...
>> CMAKE_ARGS ${VTK_BUILD_DEFINITIONS}
>> ...
>> )
>>
>>
>>
>>
>
>
> --
> Brian J. Davis
>



-- 
Brian J. Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180405/602fcdc9/attachment.html>


More information about the vtkusers mailing list