Is it that possible to use cocos2dx's GUI in other 3d game engine( irrlicht )? Help me out!

Is it that possible to use cocos2dx's GUI in other 3d game engine( irrlicht )? Help me out!
0.0 0


we use irrlicht to do the 3d things, but irrlicht’s gui is poor in mobile device( like multi-touch, table view and some animation),
so we consider cocos2dx, which has a wonderful GUI. and my question is: how much work it will take to make this two engine
work together? which version of cocos2dx is recommend?
PS: in irrlicht, the gui job is done with a function called ‘guienv->drawall()’ in the main-loop, so can the cocos2dx do the some thing this way?

sorry for my poor english, any comments/helps is welcome! :smiley:


I post the question in irrlicht’s forum as well

Now cocos2dx’s gui code has been compile into a irrlicht sample projects, but the init code contains conflicts, If anyone here
has any ideas to solve, COMMENT please :slight_smile:


My only comment is “this is probably not going to give you good results.”


@corytrese Why? I can not get you :slight_smile:


zyy571137 wrote:

@corytrese Why? I can not get you :slight_smile:

You are taking two different game engines, each of which has a very different design, and forcing them to run in the same process.

I would not recommend this based on my experience with Cocos2d-x and irrlicht codebases. Having implemented under both I would not mix.

You may be a much better programmer than me, however, and carry it off beautifully. Don’t let me discourage you if you think it’s brill.


@corytrese Thanks for you replay. Now I can compile this two engine together, but my knowleage of opengl is limit, so I really need some help from others. If this two engine can work together, It will be a ‘waa’ for both of them :), I will try.


i like it too , can you post you code and project , then i can try it .


While you can generally mix cocos2d-x with other libraries (for example, I use it with LibVLC on Android), it’s probably going to be very hard with another game engine.

The reason is simple : both use OpenGL, and as far as I know, OpenGL relies a lot on the assumption that inside a same app, only 1 person is going to use it, which means there are a lot of shared states. If you try to have 2 game engines run in the same app, there is probably going to have conflicts between the 2 game engines at the OpenGL level.

A possible workaround would be to have 2 entirely separate OpenGL surfaces (or whatever they are called on your platform). Unfortunately, I am not sure all platform allow that. That would be very interesting to try.

On other project, generally you leave the OpenGL surface for cocos2d-x and use other surfaces for the other framework.

Good luck, and keep us updated about your progress.


What cocos can do? I think almost everything.
Did you saw this video
i’m thinking about to put cocos2dx to make my dinner. (just kidding)


Real case~

Irrlicht 3D + Cocos2D on IOS by Mun


Here is my building sample, thanks for Mun!

I made this open source on Win32


cocos2dx over on irrlixcht 3d , use ogles1 ogles2 opengl
on ios, android, win32, macos

git on proton_cm_open ~~~