Original Post
Hi, I would like to know if this will slow down the rendering loop or not. Assuming I have a sorted list of materials; 10 red, 5 yellow, and 16 blue. If they are not sorted, there will be a big performance problem because of too many SetMaterial switches. My question is, after sorted, there are only three switches. However, for 10 red, I am still doing: // For red for(int i=0;i<10;i++){ g->SetMaterial(Red); g->....draw the mesh here; } In this case, does that 9 extra SetMaterial actually count as switches so it will degrade the performance like unsorted list? Thank you very much, Andy