Skip to content
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

doesn't draw content initially on macOS Mojave #364

Open
Noofbiz opened this issue Oct 12, 2018 · 3 comments
Open

doesn't draw content initially on macOS Mojave #364

Noofbiz opened this issue Oct 12, 2018 · 3 comments
Labels
sdl2-issue This issue is related to the native SDL2 library

Comments

@Noofbiz
Copy link

Noofbiz commented Oct 12, 2018

Currently, when you open a window with a GLContext in macOS Mojave, drawing doesn't start until you manually move the window. To fix it, the NSGLContext has to be updated a couple times before calling Window.GLSwap(). I have a fix for it here that makes the NSGLContext calls that can be used before GLSwap(). I'm wondering if you guys would like that incorporated into go-sdl2 in the glswap call?

@veeableful
Copy link
Contributor

Hi @Noofbiz, it sounds like maybe SDL2 itself need to fix this. Perhaps you could report it to them at https://discourse.libsdl.org? Although without a native C version of a program that reproduces this issue, I can't be 100% sure it's their issue.

@Noofbiz
Copy link
Author

Noofbiz commented Oct 13, 2018

Yeah, the issue is in SDL itself. Looks like it's already been reported here.

@veeableful veeableful added the sdl2-issue This issue is related to the native SDL2 library label Oct 13, 2018
@bartgrantham
Copy link

Are you polling any events? I discovered that even on non-GL windows the window doesn't raise or draw window decorations without pumping events. You don't even have to do anything with the events, but you have to at least consume the first two (sdl.WINDOWEVENT_SHOWN, followed by sdl.WINDOWEVENT_EXPOSED) before the window appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sdl2-issue This issue is related to the native SDL2 library
Projects
None yet
Development

No branches or pull requests

3 participants