You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the whole UI is drawn in one call, there is a limit on the number of textures you can have at once. I needed to have a much higher limit, so I hacked in separate draw calls for each LUISprite object, which lets you have as many different sprites with different textures as you want.
This was done by passing a vector down into render_recursive, and letting each object decide whether or not they want to put in a geometry and shader attribute object. This way, only the LUISprites get an extra draw call.
@tobspr If you think something like this is okay, I can clean it up and hide the functionality behind a define, then make a pull request. My commit is 264434d
The text was updated successfully, but these errors were encountered:
I would be fine if would be behind a define and documented, so its available in case you need it.
Do you, by any chance, had the possibility to measure the performance loss? Is it actually much slower?
There definitely is a performance loss, but I don't know if I'd call it a large one. I made a test with 200 LUIButtons, plus a variable number of LUISprites. I unlocked the frame rate and took some measurements with each number of LUISprites, then calculated the frame time from the fps and plotted it.
Github wouldn't upload my graph, so I had to put it here.
Since the whole UI is drawn in one call, there is a limit on the number of textures you can have at once. I needed to have a much higher limit, so I hacked in separate draw calls for each LUISprite object, which lets you have as many different sprites with different textures as you want.
This was done by passing a vector down into render_recursive, and letting each object decide whether or not they want to put in a geometry and shader attribute object. This way, only the LUISprites get an extra draw call.
@tobspr If you think something like this is okay, I can clean it up and hide the functionality behind a define, then make a pull request. My commit is 264434d
The text was updated successfully, but these errors were encountered: