NablaZeroLabs / mxd

Space Mission Design Support Tools
MIT License
4 stars 4 forks source link

Maximum OpenGL version must be automatically detected and demoted. #27

Open arrieta opened 5 years ago

arrieta commented 5 years ago

The recent commits have broken the build on macOS. That is related to the explicit version of OpenGL being selected, and the fact that OpenGL version 4.3 is not supported by macOS.

Because we explicitly want to support macOS, we need to drop OpenGL to the maximum version supported by modern macOS.

Eventually we can add a version that supports Metal in macOS and modern OpenGL in other platforms, but for the time being let's remain in 4.0.

fayalalebrun commented 5 years ago

I've done some research, and it looks like the only way to reliably get the maximum OpenGL version is to iteratively create contexts from a high version to a low version until creation no longer fails.

This can be done, but it would mean that all of our tests that need to use the initialize function would take longer to complete. Alternatively, we can use OpenGL 4.1 as our minimum and only version, and if we need compute shaders at some point, we can use OpenGL extensions. This is what I see most often recommended.