<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Elvis,</p>
<p><br>
</p>
<p>I tried your fix and it works!! Thank you so much!</p>
<p><br>
</p>
<p>Hongzhi</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Elvis Stansvik <elvis.stansvik@orexplore.com><br>
<b>Sent:</b> Saturday, September 3, 2016 11:59:09 PM<br>
<b>To:</b> Hongzhi Lan<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] Z buffer issue of QVTKWidget in Linux</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">2016-09-02 20:46 GMT+02:00 Hongzhi Lan <span dir="ltr"><<a href="mailto:hongzhi@stanford.edu" target="_blank">hongzhi@stanford.edu</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:calibri,arial,helvetica,sans-serif">
<p></p>
<div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:calibri,arial,helvetica,sans-serif">
<p></p>
<div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:calibri,arial,helvetica,sans-serif">
<p>Hi all,</p>
<p><br>
</p>
<p>Recently I have an issue with QVTKWidget in my new dell computer. It didn't happen in any of my other computers. I think it's a z buffer issue? I combined two examples from <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx" target="_blank">http://www.vtk.<wbr>org/Wiki/VTK/Examples/Cxx</a> to
reproduce the issue (see the attached image). The image slice is supposed to insert into the sphere but it doesn't render in this way in my case. The sphere looks not ok either. I know someone mentioned this issue before, but it's not solved yet, so I hope
to get some help about it. </p>
<p><br>
<span style="font-family:calibri,arial,helvetica,sans-serif;font-size:16px">I also tried to use QVTKWidget2 and was able to compile successfully, but when I ran it, I got the error below and a black renderwindow. I really want to get QVTKWidget or QVTKWidget
work for my case. Any suggestions?</span></p>
</div>
</div>
</div>
</div>
</blockquote>
<div>Hi Hongzhi,<br>
<br>
</div>
<div>I have the following in my QVTKWidget subclass to get around this issue:<br>
<br>
QSurfaceFormat surfaceFormat = windowHandle()->format();<br>
surfaceFormat.<wbr>setStencilBufferSize(8);<br>
windowHandle()->setFormat(<wbr>surfaceFormat);<br>
<br>
</div>
<div>Hope that works out for you too.<br>
<br>
</div>
<div>Elvis<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:calibri,arial,helvetica,sans-serif">
<div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:calibri,arial,helvetica,sans-serif">
<div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:calibri,arial,helvetica,sans-serif">
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">My computer configurations are:</span></p>
<p><span style="font-size:12pt">------------------------------<wbr>----------------</span></p>
<p><span style="font-size:12pt">Dell desktop OptiPlex 7040</span><br>
</p>
<p><span style="font-size:12pt">CPU: <span>Intel® Core™ i7-6700 CPU @ 3.40GHz × 8 </span></span></p>
<p><span style="font-size:12pt">Graphics: <span>Intel® HD Graphics 530 (Skylake GT2) </span></span></p>
<p><span style="font-size:12pt"><span>OS: Linux Ubuntu 14.04.5 64bit</span></span></p>
<p><span style="font-size:12pt"><span>VTK: 6.2</span></span></p>
<p><span style="font-size:12pt"><span>Qt: 5.4.2</span></span></p>
<p><span style="font-size:12pt"><span><br>
</span></span></p>
<p><br>
</p>
<p><span style="font-size:12pt"><span>Thanks a lot!</span></span></p>
<p><span style="font-size:12pt"><span>Hongzhi</span></span></p>
<p><span style="font-size:12pt"><span><br>
</span></span></p>
<p><span style="font-size:12pt"><span></span></span></p>
<div>===========================</div>
<div> </div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkGenericOpenGLRenderWindow.<wbr>cxx, line 139</div>
<div>vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 126</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLLight.cxx, line 118</div>
<div>vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 192</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected</div>
<div> 0 : (1280) Invalid enum</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLProperty.cxx, line 646</div>
<div>vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLRepresentationPainter<wbr>.cxx, line 128</div>
<div>vtkOpenGLRepresentationPainter (0x1d9d0b0): failed after RenderInternal 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLDisplayListPainter.<wbr>cxx, line 188</div>
<div>vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLImageSliceMapper.cxx, line 575</div>
<div>vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLImageSliceMapper.cxx, line 1135</div>
<div>vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 282</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkGenericOpenGLRenderWindow.<wbr>cxx, line 154</div>
<div>vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkGenericOpenGLRenderWindow.<wbr>cxx, line 139</div>
<div>vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 126</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLLight.cxx, line 118</div>
<div>vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 192</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected</div>
<div> 0 : (1280) Invalid enum</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLProperty.cxx, line 646</div>
<div>vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLDisplayListPainter.<wbr>cxx, line 188</div>
<div>vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLImageSliceMapper.cxx, line 575</div>
<div>vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLImageSliceMapper.cxx, line 1135</div>
<div>vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 282</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkGenericOpenGLRenderWindow.<wbr>cxx, line 154</div>
<div>vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkGenericOpenGLRenderWindow.<wbr>cxx, line 139</div>
<div>vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 126</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLLight.cxx, line 118</div>
<div>vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 192</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected</div>
<div> 0 : (1280) Invalid enum</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLProperty.cxx, line 646</div>
<div>vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLDisplayListPainter.<wbr>cxx, line 188</div>
<div>vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLImageSliceMapper.cxx, line 575</div>
<div>vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLImageSliceMapper.cxx, line 1135</div>
<div>vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 282</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkGenericOpenGLRenderWindow.<wbr>cxx, line 154</div>
<div>vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkGenericOpenGLRenderWindow.<wbr>cxx, line 139</div>
<div>vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 126</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLLight.cxx, line 118</div>
<div>vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 192</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors detected</div>
<div> 0 : (1280) Invalid enum</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLProperty.cxx, line 646</div>
<div>vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLDisplayListPainter.<wbr>cxx, line 188</div>
<div>vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLImageSliceMapper.cxx, line 575</div>
<div>vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLImageSliceMapper.cxx, line 1135</div>
<div>vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/vtkOpenGLRenderer.cxx, line 282</div>
<div>vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkGenericOpenGLRenderWindow.<wbr>cxx, line 154</div>
<div>vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>Generic Warning: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLDisplayListPainter.<wbr>cxx, line 52</div>
<div>failed after ReleaseAllLists 1 OpenGL errors detected</div>
<div> 0 : (1282) Invalid operation</div>
<div><br>
</div>
<div><br>
</div>
<div>ERROR: In .../SourceCode/VTK/Rendering/<wbr>OpenGL/<wbr>vtkOpenGLImageSliceMapper.cxx, line 127</div>
<div>vtkOpenGLImageSliceMapper (0x1da2ba0): failed after ReleaseGraphicsResources 1 OpenGL errors detected</div>
<div> 0 : (1280) Invalid enum</div>
<br>
<p></p>
<br>
</div>
<p></p>
</div>
<p></p>
</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>
</div>
</div>
</body>
</html>