src/video/x11/SDL_x11opengl.c
changeset 7412 50211a1fd557
parent 7191 75360622e65f
child 7413 30d42f6f2e8d
     1.1 --- a/src/video/x11/SDL_x11opengl.c	Fri Jul 12 01:26:43 2013 -0400
     1.2 +++ b/src/video/x11/SDL_x11opengl.c	Thu Jul 11 22:59:20 2013 -0700
     1.3 @@ -532,7 +532,7 @@
     1.4      GLXContext context = NULL, share_context;
     1.5  
     1.6      if (_this->gl_config.share_with_current_context) {
     1.7 -        share_context = (GLXContext)(_this->current_glctx);
     1.8 +        share_context = SDL_GL_GetCurrentContext();
     1.9      } else {
    1.10          share_context = NULL;
    1.11      }
    1.12 @@ -683,7 +683,7 @@
    1.13      } else if (_this->gl_data->glXSwapIntervalEXT) {
    1.14          Display *display = ((SDL_VideoData *) _this->driverdata)->display;
    1.15          const SDL_WindowData *windowdata = (SDL_WindowData *)
    1.16 -            _this->current_glwin->driverdata;
    1.17 +            SDL_GL_GetCurrentWindow()->driverdata;
    1.18  
    1.19          Window drawable = windowdata->xwindow;
    1.20  
    1.21 @@ -727,7 +727,7 @@
    1.22      if (_this->gl_data->glXSwapIntervalEXT) {
    1.23          Display *display = ((SDL_VideoData *) _this->driverdata)->display;
    1.24          const SDL_WindowData *windowdata = (SDL_WindowData *)
    1.25 -            _this->current_glwin->driverdata;
    1.26 +            SDL_GL_GetCurrentWindow()->driverdata;
    1.27          Window drawable = windowdata->xwindow;
    1.28          unsigned int allow_late_swap_tearing = 0;
    1.29          unsigned int interval = 0;