[vtkusers] OpenGL fails to initialize for Windows 7, VTK 7.0 - solved

Ken Martin ken.martin at kitware.com
Thu Feb 25 08:10:10 EST 2016


Awesome!  Good catch!

On Thu, Feb 25, 2016 at 8:04 AM, Matthias Blaicher <matthias at blaicher.com>
wrote:

> Ok I solved it!
>
> QVTKRenderWindowInteractor exists in VTK and in tvtk
> supplied by Mayavi. The tvtk is a bit nicer, but has a bug:
>
> The tvtk.QVTKRenderWindowInteractor._get_win_id() [1] gets a
> sip.voidpointer and casts it to str, which will result in a string like
> "<sip.voidptr object at ...>" and not an string with an integer as
> expected. Casting it to int and then to str as the VTK version does
> makes everything work...
>
> That was rather tricky to find....
>
> Very best,
> Matthias
>
>
> [1]
>
> https://github.com/enthought/mayavi/blob/master/tvtk/pyface/ui/qt4/QVTKRenderWindowInteractor.py#L269
>
> [2]
>
> https://gitlab.kitware.com/vtk/vtk/blob/master/Wrapping/Python/vtk/qt/QVTKRenderWindowInteractor.py#L267
>
>
> On 02/25/2016 01:00 PM, Matthias Blaicher wrote:
> > Hi all,
> >
> > as a further data point, I can reproduce my original error message with
> > the tvtk QVTKRenderWindowInteractor, just be running the
> > QVTKRenderWidgetConeExample. [1]
> >
> > Just from a brief glance, I do not see anything obviously wrong with
> > that code and it uses vtk.vtkRenderWindow just as the Qt example on the
> > vtk wiki [2].
> >
> > The error occurs in the call to Initialize() in line 509, which is
> > forwarded vtk.vtkGenericRenderWindowInteractor.Initialize()
> >
> > Does that help?
> >
> > Very best,
> > Matthias
> >
> > [1]
> >
> https://github.com/enthought/mayavi/blob/master/tvtk/pyface/ui/qt4/QVTKRenderWindowInteractor.py
> >
> > [2] http://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt
> >
> > On 02/25/2016 11:32 AM, Matthias Blaicher wrote:
> >> Hi Ken,
> >>
> >> I've just built the most recent master branch (ae38393d) and I still
> >> have troubles. A basic pure VTK python example such as the Cylinder [1]
> >> works, but mayavi still fails with the error message shown in the
> >> previous mail.
> >>
> >> I know that python 3 mayavi is still experimental, but it works
> >> flawlessly under Linux. Also, since mayavi has so many abstraction
> >> layers I fail to follow the path which actually leads to constructing a
> >> vtk widget. Any ideas how I should precede?
> >>
> >> Best,
> >> Matthias
> >>
> >> [1] http://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder
> >>
> >> On 02/24/2016 09:39 PM, Ken Martin wrote:
> >>> Did vtk master end up solving your issues on the intel 2500? Just want
> >>> to see if the recent changes fixed that because I think the 2500 should
> >>> work.
> >>>
> >>> Thanks
> >>> Ken
> >>>
> >>> On Mon, Feb 22, 2016 at 10:04 PM, Ken Martin <ken.martin at kitware.com
> >>> <mailto:ken.martin at kitware.com>> wrote:
> >>>
> >>>     Ahh I just saw your screenshots indicating Intel 2500. Maybe the
> >>>     master changes will work on that. I believe we have been having
> some
> >>>     hiccups with the older intel GPUs. I'd like to get them iron out.
> >>>
> >>>     Ken
> >>>
> >>>     On Mon, Feb 22, 2016 at 9:59 PM, Ken Martin <
> ken.martin at kitware.com
> >>>     <mailto:ken.martin at kitware.com>> wrote:
> >>>
> >>>         If your card supports OpenGL 4 then I would think it would also
> >>>         provide a 3.2 context. I'm not aware of cards that support 4.0
> >>>         but would not return a 3.2 context when requested. If you check
> >>>         out and build VTK master you could try running
> >>>
> >>>         ctest -R VBOPLY -VV
> >>>
> >>>         and
> >>>
> >>>         ctest -R Apple -VV
> >>>
> >>>         the output of those two tests can be helpful in debugging these
> >>>         issues.  Also maybe your system has two GPUs? Like intel on
> chip
> >>>         plus a dedicated GPU and somehow you are not getting the
> >>>         dedicated GPU maybe?  Just some ideas.
> >>>
> >>>
> >>>
> >>>
> >>>         On Mon, Feb 22, 2016 at 3:03 PM, David Gobbi
> >>>         <david.gobbi at gmail.com <mailto:david.gobbi at gmail.com>> wrote:
> >>>
> >>>             If you get the master branch, it includes this patch which
> >>>             might be related:
> >>>             https://gitlab.kitware.com/vtk/vtk/commit/8d0daf13
> >>>
> >>>             On Mon, Feb 22, 2016 at 12:33 PM, Matthias Blaicher
> >>>             <matthias at blaicher.com <mailto:matthias at blaicher.com>>
> wrote:
> >>>
> >>>                 Hi David,
> >>>
> >>>                 I guess you are right, it looks like this is the issue.
> >>>                 According to
> >>>                 OpenGL Extensions Viewer, the card exposes OpenGL 4.
> >>>
> >>>                 If I understood it correctly, the problem seems to be
> >>>                 that gpu_shader4
> >>>                 is not exposed in the 2.1 context. And 3.2 is tested
> but
> >>>                 fails (have to
> >>>                 check that for my card).
> >>>
> >>>                 Is there any patch, which would try a 3.1 context too?
> >>>                 I've seen some
> >>>                 commits in master (e.g. ca65662fa "Merge topic
> >>>                 'try_more_recent_opengl_add_getversion'"). I'll give
> the
> >>>                 master branch a
> >>>                 spin and report back.
> >>>
> >>>                 Best,
> >>>
> >>>                 Matthias
> >>>
> >>>
> >>>
> >>>             _______________________________________________
> >>>             Powered by www.kitware.com <http://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
> >>>         Chairman & CFO
> >>>         Kitware Inc.
> >>>         28 Corporate Drive
> >>>         Clifton Park NY 12065
> >>>         518 371 3971 <tel:518%20371%203971>
> >>>
> >>>         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.
> >>>
> >>>
> >>>
> >>>
> >>>     --
> >>>     Ken Martin PhD
> >>>     Chairman & CFO
> >>>     Kitware Inc.
> >>>     28 Corporate Drive
> >>>     Clifton Park NY 12065
> >>>     518 371 3971 <tel:518%20371%203971>
> >>>
> >>>     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.
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Ken Martin PhD
> >>> Chairman & CFO
> >>> Kitware Inc.
> >>> 28 Corporate Drive
> >>> Clifton Park NY 12065
> >>> 518 371 3971
> >>>
> >>> 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.
>



-- 
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160225/1ec70460/attachment.html>


More information about the vtkusers mailing list