SDL 2.0 supports setting OpenGL context flags in the latest snapshot:
Special thanks to Alistair Lowe, Matthias Bentrup, and Martin Schreiber for
their work on this.
Here’s the patch, so you can see the API changes and the effect they have:
Issues should be noted on this bug: