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. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404346
This commit is contained in:
parent
d45158ea85
commit
6da163ab81
24 changed files with 1685 additions and 549 deletions
|
@ -83,7 +83,7 @@ MoveSprites(SDL_WindowID window, SDL_TextureID sprite)
|
|||
/* Move the sprite, bounce at the wall, and draw */
|
||||
n = 0;
|
||||
SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
|
||||
SDL_RenderRect(NULL);
|
||||
SDL_RenderClear();
|
||||
for (i = 0; i < NUM_SPRITES; ++i) {
|
||||
position = &positions[i];
|
||||
velocity = &velocities[i];
|
||||
|
@ -158,7 +158,7 @@ main(int argc, char *argv[])
|
|||
/* Clear the window, load the sprite and go! */
|
||||
SDL_SelectRenderer(window);
|
||||
SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
|
||||
SDL_RenderRect(NULL);
|
||||
SDL_RenderClear();
|
||||
|
||||
sprite = LoadSprite(window, "icon.bmp");
|
||||
if (!sprite) {
|
||||
|
@ -199,7 +199,7 @@ main(int argc, char *argv[])
|
|||
case SDL_WINDOWEVENT_EXPOSED:
|
||||
SDL_SelectRenderer(event.window.windowID);
|
||||
SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
|
||||
SDL_RenderRect(NULL);
|
||||
SDL_RenderClear();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue