Ok i'm testing for chunks, but i get some errors.
I put in my TileMap class a
std::vector<sf::VertexArray> mapChunks
For my test i want to draw only a 2x2 section of my map that start from (0, 0) coordinates.
So i build a function that store in a vertexarray the right vertex and then store the vertexarray inside the vector.
Then i call draw
window.draw(mapChunks[0],&tilesTexture);
It draws nothing
I used the same algorith to build and draw the normal huge map (it draws well), but this tme it wil lbe limited only to a 2x2 matrix.
I checked memory with debugging and vertexarray inside the vector has the same vertexs of normal big map vertexarray.
Why it doesn't draw my small tilemap? What is my mistake?
EDIT: Error found, i forgot to set primitive type xD Now it draws well 2x2 map