This isn't necessarily a problem with SFML, but more a request for help. what I'm trying to do is create a 352x352 pixel view inside of a 640x480 window in the top left corner that can scroll separately from the main window.
The obvious solution to me would be to use an sf::View, but I don't understand views at all. What exactly are the "Center" and "Half Width" parameters? I assumed they were the position of the "window" into whatever I'm drawing after the view is set, so I did something like this:
View LevelView(Vector2f(176,176), Vector2f(176, 176));
while (SFMLApp.IsOpened()) {
//Process events
while (SFMLApp.GetEvent(input)) {
//(...)
}
SFMLApp.SetView(LevelView);
SFMLApp.Draw(testlevel);
SFMLApp.Draw(Player);
SFMLApp.SetView(SFMLApp.GetDefaultView());
}
Instead what I get is this:
As you can see, the content of the view is stretched in strange ways. I read the View tutorial a few times, read the source for it a few times, and as far as I can tell there's no way to make a view that only takes up part of the screen. Is that true? Are views incomplete or am I misunderstanding their purpose? :?