Last active
February 9, 2022 17:36
-
-
Save GuillaumeFavelier/02d7a51ef6aba3cae449bd33777d2c1d to your computer and use it in GitHub Desktop.
Check OpenGL extension support with VTK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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