[2.1] There seems to be no system for 2D objects.

Design / architecture / roadmap discussions related to future of Ogre3D (version 2.0 and above)
Post Reply
dummy_98
Kobold
Posts: 34
Joined: Sat Oct 31, 2015 7:12 pm

[2.1] There seems to be no system for 2D objects.

Post by dummy_98 » Thu Nov 15, 2018 11:32 pm

In ogre 2.0, I could set the order to be drawn with setRenderQueueGroupAndPriority.

However, in 2.1

MovableObject :: setRenderQueueGroup
Renderable :: setRenderQueueSubGroup

It is adjustable by this function ... but the value is too small ...

RenderQueueGroup = 0, 254
Renderable :: setRenderQueueSubGroup = 0,7

ogre2.1 can only set up to about 1400.
And seems inefficient ...


I want to propose.

First, change the size type of Renderable :: mRenderQueueSubGroup from uint8 to uint32

Code: Select all

uint8 Renderable :: mRenderQueueSubGroup;
to
uint32 Renderable :: mRenderQueueSubGroup;
  

and....

When setting the hash value for sorting in RenderQueue :: addRenderable

Code: Select all

uint32 subId = pRend-> getRenderQueueSubGroup ();
And change the hash value directly to the RenderQueueSubGroup value?

Code: Select all

OGRE_RQ_HASH (subId, RqBits :: SubRqIdBits, RqBits :: SubRqIdShift) |
            OGRE_RQ_HASH (transparent, RqBits :: TransparencyBits, RqBits :: TransparencyShift) |
            OGRE_RQ_HASH (macroblock, RqBits :: MacroblockBits, RqBits :: MacroblockShift) |
            OGRE_RQ_HASH (hlmsHash, RqBits :: ShaderBits, RqBits :: ShaderShift) |
            OGRE_RQ_HASH (meshHash, RqBits :: MeshBits, RqBits :: MeshShift) |
            OGRE_RQ_HASH (texturehash, RqBits :: TextureBits, RqBits :: TextureShift) |
            OGRE_RQ_HASH (quantizedDepth, RqBits :: DepthBits, RqBits :: DepthShift);
Not just this

Code: Select all

hash = subId;
Can not you add this hash value setting?
0 x

Post Reply