Adds gl_profile_mask to test framework, uses it in testgles
authorGabriel Jacobo <gabomdq@gmail.com>
Thu, 10 Oct 2013 00:49:57 -0300
changeset 779675c80f36038e
parent 7795 6acc7df4a175
child 7797 40543ce6e842
Adds gl_profile_mask to test framework, uses it in testgles
include/SDL_test_common.h
src/test/SDL_test_common.c
test/testgles.c
     1.1 --- a/include/SDL_test_common.h	Thu Oct 10 00:30:03 2013 -0300
     1.2 +++ b/include/SDL_test_common.h	Thu Oct 10 00:49:57 2013 -0300
     1.3 @@ -108,6 +108,7 @@
     1.4      int gl_major_version;
     1.5      int gl_minor_version;
     1.6      int gl_debug;
     1.7 +    int gl_profile_mask;
     1.8  } SDLTest_CommonState;
     1.9  
    1.10  #include "begin_code.h"
     2.1 --- a/src/test/SDL_test_common.c	Thu Oct 10 00:30:03 2013 -0300
     2.2 +++ b/src/test/SDL_test_common.c	Thu Oct 10 00:49:57 2013 -0300
     2.3 @@ -695,6 +695,9 @@
     2.4          if (state->gl_debug) {
     2.5              SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
     2.6          }
     2.7 +        if (state->gl_profile_mask) {
     2.8 +            SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, state->gl_profile_mask);
     2.9 +        }
    2.10  
    2.11          if (state->verbose & VERBOSE_MODES) {
    2.12              SDL_Rect bounds;
     3.1 --- a/test/testgles.c	Thu Oct 10 00:30:03 2013 -0300
     3.2 +++ b/test/testgles.c	Thu Oct 10 00:49:57 2013 -0300
     3.3 @@ -161,6 +161,7 @@
     3.4      state->gl_depth_size = depth;
     3.5      state->gl_major_version = 1;
     3.6      state->gl_minor_version = 1;
     3.7 +    state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES;
     3.8      if (fsaa) {
     3.9          state->gl_multisamplebuffers=1;
    3.10          state->gl_multisamplesamples=fsaa;
    3.11 @@ -179,8 +180,6 @@
    3.12      }
    3.13  
    3.14      /* Create OpenGL ES contexts */
    3.15 -    SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
    3.16 -
    3.17      for (i = 0; i < state->num_windows; i++) {
    3.18          context[i] = SDL_GL_CreateContext(state->windows[i]);
    3.19          if (!context[i]) {