vbovio
08-22-2007, 02:50 PM
what is better ?
1)
glBindTexture(texture);
2)
if (texture != activeTexture) {
glBindTexture(texture);
activeTexture = texture;
}
I have heard somewhere that glBindTexture is somewhat expensive, so probably option 2 is better, but I also have heard that the extra if is yet more expensive.. so which one is true ?
Thanks.
1)
glBindTexture(texture);
2)
if (texture != activeTexture) {
glBindTexture(texture);
activeTexture = texture;
}
I have heard somewhere that glBindTexture is somewhat expensive, so probably option 2 is better, but I also have heard that the extra if is yet more expensive.. so which one is true ?
Thanks.