Commit 213b7778 authored by Mathieu Westphal's avatar Mathieu Westphal

Adding a GetOpenGLInformation method to simple.py

parent 08539937
# GetOpenGLInformation method in simple.py
A new function, GetOpenGLInformation, has been added to simple.py
It enables to recover OpenGL related information, like GPU vendor,
OpenGL version and capabilities.
It can be used as follows
openGLInfo = GetOpenGLInformation()
openGLInfo.GetVendor()
openGLInfo.GetVersion()
openGLInfo.GetRenderer()
openGLInfo.GetCapabilities()
openGLInfo = GetOpenGLInformation(servermanager.vtkSMSession.RENDER_SERVER)
openGLInfo.GetVendor()
openGLInfo.GetVersion()
openGLInfo.GetRenderer()
openGLInfo.GetCapabilities()
......@@ -2072,6 +2072,13 @@ def ResetProperty(propertyName, proxy=None, restoreFromSettings=True):
proxy.SMProxy.UpdateVTKObjects()
def GetOpenGLInformation(location=servermanager.vtkSMSession.CLIENT):
"""Recover OpenGL information, by default on the client"""
openGLInfo = servermanager.vtkPVServerImplementationRendering.vtkPVClientServerCoreRendering.vtkPVOpenGLInformation()
session = servermanager.vtkSMProxyManager.GetProxyManager().GetActiveSession()
session.GatherInformation(location, openGLInfo, 0)
return openGLInfo
#==============================================================================
# Usage and demo code set
#==============================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment