View Full Version : vertex-arrays and textures

07-27-2002, 10:02 AM
my question is: How do you tell gl which texture to use for which polygon? You donīt use glBindTexture, do you? I mean that would mean you could use glDrawElements, etc. only for one texture, then have to switch to the next texture, etc. This would make vertex-arrays very useless, i think. So, how do you do it?
Also i tried it. I used BindTexture and then glDrawArray and i got no textured polys, only one gray mass.


07-28-2002, 06:09 AM
The only way to change texture is by using glBindTexture. Yes, that means you can't change texture in the middle of a vertex array. But since you can't change ANY states in a vertex array, not being allowed to change texture makes sense.

And no, it doesn't make vertex arrays useless. Just sort your primitives so that you can draw all triangles with the same texture (same state setup in general) at the same time.