src/video/SDL_video.c
changeset 6296 b42657486c0d
parent 6266 a4be1e781020
child 6370 93187f7f7d5d
     1.1 --- a/src/video/SDL_video.c	Mon Feb 20 20:56:52 2012 -0500
     1.2 +++ b/src/video/SDL_video.c	Mon Feb 20 23:37:57 2012 -0500
     1.3 @@ -500,6 +500,8 @@
     1.4      _this->gl_config.major_version = 2;
     1.5      _this->gl_config.minor_version = 0;
     1.6  #endif
     1.7 +    _this->gl_config.flags = 0;
     1.8 +    _this->gl_config.profile_mask = 0;
     1.9  
    1.10      /* Initialize the video subsystem */
    1.11      if (_this->VideoInit(_this) < 0) {
    1.12 @@ -2300,6 +2302,12 @@
    1.13      case SDL_GL_CONTEXT_MINOR_VERSION:
    1.14          _this->gl_config.minor_version = value;
    1.15          break;
    1.16 +    case SDL_GL_CONTEXT_FLAGS:
    1.17 +        _this->gl_config.flags = value;
    1.18 +        break;
    1.19 +    case SDL_GL_CONTEXT_PROFILE_MASK:
    1.20 +        _this->gl_config.profile_mask = value;
    1.21 +        break;
    1.22      default:
    1.23          SDL_SetError("Unknown OpenGL attribute");
    1.24          retval = -1;
    1.25 @@ -2446,6 +2454,16 @@
    1.26              *value = _this->gl_config.minor_version;
    1.27              return 0;
    1.28          }
    1.29 +    case SDL_GL_CONTEXT_FLAGS:
    1.30 +        {
    1.31 +            *value = _this->gl_config.flags;
    1.32 +            return 0;
    1.33 +        }
    1.34 +    case SDL_GL_CONTEXT_PROFILE_MASK:
    1.35 +        {
    1.36 +            *value = _this->gl_config.profile_mask;
    1.37 +            return 0;
    1.38 +        }
    1.39      default:
    1.40          SDL_SetError("Unknown OpenGL attribute");
    1.41          return -1;