Original Post
Which way is the best to optimize the drawing of objects? To draw all polys with the same texture and switching the modelview matrix as you loop through the objects, or to draw all objects independantly and switch the texture as you loop through all the polys in the object?
A little pseudo code:
1) for all textures
{
set current texture
for all objects
{
set modelview matrix
draw bunch of polys with current texture
}
}
2) for all objects
{
set modelview matrix
for all textures
{
set current texture
draw bunch of polys with current texture
}
}
so, which way would be the fastest? To switch modelview or to switch texture?
Edited by - Lord Chaos on 6/23/00 1:21:09 AM