In my game I have a grid which is drawn like this:
void LevelEditor::drawGrid(sf::RenderTarget& target) const
{
const auto viewRect = sfe::getViewRect(target.getView());
const auto viewSize = mh::getSize(viewRect);
if (viewSize.x < 8000.f && viewSize.y < 8000.f) {
const auto tileWorldSize = static_cast<float>(Tile::Size);
sf::RenderStates renderStates;
renderStates.transform.translate(mh::floor(mh::getTopLeftCorner(viewRect) / tileWorldSize) * tileWorldSize);
target.draw(gridVertexArray, renderStates);
}
}
gridVertexArray is a grid of 500x500 cells. Should be the same with "pluses"
(obviously, there's quite a few helper functions there, but it's easy to guess what they do)