Nop. Read the description of the viewport again.
Yep. sorry
And yes, as long as we don't know what you want to do, we can't tell you if this code does it well or not
I'm basically interested in how other (most) games handle the change in resolution. Say, the native resolution of my application is 1024x768. The user then, during run-time, changes the resolution to, say, 1920x1080.
Would I just resize the view, and be done with it ?
sf::View view = window.getDefaultView();
view.setSize(event.size.width, event.size.height);
window.setView(view);
But then my 20x20 rectangle would get stretched, and it won't appear to be a square. That's what I'm confused about. Or is it perfectly okay, and that's just how things work?