src/video/x11/SDL_x11opengl.c
changeset 8780 2d8d64a681ad
parent 8149 681eb46b8ac4
child 8804 a941cf4234c4
equal deleted inserted replaced
8779:d21a3ff2b0d2 8780:2d8d64a681ad
   509 }
   509 }
   510 
   510 
   511 XVisualInfo *
   511 XVisualInfo *
   512 X11_GL_GetVisual(_THIS, Display * display, int screen)
   512 X11_GL_GetVisual(_THIS, Display * display, int screen)
   513 {
   513 {
   514     XVisualInfo *vinfo;
       
   515 
       
   516     /* 64 seems nice. */
   514     /* 64 seems nice. */
   517     int attribs[64];
   515     int attribs[64];
   518     X11_GL_GetAttributes(_this,display,screen,attribs,64,SDL_FALSE);
   516     XVisualInfo *vinfo;
   519 
   517 
   520     if (!_this->gl_data) {
   518     if (!_this->gl_data) {
   521         /* The OpenGL library wasn't loaded, SDL_GetError() should have info */
   519         /* The OpenGL library wasn't loaded, SDL_GetError() should have info */
   522         return NULL;
   520         return NULL;
   523     }
   521     }
   524 
   522 
       
   523     X11_GL_GetAttributes(_this, display, screen, attribs, 64, SDL_FALSE);
   525     vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs);
   524     vinfo = _this->gl_data->glXChooseVisual(display, screen, attribs);
   526     if (!vinfo) {
   525     if (!vinfo) {
   527         SDL_SetError("Couldn't find matching GLX visual");
   526         SDL_SetError("Couldn't find matching GLX visual");
   528     }
   527     }
   529     return vinfo;
   528     return vinfo;