Martin_unique
01-09-2003, 01:19 PM
Hello,
I'm somewhat confused on how to put textures and vertex arrays together. I thought that once you put all the data you want to draw into vertex arrays you're done - you just call glDrawArrays on the entire array and everything is rendered. But certain polygons in my code use different textures. Is there a way to specify which texture should be used for which vertices beforehand, or do I have to to it 'manually', which is: bind texture, draw a sub-range of vertices, repeat ? I would appreciate if someone could share his/her experience on this one.
Regards,
Martin
I'm somewhat confused on how to put textures and vertex arrays together. I thought that once you put all the data you want to draw into vertex arrays you're done - you just call glDrawArrays on the entire array and everything is rendered. But certain polygons in my code use different textures. Is there a way to specify which texture should be used for which vertices beforehand, or do I have to to it 'manually', which is: bind texture, draw a sub-range of vertices, repeat ? I would appreciate if someone could share his/her experience on this one.
Regards,
Martin