Mercurial > sdl-ios-xcode
comparison test/testsprite2.c @ 2783:e33ad7ebb7eb
Fixed Direct3D rendering
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 25 Nov 2008 00:29:44 +0000 |
parents | 926294b2bb4e |
children | 6bacfecbf27e |
comparison
equal
deleted
inserted
replaced
2782:53689036f265 | 2783:e33ad7ebb7eb |
---|---|
81 void | 81 void |
82 MoveSprites(SDL_WindowID window, SDL_TextureID sprite) | 82 MoveSprites(SDL_WindowID window, SDL_TextureID sprite) |
83 { | 83 { |
84 int i, n; | 84 int i, n; |
85 int window_w, window_h; | 85 int window_w, window_h; |
86 SDL_Rect area, *position, *velocity; | 86 SDL_Rect *position, *velocity; |
87 | 87 |
88 SDL_SelectRenderer(window); | 88 SDL_SelectRenderer(window); |
89 | 89 |
90 /* Query the sizes */ | 90 /* Query the sizes */ |
91 SDL_GetWindowSize(window, &window_w, &window_h); | 91 SDL_GetWindowSize(window, &window_w, &window_h); |
289 } | 289 } |
290 | 290 |
291 /* Print out some timing information */ | 291 /* Print out some timing information */ |
292 now = SDL_GetTicks(); | 292 now = SDL_GetTicks(); |
293 if (now > then) { | 293 if (now > then) { |
294 printf("%2.2f frames per second\n", | 294 double fps = ((double) frames * 1000) / (now - then); |
295 ((double) frames * 1000) / (now - then)); | 295 printf("%2.2f frames per second\n", fps); |
296 } | 296 } |
297 quit(0); | 297 quit(0); |
298 } | 298 } |
299 | 299 |
300 /* vi: set ts=4 sw=4 expandtab: */ | 300 /* vi: set ts=4 sw=4 expandtab: */ |