| Summary: | SDL_WINDOW_ALLOW_HIGHDPI is pretty glitchy (especially with SDL_WINDOW_FULLSCREEN) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | philhassey <phil> |
| Component: | video | Assignee: | Eric Wasylishen <ewasylishen> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | ewasylishen, phil |
| Version: | 2.0.1 | ||
| Hardware: | x86 | ||
| OS: | Mac OS X 10.7 | ||
| Attachments: | test case to reproduce most of issues described in bug | ||
|
Description
philhassey
2013-11-06 17:49:21 UTC
You said 'SDL_WINDOW_ALLOW_HIGHDPI || SDL_WINDOW_FULLSCREEN', do you mean 'SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_FULLSCREEN'? Also, using regular fullscreen should allow you to create windows with 2880x1800 directly, that should not require SDL_WINDOW_ALLOW_HIGHDPI to be retina (AFAIK.) If you use SDL_WINDOW_FULLSCREEN_DESKTOP (or create a windowed mode), you need to OR in the SDL_WINDOW_ALLOW_HIGHDPI switch. Also, the specific code you run for each scenario would be appreciated to clarify what causes the problems. Created attachment 1516 [details]
test case to reproduce most of issues described in bug
reproduces all non-visual symptoms described in bug report.
Sorry for the typo. I've attached a test case the reproduces all the non-visual things I reported. Here's the log from my retina Mac (comments below): $ ./sdltest3.app/Contents/MacOS/sdltest3 SDL_GetDesktopDisplayMode: w=1440 h=900 Step 1... _init_video(1440,900,8199) SDL_GetWindowSize: w=1280, h=720 SDL_GL_GetDrawableSize: w=2560, h=1440 glViewport(0,0,2560,1440); SDL_GL_SwapWindow(); SDL_GL_GetDrawableSize: w=2560, h=1440 glViewport(0,0,2560,1440); SDL_GL_SwapWindow(); Step 3... _init_video(1080,675,8198) SDL_GetWindowSize: w=1080, h=675 SDL_GL_GetDrawableSize: w=2160, h=1350 glViewport(0,0,2160,1350); SDL_GL_SwapWindow(); SDL_GL_GetDrawableSize: w=2160, h=1350 glViewport(0,0,2160,1350); SDL_GL_SwapWindow(); Step 4... _init_video(1440,900,8199) SDL_GetWindowSize: w=1440, h=900 SDL_GL_GetDrawableSize: w=2880, h=1800 glViewport(0,0,2880,1800); SDL_GL_SwapWindow(); SDL_GL_GetDrawableSize: w=1440, h=900 glViewport(0,0,1440,900); SDL_GL_SwapWindow(); -- Comments: - Step 1: Expected the window size to be 1440x900 as requested. Result: 1280x720. - Step 3: This seemed to work (my test case doesn't reproduce accompanying visual problems.) - Step 4: Expected the drawable size to be 2880x1800 and for it to stay at that size. Result: 2880x1800 and then changed to 1440x900. (my test case doesn't reproduce accompanying visual problems.) Hope that gives you enough to go on! Here is a simple test case where SDL_WINDOW_ALLOW_HIGHDPI breaks SDL_WINDOW_FULLSCREEN: (on 15" macbook pro retina (2880x1800), OS X 10.9.4): - launch testgl2 (included with sdl2) with "--allow-highdpi" - press Ctrl+Enter - expected: fullscreen spinning cube. observed: black screen - press Ctrl+Enter again to exit fullscreen - exected: spinning cube window is restored. observed: the window is restored to its correct original size, but the contents are garbled. Part of the demo is rendering in the top left quadrant of the window, the rest is garbage / noise. Eric is working on a patch to address this. The steps in comment #4 still reproduce on current hg and macOS 10.12.6. Interestingly, if I plug in an external monitor beforehand, I get the spinning cube in fullscreen (going fullscreen on the highdpi laptop screen, not the external monitor) but the window is still corrupted when returning to windowed mode. |