comparison test/testspriteminimal.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 64a60c5d502e
children f638ded38b8a
comparison
equal deleted inserted replaced
3535:b403f790df65 3536:0267b8b1595c
85 int window_h = WINDOW_HEIGHT; 85 int window_h = WINDOW_HEIGHT;
86 SDL_Rect *position, *velocity; 86 SDL_Rect *position, *velocity;
87 87
88 /* Draw a gray background */ 88 /* Draw a gray background */
89 SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF); 89 SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
90 SDL_RenderFill(NULL); 90 SDL_RenderRect(NULL);
91 91
92 /* Move the sprite, bounce at the wall, and draw */ 92 /* Move the sprite, bounce at the wall, and draw */
93 for (i = 0; i < NUM_SPRITES; ++i) { 93 for (i = 0; i < NUM_SPRITES; ++i) {
94 position = &positions[i]; 94 position = &positions[i];
95 velocity = &velocities[i]; 95 velocity = &velocities[i];