Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
General
»
General discussions
»
Wrong numer of verteces in vertex array
Print
Pages: [
1
]
Author
Topic: Wrong numer of verteces in vertex array (Read 2370 times)
0 Members and 1 Guest are viewing this topic.
Guardian
Newbie
Posts: 4
Wrong numer of verteces in vertex array
«
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
) 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?
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11033
Re: Wrong numer of verteces in vertex array
«
Reply #1 on:
November 15, 2017, 10:01:15 pm »
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.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Guardian
Newbie
Posts: 4
Re: Wrong numer of verteces in vertex array
«
Reply #2 on:
November 15, 2017, 10:09:38 pm »
so it's an undefined behavior and I have to avoid it in every case.
Thank you.
Logged
Print
Pages: [
1
]
SFML community forums
»
General
»
General discussions
»
Wrong numer of verteces in vertex array
anything