<div dir="ltr">Okay. In that case, it may be best if you can put together a small example to reproduce the issue so we can debug it here.<div><br></div><div>Utkarsh</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 18, 2017 at 10:14 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">2017-05-18 15:59 GMT+02:00 Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>>:<br>
> For now, try doing this:<br>
> auto surfaceFormat = QVTKOpenGLWidget::<wbr>defaultFormat()<br>
> surfaceFormat.setSamples(0);<br>
> surfaceFormat.<wbr>setAlphaBufferSIze(0);<br>
> QSurfaceFormat::<wbr>setDefaultFormat(<wbr>surfaceFormat);<br>
<br>
</span>Thanks for the suggestion. I tried it out on the Mac, but it looks<br>
like it made no difference :/<br>
<span class="HOEnZb"><font color="#888888"><br>
Elvis<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
><br>
> Utkarsh<br>
><br>
> On Thu, May 18, 2017 at 8:57 AM, Elvis Stansvik<br>
> <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br>
>><br>
>> I'm porting our program to the new QVTKOpenGLWidget.<br>
>><br>
>> In one place, we're using a semi-transparent polygonal cube to show<br>
>> the selection of an area. We're doing volume rendering using<br>
>> vtkGPUVolumeRayCastMapper in the same renderer, and the polygonal<br>
>> selection marker is enclosing the volume in the X/Y dimensions.<br>
>><br>
>> See the attached linux_selection_correct.png for how this is supposed<br>
>> to look, and you'll understand what I mean. The light blue area is the<br>
>> selection marker.<br>
>><br>
>> This has always worked fine, but after porting from QVTKWidget to<br>
>> QVTKOpenGLWidget, the rendering looks strange on Windows (nvidia) and<br>
>> macOS (2013 MBP, intel iris). See the attached<br>
>> windows_nvidia_selection.png and macos_selection.png.<br>
>><br>
>> The selection is visualized using<br>
>><br>
>> vtkCubeSource -> vtkPolyDataMapper<br>
>><br>
>> and a vtkActor configured like this:<br>
>><br>
>> auto selectionColor = palette().color(QPalette::<wbr>Highlight);<br>
>><br>
>> m_selectionMarkerActor-><wbr>SetMapper(<wbr>selectionMarkerMapper);<br>
>> m_selectionMarkerActor-><wbr>GetProperty()->SetColor(<wbr>selectionColor.redF(),<br>
>><br>
>> selectionColor.greenF(),<br>
>><br>
>> selectionColor.blueF());<br>
>> m_selectionMarkerActor-><wbr>GetProperty()->SetOpacity(0.1)<wbr>;<br>
>> m_selectionMarkerActor-><wbr>GetProperty()->SetAmbient(1.0)<wbr>;<br>
>> m_selectionMarkerActor-><wbr>GetProperty()->SetDiffuse(0.0)<wbr>;<br>
>> m_selectionMarkerActor-><wbr>GetProperty()->SetSpecular(0.<wbr>0);<br>
>><br>
>> Any idea why the rendering looks so strange on Windows/nvidia and<br>
>> macOS/iris, respectively, when using the new widget class?<br>
>><br>
>> We're using a recent VTK from Git master.<br>
>><br>
>> We're doing the recommended<br>
>><br>
>> QSurfaceFormat::<wbr>setDefaultFormat(<wbr>QVTKOpenGLWidget::<wbr>defaultFormat());<br>
>><br>
>> to set the default surface format before QApplication construction.<br>
>><br>
>> In the particular QVTKOpenGLWidget used here, we modify the format with<br>
>><br>
>> auto surfaceFormat = format();<br>
>> surfaceFormat.setSamples(0);<br>
>> setFormat(surfaceFormat);<br>
>><br>
>> to disable multisampling.<br>
>><br>
>> Very grateful for any advise on how to solve this.<br>
>><br>
>> Cheers,<br>
>> Elvis<br>
>><br>
>> ______________________________<wbr>_________________<br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">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/<wbr>opensource/opensource.html</a><br>
>><br>
>> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
>><br>
>><br>
><br>
</div></div></blockquote></div><br></div>