test/testgles.c
changeset 7796 75c80f36038e
parent 7794 7995e0920bf9
child 7910 261addaa47d0
equal deleted inserted replaced
7795:6acc7df4a175 7796:75c80f36038e
   159     state->gl_green_size = 5;
   159     state->gl_green_size = 5;
   160     state->gl_blue_size = 5;
   160     state->gl_blue_size = 5;
   161     state->gl_depth_size = depth;
   161     state->gl_depth_size = depth;
   162     state->gl_major_version = 1;
   162     state->gl_major_version = 1;
   163     state->gl_minor_version = 1;
   163     state->gl_minor_version = 1;
       
   164     state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES;
   164     if (fsaa) {
   165     if (fsaa) {
   165         state->gl_multisamplebuffers=1;
   166         state->gl_multisamplebuffers=1;
   166         state->gl_multisamplesamples=fsaa;
   167         state->gl_multisamplesamples=fsaa;
   167     }
   168     }
   168     if (accel) {
   169     if (accel) {
   177         SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n");
   178         SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n");
   178         quit(2);
   179         quit(2);
   179     }
   180     }
   180 
   181 
   181     /* Create OpenGL ES contexts */
   182     /* Create OpenGL ES contexts */
   182     SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
       
   183 
       
   184     for (i = 0; i < state->num_windows; i++) {
   183     for (i = 0; i < state->num_windows; i++) {
   185         context[i] = SDL_GL_CreateContext(state->windows[i]);
   184         context[i] = SDL_GL_CreateContext(state->windows[i]);
   186         if (!context[i]) {
   185         if (!context[i]) {
   187             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_GL_CreateContext(): %s\n", SDL_GetError());
   186             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_GL_CreateContext(): %s\n", SDL_GetError());
   188             quit(2);
   187             quit(2);