test/testgl2.c
changeset 3408 55541ddf13e3
parent 3139 7f684f249ec9
child 3418 fba883490f72
     1.1 --- a/test/testgl2.c	Mon Oct 19 13:31:58 2009 +0000
     1.2 +++ b/test/testgl2.c	Wed Oct 21 14:51:42 2009 +0000
     1.3 @@ -204,18 +204,19 @@
     1.4  
     1.5      /* Set OpenGL parameters */
     1.6      state->window_flags |= SDL_WINDOW_OPENGL;
     1.7 -    SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
     1.8 -    SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
     1.9 -    SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
    1.10 -    SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
    1.11 -    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
    1.12 +    state->gl_red_size = 5;
    1.13 +    state->gl_green_size = 5;
    1.14 +    state->gl_blue_size = 5;
    1.15 +    state->gl_depth_size = 16;
    1.16 +    state->gl_doublebuffer = 1;
    1.17      if (fsaa) {
    1.18 -        SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
    1.19 -        SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, fsaa);
    1.20 +        state->gl_multisamplebuffers = 1;
    1.21 +        state->gl_multisamplesamples = fsaa;
    1.22      }
    1.23      if (accel) {
    1.24 -        SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
    1.25 +        state->gl_accelerated=1;
    1.26      }
    1.27 +
    1.28      if (!CommonInit(state)) {
    1.29          quit(2);
    1.30      }