Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Black screen and VSync problems on MacOS Mojave #231
I have been playing with
Everything worked perfect up until I updated to MacOS Mojave. When I start the application, the screen is initially black. If I resize the window, the game starts to render to screen normally for around a second or two after which it goes black again.
Furthermore, the game speeds up drastically, as vsync does not seem to work.
(Yes, I am aware that timestamp deltas should be used for scene updates. The game is a port to Go of something I did many years ago, so its design is crap.
Issue #228 seems like a duplicate to this, however, I am using the latest version of
Is this related to OpenGL deprecation? My understanding was that it would continue to be supported for some time. Furthermore, the issue seems to be glfw related, and that project seems necessary even if one were to switch to Vulkan.
It's been fixed on glfw 3.3 but I'm not sure if it's going to be fixed in the previous releases. I have a fix you can put just before you swap buffers here https://github.com/Noofbiz/glfwMojaveFix that you can use. It just calls the context update on OSX and nothing otherwise.
OpenGL is deprecated in the latest macOS, but it's still supported. This is just something that needs to be fixed in GLFW upstream, and made available as a Go package.
The black-screen-until-window-move issue has been resolved upstream in glfw/glfw#1334.
The vsync issue is not yet resolved upstream, see glfw/glfw#1337.
My recommendation would be to help the upstream GLFW project resolve the issue there, and then we can consider either backporting the fix to our 3.2 Go package, wait for GLFW to backport the fix to 3.2 and update our 3.2 version, or just wait until 3.3 is out with the fixes.
@Noofbiz I tried your fix (though I adapted it for
Something else that I am observing is that performance seems to be worse than before. I used to be able to run the app in fullscreen without a problem and now it lags. Could be related to the vsync problem.
Damn, it seems that Apple, Metal, and Vulkan have messed everything up. The only place I can develop 3D properly now is in a Linux Virtual Machine, where it lags to begin with...