src/video/SDL_video.c
changeset 9412 8b1436ce1028
parent 9363 c9a4d606f6db
child 9416 d5c12b28df2d
     1.1 --- a/src/video/SDL_video.c	Fri Mar 20 11:51:03 2015 -0400
     1.2 +++ b/src/video/SDL_video.c	Fri Mar 06 16:03:40 2015 +0000
     1.3 @@ -2637,6 +2637,7 @@
     1.4  #endif
     1.5      _this->gl_config.flags = 0;
     1.6      _this->gl_config.framebuffer_srgb_capable = 0;
     1.7 +    _this->gl_config.release_behavior = SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH;
     1.8  
     1.9      _this->gl_config.share_with_current_context = 0;
    1.10  }
    1.11 @@ -2743,6 +2744,9 @@
    1.12      case SDL_GL_FRAMEBUFFER_SRGB_CAPABLE:
    1.13          _this->gl_config.framebuffer_srgb_capable = value;
    1.14          break;
    1.15 +    case SDL_GL_CONTEXT_RELEASE_BEHAVIOR:
    1.16 +        _this->gl_config.release_behavior = value;
    1.17 +        break;
    1.18      default:
    1.19          retval = SDL_SetError("Unknown OpenGL attribute");
    1.20          break;
    1.21 @@ -2845,6 +2849,13 @@
    1.22          attrib = GL_SAMPLES;
    1.23  #endif
    1.24          break;
    1.25 +    case SDL_GL_CONTEXT_RELEASE_BEHAVIOR:
    1.26 +#if SDL_VIDEO_OPENGL
    1.27 +        attrib = GL_CONTEXT_RELEASE_BEHAVIOR;
    1.28 +#else
    1.29 +        attrib = GL_CONTEXT_RELEASE_BEHAVIOR_KHR;
    1.30 +#endif
    1.31 +        break;
    1.32      case SDL_GL_BUFFER_SIZE:
    1.33          {
    1.34              GLint bits = 0;