https://github.com/fasterthanlime/hello-sdl2-ios6
C, SDL2, iOS 6.0, cmake = Great success!
https://github.com/fasterthanlime/hello-sdl2-ios6
Last synced: about 1 year ago
JSON representation
C, SDL2, iOS 6.0, cmake = Great success!
- Host: GitHub
- URL: https://github.com/fasterthanlime/hello-sdl2-ios6
- Owner: fasterthanlime
- Created: 2013-01-31T07:21:23.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-31T20:21:54.000Z (over 13 years ago)
- Last Synced: 2025-04-20T17:40:27.127Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 3.45 MB
- Stars: 16
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## hello-sdl2-ios6
Just testing out a pure C application using SDL 2.0 (still in dev),
OpenGL ES, running on iphonesimulator6.0, built using cmake + Xcode.
### How to build for the simulator
```
mkdir xcode && cd xcode
cmake -GXcode ..
open Hello.xcodeproj
```
Then hit 'Build and run' and you should see a red screen (exciting, right?)
### How to build for an actual device
When opening the XCode project, change the target to 'iPhone device'
and run it on your iPhone. Should work splendidly!
### Notes
The current project runs in iPhone 4 non-retina resolution.
If you want retina-resolution, you'll have to change it in
the code (`src/main.c`).
### Why!?
Partly because I'm investigating porting my ooc games to
iOS (and Android) - read [this post for example](https://amos.me/blog/2013/braindump),
and partly because I can't for the love of me find some
good example code of SDL 2 to be compiled for iOS, so there
we go, it's there, have fun.
### Credits
This repo is heavily inspired from [this 2011 tutorial by Amin Ronacher](http://immersedcode.org/2011/4/25/sdl-on-ios/), albeit my code works with more recent
versions of SDL and the iOS SDK - and it's pure C, not C++ :)