src/video/SDL_video.c
changeset 6296 b42657486c0d
parent 6266 a4be1e781020
child 6370 93187f7f7d5d
equal deleted inserted replaced
6295:a2c60beb6115 6296:b42657486c0d
   498     _this->gl_config.minor_version = 1;
   498     _this->gl_config.minor_version = 1;
   499 #elif SDL_VIDEO_OPENGL_ES2
   499 #elif SDL_VIDEO_OPENGL_ES2
   500     _this->gl_config.major_version = 2;
   500     _this->gl_config.major_version = 2;
   501     _this->gl_config.minor_version = 0;
   501     _this->gl_config.minor_version = 0;
   502 #endif
   502 #endif
       
   503     _this->gl_config.flags = 0;
       
   504     _this->gl_config.profile_mask = 0;
   503 
   505 
   504     /* Initialize the video subsystem */
   506     /* Initialize the video subsystem */
   505     if (_this->VideoInit(_this) < 0) {
   507     if (_this->VideoInit(_this) < 0) {
   506         SDL_VideoQuit();
   508         SDL_VideoQuit();
   507         return -1;
   509         return -1;
  2297     case SDL_GL_CONTEXT_MAJOR_VERSION:
  2299     case SDL_GL_CONTEXT_MAJOR_VERSION:
  2298         _this->gl_config.major_version = value;
  2300         _this->gl_config.major_version = value;
  2299         break;
  2301         break;
  2300     case SDL_GL_CONTEXT_MINOR_VERSION:
  2302     case SDL_GL_CONTEXT_MINOR_VERSION:
  2301         _this->gl_config.minor_version = value;
  2303         _this->gl_config.minor_version = value;
       
  2304         break;
       
  2305     case SDL_GL_CONTEXT_FLAGS:
       
  2306         _this->gl_config.flags = value;
       
  2307         break;
       
  2308     case SDL_GL_CONTEXT_PROFILE_MASK:
       
  2309         _this->gl_config.profile_mask = value;
  2302         break;
  2310         break;
  2303     default:
  2311     default:
  2304         SDL_SetError("Unknown OpenGL attribute");
  2312         SDL_SetError("Unknown OpenGL attribute");
  2305         retval = -1;
  2313         retval = -1;
  2306         break;
  2314         break;
  2442             return 0;
  2450             return 0;
  2443         }
  2451         }
  2444     case SDL_GL_CONTEXT_MINOR_VERSION:
  2452     case SDL_GL_CONTEXT_MINOR_VERSION:
  2445         {
  2453         {
  2446             *value = _this->gl_config.minor_version;
  2454             *value = _this->gl_config.minor_version;
       
  2455             return 0;
       
  2456         }
       
  2457     case SDL_GL_CONTEXT_FLAGS:
       
  2458         {
       
  2459             *value = _this->gl_config.flags;
       
  2460             return 0;
       
  2461         }
       
  2462     case SDL_GL_CONTEXT_PROFILE_MASK:
       
  2463         {
       
  2464             *value = _this->gl_config.profile_mask;
  2447             return 0;
  2465             return 0;
  2448         }
  2466         }
  2449     default:
  2467     default:
  2450         SDL_SetError("Unknown OpenGL attribute");
  2468         SDL_SetError("Unknown OpenGL attribute");
  2451         return -1;
  2469         return -1;