How to integrate Ogre3D into a Qt5 QML scene

Recently I’ve been checking out again how to integrate Ogre3D into a Qt application. My previous effort Cutexture can be found here, here and the code here. This was nice as a simple integration but didn’t use modern graphics systems as efficiently as it could.

Fortunately the people at Nokia (when they were still interested in Qt) did publish a demo application qmlogre here that integrates Ogre3D into a Qt Quick QML scene by having Ogre render into an OpenGL Frame Buffer Object (FBO) which is in turn added to the QML scene as a textured item. However, this demo was relying on internal Qt headers that are not supposed to be used in production projects.

With a helpful comment I found here, I was able to update the qmlogre example to no longer rely on those internal Qt headers and to build fine with the latest stable Qt 5.0.1. In the hope that others may find it useful, I’ve made the revised code available on my Github account at https://github.com/advancingu/QmlOgre

Let me know in the comments what you think.

Edit: Here is a video of the original qmlogre application.

Cutexture: A Framework for Qt User Interfaces in Ogre3D

Today, I’d like to write about the results of a development effort which I undertook together with former co-worker Kevin Lang in our spare-time. Our goal was to create a small but fine PC game but unfortunately it never saw the light of the day. We therefore decided to release the game-independent source code of these efforts to the public as we believe we developed a novel approach to integrating Qt User Interfaces into the Ogre3D development framework.

In a nutshell, this new framework called “Cutexture” should provide developers with the following benefits over off-the-shelf User Interface solutions available for Ogre3D:

  • The full range of Qt’s widgets can be used in Ogre3D, including the Webkit webbrowser component, enabling completely new ways of integrating Web content into 3D environments.
  • Powerful: Qt is one of the most powerful User Interface toolkits currently available.
  • Ease of development: Qt’s .ui files are supported for rapid User Interface development with Qt Designer.
  • Reliable: Using the proven Qt framework, widgets are rendered into a texture instead of relying on unstable overlay techniques provided by desktop environments.
  • Flexible: Possibility to extend Cutexture to use Qt widgets as textures on arbitrary Ogre objects.
  • Open Source: Cutexture is available under the “MIT license”, thereby providing full source code access to the framework while allowing the development of proprietary (closed source) applications.

Download

Continue reading