test/testgl2.c
changeset 7746 6a05d7352575
parent 7639 9406b7dd2f2d
child 7787 e6f3e8fc96ea
     1.1 --- a/test/testgl2.c	Fri Sep 27 22:09:51 2013 -0700
     1.2 +++ b/test/testgl2.c	Fri Sep 20 13:43:00 2013 -0400
     1.3 @@ -180,6 +180,7 @@
     1.4      SDL_Event event;
     1.5      Uint32 then, now, frames;
     1.6      int status;
     1.7 +    int dw, dh;
     1.8  
     1.9      /* Enable standard application logging */
    1.10      SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
    1.11 @@ -254,6 +255,10 @@
    1.12      SDL_GetCurrentDisplayMode(0, &mode);
    1.13      SDL_Log("Screen BPP    : %d\n", SDL_BITSPERPIXEL(mode.format));
    1.14      SDL_Log("Swap Interval : %d\n", SDL_GL_GetSwapInterval());
    1.15 +    SDL_GetWindowSize(state->windows[0], &dw, &dh);
    1.16 +    SDL_Log("Window Size   : %d,%d\n", dw, dh);
    1.17 +    SDL_GL_GetDrawableSize(state->windows[0], &dw, &dh);
    1.18 +    SDL_Log("Draw Size     : %d,%d\n", dw, dh);
    1.19      SDL_Log("\n");
    1.20      SDL_Log("Vendor        : %s\n", glGetString(GL_VENDOR));
    1.21      SDL_Log("Renderer      : %s\n", glGetString(GL_RENDERER));
    1.22 @@ -322,7 +327,7 @@
    1.23      glEnable(GL_DEPTH_TEST);
    1.24      glDepthFunc(GL_LESS);
    1.25      glShadeModel(GL_SMOOTH);
    1.26 -
    1.27 +    
    1.28      /* Main render loop */
    1.29      frames = 0;
    1.30      then = SDL_GetTicks();
    1.31 @@ -336,7 +341,7 @@
    1.32          for (i = 0; i < state->num_windows; ++i) {
    1.33              int w, h;
    1.34              SDL_GL_MakeCurrent(state->windows[i], context);
    1.35 -            SDL_GetWindowSize(state->windows[i], &w, &h);
    1.36 +            SDL_GL_GetDrawableSize(state->windows[i], &w, &h);
    1.37              glViewport(0, 0, w, h);
    1.38              Render();
    1.39              SDL_GL_SwapWindow(state->windows[i]);