I know that material changes are slow, so you dont want to be changing materials all over the place.
Do you organize your scene graph by material or by entity?
psuedo:
Material:
for each material
set material
for each model using this material
orient matrix
draw this portion of the mesh
Entity:
for each entity
orient matrix
for each material
set material
draw this portion of the mesh
The second one seems obvious but just how slow is a material change compared to say a matrix push translate 3rotates and a pop.
Another thing, how many materials is an exceptable count for models? A person it seems you''d need only one, but a car you''ll need one for the glass, body, tailights, headlights, maybe license plate.
Thanks