Last week i started working to improve our mac os support, the progress is tracked on this Project on github:
Most notable changes are:
- Testing Apple Silicon M1 support
- Fix issues regarding HiDPI and scaling #1750
Separate the concept of resolution from window size. Since they do not match in mac os (and possibly other platforms aswell) when using high dpi resolution.
- OpenGL 3.2 used by default #1752
This enforces a more recent core profile, since the compatibility profile seems to be broken in mac os (see related issue for more info).
- ErrorDialog and SettingsDialog removed from the internal code #1748
These two dialogs use AWT that is known to not work when GLFW is started on the same thread, and this is a requirement for MacOS, see issue here.
So I’ve decided to remove SettingsDialog from the internal code and re-propose it as a standalone class, so that devs that still like it can use it, without keeping broken code enabled by default that might discourage new devs.
After this PR is merged, the awt SettingsDialog can be shown as follow:
AppSettings settings=new AppSettings(true);
if(SettingsDialog.showDialog(settings)){
app.setSettings(settings);
app.start();
}
this will recreated the current behavior.
I’ve also removed the ErrorDialog that is source of some issues with mac (but also other platforms, see issue for more info). The error dialog is replaced with an error handler callback, usable as follow:
JmeSystem.setErrorMessageHandler((message)->{
});
ErrorDialog like SettingsDialog is kept as a standalone class and can be used as follow
JmeSystem.setErrorMessageHandler((message)->{
ErrorDialog.showDialog(message);
});
That’s all, please leave your feedbacks here or on github and let me know if you have any objection to these changes.