glDrawArrays and using vector size for last parameter

Started by
0 comments, last by Brother Bob 12 years, 7 months ago
I'd like to use the length of the vertex array as the third parameter in the dlDrawArrays function, since it determines how many vertexes that needs to be drawn. However, it causes some really weird behaviour in the program. Whenever I use "78" which is the vertex count for the model, everything works nicely.

Why does vector.size() cause this problem and what would be the better solution? I don't like having the actual vertex count number in there.
[attachment=5319:Untitled-1.jpg]
"Rodimus and Unity" - My developer journal
Advertisement
Are you sure that the size of the vector is actually 78? Check the actual value returned by size().

This topic is closed to new replies.

Advertisement