<div dir="ltr">Looks like depth testing isn't working. Does your context have a depth buffer?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 20, 2016 at 1:50 AM, Róbert Špir <span dir="ltr"><<a href="mailto:spir.robert@gmail.com" target="_blank">spir.robert@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="SK" link="#0563C1" vlink="#954F72"><div class="m_-1977977187114779772WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I think you need to set stencil buffer size using these calls<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">QSurfaceFormat surfaceFormat = ui->qvtkWidget->windowHandle()<wbr>->format();<u></u><u></u></span></p><p class="MsoNormal"><a name="m_-1977977187114779772_mainwindow.cpp-16"></a><a name="m_-1977977187114779772_mainwindow.cpp-17"></a><span style="font-size:10.0pt;font-family:"Courier New"">surfaceFormat.<wbr>setStencilBufferSize(8);<u></u><u></u></span></p><p class="MsoNormal"><a name="m_-1977977187114779772_mainwindow.cpp-18"></a><span style="font-size:10.0pt;font-family:"Courier New"">ui->qvtkWidget->windowHandle()<wbr>->setFormat(surfaceFormat);<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Robert<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> vtkusers [mailto:<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.<wbr>org</a>] <b>On Behalf Of </b>Alexandre Boucher<br><b>Sent:</b> Tuesday, December 20, 2016 6:48 AM<br><b>To:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br><b>Subject:</b> [vtkusers] opengl2 vtk rendering back end and Qt<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hi All,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I am having a problem using the opengl2 backend with QVTKWidget (I tried Qt 5.4 to 5.7 and vtk 7.0 and 7.1). When looking at a simple vtkImageData for instance some of the faces of the grid are not properly displayed, see image below. Everything works fine with the opengl1 backend.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I also try using QVTKWidget2, but I am getting a crash when the widget call OpenGLInitState().<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Is there a trick to use Qt and opengl2?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><img width="527" height="440" style="width:5.4895in;height:4.5833in" id="m_-1977977187114779772_x0000_i1025" src="cid:image001.png@01D25A95.CBC8FF20" alt="Inline image 1"><u></u><u></u></p></div></div></div></div></div></div><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>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>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/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>