<div dir="ltr">Awesome! Good catch!</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 25, 2016 at 8:04 AM, Matthias Blaicher <span dir="ltr"><<a href="mailto:matthias@blaicher.com" target="_blank">matthias@blaicher.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok I solved it!<br>
<br>
QVTKRenderWindowInteractor exists in VTK and in tvtk<br>
supplied by Mayavi. The tvtk is a bit nicer, but has a bug:<br>
<br>
The tvtk.QVTKRenderWindowInteractor._get_win_id() [1] gets a<br>
sip.voidpointer and casts it to str, which will result in a string like<br>
"<sip.voidptr object at ...>" and not an string with an integer as<br>
expected. Casting it to int and then to str as the VTK version does<br>
makes everything work...<br>
<br>
That was rather tricky to find....<br>
<br>
Very best,<br>
Matthias<br>
<br>
<br>
[1]<br>
<a href="https://github.com/enthought/mayavi/blob/master/tvtk/pyface/ui/qt4/QVTKRenderWindowInteractor.py#L269" rel="noreferrer" target="_blank">https://github.com/enthought/mayavi/blob/master/tvtk/pyface/ui/qt4/QVTKRenderWindowInteractor.py#L269</a><br>
<br>
[2]<br>
<a href="https://gitlab.kitware.com/vtk/vtk/blob/master/Wrapping/Python/vtk/qt/QVTKRenderWindowInteractor.py#L267" rel="noreferrer" target="_blank">https://gitlab.kitware.com/vtk/vtk/blob/master/Wrapping/Python/vtk/qt/QVTKRenderWindowInteractor.py#L267</a><br>
<br>
<br>
On 02/25/2016 01:00 PM, Matthias Blaicher wrote:<br>
> Hi all,<br>
><br>
> as a further data point, I can reproduce my original error message with<br>
> the tvtk QVTKRenderWindowInteractor, just be running the<br>
> QVTKRenderWidgetConeExample. [1]<br>
><br>
> Just from a brief glance, I do not see anything obviously wrong with<br>
> that code and it uses vtk.vtkRenderWindow just as the Qt example on the<br>
> vtk wiki [2].<br>
><br>
> The error occurs in the call to Initialize() in line 509, which is<br>
> forwarded vtk.vtkGenericRenderWindowInteractor.Initialize()<br>
><br>
> Does that help?<br>
><br>
> Very best,<br>
> Matthias<br>
><br>
> [1]<br>
> <a href="https://github.com/enthought/mayavi/blob/master/tvtk/pyface/ui/qt4/QVTKRenderWindowInteractor.py" rel="noreferrer" target="_blank">https://github.com/enthought/mayavi/blob/master/tvtk/pyface/ui/qt4/QVTKRenderWindowInteractor.py</a><br>
><br>
> [2] <a href="http://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt</a><br>
><br>
> On 02/25/2016 11:32 AM, Matthias Blaicher wrote:<br>
>> Hi Ken,<br>
>><br>
>> I've just built the most recent master branch (ae38393d) and I still<br>
>> have troubles. A basic pure VTK python example such as the Cylinder [1]<br>
>> works, but mayavi still fails with the error message shown in the<br>
>> previous mail.<br>
>><br>
>> I know that python 3 mayavi is still experimental, but it works<br>
>> flawlessly under Linux. Also, since mayavi has so many abstraction<br>
>> layers I fail to follow the path which actually leads to constructing a<br>
>> vtk widget. Any ideas how I should precede?<br>
>><br>
>> Best,<br>
>> Matthias<br>
>><br>
>> [1] <a href="http://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder</a><br>
>><br>
>> On 02/24/2016 09:39 PM, Ken Martin wrote:<br>
>>> Did vtk master end up solving your issues on the intel 2500? Just want<br>
>>> to see if the recent changes fixed that because I think the 2500 should<br>
>>> work.<br>
>>><br>
>>> Thanks<br>
>>> Ken<br>
>>><br>
>>> On Mon, Feb 22, 2016 at 10:04 PM, Ken Martin <<a href="mailto:ken.martin@kitware.com">ken.martin@kitware.com</a><br>
>>> <mailto:<a href="mailto:ken.martin@kitware.com">ken.martin@kitware.com</a>>> wrote:<br>
>>><br>
>>> Ahh I just saw your screenshots indicating Intel 2500. Maybe the<br>
>>> master changes will work on that. I believe we have been having some<br>
>>> hiccups with the older intel GPUs. I'd like to get them iron out.<br>
>>><br>
>>> Ken<br>
>>><br>
>>> On Mon, Feb 22, 2016 at 9:59 PM, Ken Martin <<a href="mailto:ken.martin@kitware.com">ken.martin@kitware.com</a><br>
>>> <mailto:<a href="mailto:ken.martin@kitware.com">ken.martin@kitware.com</a>>> wrote:<br>
>>><br>
>>> If your card supports OpenGL 4 then I would think it would also<br>
>>> provide a 3.2 context. I'm not aware of cards that support 4.0<br>
>>> but would not return a 3.2 context when requested. If you check<br>
>>> out and build VTK master you could try running<br>
>>><br>
>>> ctest -R VBOPLY -VV<br>
>>><br>
>>> and<br>
>>><br>
>>> ctest -R Apple -VV<br>
>>><br>
>>> the output of those two tests can be helpful in debugging these<br>
>>> issues. Also maybe your system has two GPUs? Like intel on chip<br>
>>> plus a dedicated GPU and somehow you are not getting the<br>
>>> dedicated GPU maybe? Just some ideas.<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> On Mon, Feb 22, 2016 at 3:03 PM, David Gobbi<br>
>>> <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a> <mailto:<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>>> wrote:<br>
>>><br>
>>> If you get the master branch, it includes this patch which<br>
>>> might be related:<br>
>>> <a href="https://gitlab.kitware.com/vtk/vtk/commit/8d0daf13" rel="noreferrer" target="_blank">https://gitlab.kitware.com/vtk/vtk/commit/8d0daf13</a><br>
>>><br>
>>> On Mon, Feb 22, 2016 at 12:33 PM, Matthias Blaicher<br>
>>> <<a href="mailto:matthias@blaicher.com">matthias@blaicher.com</a> <mailto:<a href="mailto:matthias@blaicher.com">matthias@blaicher.com</a>>> wrote:<br>
>>><br>
>>> Hi David,<br>
>>><br>
>>> I guess you are right, it looks like this is the issue.<br>
>>> According to<br>
>>> OpenGL Extensions Viewer, the card exposes OpenGL 4.<br>
>>><br>
>>> If I understood it correctly, the problem seems to be<br>
>>> that gpu_shader4<br>
>>> is not exposed in the 2.1 context. And 3.2 is tested but<br>
>>> fails (have to<br>
>>> check that for my card).<br>
>>><br>
>>> Is there any patch, which would try a 3.1 context too?<br>
>>> I've seen some<br>
>>> commits in master (e.g. ca65662fa "Merge topic<br>
>>> 'try_more_recent_opengl_add_getversion'"). I'll give the<br>
>>> master branch a<br>
>>> spin and report back.<br>
>>><br>
>>> Best,<br>
>>><br>
>>> Matthias<br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" rel="noreferrer" target="_blank">http://www.kitware.com</a>><br>
>>><br>
>>> Visit other Kitware open-source projects at<br>
>>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>><br>
>>> Please keep messages on-topic and check the VTK FAQ at:<br>
>>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>>><br>
>>> Search the list archives at:<br>
>>> <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
>>><br>
>>> Follow this link to subscribe/unsubscribe:<br>
>>> <a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Ken Martin PhD<br>
>>> Chairman & CFO<br>
>>> Kitware Inc.<br>
>>> 28 Corporate Drive<br>
>>> Clifton Park NY 12065<br>
>>> <a href="tel:518%20371%203971" value="+15183713971">518 371 3971</a> <tel:518%20371%203971><br>
>>><br>
>>> This communication, including all attachments, contains<br>
>>> confidential and legally privileged information, and it is<br>
>>> intended only for the use of the addressee. Access to this<br>
>>> email by anyone else is unauthorized. If you are not the<br>
>>> intended recipient, any disclosure, copying, distribution or any<br>
>>> action taken in reliance on it is prohibited and may be<br>
>>> unlawful. If you received this communication in error please<br>
>>> notify us immediately and destroy the original message. Thank you.<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Ken Martin PhD<br>
>>> Chairman & CFO<br>
>>> Kitware Inc.<br>
>>> 28 Corporate Drive<br>
>>> Clifton Park NY 12065<br>
>>> <a href="tel:518%20371%203971" value="+15183713971">518 371 3971</a> <tel:518%20371%203971><br>
>>><br>
>>> This communication, including all attachments, contains confidential<br>
>>> and legally privileged information, and it is intended only for the<br>
>>> use of the addressee. Access to this email by anyone else is<br>
>>> unauthorized. If you are not the intended recipient, any disclosure,<br>
>>> copying, distribution or any action taken in reliance on it is<br>
>>> prohibited and may be unlawful. If you received this communication<br>
>>> in error please notify us immediately and destroy the original<br>
>>> message. Thank you.<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Ken Martin PhD<br>
>>> Chairman & CFO<br>
>>> Kitware Inc.<br>
>>> 28 Corporate Drive<br>
>>> Clifton Park NY 12065<br>
>>> 518 371 3971<br>
>>><br>
>>> This communication, including all attachments, contains confidential and<br>
>>> legally privileged information, and it is intended only for the use of<br>
>>> the addressee. Access to this email by anyone else is unauthorized. If<br>
>>> you are not the intended recipient, any disclosure, copying,<br>
>>> distribution or any action taken in reliance on it is prohibited and may<br>
>>> be unlawful. If you received this communication in error please notify<br>
>>> us immediately and destroy the original message. Thank you.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Ken Martin PhD<div>Chairman & CFO<br>Kitware Inc.<br>28 Corporate Drive<br>Clifton Park NY 12065<br>518 371 3971<div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">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.</span></div></div></div>
</div>