Great!
for (int i = 0; i < 2; ++i)
for (int j = 0; j < 2; ++j)
{
tileMap.append(sf::Vertex(sf::Vector2f(i * TILES_SIZE, j * TILES_SIZE), sf::Vector2f(0, 0)));
tileMap.append(sf::Vertex(sf::Vector2f((i + 1) * TILES_SIZE, j * TILES_SIZE), sf::Vector2f(TILES_SIZE, 0)));
tileMap.append(sf::Vertex(sf::Vector2f((i + 1) * TILES_SIZE, (j + 1) * TILES_SIZE), sf::Vector2f(TILES_SIZE, TILES_SIZE)));
tileMap.append(sf::Vertex(sf::Vector2f(i * TILES_SIZE, (j + 1) * TILES_SIZE), sf::Vector2f(0,TILES_SIZE)));
}
With this code i get the tile repeated 4 times!
Now lets make it more difficult...
To draw 2 different tile inside a tileMap, have I to create different VertexArray for each tile?
Example:
I've a map like this:
0 1 0
1 0 1
0 1 0
Where 0 is tileTest.png and 1 is anothe tile image.
Have i to create 2 VertexArray wich one store the 0s quad's coordinates and the other store for 1, then to draw them use something like this:
window.draw(zeroVertexArray,&tileTest);
windows.draw(oneVertexArray,&otherTileTexture);
So finally to draw n tile in tile map the fastest way is to work with std::vector<VertexArray>, isn't it?
PS: Sorry for bad english XD