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

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 http://irrlicht.sourceforge.net/forum/viewtopic.php?f=4&t=49585&p=285761#p285761

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 https://www.youtube.com/watch?v=93AELkHbBnA?
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!

https://plus.google.com/photos/106185541018774360364/albums/5964765088859640225/6117693729597851954?banner=pwa&pid=6117693729597851954&oid=106185541018774360364

I made this open source on Win32

cocos2dx over on irrlixcht 3d , use ogles1 ogles2 opengl
on ios, android, win32, macos
https://plus.google.com/photos/106185541018774360364/albums/6128347518156528913

git on proton_cm_open ~~~