# Recover OpenGL Informations from pvpython

**URL:** https://discourse.paraview.org/t/recover-opengl-informations-from-pvpython/1536
**Category:** Tips and Tricks
**Created:** [March 27, 2019, 10:18am UTC](https://discourse.paraview.org/t/recover-opengl-informations-from-pvpython/1536 "2019-03-27T10:18:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 27, 2019, 10:18am UTC](https://discourse.paraview.org/t/recover-opengl-informations-from-pvpython/1536/1 "2019-03-27T10:18:22Z")

</div>

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()
```

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [March 27, 2019, 2:04pm UTC](https://discourse.paraview.org/t/recover-opengl-informations-from-pvpython/1536/2 "2019-03-27T14:04:16Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 27, 2019, 2:35pm UTC](https://discourse.paraview.org/t/recover-opengl-informations-from-pvpython/1536/3 "2019-03-27T14:35:07Z")

</div>

This is indeed a good feature idea.

I’ve updated my post with the enums.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 10, 2019, 3:40pm UTC](https://discourse.paraview.org/t/recover-opengl-informations-from-pvpython/1536/4 "2019-06-10T15:40:30Z")

</div>

[https://gitlab.kitware.com/paraview/paraview/merge\_requests/3320](https://gitlab.kitware.com/paraview/paraview/merge_requests/3320)
