-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Stuttering movement and black screen on macOS 10.14 & Xcode 10 #19080
Comments
Interesting, same issue happened for me for cocos2d-iphone, because I'm using SpriteBuilderX. I have no idea why it's happening. Tried to change OpenGL view settings, but nothing helps.. |
@drelaptop @minggo I think I found whats the problem glfw/glfw#1334 |
I think I was able to hack around this issue following other's advice that the context needs to be updated. If you haven't already got it working, let me know if this works for you and if you have any thoughts. CCApplication-mac.mm
CCGLViewImpl-Desktop.h
CCGLView.h
|
I just used Xcode 9. Everything works perfect in it, nothing needs to be changed. Here is info about combinations I tested also:
|
@KAMIKAZEUA yeah XCode10+Mojave specific issue. Works fine without hack on XCode10+HighSierra. Probably a bug by Apple. Strange for sure. |
Thanks. Well, for now I can use Xcode 9 :) I hope Apple will take a look at my bug report and fix this in new Xcode. Also, I tested on 10.1 beta - same. |
Thanks! |
My bug(mentioned before) closed as duplicate, I was not first :) who reported that. |
Besides wrapping this in a
|
With this current fix, I’m still seeing shuttering, but no black screen. |
Yeah, looks like Apple broke VSYNC as well in the 10.14 + XCode10's OpenGL framework. SDL maintainer has been posting on Mojave issues as well. |
Ahh, I see now, Apple will kill OpenGL, thats for sure Metal is a new future 🤘 |
Just tested:
Got final update from Apple: this should be fixed in 10.14.2 |
This is fixed in 10.14.2. I just installed the Developer Beta (10.14.2 Beta (18C31g)) and because of that, the issue can be closed. |
Blank screen is fixed, but it appears stuttering (and I believe vsync not enabled) is still present with a simple MoveBy animation. Maybe a new PR should be opened? |
Also, it is still in beta so while I'm sure it will continue working, probably should confirm after official release. |
Both are related, I can reopen this issue, and modify the title. |
@stevetranby so it's implemented in cocos2d-x or due to some bug it's not working? |
@KAMIKAZEUA I'll try to download Xcode 9 and see if I can confirm with real numbers that it runs at 60 fps normally, but 59-65fps on Mojave w/usleep in main loop (see jerky MoveBy, and I'm sure any other per-frame changes), and finally 200-600fps (smooth, but high CPU) on Mojave w/out usleep. |
@stevetranby is the stuttering fixed? or do I need to apply some changes. |
So I updated to 10.14.2 the black screen issue is fixed. But the performance has dropped quite a bit. |
This is a GLFW issue. Either replace with a custom source version, or wait until it's fixed in GLFW's master and then also added into a future release that Cocos2d will upgrade to. For now you can try to use XCode 9.x or revert back to High Sierra. It's been "solved" by the SDL team, and shouldn't be much work, but currently still hasn't been applied to GLFW's code base. |
Yeah i think it will be available with glfw 3.3 |
Looks like it's fixed as of MacOS 10.14.4+ with XCode 10.2+. This can now be closed and @drelaptop or @minggo should revert the "hack" that was committed:
refs: |
https://discuss.cocos2d-x.org/t/stuttering-movement-and-black-screen-on-macos-10-14-mojave-and-cocos2d-x-3-17/43860
https://discuss.cocos2d-x.org/t/xcode-10-and-clion-black-screen/43780
I think newer issues on Xcode 10 or macOS 10.14 should be solved before next release.
The text was updated successfully, but these errors were encountered: