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

Andrew Maclean andrew.amaclean at gmail.com
Thu Jul 9 07:39:26 EDT 2015


Hi Sean,
   Off the top of my head, I think VTK_RENDERING_BACKEND is visible and
this has the values OpenGL or OpenGL2.

Regards
   Andrew

>
> ---------- Forwarded message ----------
> From: Sean McBride <sean at rogue-research.com>
> To: <vtk-developers at vtk.org>
> Cc:
> Date: Wed, 8 Jul 2015 18:46:33 -0400
> Subject: [vtk-developers] Detecting OpenGL2 mode at compile time?
> Hi all,
>
> Is there a way to detect at compile-time OpenGL vs OpenGL2 mode?
>
> Since my app uses Xcode, I have to do the factory initialization thing,
and I'd like to be able to handle both cases as I test between both
OpenGLs, ie:
>
> #if ???
>  #define vtkRenderingCore_AUTOINIT
3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)
> #elif ???
>  #define vtkRenderingCore_AUTOINIT
3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL2)
> #endif
>
> I don't see anything in vtkConfigure.h.
>
> Thanks,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150709/d52d38bb/attachment.html>


More information about the vtk-developers mailing list