-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to enable backing store for plots from UVCDAT script? #1383
Comments
@cameronsmith1 I've seen something similar on another X11-based system, it seems to be X related, because this person was using the exact same version that all my other users. One way around (painful) is to type canvas.interact(), that allows the redrawing once the window is in front. @dlonie @aashish24 is there a way around this in VTK? Basically until you type "interact" the interactor is not started on some X11 configs it seems to prevent the backing store as described here. |
@dlonie I assigned you, but I'm not sure there's much we can do, it might be on the user side? |
this is indeed a GL issue. I believe there is a workaround. @dlonie do you remember? |
The vtkRenderWindow redraws itself automatically as needed in every other project I've used it in. Not sure why/how the UVCDAT implementation breaks this. I doubt it's a GL issue, since it works in other projects on my system that use the same GL. Not sure what's going on with it here. |
Unassigning myself because this is a usage issue from the VCS/Python side of things. |
I think it's X related. As I mentioned all of our users use the same version (mounted from same disk) but for some it autoredraws, for some it doesn't unless in interact mode. Could it be KDE vs Gnome? |
@cameronsmith1 we had a bunch of problems which I was certain was X11 related a while back #1134), it turned out that it was a problematic X11 config on the client, for two independent user setups.. Once we cleaned up our setups independently, everything worked fine.. Do |
@durack1, thanks for the suggestion. glxgears does and doesn't work. Specifically, if I run a single instance then it appears to work fine (the 3 gears turn, and I can cover and unvcover it with normal windows). However, if I run a second instance of glxgears, then the first one stops turning, and when I cover it with the second glxgears window the first one blanks and doesn't refresh -- until I kill the second glxgears. The glxinfo produces a bunch of output. The one thing that looks to me like it might be helpful is "libGL error: failed to load driver: swrast". |
@cameronsmith1 from memory this is an ongoing issue, I do recall speaking to @doutriaux1 about this a while back... Not sure if there is a solution, possibly upgrading/updating/checking your X11 client and making sure that you have all the pieces installed and up-to-date.. |
I'm by no means an X expert, but from what I understand, a backing store is not the best solution here. They cause issues with modern compositing windowing systems, and most X implementations disable the backing store by default on their servers. Worse, the servers are free to ignore the backing store flags and override the behavior as they see fit. Thus, we'd need to make users update their X server configuration, and there's still no guarantee that it would work, or worse, it may cause rendering artifacts and tearing on certain platforms. The 'proper' solution is to handle the X Expose window events to trigger a repaint. This isn't dependent on X server settings and doesn't have the compatibility issues that the backing store does. This is handled in VTK by the event loop implemented in Looking at similar projects, this is how matplotlib works. You set up the visualization via calls to At the moment, VTK does not have an option to enable to backing store on its render windows. Given the age and widespread use of VTK, that fact that this feature has not been added suggests to me that it's really not the ideal path forward. However, I can add an option to the X implementation of Let me know how you guys want to proceed. |
Also, related to @durack1's image, I've seen this happen with some OpenGL drivers even with the interactor running (it happens to me with e.g. the latest nVidia linux drivers). My guess is that they're being super aggressive with the pixel-ownership test in the GL pipeline and discarding fragments that would be obscured by another window, saving a bit of time on blending operations and such. Which works fine, until you want to save out the window as an image, and I deal with this by using a version of mesa (or some other opengl driver) when I need to get pixel data from obscured windows. This is hardly a good solution IMO, but since it's a driver issue in that case, there's not much else we can do about it. |
@dlonie I know it works when you starts the interactor, BUT once you started the interactor, your script pauses until the user press Q. There are two issues I have seen in "real life" happening here: Again as you said I'm not sure there's a way to fix this from within the application. I'm not too wrroied about (2) since really it should be ran in bg=1 mode. But 1 is a very frequent case. Also users have no idea they should type canvas.interact() but that's another story (I used to have a warning in there, but it was decided to take it off...) |
@dlonie in short I think you answered my initial question, there's not much we can do except asking the user to upgrade their X server... |
Upgrading the X server won't change anything. Did you mean reconfigure (to enable backing store support)? That still wouldn't make a difference since the Just want to make sure we're on the same page here :) |
This thread reminds me a bit of what I have described in #1044 . I also thought that maybe I could solve my problem by finding a way to enable the backing store, or maybe find an environment variable that I could set and solve everything by magic. My current kind-of unsatisfying workaround is to use the xfce window manager, that gives slightly better resultst than cinnamon |
@jypeter here is my hacky work around to get things plotting and saving correctly to a png file:
|
@cameronsmith1 did you try to add |
@aashish24 let's talk about this. @dlonie suggestion might be worth considering if it doesn't take him too long. |
@doutriaux1 sure but may we should discuss all the options first. I am not sure relying on X is a good strategy. Are we targetting Supercomputers or desktops? |
@aashish24 Cases where I would like the graphics of UV-CDAT to work correctly (more on this at the end):
Do not forget that the local machine may not have a high end graphics card! Most of the desktop/laptops I buy here only have the default Intel HDxxxx graphics card By work correctly I mean:
|
I am putting together a UVCDAT plotting script. Each time I plot I get a new window (which is good), but they have no backing store, and don't get redrawn. This is a problem because I am producing several plots, so have to move them around my screen, and there are so many they start covering each other, and when I bring a window to the front the part that was covered stays blank (ie white).
Below is an example (which is almost identical to the code provided by the UVCDAT GUI)
I am using UVCDAT v2.2 on Rhea.
Thanks!
The text was updated successfully, but these errors were encountered: