PDA

View Full Version : GlBindTexture?



Bagoj
02-08-2004, 09:34 PM
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?

Thanks!
Regards: Bagoj

ZbuffeR
02-09-2004, 01:09 AM
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...

Bagoj
02-09-2004, 09:19 PM
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