[osg-users] Best Practices and Switches
David Heitbrink
david-heitbrink at uiowa.edu
Tue Apr 30 12:47:42 PDT 2019
Thank you for your reply.
In general my CPU load is pretty good, what I am really concerned about is reducing the number of OpenGL calls/driver overhead. If I have 200 signs all under there own switch, each sign is only 4-64 triangles each, and all the signs share the same texture mosaic. Having 200 unique drawls can get expensive, especially for such a low poly objects. Ideally the 200 street signs would get combined in the same draw object. My assumption was this cannot happen with each sign being under its own switch.
My second question is 2 part, if I remove the switches, would I want to then export the result to a file and reload the file run, then run the optimizer. Or would the performance of the optimizer be all the same if I ran it on a graph that I had just programmatically removed the switches from. I am basically concerned with running into "nodeWeCannotRemove".
Also, the second part is......what criteria does the MERGE_GEOMETRY option use to merge geometry.
For example lets say I wanted to go a step further, and remove the textures from the state sets, and add an attribute for a texture index for each vertex. Then I could say use a texture array or bindless texture in the shader to reference the texture to use. We should be able to start combining nodes with dissimilar textures.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75924#75924
More information about the osg-users
mailing list