Recover OpenGL Informations from pvpython

The OpenGL informations, visible in Help → About dialog, are not easily recoverable in pvpython yet.

Here is how to do it.

On ParaView 5.6 and earlier versions:

import vtk as VTK
openGLInfo=VTK.vtkPVOpenGLInformation() 
session=servermanager.vtkSMProxyManager.GetProxyManager().GetActiveSession()
session.GatherInformation(session.CLIENT, openGLInfo, 0)
openGLInfo.GetVendor()
openGLInfo.GetVersion()
openGLInfo.GetRenderer()
openGLInfo.GetCapabilities()

On ParaView 5.7.X :

openGLInfo=servermanager.vtkPVServerImplementationRendering.vtkPVClientServerCoreRendering.vtkPVOpenGLInformation()
session=servermanager.vtkSMProxyManager.GetProxyManager().GetActiveSession()
session.GatherInformation(session.CLIENT, openGLInfo, 0)
openGLInfo.GetVendor()
openGLInfo.GetVersion()
openGLInfo.GetRenderer()
openGLInfo.GetCapabilities()

On ParaView 5.8.0 and newer

openGLInfo = GetOpenGLInformation()
openGLInfo.GetVendor()
openGLInfo.GetVersion()
openGLInfo.GetRenderer()
openGLInfo.GetCapabilities()

how about adding a function to simple.py to gather and return the vtkPVOpenGLInformation object?

Also, you can use enums in Python now, so I’d recommend changing the 16 to appropriate enums for clarity.

This is indeed a good feature idea.

I’ve updated my post with the enums.

https://gitlab.kitware.com/paraview/paraview/merge_requests/3320