-
Notifications
You must be signed in to change notification settings - Fork 527
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
sokol_app.h: macOS with GLCORE33 mouse position update is noticeably laggy #341
Comments
I don't think I can do much about that. The mouse event code is the same between the Metal and GL backends in sokol_app.h, it might be that NSOpenGLView has more latency for presenting the framebuffer than MTKView. I'll check for any obvious things (like triple- vs double-buffering), but it's unlikely that it's something as simple as that. PS: one thing you could try is adding If this works we can probably add this generally. However the function isn't really documented (see: https://developer.apple.com/documentation/appkit/nsevent/2870068-mousecoalescingenabled?language=objc), so I don't know what's the pros and cons. |
|
I found that if I remove the |
Hmm ok, worth a try (however, isn't the display frozen if the setNeedsDisplay is removed?). IFIR had to add the NSTimer code because I couldn't get the CVDisplayLink method described here to properly work after the macOS Catalina GL regressions: https://developer.apple.com/library/archive/qa/qa1385/_index.html |
Closing this with the mouse latency improvements for macOS that had just been merged. It's still not perfect, but very noticeably better. |
toggling between
SOKOL_GLCORE33
andSOKOL_METAL
can tell the mouse position update withGLCORE33
is laggier, it's more obvious if drawing something at mouse positionThe text was updated successfully, but these errors were encountered: