enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.3k stars 285 forks source link

Add VTK, GL debug info #285

Open dmsurti opened 8 years ago

dmsurti commented 8 years ago

Add the following info:

VTK Major Version, 
VTK Minor Version,
GL Driver Version, 
GL Renderer Version,
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, 
GL_MAX_CUBE_MAP_TEXTURE_SIZE, 
GL_MAX_DRAW_BUFFERS, GL_MAX_FRAGMENT_UNIFORM_COMPONENTS,
GL_MAX_TEXTURE_IMAGE_UNITS, 
GL_MAX_TEXTURE_SIZE, 
GL_MAX_VARYING_FLOATS, 
GL_MAX_VERTEX_ATTRIBS, 
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, 
GL_MAX_VERTEX_UNIFORM_COMPONENTS, 
GL_MAX_VIEWPORT_DIMS, GL_STEREO,

This info should be computed only once and stored as it will use the expensive glGet calls. A toolbar info window should then display this stored information.

This will also be useful to the applications that use Mayavi for debugging OpenGL related issues.

dmsurti commented 8 years ago

See: http://public.kitware.com/pipermail/vtk-developers/2016-February/033113.html.

vtkOpenGLExtensionManager can be used to get the info required, but it is not available in VTK 7.0

stefanoborini commented 8 years ago

it seems that we can't get those parameters through python and VTK. glGet routines are apparently not accessible through VTK (to the best of my efforts, I could not find any access to them via the python interface).