Re: [Paraview] OpenGL Backend Identification

2015-12-10 Thread Ken Martin
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

Re: [Paraview] OpenGL Backend Identification

2015-12-10 Thread Joachim Pouderoux
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 : > Maybe

Re: [Paraview] OpenGL Backend Identification

2015-12-10 Thread Ben Boeckel
On Thu, Dec 10, 2015 at 09:29:27 -0500, Ken Martin wrote: > 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

Re: [Paraview] OpenGL Backend Identification

2015-12-10 Thread Marcus D. Hanwell
Yes, and if the header doesn't exist nor does any backend, so that seems reasonable too. On Thu, Dec 10, 2015 at 9:29 AM, Ken Martin wrote: > Maybe vtkRenderingOpenGLConfigure.h ? > > That header is configured from a .in file for both the old and new backend. > We could

Re: [Paraview] OpenGL Backend Identification

2015-12-10 Thread David E DeMarle
And it should appear in a wrapped class so that we can get it at runtime from python. David E DeMarle Kitware, Inc. R Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Dec 10, 2015 at 9:47 AM, Marcus D. Hanwell < marcus.hanw...@kitware.com> wrote: > Yes, and

Re: [Paraview] OpenGL Backend Identification

2015-12-10 Thread Ben Boeckel
On Thu, Dec 10, 2015 at 10:08:14 -0500, David E DeMarle wrote: > And it should appear in a wrapped class so that we can get it at runtime > from python. In that case, there should probably be an enum in RenderingCore: enum vtkRenderingBackend { ... }; class

Re: [Paraview] OpenGL Backend Identification

2015-12-09 Thread Joachim Pouderoux
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

Re: [Paraview] OpenGL Backend Identification

2015-12-09 Thread Shawn Waldon
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

Re: [Paraview] OpenGL Backend Identification

2015-12-09 Thread Marcus D. Hanwell
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

Re: [Paraview] OpenGL Backend Identification

2015-12-09 Thread Tim Thirion
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.pouder...@kitware.com> wrote: > BTW, I took a look but I do not see any way for a third party VTK or PV > application that

Re: [Paraview] OpenGL Backend Identification

2015-12-08 Thread Ben Boeckel
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.

[Paraview] OpenGL Backend Identification

2015-12-07 Thread Tim Thirion
Hi ParaView devs, 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? 2. Is there an ideal place to define such a constant? Perhaps on the render