[vtkusers] opengl2 vtk rendering back end and Qt

Alexandre Boucher afboucher at gmail.com
Tue Dec 20 20:17:41 EST 2016


Sorry,   This is on Windows 10, NVIDIA GTX 1080 (but tried with a few older
NVIDIA card).

I have been looking at it in more details today without success.  The
QSurfaceFormat approach  mentioned above did not work.

 I tried to isolate the issue in a stand alone code but could not reproduce
the depth issue.  The closest I have been in isolating the problem is by
not setting the look up table to the mapper, in that case the imageData is
displayed correctly (no depth issue).

without these two lines, I do not have depth issue.
mapper->SetScalarRange(cmap_->lower_bound(), cmap_->upper_bound());
mapper->SetLookupTable(cmap_->color_table());

I'll further dig into that and let you know if I get closer to any
solution.  That same code is working fine on opengl1 backend.

Thank you all for the help


On Tue, Dec 20, 2016 at 5:42 PM, Marcus D. Hanwell <
marcus.hanwell at kitware.com> wrote:

> On Tue, Dec 20, 2016 at 12:47 AM, Alexandre Boucher <afboucher at gmail.com>
> wrote:
> >
> > 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?
> >
> You don't mention what OS/graphics card you are using. I have been
> tracking a problem with OpenGL2 and Mesa/Intel DRI driver (based on
> Mesa) with Qt 5. It looks just like this, no working depth buffer. I
> proposed a patch that made it work, but it made the NVIDIA-based Linux
> systems segfault.
>
> I am hoping that we can come up with something that will work on both,
> but I haven't had time to revisit it since I looked at it in November.
> I can dig up the merge request if this sounds like your set up.
>
> Marcus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161220/05803e6e/attachment.html>


More information about the vtkusers mailing list