comparison test/testspriteminimal.c @ 3596:f638ded38b8a

Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color. Renamed SDL_RenderPoint() and SDL_RenderLine() to SDL_RenderDrawPoint() and SDL_RenderDrawLine(). Added API for rectangle drawing (as opposed to filling) Added placeholder API functions for circles and ellipses ... I'm not sure whether these will stay. Optimized software line drawing quite a bit. Added support for Wu's anti-aliased line drawing, currently disabled by default.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 23 Dec 2009 01:55:00 +0000
parents 0267b8b1595c
children 64ce267332c6
comparison
equal deleted inserted replaced
3595:b7c6828d4039 3596:f638ded38b8a
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_RenderRect(NULL); 90 SDL_RenderClear();
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];