Original Post
here''s my general algorithm
please tell me what you think ..
for(every texture) if(texture.used)
{
dev->settexture(texture);
// meshes can use only one texture
for(every mesh using this texture) if(mesh.used)
{
dev->setstreamsource(mesh);
// change dev fvf if necessary
for(every frame using this mesh) if(frame.visible)
{
dev->setworldmatrix(frame.mtx);
mesh->render;
}
}
}
-- the whole point is to be able to switch to vertex shaders easily .. it boils down to whether texture changes or stream source changes are more expensive