"Persistence" switch is a crash-me button on most machines
|Assignee:||Johnathan Corgan||% Done:|
The 'Persistence' option that comes with most wxgui-sinks rarely works, and always produces crashes if it doesn't.
#1 Updated by Sylvain Munaut almost 2 years ago
- File 0001-gr-wxgui-plotter_base-Remove-unused-code.patch added
- File 0002-gr-wxgui-plotter_base-Improve-formatting.patch added
- File 0003-gr-wxgui-plotter_base-Implement-persistence-without-.patch added
Here's a small patch series:
The first two are just 'cosmetic', fixing mix of tab and space indentation in the file, removing dead code and white space fixes.
The third one implements the persistence without using the accumulation buffer, purely with alpha blending (which should be supported on all platforms). It doesn't have the same 'visual' effect as the glAccum method however and so tt has pros and cons vs the old method.
On the pro side, it should work everywhere. It also makes the floating tooltip (with frequency/power/infos) more readable.
On the con side, it also accumulates the text antialiasing which makes it appear 'bold' when persistence is active.
The ideal method would use render to buffer object and shaders and co, but that's a whole lot more complicated :p
#2 Updated by Johnathan Corgan almost 2 years ago
- Status changed from New to Resolved
- Assignee set to Johnathan Corgan
- Target version changed from release-3.6.3 to release-3.6.4
- Resolution set to fixed
The formatting patches were applied to 3.6.3 maint, then merged up to master and next. The alpha blending patch was applied to master and merged up to next.
The new behavior isn't ideal, but at least it will work for everyone. If there's a way not to impact the tooltip display that would be great.
#3 Updated by Sylvain Munaut almost 2 years ago
Yes, it would be better if somehow the effect was applied only on the dynamic portion and not to the text and tooltip and things like that.
Unfortunately, both the glAccum method and the 'alpha blending fading' method I used act on the whole OpenGL buffer ...
The "correct" way to do it, would be to not handle persistence in plotter_base (because at that level you have no idea what should be persistent and what shouldn't), but to let the individual draw functions of the subclasses handle that. The problem is that I can't see any "easy" way to do it. It would involve render to offscreen texture, then draw the result as a textured quad.