[vtkusers] Detection of insufficient OpenGL

Elvis Stansvik elvis.stansvik at orexplore.com
Wed May 10 10:52:01 EDT 2017

2017-05-10 15:00 GMT+02:00 Ken Martin <ken.martin at kitware.com>:
> In the new OpenGL2 backend if any feature works, then basically every
> feature in VTK works, or has a fallback that is reasonable. Unlike the old
> backend there are no features that may or may not work. This is mostly
> because OpenGL 3.2 (which is what the new backend uses) is a very capable
> API.
> If you are looking to test if the system has support for the new backend
> then there are some methods on RenderWindow you can use such as
> SupportsOpenGL which will make sure it supports what is needed for that
> backend.
> If you are looking for extending VTK with new rendering techniques then you
> can use glew which is built into VTK to test for features.
> If you are looking for GPU memory limits we do not have a class that does
> that, but OpenGL does have methods for querying limits that may work. I
> believe the GPU volume renderer makes use of them.

Excellent, thanks for the info.

In the past, one culprit we've seen on weaker Intel graphics (and also
e.g. when trying to use the program through VirtualGL/TurboVNC I
think) is the lack of GL_EXT_geometry_shader4 extension.

I don't have access to either two of those at the moment. Do you know
off hand if SupportsOpenGL() would catch something like that? Or would
I get the failure printed by VTK before even getting to the
SupportsOpenGL() call? (e.g. upon construction of the render window)


> On Wed, May 10, 2017 at 8:17 AM, Elvis Stansvik
> <elvis.stansvik at orexplore.com> wrote:
>> Hi all,
>> I'd like our application to do detection of OpenGL capabilities, to
>> make sure the capabilities are sufficient for what we're using VTK for
>> (volume rendering with vtkGPUVolumeRayCastMapper, OpenGL2 backend +
>> some charts stuff with vtkChartXY, in the future maybe other things).
>> Is there any provisions in VTK itself for doing OpenGL feature
>> detection (maybe conditioned on the parts of VTK that is to be used)?
>> I guess I could always dig into the VTK source myself, to deduce what
>> features are needed, and probe for that manually somehow, but it feels
>> a bit brittle. It would be better if VTK itself could report
>> insufficient OpenGL support in way that I can intercept, to show a
>> meaningful error message.
>> Anyone been in the same situation? I found this Slicer bug
>>    http://na-mic.org/Mantis/view.php?id=4252
>> where in the comments the developers are also discussing the
>> possibilities of detecting OpenGL capabilities.
>> Thanks,
>> Elvis
>> _______________________________________________
>> Powered by www.kitware.com
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
> --
> Ken Martin PhD
> Distinguished Engineer
> Kitware Inc.
> 28 Corporate Drive
> Clifton Park NY 12065
> This communication, including all attachments, contains confidential and
> legally privileged information, and it is intended only for the use of the
> addressee.  Access to this email by anyone else is unauthorized. If you are
> not the intended recipient, any disclosure, copying, distribution or any
> action taken in reliance on it is prohibited and may be unlawful. If you
> received this communication in error please notify us immediately and
> destroy the original message.  Thank you.

More information about the vtkusers mailing list