[Interest] [qt3d] Batching optimization

Xavier Bigand flamaros.xavier at gmail.com
Mon Sep 26 14:59:08 CEST 2016


Doesn't the scene graph of qt3d use the instancing and sort the draw calls
to reduce the number of state changes?
In our engine the win was big when I add the sort to reduce calls of
glUniform* and glBindTexture,... especially on Android and Windows.
We don't use instancing for the moment because it's hard for us to maintain
the backend, it's one of reasons I am planning the migration to qt3d.

In my opinion for qt3d the API have to expose a flag on entity to allow or
not automatic batching.
Else the automatic batching could be applied on meshes that doesn't have a
transformation and don't require to be rendered in a particular order (like
those with alpha).

I'll made some tests on our engine to evaluate the performance win, it may
be insignificance due to the sort.


2016-09-25 11:55 GMT+02:00 Sean Harmer <sean.harmer at kdab.com>:

> Hi Xavier,
>
> On 23/09/2016 17:13, Xavier Bigand wrote:
>
>> Hi,
>>
>> Does qt3d backend capable to batch geometries to reduce the number of
>> draw calls?
>>
>> In our case this optimization should improve performances a lot, because
>> we generate dynamically geometries that doesn't change often and are
>> created in world coordinates (no transformations applied).
>>
>
> Qt 3D does not yet do batching automatically. However we do support stuff
> that may help you.
>
> * You can use instancing if you have GL 3.2 or newer
> * You can do your own batching by putting such geometry into a single
> buffer, either
>
> ** to be rendered as a single entity if you don't need interaction with
> the individual parts or
> ** to be rendered as separate entities with GeometryRenderer's all
> referencing the same Buffer.
>
> The latter doesn't reduce the draw call count but does minimise the state
> changes related to binding different buffers.
>
> We hope to add automatic batching in the future but we're still looking
> into a nice API to expose this without reducing the control the user has
> over organising their data.
>
> Cheers,
>
> Sean
>
>
>>
>>
>> --
>> Xavier
>>
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
> --
> Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
> KDAB (UK) Ltd, a KDAB Group company
> Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
> Mobile: +44 (0)7545 140604
> KDAB - Qt Experts
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>



-- 
Xavier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160926/8f655403/attachment.html>


More information about the Interest mailing list