Skip to content

Instantly share code, notes, and snippets.

@GuillaumeFavelier
Last active February 9, 2022 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuillaumeFavelier/02d7a51ef6aba3cae449bd33777d2c1d to your computer and use it in GitHub Desktop.
Save GuillaumeFavelier/02d7a51ef6aba3cae449bd33777d2c1d to your computer and use it in GitHub Desktop.
Check OpenGL extension support with VTK
import vtk as _vtk
renderWindow = _vtk.vtkRenderWindow()
renderWindow.SetOffScreenRendering(True)
renderWindow.Render()
extension_name = "_ES3"
if renderWindow.SupportsOpenGL():
caps = renderWindow.ReportCapabilities()
caps = caps.split('\n')
else:
caps = ""
ext_supported = [ext for ext in caps if extension_name in ext]
print(ext_supported)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment