We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4149

Summary: metal: needs to resize window before things are actually displayed
Product: SDL Reporter: SuperZazu <nico.g.allemand>
Component: renderAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus, nico.g.allemand
Version: 2.0.8   
Hardware: x86_64   
OS: macOS 10.13   
Attachments: a minimal C program that reproduces the bug

Description SuperZazu 2018-04-24 15:43:48 UTC
Created attachment 3230 [details]
a minimal C program that reproduces the bug

Good morning.

On macOS 10.13.4, while trying to do:
```
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal");
```

I find that nothing is displayed on the window at launch. I need to resize the window at least once before anything starts showing. Note that everything works as expected with the default OpenGL driver.

Also, another little thing, I noticed that the `SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0");` setting is not taken into account (also when using metal driver): it always displays graphics as if the scale quality was set to 1 (linear filtering).

I attached a little C program that reproduces the bug: try to resize the window + comment/uncomment the `SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal");` line).

Thank you for your time,
Best regards
Comment 1 Ryan C. Gordon 2018-05-28 00:32:20 UTC
This should be fixed by https://hg.libsdl.org/SDL/rev/9116d02d3feb

--ryan.
Comment 2 SuperZazu 2018-05-28 15:13:39 UTC
Indeed, the commit fixes the bug. Thank you.