black mesh (software rendering issue)
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 316
- Avg merge
- 7h 44m
- Merged PRs (30d)
- 5
Description
Hello, people!
First of all, thank you for the great work! We use mayavi in our software and it's very useful :)
Second, about the issue. On some machines without 3D acceleration (or with minor OpenGL support i.e. on Intel integrated cards) we have found a bug: mesh (or StructuredGrid) with assigned data and colormap is colored black.
Seems like this bug was previously described in this mail-list post: https://mail.enthought.com/pipermail/enthought-dev/2009-January/019453.html
I was wondering why before turning black it appears colored for a second and decided to debug the scene building process.
While debugging, I found that it turns black after this bunch of code in tvtk/pyface/ui/qt4/scene.py:
``` python
if scene.light_manager is None:
scene.light_manager = light_manager.LightManager(scene)
renwin = scene._renwin
renwin.update_traits()
vtk_rw = tvtk.to_vtk(renwin)
renwin.add_observer('StartEvent', messenger.send)
messenger.connect(vtk_rw, 'StartEvent', self._start_event_callback)
renwin.add_observer('EndEvent', messenger.send)
messenger.connect(vtk_rw, 'EndEvent', self._end_event_callback)
self.created = True
```
If you comment/delete this lines everything starts working right, with and without opengl acceleration.
I'm not sure that this fix is the right way to do it but it works like a charm in my case.
I hope that this information will be useful and'll look forward for your comments about this issue :)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.