3Dickulus / FragM

Derived from https://github.com/Syntopia/Fragmentarium/
GNU General Public License v3.0
349 stars 30 forks source link

switching from (playing) animation to progressive mode doesn't clear subframes #139

Closed claudeha closed 4 years ago

claudeha commented 4 years ago

Describe the bug Switching from (playing) animation to progressive mode gives a mix of two time stamps, one subframe from the previous animation and then accumulation from the progresse mode

To Reproduce Steps to reproduce the behavior:

  1. Have an animated frag
  2. Play animation
  3. Switch to progressive mode
  4. See error: there is one frame of animation left over from a different time stamp while the progressive frames accumulate

Expected behavior Switch to progressive mode doesn't mix timestamps / i.e. it clears after the animation

Desktop (please complete the following information):

Additional context Similar to https://github.com/3Dickulus/FragM/issues/137 ?

3Dickulus commented 4 years ago

I took a 30 sec anim and reduced it to 1 sec, for dramatic changes, and I can't find the problem, not on nVidia at least.

the solution (I think) is again engine->requireRedraw(true); in test for progressiveButton click in MainWindow::renderModeChanged() line 2276

note: requireRedraw() only sets a flag to clear backbuffer when rendering starts it does not call redraw and can be set any number of times without penalty the render() call will only use the last flag state set before rendering begins.

claudeha commented 4 years ago

Needed a heavy frag to make it visible, otherwise the first bad subframe gets quickly lost in the accumulation.

Thanks for the fix, can't reproduce it with latest develop branch.

3Dickulus commented 4 years ago

:+1: