Page 1 of 1

Wrong screen flash rectangle after window resize

Posted: Fri Sep 16, 2016 2:09
by dpJudas
Pull request: https://github.com/coelckers/gzdoom/pull/100 - PR #100! :cheers:

Okay this is more a bug fix than a code submission, but need to fill up Code Submissions. :D

It fixes that DrawBlend doesn't cover the full frame buffer area anymore if the framebuffer Width/Height is changed on the fly. Easiest way to see the bug is to start windowed in some relatively low size (say, 800x600) and then maximize the window.

I'm not 100% sure if this is the correct way to update those values for all render paths. The PR is working on my Mac laptop where I tested it though.

Re: Wrong screen flash rectangle after window resize

Posted: Fri Sep 16, 2016 7:06
by Graf Zahl
Actually, it's not 100% correct. The memcpy is needed for all render paths, only Map() and Unmap() are additionally needed for BM_DEFERRED.

Re: Wrong screen flash rectangle after window resize

Posted: Fri Sep 16, 2016 12:07
by dpJudas
Figured there was a good chance of that, but wasn't completely sure.

By the way, the Mac version ran completely steady at 60 fps. I'm not sure it did that before switching to the Core Profile. Was positively surprised. :)

Re: Wrong screen flash rectangle after window resize

Posted: Fri Sep 16, 2016 12:38
by _mental_
dpJudas wrote:By the way, the Mac version ran completely steady at 60 fps. I'm not sure it did that before switching to the Core Profile. Was positively surprised. :)
It did. Of course, depends on hardware, map, resolution, etc. The "reference" old renderer to compare with is still in the g1.x branch.

Re: Wrong screen flash rectangle after window resize

Posted: Fri Sep 16, 2016 13:46
by dpJudas
Must have been my Intel GPU on the PC that didn't run completely smooth then. Was good to see it run as it should.