comparison Xcode-iPhoneOS/Demos/src/fireworks.c @ 3685:64ce267332c6

Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 21 Jan 2010 06:21:52 +0000
parents 20326ba2bda2
children 06c7423f8c60
comparison
equal deleted inserted replaced
3684:cc564f08884f 3685:64ce267332c6
361 } 361 }
362 362
363 int 363 int
364 main(int argc, char *argv[]) 364 main(int argc, char *argv[])
365 { 365 {
366 366 SDL_Window *window; /* main window */
367 SDL_WindowID windowID; /* ID of main window */
368 Uint32 startFrame; /* time frame began to process */ 367 Uint32 startFrame; /* time frame began to process */
369 Uint32 endFrame; /* time frame ended processing */ 368 Uint32 endFrame; /* time frame ended processing */
370 Uint32 delay; /* time to pause waiting to draw next frame */ 369 Uint32 delay; /* time to pause waiting to draw next frame */
371 int done; /* should we clean up and exit? */ 370 int done; /* should we clean up and exit? */
372 371
387 SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0); 386 SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0);
388 SDL_GL_SetAttribute(SDL_GL_RETAINED_BACKING, 0); 387 SDL_GL_SetAttribute(SDL_GL_RETAINED_BACKING, 0);
389 SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1); 388 SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
390 389
391 /* create main window and renderer */ 390 /* create main window and renderer */
392 windowID = SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 391 window = SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
393 SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | 392 SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN |
394 SDL_WINDOW_BORDERLESS); 393 SDL_WINDOW_BORDERLESS);
395 SDL_CreateRenderer(windowID, 0, 0); 394 SDL_CreateRenderer(window, 0, 0);
396 395
397 /* load the particle texture */ 396 /* load the particle texture */
398 initializeTexture(); 397 initializeTexture();
399 398
400 /* check if GL_POINT_SIZE_ARRAY_OES is supported 399 /* check if GL_POINT_SIZE_ARRAY_OES is supported