test/testdraw2.c
changeset 3596 f638ded38b8a
parent 3546 65848493e08e
child 3685 64ce267332c6
     1.1 --- a/test/testdraw2.c	Fri Dec 18 08:19:18 2009 +0000
     1.2 +++ b/test/testdraw2.c	Wed Dec 23 01:55:00 2009 +0000
     1.3 @@ -58,7 +58,7 @@
     1.4  
     1.5          x = rand() % window_w;
     1.6          y = rand() % window_h;
     1.7 -        SDL_RenderPoint(x, y);
     1.8 +        SDL_RenderDrawPoint(x, y);
     1.9      }
    1.10      SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE);
    1.11  }
    1.12 @@ -102,16 +102,16 @@
    1.13                                 (Uint8) current_color, (Uint8) current_alpha);
    1.14  
    1.15          if (i == 0) {
    1.16 -            SDL_RenderLine(0, 0, window_w - 1, window_h - 1);
    1.17 -            SDL_RenderLine(0, window_h - 1, window_w - 1, 0);
    1.18 -            SDL_RenderLine(0, window_h / 2, window_w - 1, window_h / 2);
    1.19 -            SDL_RenderLine(window_w / 2, 0, window_w / 2, window_h - 1);
    1.20 +            SDL_RenderDrawLine(0, 0, window_w - 1, window_h - 1);
    1.21 +            SDL_RenderDrawLine(0, window_h - 1, window_w - 1, 0);
    1.22 +            SDL_RenderDrawLine(0, window_h / 2, window_w - 1, window_h / 2);
    1.23 +            SDL_RenderDrawLine(window_w / 2, 0, window_w / 2, window_h - 1);
    1.24          } else {
    1.25              x1 = (rand() % (window_w*2)) - window_w;
    1.26              x2 = (rand() % (window_w*2)) - window_w;
    1.27              y1 = (rand() % (window_h*2)) - window_h;
    1.28              y2 = (rand() % (window_h*2)) - window_h;
    1.29 -            SDL_RenderLine(x1, y1, x2, y2);
    1.30 +            SDL_RenderDrawLine(x1, y1, x2, y2);
    1.31          }
    1.32      }
    1.33      SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE);
    1.34 @@ -159,7 +159,7 @@
    1.35          rect.h = rand() % (window_h / 2);
    1.36          rect.x = (rand() % (window_w*2) - window_w) - (rect.w / 2);
    1.37          rect.y = (rand() % (window_h*2) - window_h) - (rect.h / 2);
    1.38 -        SDL_RenderRect(&rect);
    1.39 +        SDL_RenderFillRect(&rect);
    1.40      }
    1.41      SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE);
    1.42  }
    1.43 @@ -231,7 +231,7 @@
    1.44      for (i = 0; i < state->num_windows; ++i) {
    1.45          SDL_SelectRenderer(state->windows[i]);
    1.46          SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
    1.47 -        SDL_RenderRect(NULL);
    1.48 +        SDL_RenderClear();
    1.49      }
    1.50  
    1.51      srand(time(NULL));
    1.52 @@ -251,7 +251,7 @@
    1.53                  case SDL_WINDOWEVENT_EXPOSED:
    1.54                      SDL_SelectRenderer(event.window.windowID);
    1.55                      SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
    1.56 -                    SDL_RenderRect(NULL);
    1.57 +                    SDL_RenderClear();
    1.58                      break;
    1.59                  }
    1.60                  break;
    1.61 @@ -262,7 +262,7 @@
    1.62          for (i = 0; i < state->num_windows; ++i) {
    1.63              SDL_SelectRenderer(state->windows[i]);
    1.64              SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
    1.65 -            SDL_RenderRect(NULL);
    1.66 +            SDL_RenderClear();
    1.67  
    1.68              DrawRects(state->windows[i]);
    1.69              DrawLines(state->windows[i]);