Original Post
I know that many things, such as SetTexture, are choke points in the rendering engine, and so should be minimized. Is SetStreamSource one of these?
For example, let''s say I have 3 types of models. A-Ship, B-Ship, and asteroid. Let''s say I have 3 textures, Ship-Gray, Ship-Blue, and Rocky. Ship-Gray and Ship-Blue fit on both A-Ship and B-Ship. Now I submit to my render queue A-Ship-Gray, Asteroid-Rocky, A-Ship-Blue, B-Ship-Gray, A-Ship-Gray, B-Ship-Blue, B-Ship-Blue. At current my render queue would render it thus:
Ship-Gray A-Ship B-Ship A-Ship Rocky Asteroid Ship-Blue A-Ship B-Ship B-ShipWhere each model setstreamsource. Now would it be better if I resorted it so that it did this:
* = Denotes a setstream.
Ship-Gray
* A-Ship
A-Ship
* B-Ship
Rocky
*Asteroid
Ship-Blue
* A-Ship
* B-Ship
B-Ship
Or would the code for sorting these properly more likely take up more time than just SetStreamSource for the same model?
(Yes, I know, profile and find out. However, I''d like to know if anyone else knows before I reinvent a wheel that may be square.)