src/video/uikit/SDL_uikitopengles.m
changeset 7423 dfe7ad02f008
parent 7285 bcfd0bcaf4f3
child 7424 1644ff584b17
equal deleted inserted replaced
7422:172b0c6e51d6 7423:dfe7ad02f008
   102     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   102     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   103     SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
   103     SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
   104     SDL_DisplayData *displaydata = display->driverdata;
   104     SDL_DisplayData *displaydata = display->driverdata;
   105     SDL_DisplayModeData *displaymodedata = display->current_mode.driverdata;
   105     SDL_DisplayModeData *displaymodedata = display->current_mode.driverdata;
   106     UIWindow *uiwindow = data->uiwindow;
   106     UIWindow *uiwindow = data->uiwindow;
       
   107     EAGLSharegroup *share_group = nil;
       
   108 
       
   109     if (_this->gl_config.share_with_current_context) {
       
   110         share_group = [((SDL_uikitopenglview *) SDL_GL_GetCurrentContext() sharegroup];
       
   111     }
   107 
   112 
   108     /* construct our view, passing in SDL's OpenGL configuration data */
   113     /* construct our view, passing in SDL's OpenGL configuration data */
   109     CGRect frame;
   114     CGRect frame;
   110     if (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS)) {
   115     if (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS)) {
   111         frame = [displaydata->uiscreen bounds];
   116         frame = [displaydata->uiscreen bounds];
   119                                     gBits: _this->gl_config.green_size
   124                                     gBits: _this->gl_config.green_size
   120                                     bBits: _this->gl_config.blue_size
   125                                     bBits: _this->gl_config.blue_size
   121                                     aBits: _this->gl_config.alpha_size
   126                                     aBits: _this->gl_config.alpha_size
   122                                     depthBits: _this->gl_config.depth_size
   127                                     depthBits: _this->gl_config.depth_size
   123                                     stencilBits: _this->gl_config.stencil_size
   128                                     stencilBits: _this->gl_config.stencil_size
   124                                     majorVersion: _this->gl_config.major_version];
   129                                     majorVersion: _this->gl_config.major_version
       
   130                                     shareGroup: share_group];
   125     if (!view) {
   131     if (!view) {
   126         return NULL;
   132         return NULL;
   127     }
   133     }
   128 
   134 
   129     data->view = view;
   135     data->view = view;