Vertex arrays + colors

Started by
0 comments, last by Zakwayda 19 years, 7 months ago
When I'm using vertex arrays, and the for example 4 vertices are red, the other 4 vertices are green. If I put that then in an array, there are 4 times the same color called. Isn't that a bit waste of time? And how's that exactly with texture coordinates?
Ever noticed how fast Windows runs? Neither did I.
Advertisement
I'm not sure what you mean about texcoords, but yeah you have to duplicate the colors in the array. Basically, for one api call such as glDrawElements(), it's all or nothing. Either you have the color array activated and you submit a color for each vert, or you deactivate the color array and set an overall color with glColor**(). So it's not really a waste of time. The api doesn't care whether the colors are the same or different - it's going to access them in the array either way.

This topic is closed to new replies.

Advertisement