<div dir="ltr">For now, try doing this:<div><span style="font-size:12.8px">  auto surfaceFormat = QVTKOpenGLWidget::</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">defaultFormat()</span><br></div><div><span style="font-size:12.8px">  </span><span style="font-size:12.8px">surfaceFormat.setSamples(0);</span></div><div><span style="font-size:12.8px"><b>  surfaceFormat.setAlphaBufferSIze(0);</b></span></div><div><div><span style="font-size:12.8px">  QSurfaceFormat::</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">setDefaultFormat</span><span style="font-size:12.8px">(surfaceFormat);</span><br></div></div><div><span style="font-size:12.8px"><br></span></div><div><br></div><div><span style="font-size:12.8px">Utkarsh</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 18, 2017 at 8:57 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">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>
                                                    selectionColor.greenF(),<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 <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></blockquote></div><br></div>