Commit f125466c authored by Mathieu Westphal's avatar Mathieu Westphal Committed by Kitware Robot

Merge topic 'GetOpenGLInformationSimple'

213b7778 Adding a GetOpenGLInformation method to simple.py
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Nicolas Vuaille's avatarNicolas Vuaille <nicolas.vuaille@kitware.com>
Acked-by: Michael Migliore's avatarMichael Migliore <michael.migliore@kitware.com>
Acked-by: Joachim Pouderoux's avatarJoachim Pouderoux <joachim.pouderoux@kitware.com>
Merge-request: !3320
parents 89928957 213b7778
Pipeline #138943 failed with stage
in 0 seconds
# 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