blitz-research/monkey2

macOS Mojave issues

Closed this issue · 11 comments

Hello Mark,

I just updated to macOS Mojave that came out yesterday and seem to be experiencing some issues:

  • vsync doesn't seem to work,
  • resizing the window doesn't resize the viewport

It’s also been reported that mojo3d is broken:
http://monkeycoder.co.nz/forums/topic/macos-mojave-black-screen/#post-15465

Confirmed here. There's also a huge delay between compiling and actually displaying something in the mojo3d tests.

Recent updates in dev branch seem to have fixed all problems for me. Thanks Mark!

I’m still experiencing odd window resizing issues as can seem by the bananas/viewlayout demo. Resizing the window appears to causes the virtual resolution to occupy the bottom left of the window.

The 'Experimental fix for Mojave vsync not working.' seems to have broken things on linux. I've just done a git pull and rebuildall2go and it is failing to build mojo. In particular, the latest commit pulls in CoreVideo/CoreVideo.h which doesn't exist in linux afaik. There also seems to be some objectiveC being compiled that didn't exist before... which I presume shouldn't happen on linux?

That "CoreVideo.h" error also happens when compiling for Emscripten in MacOS, but doesn't show up when compiling for Desktop.

I've seen the resizing window bug in macOS, but couldn't reproduce it, unfortunately.

@DoctorWhoof What Mac are you using?

... after some troubleshooting ...

If I create the window with WindowFlags.HighDPI it works on the Retina display and fine on the non-retina. So I am guessing that I can just default on MacOS to create window in HighDPI for now, until a proper solution is baked into mojo.

I'm on a 2015 MacBook Pro laptop.

With the extra info you provided, I was able to reproduce the "lower left corner" view problem: It works fine with WindowFlags.HighDPI, but if you turn it off, you get the issue when scaling or moving the window.

Adding something like:

_camera.View = Self

In the window's OnRender method seems to fix the problem.

Oops, that only works in 3D... can't figure out how to make the issue go away in 2D (non HiDPI). 😢

Seems to work in latest dev branch, yay! Now the drawing behaves correctly with or without HiDPI. I can't see anything wrong with Vsync either. Close issue?

Thanks Mark.

Yes, looks like it's working now.