My windows is 1300x690. When the view is default my "map" renders properly:
http://postimg.org/image/lryrfrhlh/full/Now I want using view place my map at position (400, 0) with size (900 x 690).
So I use:
sf::View view = window.getView();
view.setViewport(sf::FloatRect(400.f/1300.f, 0, 900.f/1300.f, 1));
view.setSize(900, 690);
window.setView(view);
Now the map rendering position is moved by a few tiles (look there are no green tiles on the left):
http://postimg.org/image/s6xscfob9/Is it something wrong here or it is how view works? If so, how can I use viewport without changing the rendering position of things?
After applying viewport at (400, 0), I want (0, 0) position when rendering be at (400, 0)... It seems quite logic to me. But it is at about (335, 0) or so, I don't understand it really.