| Summary: | SDL_RenderSetLogicalSize not working as expected with metal renderer (on window resize) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | SuperZazu <nico.g.allemand> |
| Component: | render | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | amaranth72, icculus |
| Version: | 2.0.8 | ||
| Hardware: | x86_64 | ||
| OS: | macOS 10.13 | ||
| Attachments: | minimal code to reproduce the bug | ||
|
Description
SuperZazu
2018-09-05 21:24:07 UTC
Created attachment 3297 [details]
minimal code to reproduce the bug
I can reproduce it here, I'll take a look. --ryan. Ok, it's not the viewport, it's the Metal layer that isn't resizing...so we render the correct thing to a wrong-size backbuffer and then the OS scales it to fit. This is now fixed by https://hg.libsdl.org/SDL/rev/c06be57c5a01, but I'm CC'ing Alex to make sure this is the correct way to handle this. --ryan. If I'm understanding the issue correctly, I think it might make more sense to resize the metal layer in the Cocoa view resize callback, rather than in a custom callback. I think the code used to do that, but it looks like this commit removed that behaviour for some reason: https://hg.libsdl.org/SDL/rev/27d81cb6e6af This should be fixed now I think, via https://hg.libsdl.org/SDL/rev/758d4e1222a7 |