Associate a sf::Texture and a sf::VertexArray to each tileset. Then for every tile, add a quad to the vertex array that matches the tileset. That's it.
I still fail to see how this could be done in one draw call to render the entire map to the screen.
Example:
Mapdata from file contains tileIDs (seperated by spaces): "1 50 51 100 101 200"
1 = first tile in first tileset.
50 = last tile in first tileset.
51 = first tile in second tileset.
100 = last tile in second tileset.
etc.
I could add quads to the VertexArray containing all tile coordinates of the textures. No problem, these are just vertices that have nothing to do with the actual texture until you decide to render it?
But my problem is that I need an alternative way to draw the entire map with one window.draw call like its supposed to with one tileset texture but instead with multiple. But as stated before this is not possible with multiple textures:
window.draw(VertexArray, &vTilesetTextures[0]);// <- Here one texture. (vTilesetTextures = std::vector<sf::Texture>)