Page 1 of 1

Let SimpleRenderable use the render priority

Posted: Sat Jul 21, 2012 11:18 pm
by Souvarine
Hi everyone.

I've made my own class deriving from SimpleRenderable and after wasting about one hour trying to understand why the render queue priority didn't have any effect on it I found this into Ogre's code

Code: Select all

void SimpleRenderable::_updateRenderQueue(RenderQueue* queue)
{
    queue->addRenderable(this, mRenderQueueID, OGRE_RENDERABLE_DEFAULT_PRIORITY); 
}
Is there any reason why all SimpleRenderable must use the default priority ?

I did this in my derived class and it works just fine.

Code: Select all

void SpriteRenderable::_updateRenderQueue(Ogre::RenderQueue* queue)
{
    queue->addRenderable(this, mRenderQueueID, mRenderQueuePriority);
}
Also, I think a getter for mRenderQueuePriority in MovableObject class would be useful.

Regards.

Re: Let SimpleRenderable use the render priority

Posted: Sat Sep 03, 2016 4:59 pm
by JamesAMD
Thank you ! You just saved me from additional few hours(or days) of headache. You sir, are my hero.
I'm not sure why this is not fixed even in 1.9.0.

Re: Let SimpleRenderable use the render priority

Posted: Fri Mar 03, 2017 7:35 pm
by paroj
fixed in 1.10. next time open an issue: https://ogre3d.atlassian.net/projects/OGRE/issues