Ok, I've got that working now, just I added it to my loops for my tile map, and it draws it all, but this happens.
This is the loop being to draw it, doing x*x instead of x+x crashes with a First chance exception.
for (int x = 0; x < 250; x++){
for (int y = 0; y < 250; y++){
sf::VertexArray lines(sf::Quads, 4);
lines[0].position = sf::Vector2f(x, y);
lines[1].position = sf::Vector2f(x, y+y);
lines[2].position = sf::Vector2f(x+x, y+y);
lines[3].position = sf::Vector2f(x+x, y);
lines[0].texCoords = sf::Vector2f(0, 0);
lines[1].texCoords = sf::Vector2f(0, 16);
lines[2].texCoords = sf::Vector2f(16, 16);
lines[3].texCoords = sf::Vector2f(16, 0);
window.draw(lines, &t_grass);
}
}
Did I type something wrong?
Cheers