[SOLVED] Order when mixing Ogre::OverlayElement

fantasian

27-06-2010 12:58:46

I am mixing MyGUI Widgets with Ogre::OverlayElement's. The thing is, Ogre elements are drawn AFTER MyGUI.

Is there any way to change this?

Many thanks in advance.

my.name

28-06-2010 10:16:25

look at:
void OgreRenderManager::renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation)

if (Ogre::RENDER_QUEUE_OVERLAY != queueGroupId) // change this
return;

fantasian

28-06-2010 11:17:10

look at:
void OgreRenderManager::renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation)

if (Ogre::RENDER_QUEUE_OVERLAY != queueGroupId) // change this
return;

Dear my.name,

Thank you for the quick reply. I changed that to RENDER_QUEUE_MAX, but for some reason "renderQueueStarted" was never called with that ID, thus MyGUI was never rendered. Maybe, I should add the MAX queue in the SceneManager with "addSpecialCaseRenderQueue", but before that I decided to exchange renderQueueStarted with renderQueueEnded and it works great now.

Hope you approve of this change and not consider it as too hackish!

Thanks again