I'm trying to implement Qt-in-Ogre based on
Assaf's native OpenGL render code. I've configured Qt and Ogre to share an OpenGL context (Qt can be configured to render into OpenGL with surprising ease), and I manually step Qt at the point at which the example code calls NativeRender. Qt's rendering, which appears as expected when Ogre is not sharing the GL context, is absent, and stranger still, Ogre's rendering is hidden by solid white—probably the result of the clearPass, but that isn't supposed to be drawn over the whole scene as far as I can tell. The only serious diversion I've made from the example is to omit the code
Code: Select all
if (queueGroupId != RENDER_QUEUE_MAIN)
return;
as I cannot determine its function, and RENDER_QUEUE_MAIN appears to be undefined. Qt's actions on the GL context may include a buffer swap, and as such I call update(false) on my render window instead of using a more traditional Ogre mainloop to disable Ogre's own buffer swapping; as Qt acts at the end of the render queue, I don't expect this to cause problems, but it may be relevant. If I allow Ogre to perform its own buffer swap, on top of that presumably performed by Qt, Ogre appears to render normally (i.e. no white filling the display) but still with no Qt rendering visible. Anybody know what I might be doing wrong?
For reference, my code is visible here: