Closed wmvanvliet closed 4 years ago
Merging #286 into master will increase coverage by
0.17%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #286 +/- ##
==========================================
+ Coverage 74.52% 74.69% +0.17%
==========================================
Files 7 7
Lines 2575 2577 +2
Branches 512 513 +1
==========================================
+ Hits 1919 1925 +6
+ Misses 480 477 -3
+ Partials 176 175 -1
I don't know where the QOpenGLWidget/QGLWidget confusion comes from, but in my case, it needs to be QGLWidget, otherwise everything crashes.
And so to fix the bug we need:
Mayavi
bug (PR forthcoming?)Is this correct?
don't know where the QOpenGLWidget/QGLWidget confusion comes from
IIRC it's older versus newer PyQt5 versions
I think so!
Okay let's go ahead and merge this. Can you tag me in the Mayavi PR when you make it? I'd like to follow
Thanks for the awesome investigation @wmvanvliet !
A PR is not so simple. QGLWidget
is deprecated, so we should be using QOpenGLWidget
, but that is crashing and I'm out of my depth trying to debug this. I've raised the issue in the mayavi repo: https://github.com/enthought/mayavi/issues/969
Ok. More digging and potential solutions.
An undocumented workaround for various rendering bugs in some graphics drivers is to hack your local
site-packages/vtkmodules/qt/__init__.py
file and make this change:Code relying on
vtkmodules
, such as Mayavi and pyvista, will check theQVTKRWIBase
variable and try to do the right thing accordingly. Unfortunately, for some reason, it decided to do this:I don't know where the
QOpenGLWidget
/QGLWidget
confusion comes from, but in my case, it needs to beQGLWidget
, otherwise everything crashes. Removing this try/catch construction and just importingQGLWidget
fixes this at my end.This gets me up to this point:
Depth ordering bugs are fixed! And now I face the a similar rendering bug as @filip-halemba reported in #284. Sadly, turning on backface culling on the overlay surface had no effect for me. However, turning on
force_opaque
did work! See changes in this PR.Perfection at last!
EDIT:
Closes #284