[Win32] Limit OpenGL video driver to OpenGL 3.2 or newer. #9077
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Problem / Description
All OpenGL issue reports with enough info seem to have in common that they happen on Windows with old hardware.
To limit potential problems, only accept drivers that can support OpenGL 3.2 or newer on Windows to cut off the oldest hardware/drivers. As all problem reports seem to be specific to Windows, I don't see a need to prematurely limit platforms besides Windows.
The check is done in the OpenGL backend and not in the Windows driver (by forcing it with
wglCreateContextAttribsARB
) as a missingwglCreateContextAttribsARB
proc does not automatically mean a too old OpenGL version (and theoretically SDL2 could also be used). Many drivers supply the newest supported OGL version if nothing specific is requested.While we're at it, let Windows aim for a 4.5 context first, before falling back to 3.2, as drivers are technically not required to expose the newer functionality as GL extensions (even if everything we use also has an alternative extension specified).
Limitations
Once again, it is unknown if it fixes/circumvents any of the reported issues.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.