glvis icon indicating copy to clipboard operation
glvis copied to clipboard

Screenshot does not behaves reliably in glvs script

Open dohyun-cse opened this issue 1 year ago • 2 comments

Following this tutorial, I tried to make a .gif file from a series of solutions.

However, when I check .png files, one of every three files is just empty.

I get the following warning from GLVis when I run the script:

MFEM Warning: Screenshot: Reading from the front buffer is unreliable. Resulting screenshots may be incorrect. But there is no suggestion for a better way to save the figure.

What is a proper way to save figures using glvs scripts?

dohyun-cse avatar Apr 05 '23 22:04 dohyun-cse

I managed to resolve this issue by replacing

keys b to keys ~b

dohyun-cse avatar Apr 05 '23 22:04 dohyun-cse

If you are loading different mesh and/or solution files before each screenshot, you don't need the command keys b.

In the tutorial we use the same mesh and vector solution (which defines a backward displacement), so we use keys b to change what state between the no-backward-displacement and full-backward-displacement we draw, see the key b description in section "2D vector data" in https://github.com/GLVis/glvis/blob/master/README.md.

That said, there is still probably some issue with the keys not being fully processed in the script as intended and we probably need to track it down and resolve it.

v-dobrev avatar Apr 06 '23 00:04 v-dobrev