Xcode-iPhoneOS/Demos/src/happy.c
changeset 5213 25ad4a50d34f
parent 5208 78db79f5a4e2
child 5214 b0797947dd1c
equal deleted inserted replaced
5212:7b6101f3ea58 5213:25ad4a50d34f
   137     }
   137     }
   138     window = SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
   138     window = SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
   139                                 SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN |
   139                                 SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN |
   140                                 SDL_WINDOW_BORDERLESS);
   140                                 SDL_WINDOW_BORDERLESS);
   141 
   141 
   142     //SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengles2");
       
   143 	
       
   144     renderer = SDL_CreateRenderer(window, -1, 0);
   142     renderer = SDL_CreateRenderer(window, -1, 0);
   145 
   143 
   146     initializeTexture(renderer);
   144     initializeTexture(renderer);
   147     initializeHappyFaces();
   145     initializeHappyFaces();
   148 
   146 
   164         if (delay < 0) {
   162         if (delay < 0) {
   165             delay = 0;
   163             delay = 0;
   166         } else if (delay > MILLESECONDS_PER_FRAME) {
   164         } else if (delay > MILLESECONDS_PER_FRAME) {
   167             delay = MILLESECONDS_PER_FRAME;
   165             delay = MILLESECONDS_PER_FRAME;
   168         }
   166         }
   169         SDL_Delay(delay);
   167         //SDL_Delay(delay);
   170     }
   168     }
   171 
   169 
   172     /* cleanup */
   170     /* cleanup */
   173     SDL_DestroyTexture(texture);
   171     SDL_DestroyTexture(texture);
   174     /* shutdown SDL */
   172     /* shutdown SDL */