[vtk-developers] Detecting OpenGL2 mode at compile time?

Sean McBride sean at rogue-research.com
Thu Jul 9 10:47:25 EDT 2015


On Thu, 9 Jul 2015 09:45:21 -0400, Ben Boeckel said:

>> if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
>>   set_source_files_properties(
>>     vtkPSurfaceLICComposite.cxx
>>     PROPERTIES COMPILE_FLAGS -DVTK_OPENGL2)
>> endif()
>
>Some places use VTKGL2 and others use VTK_OPENGL2. I started using the
>former, but that's because I saw it first. We should probably make these
>consistent though.

There are 23 of the former, and 27 of the latter.  I guess the latter is better, being both more descriptive and more numerous.  Shall I make a find/replace patch?


On Thu, 9 Jul 2015 09:04:14 -0400, Ken Martin said:

>I have been doing something like the following in my CMakeLists files
>
>if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
>
>  set_source_files_properties(
>
>    vtkPSurfaceLICComposite.cxx
>
>    PROPERTIES COMPILE_FLAGS -DVTK_OPENGL2)
>
>endif()

Alas, I have no CMakeLists file to to that in.

Neither VTKGL2 nor VTK_OPENGL2 are exported in any public .h file.  Would it be reasonable to #define it in vtkConfigure.h?

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the vtk-developers mailing list