[vtkusers] opengl2 vtk rendering back end and Qt

Róbert Špir spir.robert at gmail.com
Tue Dec 20 01:50:56 EST 2016


I think you need to set stencil buffer size using these calls

 

QSurfaceFormat surfaceFormat = ui->qvtkWidget->windowHandle()->format();

surfaceFormat.setStencilBufferSize(8);

ui->qvtkWidget->windowHandle()->setFormat(surfaceFormat);

 

Robert

 

From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Alexandre Boucher
Sent: Tuesday, December 20, 2016 6:48 AM
To: vtkusers at vtk.org
Subject: [vtkusers] opengl2 vtk rendering back end and Qt

 

Hi All,

 

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.

 

I also try using QVTKWidget2, but I am getting a crash when the widget call OpenGLInitState().

 

Is there a trick to use Qt and opengl2?

 

Thanks

 

 

 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161220/0974e259/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 29648 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161220/0974e259/attachment.png>


More information about the vtkusers mailing list