[AD] iphone port

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I just committed what could be the beginnings of an iphone port. It's by
no means finished, but at least 2 other people asked to contribute to it
so far, so I guess better commit it soon. I'm also not sure when and how
regularly I will work on it myself.

What works is:

- touch input
- OpenGL graphics
- font addon
- image addon
- primitives addon
- color addon

What doesn't work:
- sound - openal is natively supported on iphone, just needs someone
adding the code
- lots of special blitting stuff, like memory bitmaps... needs someone
debugging it all
- properly setting up the display (right now it's hardcoded to 32-bit
RGBA with no depth buffer) - the view can only be created in the main
thread so this needs a bit of fudging things around, I'll probably fix
this next
- .png and .jpg format - those are native on iphone and should be loaded
with Apple's API instead of libpng and libjpeg
- .ttf fonts - haven't investigated yet
- physfs addon - haven't investigated yet - but .zip files apparently
are prohibited (xcode ignores them with a warning)
- documentation - except a short note in a5_readme.txt there's none yet

Building it:

cmake does not work with the iphone cross-compiler, so I had to create
an xcode project instead. It's included in SVN, but here's how to
recreate it anyway:

- create a new OpenGL ES project and remove all creates files in it
- add the addons/src/include/examples folders recursively
- create alplatf.h and so on for all *.h.cmake headers manually and also
add them
- add a new static library target called "allegro" and add its sources
- do the same for all addons
- add application targets depending on allegro and the required addons

It's a pain, and hopefully the cmake devs will soon add support for
iphone then we can remove all of this again.

The three examples in the xcode project is all I tested with, they seem
to work in the simulator as well as on the device.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/