SFML community forums
General => General discussions => Topic started by: Guardian on November 15, 2017, 09:22:32 pm
-
I'm reading the tutorial on sf::VertexArray ( https://www.sfml-dev.org/tutorials/2.4/graphics-vertex-array.php (https://www.sfml-dev.org/tutorials/2.4/graphics-vertex-array.php)) and I don't understand what happens if I try to draw a vertex array with a wrong number of vertices for his primitive type.
For example: what could happen if I drew a vertex array of 5 vertices using the sf::Lines primitive?
-
In my opinion you're asking the wrong question. You don't need to know what happens, but you need to find a way to prevent that it does happen. ;)
Might be implementation dependent and the GPU driver decides what really happens.
-
so it's an undefined behavior and I have to avoid it in every case.
Thank you.