Backport of "Fix misc windows bugs, and explicitly enable GL sub-options" into 1.16
Backport of !391 (merged) "Fix misc windows bugs, and explicitly enable GL sub-options".
Needs manual intervention, cherry-picking failed!
Commits:
Edited by Nirbheek Chauhan