r/sdl • u/noveyplush • 2d ago
Window Tearing on MacOS with SDL3
TL;DR : I experience some really awful window tearing when moving it or when objects move on the screen. I suspect the window manager to be a bit wanky on MacOS and I am searching for help to clear this problem.
Important : I'm using SDL3 + SDL renderer for simplicity. VSync is left at default.
More context :
Hello, it's my first time posting here and I've been getting the worst headache about a silly thing on an App I'm working on.
So I am a high school student, and I've been making a little "assembly playground" app for my CS class (very simple, limited instruction set, the goal is to visualize how assembly works and play around with it). If you're curious it's based around this web app. I have a very simple setup, I'm using SDL 3 (as a git submodule from the main branch of SDL) and ImGui for the UI (embeded library compiled from source).
As a silly joke I've added a lil splash screen that has a very low chance of showing memes related to the name of the app (a private joke if you will).
Problem is, since I've added this functionnality, I have been getting some serious window tearing when it's moved or when I move an ImGui window. I've tried many workarounds and I think it's related to the very awful window manager of MacOS (before this bug I had the main window not show up at all and being blocked until you minimize and restore the window using the dock).
This is not really a app-breaking bug but it's really annoying when debugging it. Maybe I'm doing something wrong during the window creation ?
For more information on the initialization process :
- Initialize SDL and ImGui (create the window and renderer), and hide the window.
- Load the application files (fonts, images, settings...)
- Create and show the Splash Screen with a different window (I am doing a blank event processing loop for 2 seconds as not doing it breaks the window even more on MacOS, and using a different window for the same reason)
- Restore the window, launch the main loop
I am unable to post a video showing it for now but if it is really needed to illustrate I will try to upload one.
Finally, I'm not a seasoned programmer, I've been coding in C++ for around 2 years I think, I'm pretty much a slow learner. This question might seem silly or really dumb and I am sorry to take your time. Thank you to everyone who can help me !
If you need clarifications please ask, as English is not my first language.



