Well I've got a simple Ogre widget, and a corresponding GraphicsView widget, along with a couple of subclasses for those implementing some more demonstrative functionality, and finally a simple demo app, mixing Qt and CEGUI (not sure why you'd want to in reality, but anyway...)
If you're not interesting in building the Ogre demo, the most important bit of code to look at is probably in QOgreGLWidget::initializeGL().
The idea is to get Ogre to use an existing window (which requires that you know its XVisualInfo), and to switch between QGLWidget and Ogre GLXContexts at the appropriate times so neither find themselves in an unexpected state.
The final point is to ensure that both Ogre and Qt don't try to swap buffers; I let Qt do it so that the QGLWidget can get a chance to draw over the window after Ogre's done with that frame.
Apologies for the roughness; I got bored of tidying it all up :P.
Also, I think there was something else I was planning to add to this post, but it's two in the morning so I'll see if I remember tomorrow...
Edit: I think it might have been that there's a bug in Ogre which this triggers. Nothing desperate - you get X Errors when the widget is destroyed; I've provided a patch.
(Just noticed that CEGUI widgets, including the mouse cursor, are resized along with the window. Text correctly manages to remain the same size though and I'm performing the resize notifications to CEGUI in the same place, so I don't see what's wrong. Guess I must have missed something.)
Bookmarks