Hello everyone
I am trying to encorporate SFML LineStrip into my existing/working program and I am having some small difficulties. For one, I'm not sure how to use something that is within the PrimitiveTypes.hpp
But for some reason, when I try to use sf::VectorArray it complies but causes a runtime error. The typical dll error: pFirstBlock == pHead error
I feel like I linked it up properly (considering that in the existing program I use Circles, Rectangles, Text, various colors, etc.) but there could potentially be a small problem there. Otherwise I'm not sure why its working.
This is the code I'm trying to implement and if I comment everything, it works perfectly. If I comment everything except the first line, there is an error.
sf::VertexArray lines(sf::LinesStrip, 4);
lines[0].position = sf::Vector2f(10, 0);
lines[1].position = sf::Vector2f(20, 0);
lines[2].position = sf::Vector2f(30, 5);
lines[3].position = sf::Vector2f(40, 2);
at a later point I do gui.draw(lines, sf::RenderStates()); // in which gui is my window
again, it builds perfectly normally. There is an error at runtime. Thanks in advance.