-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDL_PollEvent vs SDL_WaitEvent in macos is problem #6282
Comments
SDL_PollEvent will use a lot of CPU if called in a tight loop, that is not unusual. Usually there are other things that reduce CPU usage, like limiting framerate and such. |
Closing this as (probably?) not a bug. |
@mumin16, can you describe what you mean by SDL_WaitEvent CPU usage being ugly on Linux and Windows? Also, can you post a test program that shows us what is happening? |
6500 fps and %99 cpu usage in macOS... |
same code is 60 fps and %0.7 cpu usage in linux... |
Does your code use vsync? If not, your graphics driver might be forcing vsync on in Linux. |
same code is 60 fps and %0.1 cpu usage in windows... |
Is this one of the imgui samples at https://github.com/ocornut/imgui/tree/master/examples you're testing? Never mind, you're using SDL2 + OpenGL3. |
...is it possible the macOS beta broke OpenGL vsync again? |
Yes this seems to be the exact same problem as when Monterey was released, and which I think was fixed with the 12.1 update. Regardless of whether I run my application in fullscreen or windowed mode VSync does not work. Unfortunately this bug is part of the final Ventura release so it's already affecting all my macOS users that have upgraded. |
This is caused by vsync being broken on the latest macOS, and is a duplicate of #4918. |
SDL_PollEvent's CPU usage is normal in linux and windows but it is %80-90 in macos .
SDL_WaitEvent's CPU usage is normal in macos but it is ugly in linux and windows. what is problem?
The text was updated successfully, but these errors were encountered: