Cocos2d on Qt

I suppose the Editor can be created based on Cocoshop

http://www.cocos2d-iphone.org/forum/topic/15668

As always you guys amaze me :smiley:
Great work Walzer and congrats to your team worker for pulling this off (y)

I did a little test for demonstrating cocos2d-x for QT based on win32 :smiley:
But I had to spend sometime to modify the latest code, like setting up the GLEW, and integrating the view with qt’s main window(ouch! I just want to make an editor, not only a game).

Now I’m looking forward to this port can be used on mac! Can’t wait!
Is there anything I can help for the qt porting work?

Hi,

I’ve done a port of cocos2dx on Qt platform using OpenGL ES on all qt supported platforms. It is a bit messy for the third party libraries part but here’s what I found out doing the port:

  • on win32 using the PowerVR OpenGL ES drivers I got HelloWorld example to work ok, no issues. I’ve used the third party libraries from the native Win32 port.
  • on Symbian I had to port also the third party libraries (some of them reused from other open source projects with small changes e.g. libpng and libxml2). The issue here is that some of the required extensions are not available in the drivers (OES_framebuffer_object). Although the hardware has support because in OpenGL ES 2.0 this is standard, the OpenGL ES 1.1 drivers on the tested device (Nokia N8) don’t have the extension enabled (doesn’t appear in the GL_EXTENSIONS string and eglGetProcAddress returns NULL, and I tried getting them right, after setting the current GL context with eglMakeCurrent).
  • on Nokia N9 (MeeGo Harmattan), I could reuse some of the third party libraries that come with the Madde platform, but as with Symbian the OpenGL ES 1.1 drivers don’t have the framebuffer extension.
  • don’t know how it will fare on Mac OS X or Linux. On Linux I know that PowerVR have also a OpenGL ES 1.1 and 2.0 implementation, but don’t know about Mac OS X.

I’ve decided to use OpenGL ES on all platforms supported by Qt as it would have been easier to maintain, and this way it is a single code base for all these platforms, but unfortunately from my experiments it seems that on Symbian and MeeGo it is not working. I didn’t investigate further inside Cocos2Dx to see if that extension is essential or used only by few features of Cocos2Dx.
Maybe an OpenGL ES 2.0 port would seem more feasible for Qt as framebuffer functionality is standard in 2.0. An OpenGL ES 2.0 port on Qt would add Win32, Linux, (maybe Mac OS X), Symbian, MeeGo in the equation with a single code base.

Cheers,
Catalin

Forgot to mention that there are also unofficial ports of Qt to iOS and Android, and maybe even Windows Phone in the future as Ahmed stated previously so a Qt port would make it very easy to maintain the library and also the developer’s games. But from my point of view this would be feasible for an OpenGL ES 2.0 port of Cocos2Dx where current GL features required by Cocos2Dx are standard on all OpenGL ES 2.0 implementations.

@Catalin Moldovan what you’ve accoplished is really great!

Now I hope cocos2d-x guys will merge your work ASAP :slight_smile:

Thank you!

Regards.


Please,

Hello everyone

I would like to say special thanks to all the efforts from you guys

As I mentioned earlier am not expert with openGL

I will try to test this soon but these days am a little busy with other projects

Anyways thank you guys

Let’s Hope Qt will be everywhere, so write once -> Deploy everywhere :slight_smile:

Is this Qt port dead. I do not see any commits here https://github.com/honghui/cocos2d-x/tree/QtPort for months. What’s the status and plan?

For those interested there is working port of cocos2d-x to Qt here: https://projects.developer.nokia.com/cocos2dxqt

Cheers,
Catalin

I have some stupid questions……

Why do you want to port Cocos2d-x to Qt? Isn’t Cocos2d-x already crossplatform? What advantages will you gain from it? Is it just cross platform awesomeness if you do?

Aha!, i has merged https://github.com/honghui/cocos2d-x/tree/QtPort with https://projects.developer.nokia.com/cocos2dxqt.

my repo: https://github.com/yinjimmy/cocos2d-x.
Hope it help somebody and welcome to submit bug and patch.

Why cocos2d-x with Qt?? Because we want XXOO editor.