Hi CEGUI community.
I'm currently interested in porting CEGUI to Android. So far a have successfully built the GLES1 render module and the core CEGUI modules and I have a simple demo running (the OpenGLESTest Demo).
I want to point out that at the moment building is not very user friendly and is not documented.
I'm thinking to try do write a ResourceProvider that reads for the android asset directory and eventually write a GLES2 Renderer Module.
So i'm asking what are your thoughts about the proposal i'm giving ?
I have created a fork on github: https://github.com/ironsteel/cegui Checkout the android branch if you want to see the mess
I will also publish the source for the demo soon.
P.S. If you have some questions on the details, fell free to ask
An attempt to do a Android port
Moderators: CEGUI MVP, CEGUI Team
Re: An attempt to do a Android port
Cool!
I wanted to play with a port of CEGUI to Android at some point but I have no hardware with Android at all
Keep in mind that CEGUI is still very keyboard/mouse oriented and touch input has to be hacked around a bit. We do want to improve that at some point but it won't happen for CEGUI 1.0
PS: I wonder what this is and whether it will pose any difficulty when merging your stuff back to upstream CEGUI repository - https://github.com/ironsteel/cegui/comm ... 5eaad3f1c6
I wanted to play with a port of CEGUI to Android at some point but I have no hardware with Android at all
Keep in mind that CEGUI is still very keyboard/mouse oriented and touch input has to be hacked around a bit. We do want to improve that at some point but it won't happen for CEGUI 1.0
PS: I wonder what this is and whether it will pose any difficulty when merging your stuff back to upstream CEGUI repository - https://github.com/ironsteel/cegui/comm ... 5eaad3f1c6
Re: An attempt to do a Android port
Well I'm actually fixing the mess right now, I may have some questions regarding the CMake Scripts, but they will popup soon.
As for the touch support, yes it will be a little challenging. I'll merge the default branch from sourceforge as soon as possible.
P.S. If you have any suggestions (critics), throw them at me
As for the touch support, yes it will be a little challenging. I'll merge the default branch from sourceforge as soon as possible.
P.S. If you have any suggestions (critics), throw them at me
Re: An attempt to do a Android port
OpenGL ES 2 specification is pretty close to OpenGL desktop 3.2 Core Profile, i wrote the OpenGL 3.2 Core Profile compatible renderer (OpenGL3Renderer) for cegui. It is based on the OpenGL renderer and i changed everything needed to remove all deprecated code, so you might wanna look at it when you do the OpenGL ES 2 renderer for android.
Additionally i recommend you to use the glm lib for that case - it is headers only and you should be able to compile this on android afaik. This is also used in the OGL3 Renderer because you need it for matrix stacks and calculations etc etc.
I hope this is helpful for you
Additionally i recommend you to use the glm lib for that case - it is headers only and you should be able to compile this on android afaik. This is also used in the OGL3 Renderer because you need it for matrix stacks and calculations etc etc.
I hope this is helpful for you
CrazyEddie: "I don't like GUIs"
Re: An attempt to do a Android port
Thanks for the useful information about the OpenGL3 <-> GLES2 similarity. I've already used glm in a simple project for android using GLES2, so is should not be a problem.
Re: An attempt to do a Android port
Hi, I have cleaned up the mess in a new branch.
You can see the diff comparing the master branch here: https://github.com/ironsteel/cegui/compare/master...android-port
Tell me if you have some remarks on what i have done so far.
You can see the diff comparing the master branch here: https://github.com/ironsteel/cegui/compare/master...android-port
Tell me if you have some remarks on what i have done so far.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: An attempt to do a Android port
The changes in the linked diff look pretty minimal - so that's cool. The only thing that IMO you should not be doing is specifying the EGL lib name explicitly in the 'cegui_target_link_libraries' line - if it's not working without that then I think the OpenGLES 'find' module should be fixed so that the appropriate libs are put in the variable (then it should be handled via the 'cegui_add_dependency' macro.
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: An attempt to do a Android port
Hi, I've added a cmake script for finding EGL and then including it to the list of dependencies for the OpenGLES Renderer Module.
You can see the diff: https://github.com/ironsteel/cegui/compare/master...android-port
You can ignore my bash helper scripts. Well you can look at the build_android.sh script which invokes cmake for configuring.
For the cmake configuration step i'm using the android-cmake-toolchain for projects that use cmake, which then compiles them with the android ndk toolchain.
I'have a question:
Is it possible to tell cmake to search for the dependencies in other dir's. I've seen that the main CMakeLists.txt has a option for Win32 and MACOS, i've tried it but no result.
I'm asking the question because right now I'm copying the deps (freeimage, freetype, iconv, tinyxml) to the android toolchain directory in the appropriate dir for the platform and architecture, which is not the right way I think.
OGRE has this option in there cmake scripts when building for MACOS, WIN, ANDROID. I have looked there script, but I can't quite understand it, because i'm not very familiar with cmake.
So any pointers on this ?
Thanks in advance.
You can see the diff: https://github.com/ironsteel/cegui/compare/master...android-port
You can ignore my bash helper scripts. Well you can look at the build_android.sh script which invokes cmake for configuring.
For the cmake configuration step i'm using the android-cmake-toolchain for projects that use cmake, which then compiles them with the android ndk toolchain.
I'have a question:
Is it possible to tell cmake to search for the dependencies in other dir's. I've seen that the main CMakeLists.txt has a option for Win32 and MACOS, i've tried it but no result.
I'm asking the question because right now I'm copying the deps (freeimage, freetype, iconv, tinyxml) to the android toolchain directory in the appropriate dir for the platform and architecture, which is not the right way I think.
OGRE has this option in there cmake scripts when building for MACOS, WIN, ANDROID. I have looked there script, but I can't quite understand it, because i'm not very familiar with cmake.
So any pointers on this ?
Thanks in advance.
Re: An attempt to do a Android port
Happy New Year CEGUI community !
It's been a while since I've last wrote my last forum post.
I have written some how to's on how to build CEGUI and run the sample application on android.
I have solved the issue with the dependencies search in CMake. The problem was in the cmake toolchain. I've copied the cmake toolchain file from the OGRE project.
You can see the diff for CEGUI changes here: https://github.com/ironsteel/cegui/compare/master...android-port#files_bucket
I have made some changes to the CMakeLists.txt file and added a parameter to the OpenGLES renderer bootstrapSystem() method for passing a custom resource provider for reading from the android assets directory.
You can find the instructions for building CEGUI here: https://github.com/ironsteel/cegui/blob/android-port/README.md
And the instructions for building the demo app here: https://github.com/ironsteel/cegui-android-test/blob/master/README.md
There are little bit frustrating but they will be improved.
If you have problems shout them loud to me
Next thing I will try is to build and run some of the more bigger examples from the example framework.
Once again if you have some suggestions or critics please throw them at me
It's been a while since I've last wrote my last forum post.
I have written some how to's on how to build CEGUI and run the sample application on android.
I have solved the issue with the dependencies search in CMake. The problem was in the cmake toolchain. I've copied the cmake toolchain file from the OGRE project.
You can see the diff for CEGUI changes here: https://github.com/ironsteel/cegui/compare/master...android-port#files_bucket
I have made some changes to the CMakeLists.txt file and added a parameter to the OpenGLES renderer bootstrapSystem() method for passing a custom resource provider for reading from the android assets directory.
You can find the instructions for building CEGUI here: https://github.com/ironsteel/cegui/blob/android-port/README.md
And the instructions for building the demo app here: https://github.com/ironsteel/cegui-android-test/blob/master/README.md
There are little bit frustrating but they will be improved.
If you have problems shout them loud to me
Next thing I will try is to build and run some of the more bigger examples from the example framework.
Once again if you have some suggestions or critics please throw them at me
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: An attempt to do a Android port
Happy new year to you, too.
Still don't have an android device to test any of this on But looking at your commits makes me feel bad, because I am reminded that I always forget to update the GLES Renderer module whenever I change the CEGUI::Renderer interface
Hopefully later this year (maybe before the fabled CEGUI 1.0 release) we can get these changes merged
Still don't have an android device to test any of this on But looking at your commits makes me feel bad, because I am reminded that I always forget to update the GLES Renderer module whenever I change the CEGUI::Renderer interface
Hopefully later this year (maybe before the fabled CEGUI 1.0 release) we can get these changes merged
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: An attempt to do a Android port
Still don't have an android device to test any of this on
You can test it on the android emulator, I have written instructions for how to run the sample on the emulator here: https://github.com/ironsteel/cegui-android-test/blob/master/README.md.
But looking at your commits makes me feel bad,
I'm sorry for the introduced parameter in the bootstrap method, needed to pass my custom resource provider.
If you can point me how can i set a custom resource provider without modifying the code. I have searched the sources for such an option, but didn't find any. I should look again because I may be missing something.
As for the android sample app, it needs some fixes, cause i'm not handling right the lifecycle android callbacks and some other things (can't remember right now ).
A question out of curiosity, are others interested in this port ? I'm not giving it up, just asking. I'm doing this just for fun, not for any particular usage, but might come up with one for future projects.
This is for now, I will continue to write here if I have missed something
Cheers
-
- Just popping in
- Posts: 1
- Joined: Tue Feb 12, 2013 18:16
Re: An attempt to do a Android port
A little history: I have started porting Ogre to android, rewriting it in java. Most of it is now done and have released a game that uses an engine with the Ogre renderer. Until now I have used the basic overlays that Ogre provides for GUI but I would like to add CEGUI instead.
Since I am not planning to rewrite this one in java the only option is to use it with the NDK and adapt it to the android requirements. Since the Ogre part is java and CEGUI is C++ I will have to use SWIG and maybe GWIS to make them communicate.
I have just started looking thorough CEGUI docs so I am not yet familiar with the project, but as I get up to speed I may be able to contribute to the android C++ port. From what I understand the big thing is the multi touch support that is not integrated in CEGUI. I am intending to release the game on PC and not limit myself to android so the android port should keep the mouse and keyboard parts intact. Is this the intended goal of CEGUI android port?
Since I am not planning to rewrite this one in java the only option is to use it with the NDK and adapt it to the android requirements. Since the Ogre part is java and CEGUI is C++ I will have to use SWIG and maybe GWIS to make them communicate.
I have just started looking thorough CEGUI docs so I am not yet familiar with the project, but as I get up to speed I may be able to contribute to the android C++ port. From what I understand the big thing is the multi touch support that is not integrated in CEGUI. I am intending to release the game on PC and not limit myself to android so the android port should keep the mouse and keyboard parts intact. Is this the intended goal of CEGUI android port?
Return to “CEGUI Library Development Discussion”
Who is online
Users browsing this forum: No registered users and 19 guests