So im pretty new to SFML. i've been trying to get a section of a tileset to repeat in a vertex array but it just stretches it, any one know a solution if so that would be a great help.
sf::Texture tileset;
tileset.loadFromFile("assets\\platform\\tiles and background_foreground (new)\\tileset.png");
tileset.setRepeated(true);
sf::VertexArray grass(sf::Quads, 4);
grass[0].position = sf::Vector2f(0, 500);
grass[1].position = sf::Vector2f(1024, 500);
grass[2].position = sf::Vector2f(1024, 720);
grass[3].position = sf::Vector2f(0, 720);
grass[0].texCoords = sf::Vector2f(16, 0);
grass[1].texCoords = sf::Vector2f(32, 0);
grass[2].texCoords = sf::Vector2f(32, 16);
grass[3].texCoords = sf::Vector2f(16, 16);