Hey folks,
So I have been starting to work on my game's camera and I have a few questions about the working of views. More specifically, what is Viewport? It's a rectangle of some sort but I can't figure what it does, it only always seems start at 0, 0 and be of size 1, 1. Some example code:
RenderWindow app = new RenderWindow(new VideoMode(800, 600), "Test");
Console.WriteLine(app.DefaultView.Viewport);
//Outputs [FloatRect] Left(0) Top(0) Right(1) Bottom(1)
View camera = new View(new Vector2(0, 0), new Vector2(app.Width, app.Height));
Console.WriteLine(camera.Viewport);
//Outputs [FloatRect] Left(0) Top(0) Right(1) Bottom(1)
Perhaps I don't understand this both in cases I would expect it to look like:
[FloatRect] Left(0) Top(0) Right (800) Bottom(600)
I found that RenderWindow.GetViewport seems to be what I am looking for, as passing it my view returns the expected Rectangle. However, why does this one return an IntRect and the other ones FloatRect's?
Thanks.