fixed a bug where the GL context wouldn't load up on macos because the window wasn't shown first