Mercurial > sdl-ios-xcode
diff test/testdraw2.c @ 3536:0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
SDL_DrawPoints()
SDL_BlendPoints()
SDL_BlendLines()
SDL_DrawLines()
SDL_FillRects()
SDL_BlendRects()
SDL_RenderPoints()
SDL_RenderLines()
SDL_RenderRects()
Renamed SDL_RenderFill() to SDL_RenderRect()
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 09 Dec 2009 15:56:56 +0000 |
parents | 438ba87e9578 |
children | 65848493e08e |
line wrap: on
line diff
--- a/test/testdraw2.c Mon Dec 07 10:08:24 2009 +0000 +++ b/test/testdraw2.c Wed Dec 09 15:56:56 2009 +0000 @@ -159,7 +159,7 @@ rect.h = rand() % (window_h / 2); rect.x = (rand() % window_w) - (rect.w / 2); rect.y = (rand() % window_w) - (rect.h / 2); - SDL_RenderFill(&rect); + SDL_RenderRect(&rect); } SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE); } @@ -231,7 +231,7 @@ for (i = 0; i < state->num_windows; ++i) { SDL_SelectRenderer(state->windows[i]); SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF); - SDL_RenderFill(NULL); + SDL_RenderRect(NULL); } srand(time(NULL)); @@ -251,7 +251,7 @@ case SDL_WINDOWEVENT_EXPOSED: SDL_SelectRenderer(event.window.windowID); SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF); - SDL_RenderFill(NULL); + SDL_RenderRect(NULL); break; } break; @@ -262,7 +262,7 @@ for (i = 0; i < state->num_windows; ++i) { SDL_SelectRenderer(state->windows[i]); SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF); - SDL_RenderFill(NULL); + SDL_RenderRect(NULL); DrawRects(state->windows[i]); DrawLines(state->windows[i]);