How are you drawing that? VertexArrays? Sprites? Something else?
VertexArray. Also we tried setSmooth() but it doesn't help much. It still keeps some very ugly distorsion, it just messes it up even more.
void MapLayer::ConstructMap()
{
mapVertices.clear();
int index = 0;
int index_y = 0;
for(auto&& i : tileData)
{
for(auto&& j : i)
{
//====================================================================\\
// Figure showing the quad order. Important. \\
//====================================================================\\
// (up_l_point) (up_r_point) | \\
// +-----------+ | (1) (2) \\
// | | | +----+ \\
// | | | | | \\
// | | | +----+ \\
// | | | (4) (3) \\
// +-----------+ | \\
// (down_l_point) (down_r_point) | Order of the points \\
//====================================================================\\
// Declare 4 points of the quad
sf::Vertex up_l_point;
sf::Vertex up_r_point;
sf::Vertex down_r_point;
sf::Vertex down_l_point;
// Set their positions
up_l_point.position = sf::Vector2f((float)(index*tile_size), (float)(index_y*tile_size));
up_r_point.position = sf::Vector2f((float)(index*tile_size + tile_size), (float)(index_y*tile_size));
down_r_point.position = sf::Vector2f((float)(index*tile_size + tile_size), (float)(index_y*tile_size + tile_size));
down_l_point.position = sf::Vector2f((float)(index*tile_size), (float)(index_y*tile_size + tile_size));
// Set their texture bounding box
up_l_point.texCoords = sf::Vector2f((j%tiles_per_row) * tile_size +0.5f, (j/tiles_per_row) * tile_size +0.5f);
up_r_point.texCoords = sf::Vector2f((j%tiles_per_row * tile_size) + tile_size-0.5f, (j/tiles_per_row) * tile_size+0.5f);
down_r_point.texCoords = sf::Vector2f((j%tiles_per_row) * tile_size + tile_size-0.5f, (j/tiles_per_row * tile_size) + tile_size-0.5f);
down_l_point.texCoords = sf::Vector2f((j%tiles_per_row) * tile_size +0.5f, (j/tiles_per_row * tile_size) + tile_size-0.5f);
mapVertices.append(up_l_point);
mapVertices.append(up_r_point);
mapVertices.append(down_r_point);
mapVertices.append(down_l_point);
index++;
}
index = 0;
index_y++;
}
}