OpenGL context flags

SDL 2.0 supports setting OpenGL context flags in the latest snapshot:
http://www.libsdl.org/tmp/SDL-2.0.zip

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:
http://bugzilla.libsdl.org/show_bug.cgi?id=776

Cheers!
–Sam

Hello Sam,

I just noticed that some flags, e.g. for debug context, are also useful on pre-3.x contexts, so maybe

Code:

  • if (_this->gl_config.major_version < 3) {
  • if (_this->gl_config.major_version < 3 &&
  •   _this->gl_config.context_profile_mask == 0 &&
    
  •   _this->gl_config.context_flags == 0) {
    

would make sense in WIN_GL_CreateContext and X11_GL_CreateContext.