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