112 ============================================================================== |
112 ============================================================================== |
113 Notes -- iPhone SDL limitations |
113 Notes -- iPhone SDL limitations |
114 ============================================================================== |
114 ============================================================================== |
115 |
115 |
116 Windows: |
116 Windows: |
117 Full-size, single window applications only. You cannot create multi-window SDL applications for iPhone OS. The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow the flag SDL_WINDOW_BORDERLESS). Presently, landscape mode is not supported. |
117 Full-size, single window applications only. You cannot create multi-window SDL applications for iPhone OS. The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow the flag SDL_WINDOW_BORDERLESS). |
118 |
|
119 Video: |
|
120 For real time frame-rates, you are advised to use strictly SDL 2.0 video calls. Using compatibility video calls uploads an OpenGL texture for each frame drawn, and this operation is excruciatingly slow. |
|
121 |
118 |
122 Textures: |
119 Textures: |
123 SDL for iPhone Textures supports only SDL_PIXELFORMAT_ABGR8888 and SDL_PIXELFORMAT_RGB24 pixel formats. This is because texture support in SDL for iPhone is done through OpenGL ES, which supports fewer pixel formats than OpenGL, will not re-order pixel data for you, and has no support for color-paletted formats (without extensions). |
120 The optimal texture formats on iOS are SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, and SDL_PIXELFORMAT_RGB24 pixel formats. |
124 |
|
125 Audio: |
|
126 SDL for iPhone does not yet support audio input. |
|
127 |
121 |
128 Loading Shared Objects: |
122 Loading Shared Objects: |
129 This is disabled by default since it seems to break the terms of the iPhone SDK agreement. It can be re-enabled in SDL_config_iphoneos.h. |
123 This is disabled by default since it seems to break the terms of the iPhone SDK agreement. It can be re-enabled in SDL_config_iphoneos.h. |
130 |
124 |
131 ============================================================================== |
125 ============================================================================== |
154 // Initialize the Game Center for scoring and matchmaking |
148 // Initialize the Game Center for scoring and matchmaking |
155 InitGameCenter(); |
149 InitGameCenter(); |
156 |
150 |
157 // Set up the game to run in the window animation callback on iOS |
151 // Set up the game to run in the window animation callback on iOS |
158 // so that Game Center and so forth works correctly. |
152 // so that Game Center and so forth works correctly. |
159 SDL_iPhoneSetAnimationCallback(screen->GetWindow(), 1, ShowFrame, 0); |
153 SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL); |
160 #else |
154 #else |
161 while ( gRunning ) { |
155 while ( running ) { |
162 ShowFrame(0); |
156 ShowFrame(0); |
163 DelayFrame(); |
157 DelayFrame(); |
164 } |
158 } |
165 CleanUp(); |
|
166 #endif |
159 #endif |
167 return 0; |
160 return 0; |
168 } |
161 } |