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

Black screen and VSync problems on MacOS Mojave #231

Open
mokiat opened this Issue Nov 7, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@mokiat

mokiat commented Nov 7, 2018

Hi,

I have been playing with go-gl/gl and go-gl/glfw for some time now in my rally-mka project.

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. 😅I just use it to experiment with and learn newer OpenGL versions and see how Go copes).


Issue #228 seems like a duplicate to this, however, I am using the latest version of glfw and the issue is not fixed for me. Furthermore, the vsync issue is not described there.

There is also pull request #219 where @kivutar mentions these problems, though I could not find them in GitHub issue tracker.


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.

@Noofbiz

This comment has been minimized.

Noofbiz commented Nov 7, 2018

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.

@Noofbiz

This comment has been minimized.

Noofbiz commented Nov 7, 2018

Oh that's only for the blank screen, not sure about the vsync issue unfortunately

@dmitshur

This comment has been minimized.

Member

dmitshur commented Nov 8, 2018

Is this related to OpenGL deprecation? My understanding was that it would continue to be supported for some time.

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.

@dmitshur dmitshur added the external label Nov 8, 2018

@mokiat

This comment has been minimized.

mokiat commented Nov 8, 2018

@Noofbiz thanks for the fix! I will have a look at it.

@dmitshur now it all makes sense. Thanks! I don't know why I presumed that the problem is in the go binding. Looking forward to 3.3.

@mokiat

This comment has been minimized.

mokiat commented Nov 15, 2018

@Noofbiz I tried your fix (though I adapted it for 3.2). It does fix the black screen problem, however, as you already mentioned, the vsync issue is still there.

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment