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.


Cutexture is available for download as a public repository on Github.


Cutexture uses the CMake build system. A build is invoked with

cmake -DCMAKE_BUILD_TYPE=”Release”


cmake -DCMAKE_BUILD_TYPE=”Debug”

Cutexture’s dependencies are:

  • Qt version 4.6 or higher, with qmake available on the system path when invoking cmake
  • Ogre3D version 1.6.4 or higher
  • Ogre Input System (OIS) 1.2.0

Specific installation paths for these dependencies are defined in CMakeLists.txt


Cutexture screenshot

Cutexture showing Qt widgets and a Google search


I would be happy to receive feedback on Cutexture and of course welcome any code contributions.

Update 2010-11-10: Added screenshot.



11 thoughts on “Cutexture: A Framework for Qt User Interfaces in Ogre3D

  1. Nice!

    My first attempt to build it using cmake failed, it could not find ogre headers. Note: I didn’t like to have to copy headers to the location specified in CMakeLists.txt, so I edited that file to have it look in the location where I already have the headers, maybe I did it wrong. Then I tried with the original CMakeList.txt, placing ogre headers and ois headers where the script expect them but still no look, headers where not found.

    I get to compile it in Ubuntu 10.04 by starting a new Code::Blocks empty project file and then add each cutexture cpp and h file to the project and configure the project build options as indicated in Ogre wiki. Is this project file of any interest to you? It should work for everyone if in Linux and as long as it is in cutexture root directory.

  2. The reply is very late so maybe it is no longer needed info but editing CMakeList.txt is the right thing to do in my opinion at this point. Ideally there would be a separate CMake file where only the build paths would go into, defaulting to a path such as /usr/include so that you would not have to touch the main file. However, this is currently not implemented.

    In general, the project should compile under all platforms that Ogre and Qt support. Personally, I have created Windows and Linux builds successfully.

  3. Pingback: OGRE 3D 1.7 Beginner’s Guide: book review & giveaway | Advancing Usability

  4. You may speedup your solution if:
    1) Use signal QGraphicsScene::changed only to mark texture/QImage as dirty and call QGraphicsView::render only if dirty just before OgreCore::renderFrame()
    2) Render directly into the texture by constructing a QPainter with QImage ( uchar * data, int width, int height, Format format ) where data, width and height are you locked texture and use as before QImage::Format_ARGB32 as format.

  5. @JH
    I now ran into your problem as well. Basically your IDE (i.e. Code::Blocks) was bypassing cmake and trying to compile the project by itself. This doesn’t work and you need to change your IDE to run cmake and then use the generated Makefile.

    Thanks for the tips! I’ve implemented both changes and performance has definitively improved a lot. You can find the updated code at Github.

  6. Pingback: How to integrate Ogre3D into a Qt5 QML scene | Advancing Usability

This blog is no longer actively maintained

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s