Friday, April 27, 2012

Any GUI libaray for iPhone & Android based on OpenGL ES?


Since both iPhone and Android support OpenGL ES, is there any open source or commercial GUI library we can use for these two platforms? Or is it doable (or how difficult) to port an application from one to another platform?



As I know, for iPhone only, libNUI (http://www.libnui.net) is a good choice (dynamic layout & mature), but it only provides GPL & commercial license. Any other open source tool similar with libNUI?


Source: Tips4all

3 comments:

  1. Clutter is by far your best bet. ( I made this question a while back for iPhone, located here ) . There where some builds of Clutter for iPod/iPhone at the time, but I don't know if they are still there, however I know that the work involved in doing such builds shouldn't be to heavy.

    For android you would have to do the Java Bindings, totally possible though, and maybe someone already made them.

    Good luck!

    ReplyDelete
  2. I wouldn't think there would be a library that will work across both platforms since iPhone stuff is written in Objective-C and Android is C/C++/Java.

    ReplyDelete
  3. I have never used it but I just read about cocos2d-android earlier today.

    From their site:


    cocos2d for Android is a framework for
    building 2D games, demos and other
    graphical/interactive applications. It
    is based on the cocos2d-iphone design:
    it uses the same API, but instead of
    using objective-c, it uses java.


    (here is a link for cocos2d-iphone)

    So yeah, I have never used it, and I don't think you will be able to share source files between the 2 platforms because as they mention it uses Java instead of objective-c

    It may be possible to create a library that can be used by both platforms, but I am not 100% sure about this. The Android NDK (native development kit) allows you to write some functions in C and C++ and hook into them in an Android application via JNI (Java Native Interface). The latest NDK supports OpenGL ES 2.0 So it may be possible to share code, but I am really not sure.

    ReplyDelete