What should be the default render queue for Items and Entity, i.e. right now it is:
Code: Select all
item->setRenderQueueGroup( 0u ); entity->setRenderQueueGroup( 1u );
Code: Select all
item->setRenderQueueGroup( 10u ); entity->setRenderQueueGroup( 110u );
Back when I started Ogre 2.0, I didn't want to risk breaking things more than they already were; and thus I hesitated to place Entities somewhere else other than RenderQueue group 0.
Then Items in Ogre 2.1 appeared, and Items went into RenderQueue group 0, and v1::Entity was displaced to group 1 (because v2 and v1 objects can't live in the same render queue group).
However lately from two entirely different fronts, I've met with the problem that often we want a specific object to be drawn first.
But we can't do that. Because all objects are already on RQ 0, which means the only solution is to manually switch all other Items to higher RQ, so that this particular object can be rendered first.
Another issue, is that by default all RenderQueues except RQ 0 default to V1_FAST. This often causes cryptic crashes because items are in a RenderQueue with the wrong mode. Back then it made sense because users porting their codebase from Ogre 1.x would use v1 objects more often than v2 ones.
But now users are adopting v2 objects more frequently, and now that we're all more acquinted with Ogre 2.1+, I think this change wouldn't actually cause any damage.
Now that v2 objects have been long enough, I propose the following:
- RenderQueue ID range [0; 100) & [200; 225) default to FAST (i.e. for v2 objects, like Items)
- RenderQueue ID range [100; 200) & [225; 256) default to V1_FAST (i.e. for v1 objects, like v1::Entity)
- By default new Items and other v2 objects are placed in RenderQueue ID 10
- By default new v1::Entity and other v1 objects are placed in RenderQueue ID 110
Edit: In case you're interested, the 2 fronts I mention are the Hidden Area Mesh for optimizing VR rendering, and Sky rendering (when rendering it late is not possible).