[vtkusers] Z buffer issue of QVTKWidget in Linux
Elvis Stansvik
elvis.stansvik at orexplore.com
Wed Sep 7 14:32:12 EDT 2016
2016-09-07 18:08 GMT+02:00 Hongzhi Lan <hongzhi at stanford.edu>:
> Hi Elvis,
>
>
> I tried your fix and it works!! Thank you so much!
>
No problem, glad it helped.
Elvis
>
> Hongzhi
> ------------------------------
> *From:* Elvis Stansvik <elvis.stansvik at orexplore.com>
> *Sent:* Saturday, September 3, 2016 11:59:09 PM
> *To:* Hongzhi Lan
> *Cc:* vtkusers at vtk.org
> *Subject:* Re: [vtkusers] Z buffer issue of QVTKWidget in Linux
>
> 2016-09-02 20:46 GMT+02:00 Hongzhi Lan <hongzhi at stanford.edu>:
>
>> Hi all,
>>
>>
>> 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 http://www.vtk.org/Wiki/VTK/Examples/Cxx 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.
>>
>>
>> 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?
>>
> Hi Hongzhi,
>
> I have the following in my QVTKWidget subclass to get around this issue:
>
> QSurfaceFormat surfaceFormat = windowHandle()->format();
> surfaceFormat.setStencilBufferSize(8);
> windowHandle()->setFormat(surfaceFormat);
>
> Hope that works out for you too.
>
> Elvis
>
>>
>> My computer configurations are:
>>
>> ----------------------------------------------
>>
>> Dell desktop OptiPlex 7040
>>
>> CPU: Intel® Core™ i7-6700 CPU @ 3.40GHz × 8
>>
>> Graphics: Intel® HD Graphics 530 (Skylake GT2)
>>
>> OS: Linux Ubuntu 14.04.5 64bit
>>
>> VTK: 6.2
>>
>> Qt: 5.4.2
>>
>>
>>
>> Thanks a lot!
>>
>> Hongzhi
>>
>>
>> ===========================
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx,
>> line 139
>> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 126
>> vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line
>> 118
>> vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 192
>> vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors
>> detected
>> 0 : (1280) Invalid enum
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx,
>> line 646
>> vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRepresentationPainter.cxx,
>> line 128
>> vtkOpenGLRepresentationPainter (0x1d9d0b0): failed after RenderInternal 1
>> OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx,
>> line 188
>> vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1
>> OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
>> line 575
>> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1
>> OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
>> line 1135
>> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 282
>> vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx,
>> line 154
>> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx,
>> line 139
>> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 126
>> vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line
>> 118
>> vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 192
>> vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors
>> detected
>> 0 : (1280) Invalid enum
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx,
>> line 646
>> vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx,
>> line 188
>> vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1
>> OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
>> line 575
>> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1
>> OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
>> line 1135
>> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 282
>> vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx,
>> line 154
>> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx,
>> line 139
>> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 126
>> vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line
>> 118
>> vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 192
>> vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors
>> detected
>> 0 : (1280) Invalid enum
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx,
>> line 646
>> vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx,
>> line 188
>> vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1
>> OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
>> line 575
>> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1
>> OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
>> line 1135
>> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 282
>> vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx,
>> line 154
>> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx,
>> line 139
>> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PushState 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 126
>> vtkOpenGLRenderer (0x1d9fed0): failed ater ClearLights 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLLight.cxx, line
>> 118
>> vtkOpenGLLight (0x1d949e0): failed after Render 1 OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 192
>> vtkOpenGLRenderer (0x1d9fed0): failed after UpdateLights 1 OpenGL errors
>> detected
>> 0 : (1280) Invalid enum
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLProperty.cxx,
>> line 646
>> vtkOpenGLProperty (0x1d94b30): failed after Render 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx,
>> line 188
>> vtkOpenGLDisplayListPainter (0x1d9bee0): failed after RenderInternal 1
>> OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
>> line 575
>> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after RenderPolygon 1
>> OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
>> line 1135
>> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after Render 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
>> line 282
>> vtkOpenGLRenderer (0x1d9fed0): failed after DeviceRender 1 OpenGL errors
>> detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkGenericOpenGLRenderWindow.cxx,
>> line 154
>> vtkGenericOpenGLRenderWindow (0x1f0bd30): failed after PopState 1 OpenGL
>> errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> Generic Warning: In .../SourceCode/VTK/Rendering/O
>> penGL/vtkOpenGLDisplayListPainter.cxx, line 52
>> failed after ReleaseAllLists 1 OpenGL errors detected
>> 0 : (1282) Invalid operation
>>
>>
>> ERROR: In .../SourceCode/VTK/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
>> line 127
>> vtkOpenGLImageSliceMapper (0x1da2ba0): failed after
>> ReleaseGraphicsResources 1 OpenGL errors detected
>> 0 : (1280) Invalid enum
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160907/644f7bc7/attachment.html>
More information about the vtkusers
mailing list