Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MrMisterson

Pages: [1]
1
Yes I see *Cartman voice*

It's a bit hard to tell exactly what's going without seeing the whole code or knowing which parts are the provided library. Also, I've only been using SFML for a few months and I haven't delved too deep into the realm of dealing with different video resolutions yet.

However I noticed in your first post the window size is 1280 x 720 while the View size is 1920 x 1080. I would try keeping the View size the same as the window size.

So in a pure SFML environment it might look something like:

sf::RenderWindow window;
sf::View view;

window.create(
  sf::VideoMode(1920, 1080),
  "Game Name",
  sf::Style::Fullscreen
);
// As far as I can tell, the initial size for video mode above kind of doesnt matter if youre doing Style::Fullscreen or Style::Default because the window will be automatically resized based on the operating system environment.

sf::Vector2u windowSize = window.getSize(); // Get the actual size of the window now that it exists.

view.setSize(windowSize.x, windowSize.y);
 

And then maybe even have it readjust every time the window resizes. So somewhere inside the game loop you would have:
sf::Event event;
while (window.pollEvent(event)) {
  if (event.type == sf::Event::Resized)
    view.setSize(event.size.width, event.size.height);
}
 

Somehow I doubt this solves everything, but maybe it might help reveal the ultimate solution.

2
Do you setCenter for the View?

Something like:
view.setCenter(resolution.x/2.f, resolution.y/2.f);
 

Pages: [1]