| Summary: | macOS 10.15: window doesn't get cleared to black, and GL content in non-highdpi windows is scaled until window is moved | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alex Szpakowski <amaranth72> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | macOS 10.15 | ||
|
Description
Alex Szpakowski
2019-09-27 22:53:25 UTC
I think https://hg.libsdl.org/SDL/rev/46b094f7d20e should fix the scaling issue. I think I understand what's going on with drawRect+NSRectFill now. I get some "CGContextSetFillColorWithColor: invalid context 0x0" messages printed during startup, macOS lets me see a backtrace of it. The stack in the backtrace includes [SDLView drawRect:] and [_NSOpenGLViewBackingLayer display]. So it looks like macOS 10.15 is using some NSOpenGLView code under the hood when a NSOpenGLContext is attached to a regular NSView, and it's hiding the fact that there's a layer by attempting to emulate the old behaviour - but without a real NSGraphicsContext active, since I guess they just expected apps to only use direct OpenGL calls in drawRect in this situation. I'll try to think of a good solution for that. https://hg.libsdl.org/SDL/rev/065b94926987 fixes it for me. |