glDrawElements and count parameter over or under

What will happen if I have

glDrawElements count parameter set to say 1024 and the VBO for vertices say has less than the count parameter calls for? I have some patches that don’t end up with a nice 32x32 square and I am sending in that amount for the count, so I am concerned with the patches that aren’t 32x32. Those non 32x32 patches will have less than 32x32 vertices.

Worst case: It crashes.

It is your responsibility to give correct information to the driver.

Jan.

Indeed, a crash might happen, but a more likely problem is geometry corruption, random triangles etc. Don’t make invalid call, by the old principle: crap in -> crap out.