[Interest] Are there limits to the number of vertices that can be allocated on a QSGGeometry?

Shawn Rutledge Shawn.Rutledge at qt.io
Wed Oct 20 18:49:58 CEST 2021



> On 2021 Oct 20, at 18:11, Nuno Santos <nuno.santos at imaginando.pt> wrote:
> 
> Hi Shawn,
> 
> Thank you very much for your reply and clarification.
> 
> My next question is, what is the best way to work around this?
> 
> Should I create a QSGGeometryNode that draws an element and then create a node for each element?
> 
> Do you think this will degrade the performance?
> 
> Is there any other way of making it more performant?

Probably the ideal thing to do is break up the vertices into chunks somewhere around the 64k limit, but maybe the graphics guys will have something else to suggest.  I was just working on Text recently: each character is a quad (so the limit is 16k characters per node); and if you render too much text in one Text item, the first node creates more, as children of itself.  That was already working since early Qt 5 releases; I just did some optimizations recently to save memory and time while generating those; and now in 6.2 all the children are direct children rather than being recursively nested.  So that’s one way to break it up when you have too many vertices.



More information about the Interest mailing list