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

Ken Martin ken.martin at kitware.com
Thu Jul 9 10:56:22 EDT 2015


If you could make a patch Sean that would be awesome. And yes we should
probably stick it in vtkConfigure.h, that will also clean up some of the
CMakeLists files a bit.

Thanks
Ken

Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
ken.martin at kitware.com
518 881-4901 (w)
518 371-4573 (f)

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you
are not the intended recipient, any disclosure, copying, distribution or
any action taken in reliance on it is prohibited and may be unlawful. If
you received this communication in error please notify us immediately and
destroy the original message.  Thank you.


-----Original Message-----
From: Sean McBride [mailto:sean at rogue-research.com]
Sent: Thursday, July 9, 2015 10:47 AM
To: ben.boeckel at kitware.com; Ken Martin
Cc: andrew.amaclean at gmail.com; VTK Developers
Subject: Re: [vtk-developers] Detecting OpenGL2 mode at compile time?

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