[Paraview] OpenGL Backend Identification
Joachim Pouderoux
joachim.pouderoux at kitware.com
Thu Dec 10 09:39:30 EST 2015
vtkRenderingOpenGLConfigure.h seems indeed the right place.
I propose to also add a VTK_OPENGL1 - let's get prepared for the future.
And we could also add
#define VTK_OPENGL_BACKEND_VERSION [1|2]
J.
2015-12-10 15:29 GMT+01:00 Ken Martin <ken.martin at kitware.com>:
> Maybe vtkRenderingOpenGLConfigure.h ?
>
> That header is configured from a .in file for both the old and new
> backend. We could define VTK_OPENGL2 in that header and applications could
> include it as needed. That header appears to get installed. The only issue
> I see is that if someone built VTK with no rendering then that header file
> might not exist.
>
> Does that work? If so I can put the VTK_OPENGL2 definition in there.
>
>
> On Wed, Dec 9, 2015 at 12:43 PM, Marcus D. Hanwell <
> marcus.hanwell at kitware.com> wrote:
>
>> vtkConfigure.h is definitely not the right place for this, and we
>> worked pretty hard to move things out of it that didn't need to be
>> there. It will cause almost all classes to recompile, and nothing in
>> common is even aware of rendering backends. There is a configured
>> header in the modules that record some settings (such as Cocoa,
>> Carbon, X11, etc as far as I remember) that would be more appropriate.
>>
>> I haven't looked at the code in a while, adding something to configure
>> it in seems reasonable. It is something we originally hoped could be
>> decided at link time, and it has since become something that can only
>> really be decided at compile time (which backend to use). With that in
>> mind, you could simply define something in vtkRenderingCore's
>> configured header stating which backend it was compiled with.
>>
>> Marcus
>>
>> On Wed, Dec 9, 2015 at 12:00 PM, Shawn Waldon <shawn.waldon at kitware.com>
>> wrote:
>> > There *is* a global VTK configuration header. vtkConfigure.h has many
>> of
>> > these definitions and is included in vtkObjectBase.h (so pretty much
>> > everywhere). But you may be right that this should go somewhere in the
>> > rendering code rather than in there. I am not sure that
>> vtkRenderWindow is
>> > the best location for it, but I am not as familiar with the code that
>> uses
>> > the compiler definition. Does everywhere that #ifdefs VTK_OPENGL2
>> include
>> > vtkRenderWindow.h? Or would we have to pull in that header just for
>> that
>> > macro?
>> >
>> > Shawn
>> >
>> > On Wed, Dec 9, 2015 at 11:54 AM, Tim Thirion <tim.thirion at kitware.com>
>> > wrote:
>> >>
>> >> Yes, that was my original question. :) Is the vtkRenderWindow the best
>> >> place for this? I'm happy to add it.
>> >>
>> >> On Wed, Dec 9, 2015 at 11:12 AM, Joachim Pouderoux
>> >> <joachim.pouderoux at kitware.com> wrote:
>> >>>
>> >>> BTW, I took a look but I do not see any way for a third party VTK or
>> PV
>> >>> application that would not use CMake machinery (and use
>> VTK_OPENGL_BACKEND)
>> >>> to know if the VTK it uses is based on OpenGL backend 1 or 2.
>> >>> VTK_OPENGL2 is a compiler definition provided to build VTK or PV but,
>> as
>> >>> there is no global VTK configuration header, shouldn't we add a
>> function in
>> >>> vtkRenderWindow to return the version of the backend it is based on?
>> >>>
>> >>> Joachim Pouderoux
>> >>>
>> >>> PhD, Technical Expert
>> >>> Kitware SAS
>> >>>
>> >>>
>> >>> 2015-12-08 19:58 GMT+01:00 Ben Boeckel <ben.boeckel at kitware.com>:
>> >>>>
>> >>>> On Mon, Dec 07, 2015 at 14:49:51 -0500, Tim Thirion wrote:
>> >>>> > I'm looking to provide run-time identification of the current
>> OpenGL
>> >>>> > backend in use. Some questions:
>> >>>> >
>> >>>> > 1. VTK #defines VTK_OPENGL2, but ParaView #defines VTKGL2. Is
>> there a
>> >>>> > particular reason we have both?
>> >>>>
>> >>>> VTK used to have both. VTKGL2 should be migrated to VTK_OPENGL2 (as
>> VTK
>> >>>> did).
>> >>>>
>> >>>> > 2. Is there an ideal place to define such a constant? Perhaps on
>> the
>> >>>> > render
>> >>>> > window?
>> >>>>
>> >>>> The About dialog has a list of information already (versions of
>> Python,
>> >>>> matplotlib, numpy, Qt, etc.).
>> >>>>
>> >>>> --Ben
>> >>>> _______________________________________________
>> >>>> Powered by www.kitware.com
>> >>>>
>> >>>> Visit other Kitware open-source projects at
>> >>>> http://www.kitware.com/opensource/opensource.html
>> >>>>
>> >>>> Please keep messages on-topic and check the ParaView Wiki at:
>> >>>> http://paraview.org/Wiki/ParaView
>> >>>>
>> >>>> Search the list archives at: http://markmail.org/search/?q=ParaView
>> >>>>
>> >>>> Follow this link to subscribe/unsubscribe:
>> >>>> http://public.kitware.com/mailman/listinfo/paraview
>> >>>
>> >>>
>> >>
>> >>
>> >> _______________________________________________
>> >> Powered by www.kitware.com
>> >>
>> >> Visit other Kitware open-source projects at
>> >> http://www.kitware.com/opensource/opensource.html
>> >>
>> >> Please keep messages on-topic and check the ParaView Wiki at:
>> >> http://paraview.org/Wiki/ParaView
>> >>
>> >> Search the list archives at: http://markmail.org/search/?q=ParaView
>> >>
>> >> Follow this link to subscribe/unsubscribe:
>> >> http://public.kitware.com/mailman/listinfo/paraview
>> >>
>> >
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the ParaView Wiki at:
>> > http://paraview.org/Wiki/ParaView
>> >
>> > Search the list archives at: http://markmail.org/search/?q=ParaView
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://public.kitware.com/mailman/listinfo/paraview
>> >
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview
>>
>
>
>
> --
> Ken Martin PhD
> Chairman & CFO
> Kitware Inc.
> 28 Corporate Drive
> Clifton Park NY 12065
> 518 371 3971
>
> 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.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20151210/98f937a8/attachment.html>
More information about the ParaView
mailing list