Hi there!

Can anyone tell me if it is worth sorting faces by the texture they use, or GlBindTexture is fast enough to call before every face drawn?

Regards: Bagoj

Of course, the less you use glBindTexture the faster it is.

You are not forced to call it only once for each texture, but once for each triangle seems way too much.

If you have a doubt, try both methods, and see which is faster for you…

Well thanks, just as i thought. I asked it because if it is some simple task (eg seting a pointer to the texture) it is simpler and maybe faster than having a plus level of indirection (eg material->face->vertex->posX). But it seems now i have to make them in order by their material to bypass material-> .

Thanks again!
Regards: Bagoj